diff --git a/build/basic.js b/build/basic.js index ed1ef24..9477765 100644 --- a/build/basic.js +++ b/build/basic.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:l}=Math;function h(t){return-1===l(t)}function p(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const y=Array.isArray;const d=Reflect.construct;function m(t,n=[],e){const r=y(n)?n:[n];return e?d(t,r,e):d(t,r)}function A(t){return y(t)&&t||i(t)&&[t]||[]}function b(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=m(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function O(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function I(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function M(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function E(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const S=/\.|\[/,x=/]/g,R="";function N(t){return t.replace(x,R).split(S)}function T(t,n){if(!n)return!1;let e=n;return M(y(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function U(t){if(t)return B(t)}const P=Object.hasOwn;function k(t,...n){if(t)return M(n,(n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}}))}function $(t,n){return t?.constructor===n||!1}function D(t){return n=>$(n,t)}function L(t){return t?.constructor?.name}function q(t){return n=>L(n)===t||!1}function V(t){return function(n,...e){return e?t(n)&&M(e,t):t(n)}}const Z=q("Buffer"),K=V(Z),z=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),_=(t,n)=>{if(t===n)return!0;if(K(t))return t.equals(n);if(t.toString()===n.toString())if(z(t)){const e=U(t);if(k(n,e))return M(e,(e=>_(t[e],n[e])))}else if(y(t)&&t.length===n.length)return M(t,((t,e)=>_(t,n[e])));return!1};const W=Math.max;function G(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function J(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function H(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,ft=q("Number"),lt=V(ft);const ht=D(String);const pt=Object.assign;function gt(t,n){if(z(n))pt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:pt(t,n)}else(ht(n)||lt(n))&&(t[n]=n);return t}function yt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function bt(t,n="id",e){return t.sort(((t,r)=>At(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:G(n,(n=>t[n]))}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Mt(t){return n=>!!i(n)&&t.test(n)}const jt=Mt(/\.css$/),Ft=Mt(/\.html$/),Et=Mt(/\.js$/),St=Mt(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=U(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Rt(t,n,e,r){if(!t)return;const o=U(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Tt=V(Nt);function Bt(t,n){if(Tt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Ut=q("GeneratorFunction"),Pt=V(Ut);async function kt(t,n,e){if(Tt(t)){for(const e of t)await n(e,t);return t}if(Pt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const $t=q("AsyncFunction"),Dt=V($t);function Lt(t,n,e,r,o,c){return(s,u,a,f,l)=>{let h;const p=Dt(u);if(i(s)&&u)return h=y(s)?p?n:t:z(s)||at(s)?p?r:e:o?p?c:o:Pt(s)?c:p?r:e,h(s,u,a,f,l)}}const qt=Lt(s,a,Rt,xt,Bt,kt);class Vt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Zt(){}function Kt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const _t=m(zt);function Wt(t,n){return _t.set(t,n)}const Gt=Reflect.apply;function Jt(t,n,e){if(at(t))return Gt(t,n,e)}function Ht(t){return t?.constructor}function Qt(t,n=[]){const e=Ht(t);return e===Function&&"function"===e.name?function(){}:m(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Rt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Rt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Lt(G,J,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return j(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return M(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(y(t)||Tt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if(Pt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(y(t)||Tt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Lt(M,j,on,rn,cn,sn);const an=Function.prototype;function fn(t){return an.call.bind(t)}const ln=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,pn=Object.defineProperty,gn=fn(Object.hasOwnProperty),yn=Object.is;const{random:dn}=Math;const{sign:mn}=Math;function An(t){return 0===t}const bn=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Rt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Rt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function On(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const In=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Mn(t){return t.replace(In,"\\$&")}function jn(t,n){return n?jn(G(t,Mn)):RegExp(t.join("|"))}const Fn=q("RegExp"),En=V(Fn);function Sn(t){if(!t)return;if(z(t))return U(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:U(t).length}const xn=/[ _-]+/g;const Rn=/[ _-]+/g,Nn=/[ ]+/g;const Tn=/[ _-]+/g,Bn=/[ ]+/g;const Un=/[ _-]+/g;const Pn=/[ _-]+/g;function kn(t,n=1){return t.substring(n)}const $n=/%(?![\da-f]{2})/gi,Dn=/&/g,Ln=//g,Vn=/"/g;function Zn(t){return decodeURIComponent(t.replace($n,(()=>"%25")))}function Kn(t){return t.replace(Dn,"&").replace(Ln,"<").replace(qn,">").replace(Vn,""")}const zn=/\S+/g,_n=/\w+/g;const Wn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+kn(t)}function Hn(t){return Gn(t)+kn(t).toLowerCase()}function Qn(t){return Ht(t)?.name}const Xn=q("Map"),Yn=V(Xn),te=/Array/,ne="Array";function ee(t){if(t){const n=Qn(t);if(te.test(n)&&n!==ne)return!0}return!1}function re(t){return!i(t)}const oe=q("BigInt"),ie=V(oe),ce=q("Boolean"),se=V(ce),ue=q("ArrayBuffer"),ae=V(ue);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const le=q("Date"),he=V(le);function pe(t){return!1===t}const ge=q("Float32Array"),ye=V(ge),de=q("Float64Array"),me=V(de),{isInteger:Ae}=Number,be=Ae,we=q("Int16Array"),ve=V(we),Ce=q("Int32Array"),Oe=V(Ce),Ie=q("Int8Array"),Me=V(Ie);function je(t){return!!t&&t instanceof Promise}function Fe(t){return!!t&&(je(t)||Dt(t)||Pt(t))}const{isSafeInteger:Ee}=Number,Se=Ee;const xe=q("Uint16Array"),Re=V(xe),Ne=q("Uint32Array"),Te=V(Ne),Be=q("Uint8Array"),Ue=V(Be),Pe=q("Uint8ClampedArray"),ke=V(Pe),$e=q("WeakMap"),De=V($e),Le=void 0!==globalThis.Deno,qe=void 0!==globalThis.process&&process.versions&&process.versions.node;function Ve(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(_(t,n))}const Ke=JSON;const ze=Ke.stringify;function _e(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${ze(t)}\n\t\tExpected: ${ze(n)}`,r)}async function We(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||_e(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function He(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Qe=Lt(u,f,vn,wn,He,Je);function Xe(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function Ye(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const tr=Lt(F,E,Cn,On,Xe,Ye);function nr(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const er=nr(s),rr=nr(O);function or(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ir=or(a),cr=or(I);const sr=Mt(/\./);class ur{list=m(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ar=m(ur);class fr{static models=new Map;constructor(t,n){i(n)?(yt(this,n),this.modelName=t,fr.models.set(t,n)):yt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}class lr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Rt(t,(n=>{t[n]=new lr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new lr(e),!0)})}}class hr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const pr=m(hr);class gr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=Vt,t.Intervals=ur,t.Model=fr,t.Store=lr,t.Timers=zt,t.UniqID=hr,t.VirtualStorage=gr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Jt,t.arrayToRegex=jn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Fe(t)||Fe(n)?We(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||_e(t,n,e)},t.assertAsync=We,t.assign=yt,t.assignToClass=dt,t.assignToObject=gt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?yt(e,r):r},t.cacheNativeMethod=fn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(xn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return m(Vt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(K(t))return ut(t);if(y(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Kt(setTimeout(Zt,0),(t=>{ar.remove(t)}))},t.clearTimers=function(){Kt(setTimeout(Zt,0),(t=>{_t.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.compact=function(t){if(z(t)){const n=U(t),e=n.length,r={};for(let o=0;oVe(t)))},t.compactKeys=function(t){const n=[];return Rt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Qe,t.compactMapArray=u,t.compactMapAsyncArray=f,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&_t.remove(e.id),e.id=Wt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(_t.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=pn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Rt,t.eachRight=O,t.eachRightAsync=I,t.ensureArray=A,t.ensureBuffer=function(t){return K(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=An,t.escapeRegex=Mn,t.escapeRegexRegex=In,t.every=un,t.everyArg=function(...t){return Dt(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=M,t.everyAsyncArray=j,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rmt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=mt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>mt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e},t.flattenDeep=b,t.flow=er,t.flowAsync=ir,t.flowAsyncRight=cr,t.flowRight=rr,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=He,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Xe,t.forOfFilterAsync=Ye,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Lt,t.get=T,t.getEntries=function(t){if(i(t))return bn(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return bt(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return M(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=ln,t.getType=Ht,t.getTypeName=Qn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!re(n)&&!re(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):En(e)?e.test(n):at(e)?e(n):y(e)?M(e,(e=>t(n,e))):un(e,(e=>t(n,e))):y(n)?En(e)?M(n,(t=>t.test(e))):at(e)?M(n,e):y(e)?M(e,(e=>t(n,e))):n.includes(e,r):!!z(n)&&(En(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):z(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}})))},t.hasDot=sr,t.hasKeys=k,t.hasLength=r,t.hasProp=gn,t.hasValue=i,t.htmlEntities=Kn,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Jt(n,e,r):n(...r);if(z(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(M(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return ar.set(t,n)},t.intervals=ar,t.invert=function(t,n={}){if(t)return Rt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return J(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=y,t.isArrayBuffer=ae,t.isArrayBufferCall=ue,t.isArrayLike=function(t,n){if(re(t)||at(t))return!1;if(y(t)||ee(t))return!0;const e=t.length;if(!re(e)||!lt(e)||e<0)return!1;if(n){const n=U(t);return!!n&&un(n,((t,n)=>n>=0&<(n)))}return!0},t.isAsync=Dt,t.isAsyncCall=$t,t.isBigInt=ie,t.isBigIntCall=oe,t.isBoolean=se,t.isBooleanCall=ce,t.isBuffer=K,t.isBufferCall=Z,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=$,t.isConstructorFactory=D,t.isConstructorNameFactory=q,t.isDate=he,t.isDateCall=le,t.isDeno=Le,t.isEmpty=function(t){return ht(t)||y(t)?!r(t):z(t)?!Sn(t):!i(t)},t.isEqual=_,t.isF32=ye,t.isF32Call=ge,t.isF64=me,t.isF64Call=de,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=jt,t.isFileHTML=Ft,t.isFileJS=Et,t.isFileJSON=St,t.isFloat=be,t.isFunction=at,t.isGenerator=Pt,t.isGeneratorCall=Ut,t.isI16=ve,t.isI16Call=we,t.isI32=Oe,t.isI32Call=Ce,t.isI8=Me,t.isI8Call=Ie,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Fe,t.isMap=Yn,t.isMapCall=Xn,t.isMatchArray=function(t,n){return t.length===n.length&&M(t,((t,e)=>_(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=U(t),r=U(n);return e.length===r.length&&M(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodejs=qe,t.isNotArray=function(t){return!y(t)},t.isNotNumber=function(t){return!lt(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=lt,t.isNumberCall=ft,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=z,t.isPositive=function(t){return 1===mn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=je,t.isRegex=En,t.isRegexCall=Fn,t.isRelated=function(t,n){return!re(t)&&!re(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Se,t.isSame=yn,t.isSameType=function(t,n){const e=Ht(t),r=Ht(n);return e===r&&e.name===r.name},t.isSet=Tt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=Ve,t.isTypeFactory=V,t.isTypedArray=ee,t.isU16=Re,t.isU16Call=xe,t.isU32=Te,t.isU32Call=Ne,t.isU8=Ue,t.isU8C=ke,t.isU8CCall=Pe,t.isU8Call=Be,t.isUndefined=e,t.isWeakMap=De,t.isWeakMapCall=$e,t.isZero=An,t.jsonParse=function(t,n){if(t)return Ke.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Rn," ").trim().toLowerCase().replace(Nn,"-")},t.keys=U,t.largest=function(t){return W(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase()},t.map=en,t.mapArray=G,t.mapAsyncArray=J,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(z(e)||y(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?m(fr,[t,n]):T(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=re,t.noop=Zt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=pt,t.objectEntries=bn,t.objectSize=Sn,t.omit=function(t,n){if(!t)return{};if(y(n)){const e=jn(n);return Cn(t,((t,n)=>!e.test(n)))}if(En(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(lt(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):pt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return G(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=U(t))=>M(e,(e=>_(t[e],n[e]))),t.randomFloat=function(t,n=0){return dn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Mt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cOt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=bt,t.sortCollectionDescendingFilter=At,t.sortNumberAscending=function(t){return t.sort(H)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=Ot,t.sortObjectsAlphabeticallyReverse=It,t.sortUnique=ct,t.stringify=ze,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=H,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Wt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{_t.remove(e.id),e.id=!1},e},t.timer=Wt,t.timers=_t,t.times=Kt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Rt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(b(t))},t.uniqID=pr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Hn,t.upperFirstOnlyAll=function(t){return t.replace(Wn,(t=>Hn(t)))},t.virtualStorage=function(t){return new gr(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(_n)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=m(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e}})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:l}=Math;function h(t){return-1===l(t)}function p(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const y=Array.isArray;const d=Reflect.construct;function m(t,n=[],e){const r=y(n)?n:[n];return e?d(t,r,e):d(t,r)}function A(t){return y(t)&&t||i(t)&&[t]||[]}function b(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=m(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function O(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function I(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function M(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function E(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const S=/\.|\[/,x=/]/g,R="";function N(t){return t.replace(x,R).split(S)}function T(t,n){if(!n)return!1;let e=n;return M(y(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function U(t){if(t)return B(t)}const P=Object.hasOwn;function k(t,...n){if(t)return M(n,(n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}}))}function $(t,n){return t?.constructor===n||!1}function D(t){return n=>$(n,t)}function L(t){return t?.constructor?.name}function q(t){return n=>L(n)===t||!1}function V(t){return function(n,...e){return e?t(n)&&M(e,t):t(n)}}const Z=q("Buffer"),K=V(Z),z=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),_=(t,n)=>{if(t===n)return!0;if(K(t))return t.equals(n);if(t.toString()===n.toString())if(z(t)){const e=U(t);if(k(n,e))return M(e,(e=>_(t[e],n[e])))}else if(y(t)&&t.length===n.length)return M(t,((t,e)=>_(t,n[e])));return!1};const W=Math.max;function G(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function J(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function H(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,ft=q("Number"),lt=V(ft);const ht=D(String);const pt=Object.assign;function gt(t,n){if(z(n))pt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:pt(t,n)}else(ht(n)||lt(n))&&(t[n]=n);return t}function yt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function bt(t,n="id",e){return t.sort(((t,r)=>At(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:G(n,(n=>t[n]))}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Mt(t){return n=>!!i(n)&&t.test(n)}const jt=Mt(/\.css$/),Ft=Mt(/\.html$/),Et=Mt(/\.js$/),St=Mt(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=U(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Rt(t,n,e,r){if(!t)return;const o=U(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Tt=V(Nt);function Bt(t,n){if(Tt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Ut=q("GeneratorFunction"),Pt=V(Ut);async function kt(t,n,e){if(Tt(t)){for(const e of t)await n(e,t);return t}if(Pt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const $t=q("AsyncFunction"),Dt=V($t);function Lt(t,n,e,r,o,c){return(s,u,a,f,l)=>{let h;const p=Dt(u);if(i(s)&&u)return h=y(s)?p?n:t:z(s)||at(s)?p?r:e:o?p?c:o:Pt(s)?c:p?r:e,h(s,u,a,f,l)}}const qt=Lt(s,a,Rt,xt,Bt,kt);class Vt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Zt(){}function Kt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const _t=m(zt);function Wt(t,n){return _t.set(t,n)}const Gt=Reflect.apply;function Jt(t,n,e){if(at(t))return Gt(t,n,e)}function Ht(t){return t?.constructor}function Qt(t,n=[]){const e=Ht(t);return e===Function&&"function"===e.name?function(){}:m(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Rt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Rt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Lt(G,J,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return j(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return M(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(y(t)||Tt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if(Pt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(y(t)||Tt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Lt(M,j,on,rn,cn,sn);const an=Function.prototype;function fn(t){return an.call.bind(t)}const ln=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,pn=Object.defineProperty,gn=fn(Object.hasOwnProperty),yn=Object.is;const{random:dn}=Math;const{sign:mn}=Math;function An(t){return 0===t}const bn=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Rt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Rt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function On(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const In=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Mn(t){return t.replace(In,"\\$&")}function jn(t,n){return n?jn(G(t,Mn)):RegExp(t.join("|"))}const Fn=q("RegExp"),En=V(Fn);function Sn(t){if(!t)return;if(z(t))return U(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:U(t).length}const xn=/[ _-]+/g;const Rn=/[ _-]+/g,Nn=/[ ]+/g;const Tn=/[ _-]+/g,Bn=/[ ]+/g;const Un=/[ _-]+/g;const Pn=/[ _-]+/g;function kn(t,n=1){return t.substring(n)}const $n=/%(?![\da-f]{2})/gi,Dn=/&/g,Ln=//g,Vn=/"/g;function Zn(t){return decodeURIComponent(t.replace($n,(()=>"%25")))}function Kn(t){return t.replace(Dn,"&").replace(Ln,"<").replace(qn,">").replace(Vn,""")}const zn=/\S+/g,_n=/\w+/g;const Wn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+kn(t)}function Hn(t){return Gn(t)+kn(t).toLowerCase()}function Qn(t){return Ht(t)?.name}const Xn=q("Map"),Yn=V(Xn),te=/Array/,ne="Array";function ee(t){if(t){const n=Qn(t);if(te.test(n)&&n!==ne)return!0}return!1}function re(t){return!i(t)}const oe=q("BigInt"),ie=V(oe),ce=q("Boolean"),se=V(ce),ue=q("ArrayBuffer"),ae=V(ue);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const le=q("Date"),he=V(le);function pe(t){return!1===t}const ge=q("Float32Array"),ye=V(ge),de=q("Float64Array"),me=V(de),{isInteger:Ae}=Number,be=Ae,we=q("Int16Array"),ve=V(we),Ce=q("Int32Array"),Oe=V(Ce),Ie=q("Int8Array"),Me=V(Ie);function je(t){return!!t&&t instanceof Promise}function Fe(t){return!!t&&(je(t)||Dt(t)||Pt(t))}const{isSafeInteger:Ee}=Number,Se=Ee;const xe=q("Uint16Array"),Re=V(xe),Ne=q("Uint32Array"),Te=V(Ne),Be=q("Uint8Array"),Ue=V(Be),Pe=q("Uint8ClampedArray"),ke=V(Pe),$e=q("WeakMap"),De=V($e),Le=void 0!==globalThis.Deno,qe=void 0!==globalThis.process&&process.versions&&process.versions.node;function Ve(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(_(t,n))}const Ke=JSON;const ze=Ke.stringify;function _e(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${ze(t)}\n\t\tExpected: ${ze(n)}`,r)}async function We(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||_e(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function He(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Qe=Lt(u,f,vn,wn,He,Je);function Xe(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function Ye(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const tr=Lt(F,E,Cn,On,Xe,Ye);function nr(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const er=nr(s),rr=nr(O);function or(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ir=or(a),cr=or(I);const sr=Mt(/\./);class ur{list=m(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ar=m(ur);class fr{static models=new Map;constructor(t,n){i(n)?(yt(this,n),this.modelName=t,fr.models.set(t,n)):yt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}class lr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Rt(t,(n=>{t[n]=new lr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new lr(e),!0)})}}class hr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const pr=m(hr);class gr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=Vt,t.Intervals=ur,t.Model=fr,t.Store=lr,t.Timers=zt,t.UniqID=hr,t.VirtualStorage=gr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Jt,t.arrayToRegex=jn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Fe(t)||Fe(n)?We(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||_e(t,n,e)},t.assertAsync=We,t.assign=yt,t.assignToClass=dt,t.assignToObject=gt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?yt(e,r):r},t.cacheNativeMethod=fn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(xn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return m(Vt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(K(t))return ut(t);if(y(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Kt(setTimeout(Zt,0),(t=>{ar.remove(t)}))},t.clearTimers=function(){Kt(setTimeout(Zt,0),(t=>{_t.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.compact=function(t){if(z(t)){const n=U(t),e=n.length,r={};for(let o=0;oVe(t)))},t.compactKeys=function(t){const n=[];return Rt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Qe,t.compactMapArray=u,t.compactMapAsyncArray=f,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&_t.remove(e.id),e.id=Wt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(_t.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=pn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Rt,t.eachRight=O,t.eachRightAsync=I,t.ensureArray=A,t.ensureBuffer=function(t){return K(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=An,t.escapeRegex=Mn,t.escapeRegexRegex=In,t.every=un,t.everyArg=function(...t){return Dt(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=M,t.everyAsyncArray=j,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rmt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=mt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>mt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e},t.flattenDeep=b,t.flow=er,t.flowAsync=ir,t.flowAsyncRight=cr,t.flowRight=rr,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=He,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Xe,t.forOfFilterAsync=Ye,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Lt,t.get=T,t.getEntries=function(t){if(i(t))return bn(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return bt(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return M(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=ln,t.getType=Ht,t.getTypeName=Qn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!re(n)&&!re(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):En(e)?e.test(n):at(e)?e(n):y(e)?M(e,(e=>t(n,e))):un(e,(e=>t(n,e))):y(n)?En(e)?M(n,(t=>t.test(e))):at(e)?M(n,e):y(e)?M(e,(e=>t(n,e))):n.includes(e,r):!!z(n)&&(En(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):z(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}})))},t.hasDot=sr,t.hasKeys=k,t.hasLength=r,t.hasProp=gn,t.hasValue=i,t.htmlEntities=Kn,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Jt(n,e,r):n(...r);if(z(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(M(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return ar.set(t,n)},t.intervals=ar,t.invert=function(t,n={}){if(t)return Rt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return J(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=y,t.isArrayBuffer=ae,t.isArrayBufferCall=ue,t.isArrayLike=function(t,n){if(re(t)||at(t))return!1;if(y(t)||ee(t))return!0;const e=t.length;if(!re(e)||!lt(e)||e<0)return!1;if(n){const n=U(t);return!!n&&un(n,((t,n)=>n>=0&<(n)))}return!0},t.isAsync=Dt,t.isAsyncCall=$t,t.isBigInt=ie,t.isBigIntCall=oe,t.isBoolean=se,t.isBooleanCall=ce,t.isBuffer=K,t.isBufferCall=Z,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=$,t.isConstructorFactory=D,t.isConstructorNameFactory=q,t.isDate=he,t.isDateCall=le,t.isDeno=Le,t.isEmpty=function(t){return ht(t)||y(t)?!r(t):z(t)?!Sn(t):!i(t)},t.isEqual=_,t.isEven=function(t){return!(1&t)},t.isF32=ye,t.isF32Call=ge,t.isF64=me,t.isF64Call=de,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=jt,t.isFileHTML=Ft,t.isFileJS=Et,t.isFileJSON=St,t.isFloat=be,t.isFunction=at,t.isGenerator=Pt,t.isGeneratorCall=Ut,t.isI16=ve,t.isI16Call=we,t.isI32=Oe,t.isI32Call=Ce,t.isI8=Me,t.isI8Call=Ie,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Fe,t.isMap=Yn,t.isMapCall=Xn,t.isMatchArray=function(t,n){return t.length===n.length&&M(t,((t,e)=>_(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=U(t),r=U(n);return e.length===r.length&&M(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodejs=qe,t.isNotArray=function(t){return!y(t)},t.isNotNumber=function(t){return!lt(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=lt,t.isNumberCall=ft,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=z,t.isPositive=function(t){return 1===mn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=je,t.isRegex=En,t.isRegexCall=Fn,t.isRelated=function(t,n){return!re(t)&&!re(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Se,t.isSame=yn,t.isSameType=function(t,n){const e=Ht(t),r=Ht(n);return e===r&&e.name===r.name},t.isSet=Tt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=Ve,t.isTypeFactory=V,t.isTypedArray=ee,t.isU16=Re,t.isU16Call=xe,t.isU32=Te,t.isU32Call=Ne,t.isU8=Ue,t.isU8C=ke,t.isU8CCall=Pe,t.isU8Call=Be,t.isUndefined=e,t.isWeakMap=De,t.isWeakMapCall=$e,t.isZero=An,t.jsonParse=function(t,n){if(t)return Ke.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Rn," ").trim().toLowerCase().replace(Nn,"-")},t.keys=U,t.largest=function(t){return W(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase()},t.map=en,t.mapArray=G,t.mapAsyncArray=J,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(z(e)||y(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?m(fr,[t,n]):T(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=re,t.noop=Zt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=pt,t.objectEntries=bn,t.objectSize=Sn,t.omit=function(t,n){if(!t)return{};if(y(n)){const e=jn(n);return Cn(t,((t,n)=>!e.test(n)))}if(En(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(lt(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):pt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return G(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=U(t))=>M(e,(e=>_(t[e],n[e]))),t.randomFloat=function(t,n=0){return dn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Mt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cOt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=bt,t.sortCollectionDescendingFilter=At,t.sortNumberAscending=function(t){return t.sort(H)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=Ot,t.sortObjectsAlphabeticallyReverse=It,t.sortUnique=ct,t.stringify=ze,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=H,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Wt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{_t.remove(e.id),e.id=!1},e},t.timer=Wt,t.timers=_t,t.times=Kt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Rt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(b(t))},t.uniqID=pr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Hn,t.upperFirstOnlyAll=function(t){return t.replace(Wn,(t=>Hn(t)))},t.virtualStorage=function(t){return new gr(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(_n)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=m(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e}})); //# sourceMappingURL=basic.js.map diff --git a/build/basic.js.map b/build/basic.js.map index 78c8024..febaa0a 100644 --- a/build/basic.js.map +++ b/build/basic.js.map @@ -1 +1 @@ -{"version":3,"file":"basic.js","sources":["../source/arrays/clear.js","../source/types/isUndefined.js","../source/utilities/hasLength.js","../source/types/isNull.js","../source/types/hasValue.js","../source/utilities/returnValue.js","../source/arrays/each.js","../source/arrays/compactMap.js","../source/arrays/eachAsync.js","../source/arrays/compactMapAsync.js","../source/numbers/isNegative.js","../source/arrays/range.js","../source/types/isArray.js","../source/classes/construct.js","../source/arrays/ensure.js","../source/arrays/flattenDeep.js","../source/utilities/forEach.js","../source/arrays/difference.js","../source/arrays/drop.js","../source/arrays/eachRight.js","../source/arrays/eachRightAsync.js","../source/arrays/every.js","../source/arrays/everyAsync.js","../source/arrays/filter.js","../source/arrays/filterAsync.js","../source/utilities/toPath.js","../source/utilities/get.js","../source/objects/keys.js","../source/objects/hasKeys.js","../source/types/isConstructor.js","../source/types/isTypeFactory.js","../source/types/isBuffer.js","../source/types/isPlainObject.js","../source/utilities/isEqual.js","../source/arrays/largest.js","../source/arrays/map.js","../source/arrays/mapAsync.js","../source/math/subtract.js","../source/math/subtractReverse.js","../source/math/randomInt.js","../source/internal/array.js","../source/arrays/shuffle.js","../source/arrays/smallest.js","../source/arrays/unique.js","../source/buffers/clear.js","../source/types/isFunction.js","../source/types/isNumber.js","../source/types/isString.js","../source/objects/assign.js","../source/classes/extendClass.js","../source/collection/findIndexCache.js","../source/collection/sortCollectionDescending.js","../source/collection/sortCollectionAscending.js","../source/objects/pluckObject.js","../source/collection/sortCollectionAlphabetically.js","../source/collection/sortCollectionAlphabeticallyReverse.js","../source/internal/regexTestFactory.js","../source/files/isFileCSS.js","../source/files/isFileHTML.js","../source/files/isFileJS.js","../source/files/isFileJSON.js","../source/objects/eachAsync.js","../source/objects/each.js","../source/types/isSet.js","../source/utilities/forOf.js","../source/types/isGenerator.js","../source/utilities/forOfAsync.js","../source/types/isAsync.js","../source/utilities/generateLoop.js","../source/utilities/each.js","../source/functions/chain.js","../source/utilities/noop.js","../source/utilities/times.js","../source/utilities/timer.js","../source/internal/apply.js","../source/types/getType.js","../source/types/cloneType.js","../source/utilities/forOfMap.js","../source/utilities/forOfMapAsync.js","../source/objects/mapAsync.js","../source/objects/map.js","../source/utilities/map.js","../source/objects/everyAsync.js","../source/objects/every.js","../source/utilities/forOfEvery.js","../source/utilities/forOfEveryAsync.js","../source/utilities/every.js","../source/utilities/cacheNativeMethod.js","../source/internal/object.js","../source/internal/isSame.js","../source/math/randomFloat.js","../source/numbers/isPositive.js","../source/numbers/isZero.js","../source/objects/getEntries.js","../source/objects/compactMapAsync.js","../source/objects/compactMap.js","../source/objects/filter.js","../source/objects/filterAsync.js","../source/objects/isMatch.js","../source/regexps/escapeRegex.js","../source/regexps/arrayToRegex.js","../source/types/isRegex.js","../source/objects/size.js","../source/objects/zip.js","../source/strings/camelCase.js","../source/strings/kebabCase.js","../source/strings/snakeCase.js","../source/strings/upperCase.js","../source/strings/lowerCase.js","../source/strings/range.js","../source/strings/sanitize.js","../source/strings/tokenize.js","../source/strings/typography.js","../source/types/getTypeName.js","../source/types/isMap.js","../source/types/isTypedArray.js","../source/types/noValue.js","../source/types/isBigInt.js","../source/types/isBoolean.js","../source/types/isArrayBuffer.js","../source/types/isCloneable.js","../source/types/isDate.js","../source/types/isFalse.js","../source/types/isF32.js","../source/types/isF64.js","../source/types/isFloat.js","../source/types/isI16.js","../source/types/isI32.js","../source/types/isI8.js","../source/types/isPromise.js","../source/types/isKindAsync.js","../source/types/isSafeInt.js","../source/types/isU16.js","../source/types/isU32.js","../source/types/isU8.js","../source/types/isU8C.js","../source/types/isWeakMap.js","../source/types/isDeno.js","../source/types/isNode.js","../source/types/isTruthy.js","../source/utilities/notEqual.js","../source/utilities/json.js","../source/utilities/assert.js","../source/utilities/clone.js","../source/utilities/forOfCompactMapAsync.js","../source/utilities/forOfCompactMap.js","../source/utilities/compactMap.js","../source/utilities/forOfFilter.js","../source/utilities/forOfFilterAsync.js","../source/utilities/filter.js","../source/utilities/flow.js","../source/utilities/flowAsync.js","../source/utilities/hasDot.js","../source/utilities/interval.js","../source/utilities/model.js","../source/utilities/store.js","../source/utilities/uid.js","../source/utilities/virtualStorage.js","../source/math/add.js","../source/functions/after.js","../source/utilities/arraysToObject.js","../source/functions/ary.js","../source/functions/before.js","../source/utilities/bindAll.js","../source/math/progress.js","../source/arrays/chunk.js","../source/utilities/clear.js","../source/arrays/clone.js","../source/utilities/compact.js","../source/objects/compactKeys.js","../source/utilities/concurrent.js","../source/arrays/concurrentEach.js","../source/utilities/concurrentStatus.js","../source/collection/countBy.js","../source/collection/countKey.js","../source/collection/countWithoutKey.js","../source/functions/curry.js","../source/functions/curryRight.js","../source/functions/debounce.js","../source/math/deduct.js","../source/math/divide.js","../source/arrays/dropRight.js","../source/buffers/ensure.js","../source/utilities/everyArg.js","../source/collection/findIndex.js","../source/collection/findItem.js","../source/arrays/first.js","../source/arrays/flatten.js","../source/utilities/forEachAsync.js","../source/utilities/forMap.js","../source/files/getExtension.js","../source/files/getFilename.js","../source/collection/getHighest.js","../source/collection/getLowest.js","../source/arrays/getNumberInsertIndex.js","../source/collection/groupBy.js","../source/utilities/has.js","../source/functions/ifInvoke.js","../source/utilities/ifNotAssign.js","../source/utilities/ifValue.js","../source/utilities/inAsync.js","../source/utilities/inSync.js","../source/math/increment.js","../source/collection/indexBy.js","../source/arrays/initial.js","../source/arrays/intersect.js","../source/objects/invert.js","../source/arrays/invoke.js","../source/collection/invoke.js","../source/collection/invokeAsync.js","../source/types/isArguments.js","../source/types/isArrayLike.js","../source/types/isChild.js","../source/types/isEmpty.js","../source/types/isFalsy.js","../source/types/isIterable.js","../source/arrays/isMatch.js","../source/numbers/isNumberEqual.js","../source/numbers/isNumberInRange.js","../source/numbers/isNumberNotInRange.js","../source/types/isParent.js","../source/types/isPrimitive.js","../source/types/isRelated.js","../source/types/isSameType.js","../source/types/isTrue.js","../source/arrays/last.js","../source/arrays/mapRight.js","../source/arrays/mapWhile.js","../source/utilities/merge.js","../source/math/multiple.js","../source/functions/negate.js","../source/functions/nthArg.js","../source/objects/omit.js","../source/functions/once.js","../source/functions/over.js","../source/functions/overEvery.js","../source/utilities/pair.js","../source/arrays/partition.js","../source/objects/pick.js","../source/collection/pluck.js","../source/utilities/promise.js","../source/utilities/propertyMatch.js","../source/functions/rearged.js","../source/math/remainder.js","../source/arrays/remove.js","../source/strings/replace.js","../source/arrays/rest.js","../source/arrays/right.js","../source/arrays/sample.js","../source/utilities/setKey.js","../source/utilities/setValue.js","../source/arrays/sortNumberAscending.js","../source/arrays/sortNumberDescening.js","../source/utilities/stubArray.js","../source/utilities/stubFalse.js","../source/utilities/stubObject.js","../source/utilities/stubString.js","../source/utilities/stubTrue.js","../source/math/subtractAll.js","../source/math/sumAll.js","../source/arrays/take.js","../source/arrays/takeRight.js","../source/functions/throttle.js","../source/utilities/timesAsync.js","../source/utilities/toggle.js","../source/strings/truncate.js","../source/arrays/zip.js","../source/arrays/union.js","../source/arrays/untilFalse.js","../source/arrays/untilTrue.js","../source/arrays/whileCompactMap.js","../source/arrays/whileEach.js","../source/arrays/whileMap.js","../source/arrays/without.js","../source/functions/wrap.js","../source/arrays/xor.js"],"sourcesContent":["/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [key, value] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst zipedObject = {};\n\teachArray(properties, (item, key) => {\n\t\tzipedObject[item] = values[key];\n\t});\n\treturn zipedObject;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst unZippedKeys = [];\n\tconst values = [];\n\teachObject(object, (item, key) => {\n\t\tunZippedKeys.push(key);\n\t\tvalues.push(item);\n\t});\n\treturn [unZippedKeys, values];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(compactMapArray, compactMapAsyncArray,\n\tcompactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0;index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0;index < arrayLength;index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn (isEqual(on, value)) ? off : on;\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n"],"names":["clearArray","source","length","isUndefined","undefined","hasLength","Boolean","isNull","hasValue","returnValue","eachArray","iteratee","thisBind","additionalArg","arrayLength","index","call","compactMapArray","results","thisCall","item","arrayOriginal","returned","push","async","eachAsyncArray","compactMapAsyncArray","result","sign","Math","isNegative","rangeUp","start","end","step","sourceArray","position","rangeDown","isArray","Array","reflectConstruct","Reflect","construct","target","argumentsList","newTarget","args","ensureArray","flattenDeep","flat","Infinity","forEach","callback","difference","sources","differencesMap","Map","differences","currentArray","parentIndex","child","childIndex","childRoot","get","count","set","drop","array","amount","upTo","splice","eachRight","additionalArgument","eachRightAsync","everyArray","sourceLength","everyAsyncArray","filterArray","filterAsyncArray","regexToPath","regexCloseBracket","emptyString","toPath","replace","split","propertyString","link","objectKeys","Object","keys","hasOwn","hasKeys","properties","pathArray","lastPath","pop","initialPathObject","isConstructor","constructor","isConstructorFactory","constructorName","name","isConstructorNameFactory","isTypeFactory","method","primarySource","otherSources","isBufferCall","isBuffer","isPlainObject","toString","trim","slice","isEqual","equals","sourceProperties","key","mathNativeMax","max","mapArray","mapAsyncArray","subtract","minuend","subtrahend","subtractReverse","floor","random","randomInt","min","arrayFrom","from","toArray","arrayLike","mapFn","thisArg","shuffle","shuffleArray","value","mathNativeMin","onlyUnique","indexOf","sortUnique","unique","isSorted","filter","clearBuffer","fill","isFunction","Function","isNumberCall","isNumber","isString","String","objectAssign","assign","assignToObject","assignToClass","prototype","findIndexCache","element","indexMatch","propertyName","sortCollectionDescendingFilter","previous","next","ifMatch","previousKey","nextKey","sortCollectionDescending","collection","sort","sortCollectionAscendingFilter","sortCollectionAscending","pluckObject","targets","sortObjectsAlphabetically","localeCompare","sortObjectsAlphabeticallyReverse","regexTestFactory","regexType","test","isFileCSS","isFileHTML","isFileJS","isFileJSON","eachAsyncObject","propertyCount","eachObject","objectKeysArray","isSetCall","isSet","forOf","isGeneratorCall","isGenerator","forOfAsync","generatorArgs","isAsyncCall","isAsync","generateLoop","arrayLoop","arrayLoopAsync","objectLoop","objectLoopAsync","forOfLoop","forOfLoopAsync","argument1","argument2","argument3","isIterateeAsync","each","Chain","methods","this","addChainMethod","thisChain","methodName","setValue","done","noop","times","Timers","list","remove","id","clearTimeout","delete","has","callable","time","currentThis","setTimeout","clear","timers","timer","applyNative","apply","thisArgument","getType","cloneType","sourceType","forOfMap","resultsObject","methodPush","add","methodPushBound","bind","methodSet","forOfMapAsync","resultsGenerator","mapAsyncObject","thisObject","mapObject","original","map","everyAsyncObject","everyObject","forOfEvery","forOfEveryAsync","every","functionPrototype","cacheNativeMethod","getPropNames","getOwnPropertyNames","getPropDesc","getOwnPropertyDescriptor","defProp","defineProperty","hasProp","hasOwnProperty","isSame","is","isZero","objectEntries","entries","compactMapAsyncObject","compactMapObject","filterObject","filterAsyncObject","escapeRegexRegex","escapeRegex","arrayToRegex","makeSafe","RegExp","join","isRegexCall","isRegex","objectSize","objectLengthProperty","objectSizeProperty","size","normalizeCase","space","restString","string","substring","rawURLDecodeRegex","andRegex","lessThanRegex","moreThanRegex","doubleQuoteRegex","rawURLDecode","decodeURIComponent","htmlEntities","tokenizeRegEx","wordsRegEx","getWords","upperFirstLetter","toUpperCase","upperFirst","upperFirstOnly","toLowerCase","getTypeName","isMapCall","isMap","typedArrayRegex","arrayConstructorName","isTypedArray","noValue","isBigIntCall","isBigInt","isBooleanCall","isBoolean","isArrayBufferCall","isArrayBuffer","constructorNames","isDateCall","isDate","isFalse","isF32Call","isF32","isF64Call","isF64","isInteger","Number","isFloat","isI16Call","isI16","isI32Call","isI32","isI8Call","isI8","isPromise","Promise","isKindAsync","isSafeInteger","isSafeInt","isU16Call","isU16","isU32Call","isU32","isU8Call","isU8","isU8CCall","isU8C","isWeakMapCall","isWeakMap","isDeno","globalThis","Deno","isNodejs","process","versions","node","isTruthy","returnIfTrue","notEqual","jsonNative","JSON","stringify","createAssertError","expected","localOptions","options","errorTitle","title","file","Error","assertAsync","sourceArg","structuredCloneSafe","structuredClone","forOfCompactMapAsync","forOfCompactMap","compactMap","forOfFilter","forOfFilterAsync","returnFlow","arg","flow","flowRight","flowAsync","flowAsyncRight","hasDot","Intervals","clearInterval","setInterval","intervals","Model","static","modelName","modelSource","models","Store","property","data","Proxy","proxySource","console","log","UniqID","totalActive","freed","totalFree","shift","free","isActive","shouldReset","reset","uniqID","VirtualStorage","initialObject","items","getItem","hasItem","setItem","removeItem","augend","addend","point","sortedObject","bindThis","targetAssign","total","currentAmount","config","chunked","match","sourceKeys","sourceKeysLength","targetObject","i","keyName","object","compactedKeys","all","queue","allSettled","arity","curries","curried","curryArgs","unshift","debounced","Buffer","alloc","findIndex","find","level","reduce","previousValue","currentValue","concat","values","valuesLength","cloned","methodBound","lastIndexOf","insertIndex","search","includes","rootObject","equalThis","optional","text","arrays","otherItem","strictFlag","indexes","sourceChild","targetParent","Symbol","iterator","compareArray","targetKeys","sourceParent","targetChild","type","targetOne","targetTwo","other","otherType","reviver","parse","indexFrom","trueIndex","merge","currentSource","sourceItem","sourceKey","blacklist","blacklistRegex","numberToString","iteratees","predicates","predicate","rejected","whitelist","compared","removeThese","words","sampleArray","used","numberList","a","b","endIndex","indexRight","throttled","shouldThrottle","on","off","maxLength","stringLength","breakAll","breakAllLength","truncateDown","truncateUp","arraySet","unZippedKeys","sourcesSet","Set","wrapper","xorMap","xored","zipedObject"],"mappings":"yOAaO,SAASA,EAAWC,GAE1B,OADAA,EAAOC,OAAS,EACTD,CACR,CCLO,SAASE,EAAYF,GAC3B,YAAkBG,IAAXH,CACR,CCAO,SAASI,EAAUJ,GACzB,OAAOK,QAAQL,EAAOC,OACvB,CCFO,SAASK,EAAON,GACtB,OAAkB,OAAXA,CACR,CCDO,SAASO,EAASP,GACxB,OAAQE,EAAYF,KAAYM,EAAON,EACxC,CCRO,SAASQ,EAAYR,GAC3B,OAAOA,CACR,CCYO,SAASS,EAAUT,EAAQU,EA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AAQie,GAAShgB,IACG,IAAfA,EAAK4C,OACRqd,EAAM9f,KAAKH,EAAKwC,MAChB,IAEKyd,EACR,QTlCO,YAAgB3D,GACtB,OAAOA,EAAO,GAAG7N,KAAI,CAACzO,EAAML,IACpB2c,EAAO7N,KAAK1L,GACXA,EAAMpD,MAGhB,cnKHyB,CAAC6E,EAAYkX,KACrC,MAAMwE,EAAc,CAAA,EAIpB,OAHA5gB,EAAUkF,GAAY,CAACxE,EAAMgG,KAC5Bka,EAAYlgB,GAAQ0b,EAAO1V,EAAI,IAEzBka,CAAW"} \ No newline at end of file +{"version":3,"file":"basic.js","sources":["../source/arrays/clear.js","../source/types/isUndefined.js","../source/utilities/hasLength.js","../source/types/isNull.js","../source/types/hasValue.js","../source/utilities/returnValue.js","../source/arrays/each.js","../source/arrays/compactMap.js","../source/arrays/eachAsync.js","../source/arrays/compactMapAsync.js","../source/numbers/isNegative.js","../source/arrays/range.js","../source/types/isArray.js","../source/classes/construct.js","../source/arrays/ensure.js","../source/arrays/flattenDeep.js","../source/utilities/forEach.js","../source/arrays/difference.js","../source/arrays/drop.js","../source/arrays/eachRight.js","../source/arrays/eachRightAsync.js","../source/arrays/every.js","../source/arrays/everyAsync.js","../source/arrays/filter.js","../source/arrays/filterAsync.js","../source/utilities/toPath.js","../source/utilities/get.js","../source/objects/keys.js","../source/objects/hasKeys.js","../source/types/isConstructor.js","../source/types/isTypeFactory.js","../source/types/isBuffer.js","../source/types/isPlainObject.js","../source/utilities/isEqual.js","../source/arrays/largest.js","../source/arrays/map.js","../source/arrays/mapAsync.js","../source/math/subtract.js","../source/math/subtractReverse.js","../source/math/randomInt.js","../source/internal/array.js","../source/arrays/shuffle.js","../source/arrays/smallest.js","../source/arrays/unique.js","../source/buffers/clear.js","../source/types/isFunction.js","../source/types/isNumber.js","../source/types/isString.js","../source/objects/assign.js","../source/classes/extendClass.js","../source/collection/findIndexCache.js","../source/collection/sortCollectionDescending.js","../source/collection/sortCollectionAscending.js","../source/objects/pluckObject.js","../source/collection/sortCollectionAlphabetically.js","../source/collection/sortCollectionAlphabeticallyReverse.js","../source/internal/regexTestFactory.js","../source/files/isFileCSS.js","../source/files/isFileHTML.js","../source/files/isFileJS.js","../source/files/isFileJSON.js","../source/objects/eachAsync.js","../source/objects/each.js","../source/types/isSet.js","../source/utilities/forOf.js","../source/types/isGenerator.js","../source/utilities/forOfAsync.js","../source/types/isAsync.js","../source/utilities/generateLoop.js","../source/utilities/each.js","../source/functions/chain.js","../source/utilities/noop.js","../source/utilities/times.js","../source/utilities/timer.js","../source/internal/apply.js","../source/types/getType.js","../source/types/cloneType.js","../source/utilities/forOfMap.js","../source/utilities/forOfMapAsync.js","../source/objects/mapAsync.js","../source/objects/map.js","../source/utilities/map.js","../source/objects/everyAsync.js","../source/objects/every.js","../source/utilities/forOfEvery.js","../source/utilities/forOfEveryAsync.js","../source/utilities/every.js","../source/utilities/cacheNativeMethod.js","../source/internal/object.js","../source/internal/isSame.js","../source/math/randomFloat.js","../source/numbers/isPositive.js","../source/numbers/isZero.js","../source/objects/getEntries.js","../source/objects/compactMapAsync.js","../source/objects/compactMap.js","../source/objects/filter.js","../source/objects/filterAsync.js","../source/objects/isMatch.js","../source/regexps/escapeRegex.js","../source/regexps/arrayToRegex.js","../source/types/isRegex.js","../source/objects/size.js","../source/objects/zip.js","../source/strings/camelCase.js","../source/strings/kebabCase.js","../source/strings/snakeCase.js","../source/strings/upperCase.js","../source/strings/lowerCase.js","../source/strings/range.js","../source/strings/sanitize.js","../source/strings/tokenize.js","../source/strings/typography.js","../source/types/getTypeName.js","../source/types/isMap.js","../source/types/isTypedArray.js","../source/types/noValue.js","../source/types/isBigInt.js","../source/types/isBoolean.js","../source/types/isArrayBuffer.js","../source/types/isCloneable.js","../source/types/isDate.js","../source/types/isFalse.js","../source/types/isF32.js","../source/types/isF64.js","../source/types/isFloat.js","../source/types/isI16.js","../source/types/isI32.js","../source/types/isI8.js","../source/types/isPromise.js","../source/types/isKindAsync.js","../source/types/isSafeInt.js","../source/types/isU16.js","../source/types/isU32.js","../source/types/isU8.js","../source/types/isU8C.js","../source/types/isWeakMap.js","../source/types/isDeno.js","../source/types/isNode.js","../source/types/isTruthy.js","../source/utilities/notEqual.js","../source/utilities/json.js","../source/utilities/assert.js","../source/utilities/clone.js","../source/utilities/forOfCompactMapAsync.js","../source/utilities/forOfCompactMap.js","../source/utilities/compactMap.js","../source/utilities/forOfFilter.js","../source/utilities/forOfFilterAsync.js","../source/utilities/filter.js","../source/utilities/flow.js","../source/utilities/flowAsync.js","../source/utilities/hasDot.js","../source/utilities/interval.js","../source/utilities/model.js","../source/utilities/store.js","../source/utilities/uid.js","../source/utilities/virtualStorage.js","../source/math/add.js","../source/functions/after.js","../source/utilities/arraysToObject.js","../source/functions/ary.js","../source/functions/before.js","../source/utilities/bindAll.js","../source/math/progress.js","../source/arrays/chunk.js","../source/utilities/clear.js","../source/arrays/clone.js","../source/utilities/compact.js","../source/objects/compactKeys.js","../source/utilities/concurrent.js","../source/arrays/concurrentEach.js","../source/utilities/concurrentStatus.js","../source/collection/countBy.js","../source/collection/countKey.js","../source/collection/countWithoutKey.js","../source/functions/curry.js","../source/functions/curryRight.js","../source/functions/debounce.js","../source/math/deduct.js","../source/math/divide.js","../source/arrays/dropRight.js","../source/buffers/ensure.js","../source/utilities/everyArg.js","../source/collection/findIndex.js","../source/collection/findItem.js","../source/arrays/first.js","../source/arrays/flatten.js","../source/utilities/forEachAsync.js","../source/utilities/forMap.js","../source/files/getExtension.js","../source/files/getFilename.js","../source/collection/getHighest.js","../source/collection/getLowest.js","../source/arrays/getNumberInsertIndex.js","../source/collection/groupBy.js","../source/utilities/has.js","../source/functions/ifInvoke.js","../source/utilities/ifNotAssign.js","../source/utilities/ifValue.js","../source/utilities/inAsync.js","../source/utilities/inSync.js","../source/math/increment.js","../source/collection/indexBy.js","../source/arrays/initial.js","../source/arrays/intersect.js","../source/objects/invert.js","../source/arrays/invoke.js","../source/collection/invoke.js","../source/collection/invokeAsync.js","../source/types/isArguments.js","../source/types/isArrayLike.js","../source/types/isChild.js","../source/types/isEmpty.js","../source/numbers/isEven.js","../source/types/isFalsy.js","../source/types/isIterable.js","../source/arrays/isMatch.js","../source/numbers/isNumberEqual.js","../source/numbers/isNumberInRange.js","../source/numbers/isNumberNotInRange.js","../source/numbers/isOdd.js","../source/types/isParent.js","../source/types/isPrimitive.js","../source/types/isRelated.js","../source/types/isSameType.js","../source/types/isTrue.js","../source/arrays/last.js","../source/arrays/mapRight.js","../source/arrays/mapWhile.js","../source/utilities/merge.js","../source/math/multiple.js","../source/functions/negate.js","../source/functions/nthArg.js","../source/objects/omit.js","../source/functions/once.js","../source/functions/over.js","../source/functions/overEvery.js","../source/utilities/pair.js","../source/arrays/partition.js","../source/objects/pick.js","../source/collection/pluck.js","../source/utilities/promise.js","../source/utilities/propertyMatch.js","../source/functions/rearged.js","../source/math/remainder.js","../source/arrays/remove.js","../source/strings/replace.js","../source/arrays/rest.js","../source/arrays/right.js","../source/arrays/sample.js","../source/utilities/setKey.js","../source/utilities/setValue.js","../source/arrays/sortNumberAscending.js","../source/arrays/sortNumberDescening.js","../source/utilities/stubArray.js","../source/utilities/stubFalse.js","../source/utilities/stubObject.js","../source/utilities/stubString.js","../source/utilities/stubTrue.js","../source/math/subtractAll.js","../source/math/sumAll.js","../source/arrays/take.js","../source/arrays/takeRight.js","../source/functions/throttle.js","../source/utilities/timesAsync.js","../source/utilities/toggle.js","../source/strings/truncate.js","../source/arrays/zip.js","../source/arrays/union.js","../source/arrays/untilFalse.js","../source/arrays/untilTrue.js","../source/arrays/whileCompactMap.js","../source/arrays/whileEach.js","../source/arrays/whileMap.js","../source/arrays/without.js","../source/functions/wrap.js","../source/arrays/xor.js"],"sourcesContent":["/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = isArray(propertyString) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [\n\t\tkey,\n\t\tvalue\n\t] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = isIterateeAsync ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = isIterateeAsync ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst source = {};\n\teachArray(properties, (item, key) => {\n\t\tsource[item] = values[key];\n\t});\n\treturn source;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst objectKeys = [];\n\tconst objectValues = [];\n\teachObject(object, (item, key) => {\n\t\tobjectKeys.push(key);\n\t\tobjectValues.push(item);\n\t});\n\treturn [\n\t\tobjectKeys,\n\t\tobjectValues,\n\t];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(\n\tcompactMapArray,\n\tcompactMapAsyncArray,\n\tcompactMapObject,\n\tcompactMapAsyncObject,\n\tforOfCompactMap,\n\tforOfCompactMapAsync\n);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Checks if a number is even & returns true or false.\n *\n * @function isEven\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEven, assert } from '@universalweb/acid';\n * assert(isEven(1), true);\n */\nexport function isEven(source) {\n\treturn (source & 1) === 0;\n}\n\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is odd & returns true or false.\n *\n * @function isOdd\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isOdd, assert } from '@universalweb/acid';\n * assert(isOdd(1), true);\n */\nexport function isOdd(source) {\n\treturn (source & 1) === 1;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn ((isEqual(on, value)) ? off : on);\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n"],"names":["clearArray","source","length","isUndefined","undefined","hasLength","Boolean","isNull","hasValue","returnValue","eachArray","iteratee","thisBind","additionalArg","arrayLength","index","call","compactMapArray","results","thisCall","item","arrayOriginal","returned","push","async","eachAsyncArray","compactMapAsyncArray","result","sign","Math","isNegative","rangeUp","start","end","step","sourceArray","position","rangeDown","isArray","Array","reflectConstruct","Reflect","construct","target","argumentsList","newTarget","args","ensureArray","flattenDeep","flat","Infinity","forEach","callback","difference","sources","differencesMap","Map","differences","currentArray","parentIndex","child","childIndex","childRoot","get","count","set","drop","array","amount","upTo","splice","eachRight","additionalArgument","eachRightAsync","everyArray","sourceLength","everyAsyncArray","filterArray","filterAsyncArray","regexToPath","regexCloseBracket","emptyString","toPath","replace","split","propertyString","link","objectKeys","Object","keys","hasOwn","hasKeys","properties","pathArray","lastPath","pop","initialPathObject","isConstructor","constructor","isConstructorFactory","constructorName","name","isConstructorNameFactory","isTypeFactory","method","primarySource","otherSources","isBufferCall","isBuffer","isPlainObject","toString","trim","slice","isEqual","equals","sourceProperties","key","mathNativeMax","max","mapArray","mapAsyncArray","subtract","minuend","subtrahend","subtractReverse","floor","random","randomInt","min","arrayFrom","from","toArray","arrayLike","mapFn","thisArg","shuffle","shuffleArray","value","mathNativeMin","onlyUnique","indexOf","sortUnique","unique","isSorted","filter","clearBuffer","fill","isFunction","Function","isNumberCall","isNumber","isString","String","objectAssign","assign","assignToObject","assignToClass","prototype","findIndexCache","element","indexMatch","propertyName","sortCollectionDescendingFilter","previous","next","ifMatch","previousKey","nextKey","sortCollectionDescending","collection","sort","sortCollectionAscendingFilter","sortCollectionAscending","pluckObject","targets","sortObjectsAlphabetically","localeCompare","sortObjectsAlphabeticallyReverse","regexTestFactory","regexType","test","isFileCSS","isFileHTML","isFileJS","isFileJSON","eachAsyncObject","propertyCount","eachObject","objectKeysArray","isSetCall","isSet","forOf","isGeneratorCall","isGenerator","forOfAsync","generatorArgs","isAsyncCall","isAsync","generateLoop","arrayLoop","arrayLoopAsync","objectLoop","objectLoopAsync","forOfLoop","forOfLoopAsync","argument1","argument2","argument3","isIterateeAsync","each","Chain","methods","this","addChainMethod","thisChain","methodName","setValue","done","noop","times","Timers","list","remove","id","clearTimeout","delete","has","callable","time","currentThis","setTimeout","clear","timers","timer","applyNative","apply","thisArgument","getType","cloneType","sourceType","forOfMap","resultsObject","methodPush","add","methodPushBound","bind","methodSet","forOfMapAsync","resultsGenerator","mapAsyncObject","thisObject","mapObject","original","map","everyAsyncObject","everyObject","forOfEvery","forOfEveryAsync","every","functionPrototype","cacheNativeMethod","getPropNames","getOwnPropertyNames","getPropDesc","getOwnPropertyDescriptor","defProp","defineProperty","hasProp","hasOwnProperty","isSame","is","isZero","objectEntries","entries","compactMapAsyncObject","compactMapObject","filterObject","filterAsyncObject","escapeRegexRegex","escapeRegex","arrayToRegex","makeSafe","RegExp","join","isRegexCall","isRegex","objectSize","objectLengthProperty","objectSizeProperty","size","normalizeCase","space","restString","string","substring","rawURLDecodeRegex","andRegex","lessThanRegex","moreThanRegex","doubleQuoteRegex","rawURLDecode","decodeURIComponent","htmlEntities","tokenizeRegEx","wordsRegEx","getWords","upperFirstLetter","toUpperCase","upperFirst","upperFirstOnly","toLowerCase","getTypeName","isMapCall","isMap","typedArrayRegex","arrayConstructorName","isTypedArray","noValue","isBigIntCall","isBigInt","isBooleanCall","isBoolean","isArrayBufferCall","isArrayBuffer","constructorNames","isDateCall","isDate","isFalse","isF32Call","isF32","isF64Call","isF64","isInteger","Number","isFloat","isI16Call","isI16","isI32Call","isI32","isI8Call","isI8","isPromise","Promise","isKindAsync","isSafeInteger","isSafeInt","isU16Call","isU16","isU32Call","isU32","isU8Call","isU8","isU8CCall","isU8C","isWeakMapCall","isWeakMap","isDeno","globalThis","Deno","isNodejs","process","versions","node","isTruthy","returnIfTrue","notEqual","jsonNative","JSON","stringify","createAssertError","expected","localOptions","options","errorTitle","title","file","Error","assertAsync","sourceArg","structuredCloneSafe","structuredClone","forOfCompactMapAsync","forOfCompactMap","compactMap","forOfFilter","forOfFilterAsync","returnFlow","arg","flow","flowRight","flowAsync","flowAsyncRight","hasDot","Intervals","clearInterval","setInterval","intervals","Model","static","modelName","modelSource","models","Store","property","data","Proxy","proxySource","console","log","UniqID","totalActive","freed","totalFree","shift","free","isActive","shouldReset","reset","uniqID","VirtualStorage","initialObject","items","getItem","hasItem","setItem","removeItem","augend","addend","point","sortedObject","bindThis","targetAssign","total","currentAmount","config","chunked","match","sourceKeys","sourceKeysLength","targetObject","i","keyName","object","compactedKeys","all","queue","allSettled","arity","curries","curried","curryArgs","unshift","debounced","Buffer","alloc","findIndex","find","level","reduce","previousValue","currentValue","concat","values","valuesLength","cloned","methodBound","lastIndexOf","insertIndex","search","includes","rootObject","equalThis","optional","text","arrays","otherItem","strictFlag","indexes","sourceChild","targetParent","Symbol","iterator","compareArray","targetKeys","sourceParent","targetChild","type","targetOne","targetTwo","other","otherType","reviver","parse","indexFrom","trueIndex","merge","currentSource","sourceItem","sourceKey","blacklist","blacklistRegex","numberToString","iteratees","predicates","predicate","rejected","whitelist","compared","removeThese","words","sampleArray","used","numberList","a","b","endIndex","indexRight","throttled","shouldThrottle","on","off","maxLength","stringLength","breakAll","breakAllLength","truncateDown","truncateUp","arraySet","objectValues","sourcesSet","Set","wrapper","xorMap","xored"],"mappings":"yOAaO,SAASA,EAAWC,GAE1B,OADAA,EAAOC,OAAS,EACTD,CACR,CCLO,SAASE,EAAYF,GAC3B,YAAkBG,IAAXH,CACR,CCAO,SAASI,EAAUJ,GACzB,OAAOK,QAAQL,EAAOC,OACvB,CCFO,SAASK,EAAON,GACtB,OAAkB,OAAXA,CACR,CCDO,SAASO,EAASP,GACxB,OAAQE,EAAYF,KAAYM,EAAON,EACxC,CCRO,SAASQ,EAAYR,GAC3B,OAAOA,CACR,CCYO,SAASS,EAAUT,EAAQU,EAAUC,EAAUC,GACrD,IAAKZ,EACJ,OAED,MAAMa,EAAcb,EAAOC,OAC3B,GAAIM,EAASI,GACZ,IAAK,IAAIG,EAAQ,EAAGA,EAAQD,EAAaC,IACxCJ,EAASK,KAAKJ,EAAUX,EAAOc,GAAQA,EAAOd,EAAQa,EAAaD,Q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AG7N,KAAI,CAACzO,EAAML,IACpB2c,EAAO7N,KAAK1L,GACXA,EAAMpD,MAGhB,crKHyB,CAAC6E,EAAYkX,KACrC,MAAM7c,EAAS,CAAA,EAIf,OAHAS,EAAUkF,GAAY,CAACxE,EAAMgG,KAC5BnH,EAAOmB,GAAQ0b,EAAO1V,EAAI,IAEpBnH,CAAM"} \ No newline at end of file diff --git a/build/browser.bundle.js b/build/browser.bundle.js index 023cdc2..72685d8 100644 --- a/build/browser.bundle.js +++ b/build/browser.bundle.js @@ -1,8410 +1,8830 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' - ? factory(exports) - : typeof define === 'function' && define.amd - ? define(['exports'], factory) - : ((global = typeof globalThis !== 'undefined' ? globalThis : global || self), factory((global.$ = {}))); + typeof exports === "object" && typeof module !== "undefined" + ? factory(exports) + : typeof define === "function" && define.amd + ? define(["exports"], factory) + : ((global = + typeof globalThis !== "undefined" ? globalThis : global || self), + factory((global.$ = {}))); })(this, function (exports) { - 'use strict'; - - /** - * Chunks an array according to a user defined number. - * - * @function chunk - * @category Array - * @type {Function} - * @param {Array} array - Array to be chunked. - * @param {Number} size - Number which determines the size of each chunk. - * @returns {Array} - A chunked version of the source array. - * - * @example - * import { chunk, assert } from '@universalweb/acid'; - * assert(chunk([1,2,3], 1), [[1],[2],[3]]); - */ - function chunk(array, size = 1) { - const chunked = []; - let index = 0; - array.forEach((item, key) => { - if (!(key % size)) { - chunked.push([]); - if (key) { - index++; - } - } - chunked[index].push(item); - }); - return chunked; - } - - /** - * Clears the values out of an array. - * - * @function clearArray - * @category Array - * @type {Function} - * @param {Array} source - Takes an array to be emptied. - * @returns {Array} - The originally given array. - * - * @example - * import { clearArray, assert } from '@universalweb/acid'; - * assert(clearArray([1,'B', 'Cat']), []); - */ - function clearArray(source) { - source.length = 0; - return source; - } - - /** - * Clone an array (uses .slice()) and assign the source arrays values to the new array. - * - * @function cloneArray - * @category Array - * @type {Function} - * @param {Array} source - The array to be quick cloned. - * @returns {Array} - The newly cloned array with assigned items. - * - * @example - * import { cloneArray, assert } from '@universalweb/acid'; - * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']); - */ - function cloneArray(source) { - return source.slice(); - } - - /** Checks if the value is undefined. - * - * @function isUndefined - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isUndefined, assert } from '@universalweb/acid'; - * assert(isUndefined(undefined), true); - */ - function isUndefined(source) { - return source === undefined; - } - - /** - * Checks if the value has length greater than 0. - * - * @function hasLength - * @category utility - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { hasLength, assert } from '@universalweb/acid'; - * assert(hasLength([1]), true); - */ - function hasLength(source) { - return Boolean(source.length); - } - - /** - * Checks if the value is null. - * - * @function isNull - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNull, assert } from '@universalweb/acid'; - * assert(isNull(null), true); - */ - function isNull(source) { - return source === null; - } - - /** - * Checks if the value is not null or undefined. - * - * @function hasValue - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { hasValue, assert } from '@universalweb/acid'; - * assert(hasValue(1), true); - */ - function hasValue(source) { - return !isUndefined(source) && !isNull(source); - } - - /** - * A simple function which returns the value it's given. - * - * @function returnValue - * @category utility - * @param {*} source - The source object. - * @returns {source} The source object. - */ - function returnValue(source) { - return source; - } - - /** - * Iterates through the given array. - * - * @function eachArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. - * @param {*} thisBind - Iteratee called with thisBind as this. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array|undefined} - The originally given array. - * - * @example - * import { eachArray, assert } from '@universalweb/acid'; - * const list = []; - * eachArray([1, 2, 3], (item, index) => { - * list[index] = item; - * }); - * assert(list, [1, 2, 3]); - */ - function eachArray(source, iteratee, thisBind, additionalArg) { - if (!source) { - return; - } - const arrayLength = source.length; - if (hasValue(thisBind)) { - for (let index = 0; index < arrayLength; index++) { - iteratee.call(thisBind, source[index], index, source, arrayLength, additionalArg); - } - } else { - for (let index = 0; index < arrayLength; index++) { - iteratee(source[index], index, source, arrayLength, additionalArg); - } - } - return source; - } - - /** - * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. - * - * @function compactMapArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array} - An array with mapped properties that are not null or undefined. - * - * @example - * import { compactMapArray, assert } from '@universalweb/acid'; - * assert(compactMapArray([null, 2, 3], (item) => { - * return item; - * }), [2, 3]); - */ - function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) { - if (hasValue(thisCall)) { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - const returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg); - if (hasValue(returned)) { - results.push(returned); - } - }); - } else { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - const returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg); - if (hasValue(returned)) { - results.push(returned); - } - }); - } - return results; - } - - /** - * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order. - * - * @function eachAsyncArray - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. - * @param {*} thisCall - Iteratee called with thisCall as this. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array|undefined} - Returns source the originally given array. - * - * @example - * import { eachAsyncArray, assert } from '@universalweb/acid'; - * const tempList = []; - * await eachAsyncArray([1, 2, 3], async (item) => { - * tempList.push(item); - * }); - * assert(tempList, [1, 2, 3]); - */ - async function eachAsyncArray(source, iteratee, thisCall, additionalArg) { - if (!source) { - return; - } - const arrayLength = source.length; - if (hasValue(thisCall)) { - for (let index = 0; index < arrayLength; index++) { - await iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg); - } - } else { - for (let index = 0; index < arrayLength; index++) { - await iteratee(source[index], index, source, arrayLength, additionalArg); - } - } - return source; - } - - /** - * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. - * - * @function compactMapAsyncArray - * @type {Function} - * @category array - * @async - * @param {Array} source - Array to be compacted. - * @param {Function} iteratee - Iteratee to be performed on array. - * @returns {Array} - Array values after being put through an iterator. - * - * @example - * import { compactMapAsync, assert } from '@universalweb/acid'; - * assert(await compactMapAsync([1, 2, 3, null], async (item) => { - * return item; - * }), [1, 2, 3]); - */ - async function compactMapAsyncArray(source, iteratee = returnValue) { - const results = []; - await eachAsyncArray(source, async (item, index, arrayLength) => { - const result = await iteratee(item, index, results, arrayLength); - if (hasValue(result)) { - results.push(result); - } - }); - return results; - } - - /** - * Checks if a number is negative & returns true or false. - * - * @function isNegative - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNegative, assert } from '@universalweb/acid'; - * assert(isNegative(-1), true); - */ - const { sign: sign$1 } = Math; - function isNegative(source) { - return sign$1(source) === -1; - } - - function rangeUp(start, end, step, sourceArray) { - let position = start; - while (position < end) { - sourceArray.push(position); - position += step; - } - return sourceArray; - } - function rangeDown(start, end, step, sourceArray) { - let position = start; - while (position > end) { - sourceArray.push(position); - position -= step; - } - return sourceArray; - } - /** - * Create a numbered list of integers. - * - * @function range - * @category array - * @type {Function} - * @param {Number} start - Value which determines the start of the range. - * @param {Number} end - Value which determines the end of the range. - * @param {Number} step - Value used to step between integers. - * @returns {Array} - An array of integers. - * - * @example - * import { range, assert } from '@universalweb/acid'; - * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]); - */ - function range(start, end, step = 1, sourceArray = []) { - if (isNegative(step)) { - return sourceArray; - } - if (start < end) { - return rangeUp(start, end, step, sourceArray); - } else { - return rangeDown(start, end, step, sourceArray); - } - } - - /** - * Checks if the value is an array. This references Array.isArray. - * - * @function isArray - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArray, assert } from '@universalweb/acid'; - * assert(isArray([]), true); - * assert(isArray(2), false); - */ - const isArray = Array.isArray; - /** - * Checks if the value is not an array. This references Array.isArray. - * - * @function isNotArray - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNotArray, assert } from '@universalweb/acid'; - * assert(isNotArray([]), false); - * assert(isNotArray(2), true); - */ - function isNotArray(source) { - return !isArray(source); - } - - /** - * A function which acts like the "new" operator and can pass arguments. This is a safe version of the original which will error if given undefined - * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects. - * - * @function construct - * @category class - * @param {Function} target - The target function or class. - * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array. - * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target. - * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList. - * - * @example - * import { construct, assert } from '@universalweb/acid'; - * class test { - * constructor(a) { - * return 1; - * } - * } - * const newClass = construct(test, [1]); - * assert(test, 1); - */ - const reflectConstruct = Reflect.construct; - function construct(target, argumentsList = [], newTarget) { - const args = isArray(argumentsList) ? argumentsList : [argumentsList]; - if (newTarget) { - return reflectConstruct(target, args, newTarget); - } - return reflectConstruct(target, args); - } - - /** - * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned. - * - * @function ensureArray - * @category array - * @type {Function} - * @param {*} source - Object to be checked. - * @returns {Array} - Returns an array. - * - * @example - * import { isArray, ensureArray, assert } from '@universalweb/acid'; - * assert(isArray(ensureArray('test')), ['test']); - */ - function ensureArray(source) { - return (isArray(source) && source) || (hasValue(source) && [source]) || []; - } - - /** - * Flattens an array to a single level. - * - * @function flattenDeep - * @type {Function} - * @category array - * @param {Array} source - Array to flatten. - * @returns {Array} - Returns a completely flattened array. - * - * @example - * import { flattenDeep, assert } from '@universalweb/acid'; - * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]); - */ - function flattenDeep(source) { - return source.flat(Infinity); - } - - function forEach(source, callback) { - source.forEach(callback); - return source; - } - - /** - * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences. - * - * @function difference - * @category array - * @type {Function} - * @param {...Array} sources - List of arrays to be compared. - * @returns {Array|undefined} - An array which contains the differences between the source and compare array. - * - * @example - * import { difference, assert } from '@universalweb/acid'; - * assert(difference([1, 2, 3], [1, 2]), [3]); - */ - function difference(...sources) { - const differencesMap = construct(Map); - const differences = []; - eachArray(sources, (currentArray, parentIndex) => { - eachArray(currentArray, (child, childIndex) => { - let childRoot = differencesMap.get(child); - if (!childRoot) { - childRoot = { - count: 1, - parentIndex, - child - }; - differencesMap.set(child, childRoot); - } else if (childRoot.parentIndex === parentIndex) { - return; - } else { - childRoot.count++; - } - }); - }); - forEach(differencesMap, (item) => { - if (item.count === 1 && item.parentIndex === 0) { - differences.push(item.child); - } - }); - return differences; - } - - /** - * Removes all items from an array after a specified index. - * - * @function drop - * @category array - * @type {Function} - * @param {Array} array - Source array. - * @param {Number} amount - Amount of items to drop from the array. - * @param {Number} [upTo = array.length] - Index to stop at. - * @returns {Array} - An array with all values removed after a user defined index. - * - * @example - * import { drop, assert } from '@universalweb/acid'; - * assert(drop([1, 2, 3]), [2, 3]); - * assert(drop([1, 2, 3], 2), [3]); - */ - function drop(array, amount = 1, upTo = array.length) { - return array.splice(amount, upTo); - } - - /** - * Removes all items from an array before a specified index. - * - * @function dropRight - * @type {Function} - * @category array - * @param {Array} array - Source array. - * @param {Number} amount - Amount of items to drop from the array. - * @param {Number} [upTo = array.length] - Index to stop at. - * @returns {Array} - An array with all values removed before a user defined index. - * - * @example - * import { dropRight, assert } from '@universalweb/acid'; - * assert(dropRight([1, 2, 3]), [1, 2]); - * assert(dropRight([1, 2, 3], 2), [1]); - */ - const dropRight = (array, amount = 1, upTo = array.length) => { - return drop(array, 0, upTo - amount); - }; - - /** - * Iterates through the given array in reverse. - * - * @function eachRight - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array|undefined} - The originally given array. - * - * @example - * import { eachRight, assert } from '@universalweb/acid'; - * const tempList = []; - * eachRight([1, 2, 3], (item) => { - * tempList.push(item); - * }); - * assert(tempList, [3, 2, 1]); - */ - function eachRight(source, iteratee, additionalArgument) { - if (!source) { - return; - } - const arrayLength = source.length; - for (let index = arrayLength - 1; index >= 0; index--) { - iteratee(source[index], index, source, arrayLength, additionalArgument); - } - return source; - } - - /** - * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order. - * - * @function eachRightAsync - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @returns {Object|undefined} - The originally given array. - * - * @example - * import { eachRightAsync, assert } from '@universalweb/acid'; - * const tempList = []; - * await eachRightAsync([1, 2, 3], async (item) => { - * tempList.push(item); - * }); - * assert(tempList, [3, 2, 1]); - */ - async function eachRightAsync(source, iteratee) { - if (!source) { - return; - } - const arrayLength = source.length; - for (let index = arrayLength - 1; index >= 0; index--) { - await iteratee(source[index], index, source, arrayLength); - } - return source; - } - - /** - * Iterates through the given array while the iteratee returns true else the loop exits & returns false. - * - * @function everyArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. - * - * @example - * import { everyArray, assert } from '@universalweb/acid'; - * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), false); - * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), true); - */ - function everyArray(source, iteratee, additionalArgument) { - if (!source) { - return; - } - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) { - return false; - } - } - return true; - } - - /** - * Iterates through the given array while the iteratee returns true else the loop exits & returns false. - * - * @function everyAsyncArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. - * - * @example - * import { everyAsyncArray, assert } from '@universalweb/acid'; - * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), false); - * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), true); - */ - async function everyAsyncArray(source, iteratee, additionalArgument) { - if (!source) { - return; - } - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if ((await iteratee(source[index], index, source, sourceLength, additionalArgument)) === false) { - return false; - } - } - return true; - } - - /** - * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. - * - * @function filterArray - * @category array - * @type {Function} - * @category array - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array with properties that passed the test. - * - * @example - * import { filterArray, assert } from '@universalweb/acid'; - * assert(filterArray([false, true, true], (item) => { - * return item; - * }), [true, true]); - */ - function filterArray(source, iteratee, results = [], additionalArgument) { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - if (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) { - results.push(item); - } - }); - return results; - } - - /** - * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. - * - * @function filterAsyncArray - * @category array - * @type {Function} - * @category array - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array with properties that passed the test. - * - * @example - * import { filterAsyncArray, assert } from '@universalweb/acid'; - * assert(filterAsyncArray([false, true, true], (item) => { - * return item; - * }), [true, true]); - */ - async function filterAsyncArray(source, iteratee, results = [], additionalArgument) { - await eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => { - if ((await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument)) === true) { - results.push(item); - } - }); - return results; - } - - /** - * Takes the first or multiple items from an array. - * - * @function first - * @type {Function} - * @category array - * @param {Array} array - Array to extract from. - * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array. - * @returns {Array} - Returns an array. - * - * @example - * import { first, assert } from '@universalweb/acid'; - * assert(first([1, 2, 3]), 1); - */ - function first(array, upTo) { - return upTo ? array.slice(0, upTo) : array[0]; - } - - /** - * Flattens an array up to the provided level. - * - * @function flatten - * @type {Function} - * @category array - * @param {Array} source - Array to flatten. - * @param {Number} [level = 1] - Number which determines how deep the array nest can be. - * @returns {Array|undefined} - Returns an array. - * - * @example - * import { flatten, assert } from '@universalweb/acid'; - * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]); - */ - function flatten(source, level = 1) { - if (!source) { - return; - } - let sourceArray = source; - for (let i = 0; i < level; i++) { - sourceArray = sourceArray.reduce((previousValue, currentValue) => { - return previousValue.concat(ensureArray(currentValue)); - }, []); - } - return sourceArray; - } - - /** - * Takes all but the last item in the array. - * - * @function initial - * @category array - * @type {Function} - * @param {Array} array - Array to have items extracted from. - * @returns {Array} - Returns a completely flattened array. - * - * @example - * import { initial, assert } from '@universalweb/acid'; - * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]); - */ - function initial(array) { - return array.slice(0, array.length - 1); - } - - // Add intersectionBy & intersectionWith - /** - * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory)) - * of the array and the input array(s). - * - * @function intersection - * @param {Array} array - Array to compare other arrays to. - * @param {...Array} arrays - A variable number of arrays. - * @category array - * @returns {Array} - The new array of unique values shared by all of the arrays. - * - * @example - * import { intersection, assert } from '@universalweb/acid'; - * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]); - */ - function intersection(array, ...arrays) { - return compactMapArray(array, (item) => { - const shouldReturn = everyArray(arrays, (otherItem) => { - return otherItem.includes(item); - }); - if (shouldReturn) { - return item; - } - }); - } - - /** - * Invoke each function in the given array. - * - * @function invokeArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} additionalArg - An object to be given each time to the iteratee. - * @param {*} thisCall - Iteratee called with thisCall as this. - * @returns {Array|undefined} - The originally given array. - * - * @example - * import { invokeArray, assert } from '@universalweb/acid'; - * function test(arg){ - * return [this, arg]; - * } - * const results = invokeArray([test], 1, test); - * assert(results, [test, 1]); - */ - function invokeArray(source, additionalArg, thisCall) { - if (!source) { - return; - } - const arrayLength = source.length; - if (hasValue(thisCall)) { - for (let index = 0; index < arrayLength; index++) { - source[index].call(thisCall, additionalArg); - } - } else { - for (let index = 0; index < arrayLength; index++) { - source[index](additionalArg); - } - } - return source; - } - - const regexToPath = /\.|\[/; - const regexCloseBracket = /]/g; - const emptyString = ''; - /** - * Breaks up string into object chain list. - * - * @function toPath - * @type {Function} - * @category utility - * @param {String} source - String to be broken up. - * @returns {Array} - Array used to go through object chain. - * - * @example - * import { toPath, assert } from '@universalweb/acid'; - * assert(toPath('post.like[2]'), ['post', 'like', '2']); - */ - function toPath(source) { - return source.replace(regexCloseBracket, emptyString).split(regexToPath); - } - - /** - * Returns property on an object. - * - * @function get - * @category utility - * @type {Function} - * @param {String} propertyString - String used to retrieve properties. - * @param {Object} target - Object which has a property retrieved from it. - * @returns {Object} - Returns property from the given object. - * - * @example - * import { get, assert } from '@universalweb/acid'; - * const objectTarget = { - * post: { - * like: ['a','b','c'] - * } - * }; - * assert(get('post.like[2]', objectTarget), 'c'); - */ - function get(propertyString, target) { - if (!target) { - return false; - } - let link = target; - const pathArray = isArray(propertyString) ? propertyString : toPath(propertyString); - everyArray(pathArray, (item) => { - link = link[item]; - return hasValue(link); - }); - return link; - } - - /** - * Get object's keys. - * - * @function keys - * @category object - * @param {*} source - The source object to pull keys from. - * @returns {Array} - Array of keys. - * - * @example - * keys({a: 1, b: 2}); - * // => ['a', 'b'] - */ - const objectKeys = Object.keys; - function keys(source) { - if (source) { - return objectKeys(source); - } - } - - const hasOwn = Object.hasOwn; - /** - * Checks to see if an object has all of the given property names. - * - * @function hasKeys - * @category object - * @type {Function} - * @param {Object} source - Source object to check for keys. - * @param {...String} properties - List of strings to check. - * @returns {Boolean|undefined} - Returns true or false. - * - * @example - * import { hasKeys, assert } from '@universalweb/acid'; - * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true); - */ - function hasKeys(source, ...properties) { - if (!source) { - return; - } - return everyArray(properties, (item) => { - const pathArray = toPath(item); - if (pathArray.length === 1) { - return hasOwn(source, item); - } else { - const lastPath = pathArray.pop(); - const initialPathObject = get(pathArray, source); - if (initialPathObject) { - return hasOwn(initialPathObject, lastPath); - } - return false; - } - }); - } - /** - * Checks to see if an object has any of the given property names. - * - * @function hasAnyKeys - * @category object - * @type {Function} - * @param {Object} source - Source object to check for keys. - * @param {Array} properties - List of strings to check. - * @returns {Boolean|undefined} - Returns true or false. - * - * @example - * import { hasAnyKeys, assert } from '@universalweb/acid'; - * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true); - * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false); - */ - function hasAnyKeys(source, ...properties) { - if (!source) { - return; - } - return Boolean( - properties.find((item) => { - const pathArray = toPath(item); - if (pathArray.length === 1) { - return hasOwn(source, item); - } else { - const lastPath = pathArray.pop(); - const initialPathObject = get(pathArray, source); - if (initialPathObject) { - return hasOwn(initialPathObject, lastPath); - } - return false; - } - }) - ); - } - - /** - * Checks to see if the constructor is that of a native object. - * - * @function isConstructor - * @category type - * @param {Object} target - The object to be checked. - * @param {Object} source - The source constructor object. - * @returns {Object} - Returns the target object. - * - * @example - * import { isConstructor, assert } from '@universalweb/acid'; - * assert(isConstructor(2, Number), true); - */ - function isConstructor(target, source) { - return target?.constructor === source || false; - } - function isConstructorFactory(source) { - return (target) => { - return isConstructor(target, source); - }; - } - function constructorName(source) { - return source?.constructor?.name; - } - function isConstructorNameFactory(source) { - return (target) => { - return constructorName(target) === source || false; - }; - } - - function isTypeFactory(method) { - return function (primarySource, ...otherSources) { - if (otherSources) { - return method(primarySource) && everyArray(otherSources, method); - } - return method(primarySource); - }; - } - - /** - * Checks if an object or objects are a Buffer. - * - * @function isBuffer - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isBuffer, assert } from '@universalweb/acid'; - * assert(isBuffer(Buffer.from('test')), true); - */ - const isBufferCall = isConstructorNameFactory('Buffer'); - const isBuffer = isTypeFactory(isBufferCall); - - /** - * Checks if the value is a plain object. - * - * @function isPlainObject - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isPlainObject } from '@universalweb/acid'; - * isPlainObject({}); - * // => true - */ - const isPlainObject = (source) => { - if (hasValue(source)) { - return source.constructor.toString().trim().slice(9, 16) === 'Object('; - } - return false; - }; - - /** - * Performs a deep comparison between two objects & determines if the value is the same using strict comparison. - * - * @function isEqual - * @type {Function} - * @category utility - * @param {*} source - Source object. - * @param {*} target - Object to be compared. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isEqual, assert } from '@universalweb/acid'; - * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true); - */ - // Add map & buffer Support - Review required for performance and support for more types - const isEqual = (source, target) => { - if (source === target) { - return true; - } else if (isBuffer(source)) { - return source.equals(target); - } else if (source.toString() === target.toString()) { - if (isPlainObject(source)) { - const sourceProperties = keys(source); - if (hasKeys(target, sourceProperties)) { - return everyArray(sourceProperties, (key) => { - return isEqual(source[key], target[key]); - }); - } - } else if (isArray(source)) { - if (source.length === target.length) { - return everyArray(source, (item, index) => { - return isEqual(item, target[index]); - }); - } - } - } - return false; - }; - - /** - * Performs a shallow strict comparison between two objects. - * - * @function isMatchArray - * @type {Function} - * @category array - * @param {Array} source - Source object. - * @param {Array} compareArray - Object to compare to source. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isMatchArray, assert } from '@universalweb/acid'; - * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true); - */ - function isMatchArray(source, compareArray) { - if (source.length === compareArray.length) { - return everyArray(source, (item, index) => { - return isEqual(compareArray[index], item); - }); - } - return false; - } - - const mathNativeMax = Math.max; - /** - * Plucks the largest value from an array. - * - * @function largest - * @type {Function} - * @category array - * @param {Array} array - Array from which largest number is taken. - * @returns {Number} - The largest number. - * - * @example - * import { largest, assert } from '@universalweb/acid'; - * assert(largest([1,2,3]), 3); - */ - function largest(array) { - return mathNativeMax(...array); - } - - /** - * Extracts item(s) from an array starting from the last item in the array. - * - * @function last - * @type {Function} - * @category array - * @param {Array} array - Array to have items extracted from. - * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array. - * @returns {Array} - Items from the array. - * - * @example - * import { last, assert } from '@universalweb/acid'; - * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]); - */ - function last(array, indexFrom) { - const arrayLength = array.length; - return indexFrom ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1]; - } - - /** - * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. - * - * @function mapArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array} - An array of the same calling array's type. - * - * @example - * import { mapArray, assert } from '@universalweb/acid'; - * assert(mapArray([1, 2, 3], (item) => { - * return item * 2; - * }), [2, 4, 6]); - */ - function mapArray(source, iteratee, results = [], thisCall, additionalArg) { - if (hasValue(thisCall)) { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - results[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg); - }); - } else { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - results[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg); - }); - } - return results; - } - - /** - * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee. - * - * @function concurrentEachArray - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {*} thisBind - Object to use as the "this" within the function. - * @returns {Promise|Array|undefined} - An array of the same calling array's type. - * - * @example - * import { concurrentEachArray, has, assert } from '@universalweb/acid'; - * const results = await concurrentEachArray([1, 2, 3], async (item) => { - * return item * 2; - * }); - * assert(has(results, [2, 4, 6]), true); - */ - async function concurrentEachArray(source, iteratee, thisBind) { - if (!source) { - return; - } - const results = []; - const arrayLength = source.length; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - results[index] = iteratee.call(thisBind, source[index], index, results, arrayLength); - } - } else { - for (let index = 0; index < arrayLength; index++) { - results[index] = iteratee(source[index], index, results, arrayLength); - } - } - return Promise.all(results); - } - - /** - * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray. - * - * @function mapAsyncArray - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @returns {Array} - An array of the same calling array's type. - * - * @example - * import { mapAsyncArray, assert } from '@universalweb/acid'; - * assert(await mapAsyncArray([1, 2, 3], async (item) => { - * return item * 2; - * }), [2, 4, 6]); - */ - async function mapAsyncArray(source, iteratee) { - const results = []; - await eachAsyncArray(source, async (item, index, arrayLength) => { - results[index] = await iteratee(item, index, results, arrayLength); - }); - return results; - } - - /** - * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse. - * - * @function mapRightArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array of the same calling array's type. - * - * @example - * import { mapRightArray, assert } from '@universalweb/acid'; - * assert(mapRightArray([1, 2, 3], (item) => { - * return item * 2; - * }), [6, 4, 2]); - */ - function mapRightArray(source, iteratee, results = [], additionalArgument) { - let trueIndex = 0; - const arrayLength = source.length; - for (let index = arrayLength - 1; index >= 0; index--) { - results[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument); - trueIndex++; - } - return results; - } - - /** - * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee. - * - * @function mapWhile - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array with properties that passed the test. - * - * @example - * import { mapWhile, assert } from '@universalweb/acid'; - * assert(mapWhile([1, 2, 0], (item) => { - * return Boolean(item); - * }), [1, 2]); - */ - function mapWhile(source, iteratee, results = [], additionalArgument) { - const arrayLength = source.length; - for (let index = 0; index < arrayLength; index++) { - const item = source[index]; - const returned = iteratee(item, index, results, source, arrayLength, additionalArgument); - if (returned === false) { - break; - } - results[index] = item; - } - return results; - } - - /** - * Subtracts the subtrahend (second argument) from the minuend (first argument). - * - * @function subtract - * @category math - * @type {Function} - * @param {Number} minuend - The minuend. - * @param {Number} subtrahend - The subtrahend. - * @returns {Number} - Returns the difference. - * - * @example - * import { subtract, assert } from '@universalweb/acid'; - * assert(subtract(3, 1), 2); - */ - function subtract(minuend, subtrahend) { - return minuend - subtrahend; - } - - /** - * Sorts an array of numbers in ascending order. Smallest to largest. - * - * @function sortNumberAscending - * @category array - * @param {Array} numberList - Array of numbers. - * @returns {Array} - The array this method was called on. - * - * @example - * import { sortNumberAscending, assert } from '@universalweb/acid'; - * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]); - */ - function sortNumberAscending(numberList) { - return numberList.sort(subtract); - } - - /** - * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. - * - * @function partition - * @type {Function} - * @category array - * @param {Array} array - Takes an array to split. - * @param {Function} predicate - Function run on each item in the array. - * @returns {Array} - One array split into two arrays. - * - * @example - * import { partition, assert } from '@universalweb/acid'; - * const result = partition([ - * {user: 'barney', age: 36, active: false}, - * {user: 'fred', age: 40, active: true}, - * {user: 'pebbles', age: 1, active: false} - * ], (item) => { return item.active; }); - * assert(result, [{"user":"fred","age":40,"active":true}], - * [{"user":"barney","age":36,"active":false}, - * {"user":"pebbles","age":1,"active":false}]); - */ - function partition(array, predicate) { - const rejected = []; - return [ - compactMapArray(array, (item, index) => { - if (predicate(item, index)) { - return item; - } - rejected.push(item); - }), - rejected - ]; - } - - /** - * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function. - * - * @function subtractReverse - * @category math - * @type {Function} - * @param {Number} subtrahend - The subtrahend. - * @param {Number} minuend - The minuend. - * @returns {Number} - Returns the difference. - * - * @example - * import { subtractReverse, assert } from '@universalweb/acid'; - * assert(subtractReverse(1, 3), 2); - */ - function subtractReverse(subtrahend, minuend) { - return minuend - subtrahend; - } - - /** - * Sorts an array of numbers in descending order. Largest to smallest. - * - * @function sortNumberDescening - * @category array - * @param {Array} numberList - Array of numbers. - * @returns {Array} - The array this method was called on. - * - * @example - * import { sortNumberDescening, assert } from '@universalweb/acid'; - * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]); - */ - function sortNumberDescening(numberList) { - return numberList.sort(subtractReverse); - } - - /** - * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation. - * - * @function remove - * @category array - * @param {Array} array - Array to be mutated. - * @param {String|Array} removeThese - Items to remove from the array. - * @returns {Array} - The array this method was called on. - * - * @example - * remove([1, 2, 3, 3, 4, 3, 5], 1); - * // => [2, 3, 3, 4, 3, 5] - * @example - * remove([3, 3, 4, 5], 3, 4); - * // => [5] - */ - function remove(array, removeThese) { - let arrayLength = array.length; - for (let index = 0; index < arrayLength; index++) { - const item = array[index]; - if (removeThese.includes(item)) { - array.splice(index, 1); - index--; - arrayLength--; - } - } - return array; - } - /** - * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation. - * - * @function removeBy - * @category array - * @param {Array} source - Array to be mutated. - * @param {Function} iteratee - Function used to check object. Return true to remove the value. - * @returns {Array} - The array this method was called on. - * - * @example - * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);}); - * // => [2, 4] - */ - function removeBy(source, iteratee) { - let arrayLength = source.length; - for (let index = 0; index < arrayLength; index++) { - const item = source[index]; - if (iteratee(item, index)) { - source.splice(index, 1); - index--; - arrayLength--; - } - } - return source; - } - - /** - * Extracts all items in array except the first and last item. - * - * @function rest - * @type {Function} - * @category array - * @param {Array} array - Array to be sliced. - * @returns {Array} - Returns the aggregated array. - * - * @example - * rest([1, 2, 3, 4, 5]); - * // => [2, 3, 4, 5] - */ - function rest(array) { - return array.slice(1, array.length); - } - - /** - * Get the item at the supplied index starting at the end of the array. - * - * @function right - * @type {Function} - * @category array - * @param {Array} source - Array to be sliced. - * @param {Number} amount - Amount from the right. - * @returns {*} - Returns the object at the evaluated position. - * - * @example - * right([1, 2, 3, 4, 5] , 1); - * // => 4 - */ - function right(source, amount) { - return source[source.length - 1 - amount]; - } - - const { floor, random: random$1 } = Math; - /** - * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption.. - * - * @function randomInt - * @category number - * @type {Function} - * @param {Number} max - The highest possible value for the random number. - * @param {Number} [min = 0] - Establishes lowest possible value for the random number. - * @returns {Number} - Returns random integer between the max and min range. - * - * @example - * import { randomInt, assert } from '@universalweb/acid'; - * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;}); - */ - function randomInt(max, min = 0) { - return floor(random$1() * (max - min)) + min; - } - - /** - * Checks if two numbers are the same. - * - * @function isNumberEqual - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @param {Number} target - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumberEqual, assert } from '@universalweb/acid'; - * assert(isNumberEqual(0, 0), true); - */ - function isNumberEqual(source, target) { - return source === target; - } - - const arrayFrom = Array.from; - /** - * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check. - * - * @function toArray - * @category array - * @param {*} arrayLike - Array like object. - * @param {Function} mapFn - Function to map over the array. - * @param {*} thisArg - MapFn's "this". - * @returns {Array|undefined} - New array. - * - * @example - * import { toArray, assert } from '@universalweb/acid'; - * assert(toArray(new Map([[1, 2]])), [[1, 2]]); - */ - function toArray(arrayLike, mapFn, thisArg) { - if (hasValue(arrayLike)) { - return arrayFrom(arrayLike, mapFn, thisArg); - } - } - - /** - * Shuffle an array and return a new array. - * - * @function shuffle - * @category array - * @param {Array} target - Target Array to be shuffled. - * @param {Number} amount - The amount of times to shuffle the array. - * @returns {Array} - An array with the shuffled results. - * - * @example - * import { shuffle, assert } from '@universalweb/acid'; - * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]); - */ - function shuffle(target, amount = target.length) { - if (target.length <= 1) { - return toArray(target); - } - const shuffleArray = toArray(target); - let count = 0; - let index; - let value; - while (count < amount) { - index = randomInt(shuffleArray.length - 1, 0); - value = shuffleArray[count]; - shuffleArray[count] = shuffleArray[index]; - shuffleArray[index] = value; - count++; - } - return shuffleArray; - } - - /** - * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned. - * - * @function sample - * @category array - * @param {Array} source - The array to pull sample(s) from. - * @param {Number} amount - The amount of samples to take. - * @returns {Array} - An array of randomly pulled samples. - * - * @example - * sample([1, 2, 3, 4] , 2); - * // => [1, 3] - */ - function sample(source, amount) { - if (!source) { - return false; - } - const arrayLength = source.length; - if (arrayLength === amount || amount > arrayLength) { - return shuffle(source); - } - if (amount === 1) { - return [source[randomInt(arrayLength - 1, 0)]]; - } - const sampleArray = []; - const used = {}; - let count = 0; - let index; - while (count < amount) { - index = randomInt(source.length - 1, 0); - if (!used[index]) { - sampleArray.push(source[index]); - used[index] = true; - count++; - } - } - return sampleArray; - } - - const mathNativeMin = Math.min; - /** - * Plucks the smallest value from an array. - * - * @function smallest - * @category array - * @type {Function} - * @param {Array} array - Array from which smallest number is taken. - * @returns {Number} - The smallest number. - * - * @example - * smallest([1,2,3]); - * // => 1 - */ - function smallest(array) { - return mathNativeMin(...array); - } - - /** - * What index should the number be inserted at to keep a sorted array still sorted. - * - * @function getNumberInsertIndex - * @category array - * @type {Function} - * @param {Array} source - Array to be checked. - * @param {Number} target - Number to check where to be inserted. - * @returns {Number} - The index at which to insert. - * - * @example - * import { getNumberInsertIndex, assert } from '@universalweb/acid'; - * assert(getNumberInsertIndex([30, 39, 50], 40), 1); - */ - function getNumberInsertIndex(source, target) { - let insertIndex = 0; - everyArray(source, (item, index) => { - insertIndex = index; - if (target >= item) { - insertIndex = index + 1; - return true; - } else { - return false; - } - }); - return insertIndex; - } - - /** - * Returns a shallow copy of the array up to an amount. - * - * @function take - * @category array - * @type {Function} - * @param {Array} source - The source array to take from. - * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction. - * @returns {Array} - The aggregated array. - * - * @example - * import { take, assert } from '@universalweb/acid'; - * assert(take([1,2,3], 2), [1, 2]); - */ - function take(source, endIndex = 1) { - return source.slice(0, endIndex); - } - - /** - * Returns a shallow copy of the array up to an amount starting from the right. - * - * @function takeRight - * @category array - * @type {Function} - * @param {Array} source - The source array to take right from. - * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction. - * @returns {Array} - The aggregated array. - * - * @example - * import { takeRight, assert } from '@universalweb/acid'; - * assert(takeRight([1,2,3], 2), [2, 3]); - */ - function takeRight(source, indexRight = 1) { - const arrayLength = source.length; - return source.slice(arrayLength - indexRight, arrayLength); - } - - function onlyUnique(value, index, array) { - return array.indexOf(value) === index; - } - function sortUnique(item, index, array) { - return item !== array[index - 1]; - } - /** - * Filters the array down to unique elements. - * - * @function unique - * @category array - * @type {Function} - * @param {Array} source - The array to be filtered. - * @param {Boolean} isSorted - Flag which means the array is already sorted. - * @returns {Array} - The filtered array. - * - * @example - * unique([1, 2, 2, 4]); - * // => [1, 2, 4] - */ - function unique(source, isSorted) { - if (isSorted) { - return source.filter(sortUnique); - } - return source.filter(onlyUnique); - } - - /** - * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays. - * - * @function union - * @category array - * @type {Function} - * @param {...Array} arrays - The arrays to be evaluated. - * @returns {Array} - The aggregated array. - * - * @example - * union([1,2,4], [1,2,3]); - * // => [1, 2, 4, 3] - */ - function union(...arrays) { - return unique(flattenDeep(arrays)); - } - - /** - * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned. - * If and when the iteratee yields false the loop stops & false is returned. - * - * @function untilFalseArray - * @category array - * @type {Function} - * @param {Array} source - The array to iterate over. - * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. - * @returns {Array} - Returns true if all returns are true or false if one value returns false. - * - * @example - * import { untilFalseArray, assert } from '@universalweb/acid'; - * assert(untilFalseArray([true, true, false], (item) => { - * return item; - * }), false); - * assert(untilFalseArray([true, true, true], (item) => { - * return item; - * }), true); - */ - function untilFalseArray(source, iteratee) { - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if (iteratee(source[index], index) === false) { - return false; - } - } - return true; - } - - /** - * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned. - * If and when the iteratee yields true the loop stops & false is returned. - * - * @function untilTrueArray - * @category array - * @type {Function} - * @param {Array} source - The array to iterate over. - * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. - * @returns {Array} - Returns true if all returns are false or false if one value returns true. - * - * @example - * import { untilTrueArray, assert } from '@universalweb/acid'; - * assert(untilTrueArray([true], (item) => { - * return item; - * }), false); - * assert(untilTrueArray([true, true, true], (item) => { - * return item; - * }), true); - */ - function untilTrueArray(source, iteratee) { - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if (iteratee(source[index], index) === true) { - return false; - } - } - return true; - } - - /** - * Iterates through the calling object and creates a new object based on the calling object's type with the results, - * (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * Re-checks the length each loop. - * - * @function whileCompactMap - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The originally given array. - * - * @example - * import { whileCompactMap, assert } from '@universalweb/acid'; - * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => { - * return item; - * }), [1, 2, 3, false]); - */ - function whileCompactMap(source, iteratee, results = [], additionalArgument) { - let index = 0; - while (index < source.length) { - const result = results.push(iteratee(source[index], index, source, source.length, additionalArgument)); - index++; - if (hasValue(result)) { - results.push(result); - } - } - return source; - } - - /** - * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over. - * - * @function whileEachArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The originally given array. - * - * @example - * import { whileEachArray, assert } from '@universalweb/acid'; - * const list = []; - * whileEachArray([1, 2, 3], (item, index) => { - * list[index] = item; - * }); - * assert(list, [1, 2, 3]); - */ - function whileEachArray(source, iteratee, additionalArgument) { - let index = 0; - while (index < source.length) { - iteratee(source[index], index, source, source.length, additionalArgument); - index++; - } - return source; - } - - /** - * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. - * Re-checks the length each loop. - * - * @function whileMapArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The originally given array. - * - * @example - * import { whileMapArray, assert } from '@universalweb/acid'; - * assert(whileMapArray([1, 2, 3], (item, index, source) => { - * if (index === 0) { - * source.push(4); - * } - * return item; - * }), [1, 2, 3, 4]); - */ - function whileMapArray(source, iteratee, results = [], additionalArgument) { - let index = 0; - while (index < source.length) { - results.push(iteratee(source[index], index, source, source.length, additionalArgument)); - index++; - } - return source; - } - - /** - * Returns a copy of the array with all instances of the values removed. - * - * @function without - * @type {Function} - * @category array - * @param {Array} target - The target array to be filtered. - * @param {Array} sources - Items to be removed. - * @returns {Array} - The target array filtered. - * - * @example - * import { without, assert } from '@universalweb/acid'; - * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]); - */ - function without(target, sources) { - if (!sources) { - return target; - } - const sourcesSet = construct(Set, sources); - return target.filter((item) => { - return !sourcesSet.has(item); - }); - } - - /** - * Creates an array that is the symmetric difference of the provided arrays. - * - * @function xor - * @category array - * @type {Function} - * @param {...Array} sources - The array(s) to be filtered. - * @returns {Array|undefined} - The filtered array. - * - * @example - * xor([2, 1], [2, 3, 5], [6]); - * // => [1, 3, 5, 6] - */ - function xor(...sources) { - const xorMap = construct(Map); - const xored = []; - const sourcesLength = sources.length; - if (sourcesLength === 2) { - return difference(sources[0], sources[1]); - } - eachArray(sources, (currentArray, parentIndex) => { - eachArray(currentArray, (child, childIndex) => { - let childRoot = xorMap.get(child); - if (!childRoot) { - childRoot = { - count: 1, - parentIndex, - child - }; - xorMap.set(child, childRoot); - } else if (childRoot.parentIndex === parentIndex) { - return; - } else { - childRoot.count++; - } - }); - }); - forEach(xorMap, (item) => { - if (item.count === 1) { - xored.push(item.child); - } - }); - return xored; - } - - /** - * Merges together the values of each of the arrays with the values at the corresponding position. - * - * @function zip - * @type {Function} - * @category array - * @param {Array} arrays - The arrays to process. - * @returns {Array} - Returns the new array of regrouped elements. - * - * @example - * zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] - */ - function zip(...arrays) { - return arrays[0].map((item, index) => { - return arrays.map((array) => { - return array[index]; - }); - }); - } - /** - * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration. - * - * @function unZip - * @type {Function} - * @category array - * @param {Array} source - The array of grouped elements to process. - * @returns {Array} - Returns the new array of regrouped elements. - * - * @example - * unZip([['a', 1, true], ['b', 2, false]]); - * // => [['a', 'b'], [1, 2], [true, false]] - */ - function unZip(source) { - return source[0].map((item, index) => { - return source.map((arraySet) => { - return arraySet[index]; - }); - }); - } - - /** - * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer. - * - * @function ensureBuffer - * @category buffer - * @type {Function} - * @param {*} source - Object to be checked. - * @returns {Array} - Returns an array. - * - * @example - * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid'; - * assert(isBuffer(ensureBuffer('test')), true); - */ - function ensureBuffer(source) { - return (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0); - } - - /** - * Clears the values out of a buffer. - * - * @function clearBuffer - * @category buffer - * @type {Function} - * @param {Array} source - Takes an array to be emptied. - * @returns {Array} - The originally given array. - * - * @example - * import { clearBuffer, assert } from '@universalweb/acid'; - * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([])); - */ - function clearBuffer(source) { - source.fill(0); - return source; - } - - /** - * Checks if an object or objects are a plain object. - * - * @function isFunction - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFunction } from '@universalweb/acid'; - * isFunction(() => {}); - * // => true - */ - const isFunction = (source) => { - return hasValue(source) ? source instanceof Function : false; - }; - - /** - * Checks if the value is a number. - * - * @function isNumber - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumber, assert } from '@universalweb/acid'; - * assert(isNumber(1), true); - */ - const isNumberCall = isConstructorNameFactory('Number'); - const isNumber = isTypeFactory(isNumberCall); - /** - * Checks if the value is not a number. - * - * @function isNotNumber - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNotNumber, assert } from '@universalweb/acid'; - * assert(isNotNumber(1), false); - */ - function isNotNumber(source) { - return !isNumber(source); - } - - /** - * Checks if the value is a string. - * - * @function isString - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isString, assert } from '@universalweb/acid'; - * assert(isString('hello'), true); - * assert(isString(1), false); - */ - const isString = isConstructorFactory(String); - /** - * Checks if the value is not a string. - * - * @function isNotString - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNotString, assert } from '@universalweb/acid'; - * assert(isNotString(1), true); - * assert(isNotString('hello'), false); - */ - function isNotString(source) { - return !isString(source); - } - - const objectAssign = Object.assign; - function assignToObject(target, source) { - if (isPlainObject(source)) { - objectAssign(target, source); - } else if (isFunction(source)) { - const key = source.name; - if (key) { - target[key] = source; - } else { - objectAssign(target, source); - } - } else if (isString(source) || isNumber(source)) { - target[source] = source; - } - return target; - } - /** - * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module. - * - * @function assign - * @category object - * @param {Object} target - The target object. - * @param {...Object} sources - The source object(s). - * @returns {Object} - Returns the target object. - * - * @example - * import { assign, assert } from '@universalweb/acid'; - * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5}); - */ - function assign(target, ...sources) { - const sourceLength = sources.length; - for (let index = 0; index < sourceLength; index++) { - assignToObject(target, sources[index]); - } - return target; - } - - function assignToClass(target, source) { - if (isPlainObject(source)) { - objectAssign(target.prototype, source); - } else if (isFunction(source)) { - const key = source.name; - if (key) { - target.prototype[key] = source; - } - } else if (isConstructor(source)) { - const key = source.constructor?.name; - if (key) { - target.prototype[key] = source; - } - } else if (isString(source) || isNumber(source)) { - target.prototype[source] = source; - } - return target; - } - /** - * The function adds a new method to a class. - * @param {Class} target - The target parameter refers to the Class or constructor function to which you want - * to add a new method. - * @param {Function|Object|String|Number} sources - What you want to add to the class. - * @returns {Class} - Returns the Class provided in the target parameter. - * - * @example - * import { extendClass, assert } from '@universalweb/acid'; - * class Test {} - * function a(){return 1;} - * extendClass(Test, a) - * assert((new Test()).a(), 1); - */ - function extendClass(target, ...sources) { - const sourceLength = sources.length; - for (let index = 0; index < sourceLength; index++) { - assignToClass(target, sources[index]); - } - return target; - } - - /** - * Creates an object composed of keys generated from the results of running each element of collection through iteratee. - * - * @function countBy - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {Function} iteratee - The iteratee to transform keys. - * @returns {Object} - Returns the composed aggregate object. - * - * @example - * import { countBy, assert } from '@universalweb/acid'; - * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2}); - */ - function countBy(collection, iteratee) { - const object = {}; - let result; - eachArray(collection, (item) => { - result = iteratee(item); - if (!object[result]) { - object[result] = 0; - } - object[result]++; - }); - return object; - } - - /** - * Count the amount of times a key is present in a collection. - * - * @function countKey - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {Function} propertyName - The name of the key. - * @returns {Number} - The count. - * - * @example - * import { countKey, assert } from '@universalweb/acid'; - * assert(countKey([{a:1}, {a:3}], 'a'), 2); - */ - function countKey(collection, propertyName) { - let count = 0; - eachArray(collection, (item) => { - if (item[propertyName]) { - count++; - } - }); - return count; - } - - /** - * Count the amount of times a key is not present in a collection. - * - * @function countWithoutKey - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {String} propertyName - The name of the key. - * @returns {Number} - The count. - * - * @example - * import { countWithoutKey, assert } from '@universalweb/acid'; - * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2); - */ - function countWithoutKey(collection, propertyName) { - let count = 0; - eachArray(collection, (item) => { - if (!item[propertyName]) { - count++; - } - }); - return count; - } - - function findIndexCache(element, index, array, indexMatch, propertyName) { - if (element[propertyName] === indexMatch) { - return true; - } - } - - /** - * Finds an object in a collection by the given id and property name and returns the array index of the object. - * - * @function findIndex - * @type {Function} - * @category collection - * @param {Array} collection - Collection to be checked for an item. - * @param {Number|string} id - The value to look for. - * @param {String} [propertyName = 'id'] - The name of the property to compare. - * @returns {Number} - The index of the object. - * - * @example - * findIndex([{id: 1}, {id: 2}], 1); - * // => 0 - */ - function findIndex(collection, id, propertyName = 'id') { - const result = collection.findIndex((element, index) => { - return findIndexCache(element, index, collection, id, propertyName); - }); - return result === -1 ? false : result; - } - - /** - * Finds an object in a collection by the given id and property name. - * - * @function findItem - * @type {Function} - * @category collection - * @param {Array} collection - Collection to be checked for an item. - * @param {Number|string} id - The value to look for. - * @param {String} [propertyName = 'id'] - The name of the property to compare. - * @returns {Object} - The found object. - * - * @example - * findItem([{id: 1}, {id: 2}], 1); - * // => {id: 1} - */ - function findItem(collection, id, propertyName = 'id') { - const result = collection.find((element, index) => { - return findIndexCache(element, index, collection, id, propertyName); - }); - return result === -1 ? false : result; - } - - function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - if (!nextKey) { - return -1; - } else if (!previousKey) { - return 1; - } else if (previousKey < nextKey) { - return 1; - } else if (previousKey > nextKey) { - return -1; - } - return 0; - } - /** - * Sorts an array in place using a key in descending order. - * - * @function sortCollectionDescending - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array and or a clone of the array sorted. - * - * @example - * import { sortCollectionDescending, assert } from '@universalweb/acid'; - * const result = [{id: 1}, {id: 0}]; - * const collect = [{id: 0}, {id: 1}]; - * const prop = 'id'; - * assert(sortCollectionDescending(collect, prop), result); - */ - function sortCollectionDescending(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortCollectionDescendingFilter(previous, next, propertyName, ifMatch); - }); - } - - /** - * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array. - * - * @function getLowest - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @returns {Object} - The newest object in the collection. - * - * @example - * import { getLowest, assert } from '@universalweb/acid'; - * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1}); - */ - function getLowest(collection, propertyName) { - return sortCollectionDescending(collection, propertyName, false)[0]; - } - - function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - if (!nextKey) { - return 1; - } else if (!previousKey) { - return -1; - } else if (previousKey < nextKey) { - return -1; - } else if (previousKey > nextKey) { - return 1; - } - return 0; - } - /** - * Sorts an array in place using a key in ascending order. - * - * @function sortCollectionAscending - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array and or a clone of the array sorted. - * - * @example - * import { sortCollectionAscending, assert } from '@universalweb/acid'; - * const result = [{id: 0}, {id: 1}]; - * const collect = [{id: 1}, {id: 0}]; - * const prop = 'id'; - * assert(sortCollectionAscending(collect, prop), result); - */ - function sortCollectionAscending(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortCollectionAscendingFilter(previous, next, propertyName, ifMatch); - }); - } - - /** - * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array. - * - * @function getHighest - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @returns {Object} - The newest object in the collection. - * - * @example - * import { getHighest, assert } from '@universalweb/acid'; - * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0}); - */ - function getHighest(collection, propertyName = 'id') { - return sortCollectionAscending(collection, propertyName)[0]; - } - - /** - * Creates an object composed of keys generated from the results of running each element of collection thru iteratee. - * The order of grouped values is determined by the order they occur in collection. - * The corresponding value of each key is an array of elements responsible for generating the key. - * - * @function groupBy - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {Function} iteratee - The iteratee to transform keys. - * @returns {Object} - Returns the composed aggregate object. - * - * @example - * groupBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': [4.2], '6': [6.1, 6.3] } - */ - function groupBy(collection, iteratee) { - const sortedObject = {}; - eachArray(collection, (item) => { - const results = iteratee(item); - if (!sortedObject[results]) { - sortedObject[results] = []; - } - sortedObject[results].push(item); - }); - return sortedObject; - } - - /** - * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique. - * - * @function indexBy - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {String} propertyName - The property name to index by. - * @returns {Object} - Returns the composed aggregate object. - * - * @example - * import { indexBy, assert } from '@universalweb/acid'; - * const result = { "0": {name: 'test', id: 0}, "1": {name: 'test2', id: 1}}; - * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id'); - * assert(indexed, result); - */ - function indexBy(collection, propertyName = 'id') { - const sortedObject = {}; - eachArray(collection, (item) => { - sortedObject[item[propertyName]] = item; - }); - return sortedObject; - } - - /** - * Invokes a function on the provided property name in each object in the collection. - * - * @function invokeCollection - * @category collection - * @type {Function} - * @param {Array} collection - Collection from which method will be taken. - * @param {String} property - Value used to pluck method from object. - * @param {*} value - Value to be passed to callable property. - * @returns {Array} - Returns the results of the invoked method. - * - * @example - * import { invokeCollection, assert } from '@universalweb/acid'; - * const results = invokeCollection([{ - * test(item, index) { return [item, index];} - * }], 'test', ['EXAMPLE']); - * assert(results, [['EXAMPLE', 0]]); - */ - function invokeCollection(collection, property, value, thisBind) { - if (thisBind) { - return mapArray(collection, (item, index) => { - return item[property].call(thisBind, value); - }); - } - return mapArray(collection, (item, index) => { - return item[property](value); - }); - } - - /** - * Asynchronously awaits & invokes a function on the provided property name in each object in the collection. - * - * @function invokeCollectionAsync - * @category collection - * @type {Function} - * @async - * @param {Array} collection - Collection from which method will be taken. - * @param {String} property - Value used to pluck method from object. - * @param {*} value - Value to be passed to callable property. - * @returns {Array} - Returns the results of the invoked method. - * - * @example - * import { invokeCollectionAsync, assert } from '@universalweb/acid'; - * const results = await invokeCollectionAsync([{ - * async test(item, index) { return [item, index];} - * }], 'test', ['EXAMPLE']); - * assert(results, [['EXAMPLE', 0]]); - */ - function invokeCollectionAsync(collection, property, value, thisBind) { - if (thisBind) { - return mapAsyncArray(collection, (item) => { - return item[property].call(thisBind, value); - }); - } - return mapAsyncArray(collection, async (item) => { - return item[property](value); - }); - } - - /** - * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array. - * - * @function pluckObject - * @category object - * @type {Function} - * @param {Object} source - Array used to determine what sources to be plucked. - * @param {String|Array} targets - Property name. - * @returns {Array|undefined} - An array of plucked sources. - * - * @example - * import { pluckObject, assert } from '@universalweb/acid'; - * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]); - */ - function pluckObject(source, targets) { - if (!source) { - return; - } else if (isString(targets)) { - return source[targets]; - } - return mapArray(targets, (item) => { - return source[item]; - }); - } - - /** - * Returns an array of the plucked values from the collection. - * - * @function pluck - * @category collection - * @type {Function} - * @param {Array} collection - Array used to determine what value to be plucked. - * @param {(String|Number|Array.)} targets - Property name. - * @returns {Array} - An array of plucked values. - * - * @example - * import { pluck, assert } from '@universalweb/acid'; - * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]); - * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]); - */ - function pluck(collection, targets) { - return mapArray(collection, (item) => { - return pluckObject(item, targets); - }); - } - - function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - return previousKey.localeCompare(nextKey); - } - /** - * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array. - * - * @function sortCollectionAlphabetically - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - Name of property to compare. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array. - * - * @example - * import { sortCollectionAlphabetically, assert } from '@universalweb/acid'; - * const result = [{"letter":"a"},{"letter":"c", g: 0},{"letter":"c", g: 2}, {letter:'f'}]; - * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c", g: 2}, {letter:'c', g: 0}]; - * const prop = 'letter'; - * function ifMatchSort(c, n) { - * if (c.g < n.g) { - * return -1; - * } - * if (c.g > n.g) { - * return 1; - * } - * } - * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result); - */ - function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortObjectsAlphabetically(previous, next, propertyName, ifMatch); - }); - } - - function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - return nextKey.localeCompare(previousKey); - } - /** - * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array. - * - * @function sortCollectionAlphabeticallyReverse - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - Name of property to compare. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array. - * - * @example - * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid'; - * const result = [{letter:'f'},{"letter":"c"}, {"letter":"a"}]; - * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c"}]; - * const prop = 'letter'; - * assert(sortCollectionAlphabeticallyReverse(collect, prop), result); - */ - function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch); - }); - } - - /** - * Return the file extension. - * - * @function getFileExtension - * @category file - * @param {*} source - Object to be checked. - * @returns {String|undefined} - Returns the extension. - * - * @example - * import { getFileExtension, assert } from '@universalweb/acid'; - * assert(getFileExtension('test.js'),'js'); - */ - function getFileExtension(source) { - if (source) { - return source.substring(source.lastIndexOf('.') + 1); - } - } - - /** - * Return the file extension. - * - * @function getFilename - * @category file - * @param {*} source - Object to be checked. - * @returns {String|undefined} - Returns the extension. - * - * @example - * import { getFilename, assert } from '@universalweb/acid'; - * assert(getFilename('./universalweb/test.js'),'test.js'); - */ - function getFilename(source) { - if (source) { - return source.substring(source.lastIndexOf('/') + 1); - } - } - - function regexTestFactory(regexType) { - return (item) => { - return hasValue(item) ? regexType.test(item) : false; - }; - } - - /** - * Checks if the string has a .css extension. - * - * @function isFileCSS - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileCSS, assert } from '@universalweb/acid'; - * assert(isFileCSS('test.css'), true); - */ - const isFileCSS = regexTestFactory(/\.css$/); - - /** - * Checks if the string has a .html extension. - * - * @function isFileHTML - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileHTML, assert } from '@universalweb/acid'; - * assert(isFileHTML('test.html'), true); - */ - const isFileHTML = regexTestFactory(/\.html$/); - - /** - * Checks if the string has a .js extension. - * - * @function isFileJS - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileJS, assert } from '@universalweb/acid'; - * assert(isFileJS('test.js'), true); - */ - const isFileJS = regexTestFactory(/\.js$/); - - /** - * Checks if the string has a .json extension. - * - * @function isFileJSON - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileJSON, assert } from '@universalweb/acid'; - * assert(isFileJSON('test.json'), true); - */ - const isFileJSON = regexTestFactory(/\.json$/); - - /** - * Creates a function that executes callable, only after being called n times. - * - * @function after - * @category function - * @type {Function} - * @param {Number} amount - The number of calls until method is invoked. - * @param {Function} callable - The function to be called. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * import { after, assert } from '@universalweb/acid'; - * const onlyAfter = after(1, (item) => { return item;}); - * assert(onlyAfter(1), undefined); - * assert(onlyAfter(2), 2); - */ - function after(amount, callable) { - let point = amount; - let value; - const onlyAfter = (...args) => { - if (point !== null) { - point--; - } - if (point <= 0) { - value = callable(...args); - point = null; - } - return value; - }; - return onlyAfter; - } - - /** - * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments. - * - * @function ary - * @category function - * @type {Function} - * @param {Function} callable - The function to cap arguments for. - * @param {Number} amount - The arity cap. - * @returns {Object} - Returns the new capped function. - * - * @example - * import { ary, assert } from '@universalweb/acid'; - * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]); - */ - function ary(callable, amount) { - return (...args) => { - return callable(...args.splice(0, amount)); - }; - } - - /** - * Creates a function that executes callable, only before n times. - * - * @function before - * @category function - * @type {Function} - * @param {Number} amount - The number of calls before n. - * @param {Function} callable - The function to be called. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * import { before, assert } from '@universalweb/acid'; - * const onlyBefore = before(3, () => { return 1;}); - * assert(onlyBefore(1), 1); - */ - function before(amount, callable) { - let point = amount; - let value; - const onlyBefore = (...args) => { - if (point !== null) { - point--; - } - if (point >= 1) { - value = callable(...args); - } else { - point = null; - } - return value; - }; - return onlyBefore; - } - - /** - * Asynchronously iterates through the given object. - * - * @function eachAsyncObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg. - * @param {*} thisCall - Iteratee called with thisCall as this. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Object|Function|undefined} - Returns source. - * - * @example - * import { eachAsyncObject, assert } from '@universalweb/acid'; - * const tempList = []; - * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => { - * tempList[key] = item; - * }); - * assert(tempList, {a: 1, b: 2, c: 3}); - */ - const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => { - if (!source) { - return; - } - const objectKeys = keys(source); - if (hasValue(thisCall)) { - await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { - return iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg); - }); - } else { - await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { - return iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg); - }); - } - return source; - }; - - /** - * Iterates through the given object. - * - * @function eachObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Object|Function|undefined} - Returns the calling object. - * - * @example - * import { eachObject, assert } from '@universalweb/acid'; - * assert(eachObject({a: 1, b: 2, c: 3}, (item) => { - * console.log(item); - * }), {a: 1, b: 2, c: 3}); - */ - function eachObject(source, iteratee, thisCall, additionalArg) { - if (!source) { - return; - } - const objectKeys = keys(source); - if (hasValue(thisCall)) { - eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { - iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg); - }); - } else { - eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { - iteratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg); - }); - } - return source; - } - - async function forEachAsync(source, callback) { - const values = []; - const properties = []; - let valuesLength = 0; - source.forEach((item, key) => { - values[valuesLength] = item; - properties[valuesLength] = item; - valuesLength++; - }); - for (let index = 0; index < valuesLength; index++) { - await callback(values[index], properties[index]); - } - return source; - } - - /** - * Checks if an object(s) is a Set. - * - * @function isSet - * @category type - * @param {...*} sources - Objects to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isSet, assert } from '@universalweb/acid'; - * assert(isSet(new Set()), true); - */ - const isSetCall = isConstructorNameFactory('Set'); - const isSet = isTypeFactory(isSetCall); - - function forOf(source, iteratee) { - if (isSet(source)) { - for (const value of source) { - iteratee(value, source); - } - return source; - } - for (const [key, value] of source) { - iteratee(value, key, source); - } - return source; - } - - /** - * Checks if an object or objects are a Int16Array. - * - * @function isGenerator - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isGenerator } from '@universalweb/acid'; - * isGenerator(function* (){}); - * // => true - */ - const isGeneratorCall = isConstructorNameFactory('GeneratorFunction'); - const isGenerator = isTypeFactory(isGeneratorCall); - - async function forOfAsync(source, iteratee, generatorArgs) { - if (isSet(source)) { - for (const value of source) { - await iteratee(value, source); - } - return source; - } - if (isGenerator(source)) { - for await (const item of source(...generatorArgs)) { - await iteratee(item, source); - } - } - for (const [key, value] of source) { - await iteratee(value, key, source); - } - return source; - } - - /** - * Checks if an object is an async function. - * - * @function isAsync - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isAsync, assert } from '@universalweb/acid'; - * assert(isAsync(async() => {}), true); - */ - const isAsyncCall = isConstructorNameFactory('AsyncFunction'); - const isAsync = isTypeFactory(isAsyncCall); - - function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) { - return (source, iteratee, argument1, argument2, argument3) => { - let returned; - const isIterateeAsync = isAsync(iteratee); - if (!hasValue(source) || !iteratee) { - return; - } else if (isArray(source)) { - returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; - } else if (isPlainObject(source) || isFunction(source)) { - returned = isIterateeAsync ? objectLoopAsync : objectLoop; - } else if (forOfLoop) { - returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; - } else if (isGenerator(source)) { - returned = forOfLoopAsync; - } else { - returned = isIterateeAsync ? objectLoopAsync : objectLoop; - } - return returned(source, iteratee, argument1, argument2, argument3); - }; - } - - /** - * Iterates through the given object. - * - * @function each - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array | object | Function} - The originally given object. - * - * @example - * import { each, assert } from '@universalweb/acid'; - * const list = {}; - * each({a: 1, b: 2, c: 3}, (item, key) => { - * list[key] = item; - * }); - * assert(list, {a: 1, b: 2, c: 3}); - */ - const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync); - - class Chain { - constructor(methods) { - this.addChainMethod(methods); - } - addChainMethod(methods) { - const thisChain = this; - each(methods, (method, methodName) => { - thisChain[methodName] = function (...args) { - this.value = method.call(thisChain, thisChain.value, ...args); - return thisChain; - }; - }); - } - setValue(value) { - this.value = value; - return this; - } - done() { - const value = this.value; - this.value = null; - return value; - } - value = null; - } - /** - * Creates a chainable set of functions. - * - * @function chain - * @category function - * @type {Function} - * @param {Array|Object} config - The object to take methods from. - * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining. - * - * @example - * import { chain, assert } from '@universalweb/acid'; - * const chained = chain({ - * a(value, c) { - * return value + c; - * } - * }).setValue(2).a(1).done(); - * assert(chained, 3); - */ - function chain(config) { - return construct(Chain, [config]); - } - - /** - * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient. - * - * @function curry - * @category function - * @type {Function} - * @param {Function} callable - The function to curry. - * @param {Number} arity - The arity of method. - * @returns {*} - Returns the new curried function. - * - * @example - * import { curry, assert } from '@universalweb/acid'; - * const result = curry((a, b, c) => { - * return [a, b, c]; - * })(1)(2)(3); - * assert(result, [1, 2, 3]); - */ - function curry(callable, arity = callable.length) { - const curries = []; - const curried = (...curryArgs) => { - curries.push(...curryArgs); - if (curries.length === arity) { - const result = callable(...curries); - clearArray(curries); - return result; - } - return curried; - }; - return curried; - } - - /** - * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order. - * - * @function curryRight - * @type {Function} - * @param {Function} callable - The function to curry. - * @param {Number} arity - The arity of method. - * @returns {*} - Returns the new curried function. - * - * @example - * import { curryRight, assert } from '@universalweb/acid'; - * const result = curryRight((a, b, c) => { - * return [a, b, c]; - * })(1)(2)(3); - * assert(result, [3, 2, 1]); - */ - function curryRight(callable, arity = callable.length) { - const curries = []; - const curried = (...curryArgs) => { - curries.unshift(...curryArgs); - if (curries.length === arity) { - const result = callable(...curries); - clearArray(curries); - return result; - } - return curried; - }; - return curried; - } - - /** - * This method returns undefined. - * - * @function noop - * @category function - * @type {Function} - * @returns {undefined} - Returns undefined. - * - * @example - * import { noop, assert } from '@universalweb/acid'; - * assert(noop(), undefined); - */ - function noop() { - return; - } - - /** - * Iterates based on the amount given invoking the iteratee with the current index as an argument. - * - * @function times - * @category utility - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @returns {undefined} - Nothing. - * - * @example - * import { times } from '@universalweb/acid'; - * times(3, (item) => { - * console.log(item); - * }); - * // 0 - * // 1 - * // 2 - * // => undefined - */ - function times(amount, iteratee) { - for (let index = 0; index < amount; index++) { - iteratee(index); - } - } - /** - * Iterates based on the amount given and maps the results returned by the iteratee each time to an array. - * - * @function timesMap - * @category utility - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @param {Array} [results = []] - Array that will have iteratee return pushed to. - * @returns {Array} - An array with iteratee's returned values. - * - * @example - * import { timesMap } from '@universalweb/acid'; - * timesMap(3, (item) => { - * return item; - * }); - * // => [0, 1, 2] - */ - function timesMap(amount, iteratee, results = []) { - for (let index = 0; index < amount; index++) { - results[index] = iteratee(amount); - } - return results; - } - - class Timers { - list = construct(Map); - construct() {} - /** - * Remove a timer that was created using the timer function. - * - * @param {Number} id - The id of the timer to remove. - * @returns {undefined} - Returns nothing. - * - * @example - * import { timer, assert } from '@universalweb/acid'; - * timer(() => {}, 100); - * // => 0 - */ - remove(id) { - clearTimeout(id); - this.list.delete(id); - } - has(id) { - return this.list.has(id); - } - get(id) { - return this.list.get(id); - } - /** - * Create a timer and add it to the list of timers. - * - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setTimeoutId ID. - * - * @example - * import { timers, assert } from '@universalweb/acid'; - * timers.set(() => {}, 100); - * // => 0 - */ - set(callable, time) { - const currentThis = this; - const id = setTimeout(() => { - callable(); - currentThis.remove(id); - }, time); - this.list.set(id, true); - return id; - } - /** - * Clear all active timers. - * - * @returns {undefined} - Returns undefined. - * - * @example - * import { timers, assert } from '@universalweb/acid'; - * timers.clear(); - * // => undefined - */ - clear() { - const currentThis = this; - currentThis.list.forEach((id) => { - currentThis.remove(id); - }); - } - } - const timers = construct(Timers); - /** - * Timer wrapper. - * - * @function timer - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setTimeoutId ID. - * - * @example - * import { timer, assert } from '@universalweb/acid'; - * timer(() => {}, 100); - * // => 0 - */ - function timer(callable, time) { - return timers.set(callable, time); - } - /** - * Clear all active timers. - * - * @function clearTimers - * @category function - * @returns {undefined} - Returns undefined. - * - * @example - * import { clearTimers, assert } from '@universalweb/acid'; - * clearTimers(); - * // => undefined - */ - function clearTimers() { - const id = setTimeout(noop, 0); - times(id, (index) => { - timers.remove(index); - }); - } - - const applyNative = Reflect.apply; - /** - * Calls a target function with an optional "this" and optional arguments as specified. Same as Reflect.apply but with a function check. - * - * @function apply - * @category function - * @param {Function} target - The target function to call. - * @param {*} thisArgument - Array like object. - * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called. - * @returns {*} - The result of calling the given target function with the specified this value and arguments. - * - * @example - * import { apply, assert } from '@universalweb/acid'; - * assert(apply(function (a) {return a;}, undefined, [2]), 2); - */ - function apply(target, thisArgument, argumentsList) { - if (isFunction(target)) { - return applyNative(target, thisArgument, argumentsList); - } - } - - /** - * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer. - * - * @function debounce - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Function} - The debounced function. - * - * @example - * import { debounce, promise, assert } from '@universalweb/acid'; - * const promised = promise((a) => { - * const debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0); - * }); - * assert(await promised(), 'debounced'); - */ - function debounce(callable, time) { - function debounced(...args) { - if (debounced.id !== false) { - timers.remove(debounced.id); - } - debounced.id = timer(() => { - debounced.callable(...args); - debounced.id = false; - }, time); - } - debounced.id = false; - debounced.callable = callable.bind(debounced); - debounced.clear = () => { - if (debounced.id !== false) { - timers.remove(debounced.id); - debounced.id = false; - } - }; - return debounced; - } - - /** - * Checks if the given method is a function. If it is then it invokes it with the given arguments. - * - * @function ifInvoke - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked if possible. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args - Arguments to pass to the function. - * @returns {*} - Returns the method invoked or undefined. - * - * @example - * import { ifInvoke, assert } from '@universalweb/acid'; - * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]); - */ - function ifInvoke(callable, thisBind, ...args) { - if (isFunction(callable)) { - if (thisBind) { - return callable.call(thisBind, ...args); - } - return callable(...args); - } - } - - /** - * Creates a function that negates the result of the predicate callable. - * - * @function negate - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @returns {*} - Returns the given methods result. - * - * @example - * negate(() => { return false;})(); - * // => true - */ - function negate(callable) { - return (...args) => { - return !callable(...args); - }; - } - - /** - * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned. - * - * @function nthArg - * @category function - * @type {Function} - * @param {Number} [index = 0] - The index of the argument to return. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * nthArg(1)('a', 'b'); - * // => 'b' - */ - function nthArg(index = 0) { - return (...args) => { - return args[index]; - }; - } - - /** - * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function. - * - * @function once - * @category function - * @type {Function} - * @param {Function} callable - The function to be called. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * const onceOnly = once((item) => { return item;}); - * onceOnly(5); - * onceOnly(3); - * // => 5 - */ - const once = (callable) => { - let value; - const onlyOnce = (...args) => { - if (!hasValue(value)) { - value = callable(...args); - } - return value; - }; - return onlyOnce; - }; - - /** - * Returns the constructor of an object. - * - * @function getType - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { getType, assert } from '@universalweb/acid'; - * assert(getType(1), true); - */ - function getType(source) { - return source?.constructor; - } - - /** - * Returns a new empty object of the same type. - * - * @function cloneType - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { cloneType, assert } from '@universalweb/acid'; - * assert(cloneType([1]), []); - */ - function cloneType(source, args = []) { - const sourceType = getType(source); - if (sourceType === Function) { - if (sourceType.name === 'function') { - return function () {}; - } - } - return construct(sourceType, args); - } - - /** - * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object. - * - * @function forOfCompactMap - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => { - * return item; - * }); - * // => {b: 2, c: 3} - */ - function forOfMap(source, iteratee = returnValue, resultsObject) { - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = iteratee(value, results, source); - methodPushBound(result); - } - return results; - } - const methodSet = isFunction(results.set); - for (const [key, value] of source) { - const result = iteratee(value, key, results, source); - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - return results; - } - - /** - * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function forOfCompactMapAsync - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * import { forOfCompactMapAsync, assert } from '@universalweb/acid'; - * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => { - * return item; - * }), {b: 2, c: 3}); - */ - async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) { - if (isGenerator(source)) { - const resultsGenerator = []; - for await (const item of source(...generatorArgs)) { - resultsGenerator.push(await iteratee(item, resultsGenerator, source)); - } - return resultsGenerator; - } - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = await iteratee(value, results, source); - methodPushBound(result); - } - return results; - } - const methodSet = isFunction(results.set); - for await (const [key, value] of source) { - const result = await iteratee(value, key, results, source); - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - return results; - } - - /** - * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. - * - * @function mapObjectAsync - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function|undefined} - An object of the same calling object's type. - * - * @example - * import { mapAsyncObject, assert } from '@universalweb/acid'; - * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, b: undefined, c: 3}); - */ - async function mapAsyncObject(source, iteratee, results = {}) { - if (!source) { - return; - } - await eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => { - results[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys); - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. - * - * @function mapObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Object|Function|undefined} - An object of the same calling object's type. - * - * @example - * import { mapObject, assert } from '@universalweb/acid'; - * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, b: undefined, c: 3}); - */ - function mapObject(source, iteratee, results = {}, thisCall, additionalArg) { - if (!source) { - return; - } - if (hasValue(thisCall)) { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - results[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg); - }); - } else { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - results[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg); - }); - } - return results; - } - - /** - * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object. - * - * @function map - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {Object | Function} [results = {}] - Object that will be used to assign results. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array | object | Function} - A new object of the same calling object's type. - * - * @example - * import { map, assert } from '@universalweb/acid'; - * assert(map({a: 1, b: 2, c: 3}, (item) => { - * return item * 2; - * }), {a: 2, b: 4, c: 6}); - */ - const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync); - - /** - * Creates a function that invokes iteratee with the arguments it receives and returns their results. - * - * @function over - * @category function - * @type {Function} - * @param {(Array.|Object.)} iteratees - The list of functions to loop through. - * @returns {Function} - Returns the new over wrapped function. - * - * @example - * import { overEvery, assert } from '@universalweb/acid'; - * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]); - */ - function over(iteratees) { - return (...args) => { - return map(iteratees, (item) => { - return item(...args); - }); - }; - } - - /** - * Iterates through the given object while the iteratee returns true. - * - * @function everyAsyncObject - * @category object - * @type {Function} - * @param {Object} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { everyAsyncObject, assert } from '@universalweb/acid'; - * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => { - * return item; - * }); - * assert(result, true); - */ - async function everyAsyncObject(source, iteratee) { - if (!source) { - return; - } - const objectKeys = keys(source); - return everyAsyncArray(objectKeys, (key, index, original, propertyCount) => { - return iteratee(source[key], key, source, propertyCount, original); - }); - } - - /** - * Iterates through the given object while the iteratee returns true. - * - * @function everyObject - * @category object - * @type {Function} - * @param {Object} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { everyObject, assert } from '@universalweb/acid'; - * const result = everyObject({a: true, b: true, c: true}, (item) => { - * return item; - * }); - * assert(result, true); - */ - function everyObject(source, iteratee) { - if (!source) { - return; - } - const objectKeys = keys(source); - return everyArray(objectKeys, (key, index, original, propertyCount) => { - return iteratee(source[key], key, source, propertyCount, original); - }); - } - - /** - * Iterates (for of) through the given object while the iteratee returns true using a for of loop. - * - * @function forOfEvery - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { every, assert } from '@universalweb/acid'; - * assert(forOfEvery({a: false, b: true, c: true}, (item) => { - * return item; - * }), false); - */ - function forOfEvery(source, iteratee = returnValue) { - if (isArray(source) || isSet(source)) { - for (const value of source) { - const result = iteratee(value, source); - if (result === false) { - return false; - } - } - } else { - for (const [key, value] of source) { - const result = iteratee(value, key, source); - if (result === false) { - return false; - } - } - } - return true; - } - - /** - * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop. - * - * @function forOfEveryAsync - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { every, assert } from '@universalweb/acid'; - * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => { - * return item; - * }), false); - */ - async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) { - if (isGenerator(source)) { - for await (const item of source(...generatorArgs)) { - const result = await iteratee(item, source); - if (result === false) { - return false; - } - } - } else if (isArray(source) || isSet(source)) { - for (const value of source) { - const result = await iteratee(value, source); - if (result === false) { - return false; - } - } - } else { - for (const [key, value] of source) { - const result = await iteratee(value, key, source); - if (result === false) { - return false; - } - } - } - return true; - } - - /** - * Iterates through the given object while the iteratee returns true. - * - * @function every - * @category utility - * @type {Function} - * @param {Object | Array | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { every, assert } from '@universalweb/acid'; - * assert(every({a: false, b: true, c: true}, (item) => { - * return item; - * }), false); - */ - const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync); - - /** - * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives. - * - * @function overEvery - * @category function - * @type {Function} - * @param {(Array.|Object.)} predicates - The list of functions to loop through. - * @returns {Function} - Returns the new overEvery wrapped function. - * - * @example - * import { overEvery, assert } from '@universalweb/acid'; - * assert(overEvery([Boolean, isFinite])('1'), true); - */ - function overEvery(predicates) { - return (arg) => { - return every(predicates, (predicate) => { - return predicate(arg); - }); - }; - } - - /** - * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on. - * - * @function reArg - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Array} indexes - The arranged argument indexes. - * @returns {Function} - Returns the new function. - * - * @example - * reArg((a, b, c) => { - * return [a, b, c]; - * }, [1,2,0])(1,2,3); - * // => [2, 3, 1] - */ - function reArg(callable, indexes) { - return (...args) => { - return callable( - ...indexes.map((item) => { - return args[item]; - }) - ); - }; - } - - /** - * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer. - * - * @function throttle - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Function|undefined} - The throttled function. - * - * @example - * const throttled = throttle(() => { console.log('throttle'); }, 0)(); - * throttled(); - * // 'throttle' - */ - function throttle(callable, time) { - function throttled(...args) { - if (throttled.id) { - throttled.shouldThrottle = true; - return; - } - throttled.callable(...args); - throttled.id = timer(() => { - if (throttled.shouldThrottle) { - throttled.callable(...args); - } - throttled.id = false; - }, time); - } - throttled.id = false; - throttled.callable = callable.bind(throttled); - throttled.clear = () => { - timers.remove(throttled.id); - throttled.id = false; - }; - return throttled; - } - - /** - * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function. - * - * @function wrap - * @category function - * @type {Function} - * @param {*} value - The value to wrap. - * @param {Function} wrapper - The wrapper function. - * @returns {Function} - The new function. - * - * @example - * wrap('Lucy', (firstName, lastName) => { - * return `My name is ${firstName} ${lastName}.`; - * })('Diamonds'); - * // => 'My name is Lucy Diamonds.' - */ - function wrap(value, wrapper) { - return (...arg) => { - return wrapper(value, ...arg); - }; - } - - const functionPrototype = Function.prototype; - /** - * Caches a prototype method. - * - * @function cacheNativeMethod - * @category utility - * @type {Function} - * @param {Function} method - Prototype method. - * @returns {Function} - Cached method. - * - * @example - * import { cacheNativeMethod, assert } from '@universalweb/acid'; - * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1); - */ - function cacheNativeMethod(method) { - return functionPrototype.call.bind(method); - } - - /** - * Returns an array of all properties (enumerable or not) found directly upon a given object. - * - * @function getPropNames - * @category object - * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned. - * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object. - * - * @example - * import { getPropNames, assert } from '@universalweb/acid'; - * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']); - */ - const getPropNames = Object.getOwnPropertyNames; - /** - * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object. - * - * @function getPropDesc - * @category object - * @param {Object} target - The target object. - * @param {String} property - The name of the property whose description is to be retrieved. - * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise. - * - * @example - * getPropDesc({ bar: 42 }, 'bar'); - * // => { configurable: true, enumerable: true, value: 42, writable: true } - */ - const getPropDesc = Object.getOwnPropertyDescriptor; - /** - * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object. - * - * @function defProp - * @category object - * @param {Object} target - The object on which to define the property. - * @param {String} property - The name of the property whose description is to be retrieved. - * @param {Object} descriptor - The descriptor for the property being defined or modified. - * @returns {Object} - The object that was passed to the function. - * - * @example - * defProp({}, 'key', { - * enumerable: false, - * configurable: false, - * writable: false, - * value: 'static' - * }).key; - * // => 'static' - */ - const defProp = Object.defineProperty; - const hasProp = cacheNativeMethod(Object.hasOwnProperty); - - /** - * Determines whether two values are the same value. - * - * @function isSame - * @category object - * @param {*} source - Value to compare to. - * @param {*} target - A value to compare. - * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value. - * - * @example - * import { isSame, assert } from '@universalweb/acid'; - * assert(isSame('foo', 'foo'), true); - */ - const isSame = Object.is; - - /** - * Adds two numbers. - * - * @function add - * @category math - * @type {Function} - * @param {Number} augend - First number. - * @param {Number} addend - Second number which is being added to another (augend). - * @returns {Number} - Returns the sum of the arguments. - * - * @example - * import { add, assert } from '@universalweb/acid'; - * assert(add(1, 1), 2); - */ - function add(augend, addend) { - return augend + addend; - } - - /** - * Decrements a number. - * - * @function deduct - * @category math - * @type {Function} - * @param {Number} source - First number. - * @returns {Number} - Returns a decremented version of the number. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - * deduct(10); - * // => 9 - */ - function deduct(source) { - return source - 1; - } - - /** - * Divides two numbers. - * - * @function divide - * @category math - * @type {Function} - * @param {Number} source - First number. - * @param {Number} value - Second number. - * @returns {Number} - Returns the quotient of the arguments. - * - * @example - * import { divide, assert } from '@universalweb/acid'; - * assert(divide(10, 5), 2); - */ - function divide(source, value) { - return source / value; - } - - /** - * Increments a number. - * - * @function increment - * @category math - * @type {Function} - * @param {Number} source - First number. - * @returns {Number} - Returns an incremented version of the number. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - * increment(10); - * // => 11 - */ - function increment(source) { - return source + 1; - } - - /** - * Multiplies two numbers. - * - * @function multiply - * @category math - * @type {Function} - * @param {Number} source - First number. - * @param {Number} value - Second number. - * @returns {Number} - Returns the product of the arguments. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - */ - function multiply(source, value) { - return source * value; - } - - /** - * Calculate the progress from a given total and current amount. - * - * @function calcProgress - * @category utility - * @type {Function} - * @param {Number} total - The total amount. - * @param {Number} currentAmount - The current amount. - * @returns {Number} - The progress as a percentage. - * - * @example - * import { calcProgress, assert } from '@universalweb/acid'; - * assert(calcProgress(100, 1), 1); - */ - function calcProgress(total, currentAmount) { - if (total === 0) { - return false; - } - if (currentAmount === 0) { - return 0; - } - return (currentAmount / total) * 100; - } - - const { random } = Math; - /** - * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption.. - * - * @function randomFloat - * @category math - * @type {Function} - * @param {Number} max - Establishes highest possible value for the random number. - * @param {Number} [min = 0] - Establishes lowest possible value for the random number. - * @returns {Number} - Returns random integer between the max and min range. - * - * @example - * import { randomFloat, assert } from '@universalweb/acid'; - * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;}); - * // => 9.1 - */ - function randomFloat(max, min = 0) { - return random() * (max - min) + min; - } - - /** - * Extracts the remainder between two numbers. - * - * @function remainder - * @category math - * @type {Function} - * @param {Number} source - First number. - * @param {Number} value - Second number. - * @returns {Number} - Returns the remainder of the arguments. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - * remainder(10, 6); - * // => 4 - */ - function remainder(source, value) { - return source % value; - } - - /** - * Subtract all numbers in the array starting from left to right & return the difference. - * - * @function subtractAll - * @category math - * @type {Function} - * @param {Number[]} source - Array of numbers. - * @returns {Number} - Returns the final difference. - * - * @example - * import { subtractAll, assert } from '@universalweb/acid'; - * assert(subtractAll([10, 1, 2, 3]), 5); - */ - function subtractAll(source) { - return source.reduce((a, b) => { - return a - b; - }, 0); - } - - /** - * Sum all numbers in a given array. - * - * @function sumAll - * @category math - * @type {Function} - * @param {Number[]} source - Array of numbers. - * @returns {Number} - Returns a single number. - * - * @example - * import { sumAll, assert } from '@universalweb/acid'; - * assert(sumAll([10, 1, 2, 3]), 5); - */ - function sumAll(source) { - return source.reduce((a, b) => { - return a + b; - }, 0); - } - - /** - * Checks if a number is within a range. - * - * @function isNumberInRange - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @param {Number} start - Beginning of range. - * @param {Number} end - End of range. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumberInRange, assert } from '@universalweb/acid'; - * assert(isNumberInRange(1, 0, 2), true); - * assert(isNumberInRange(1, 2, 5), false); - */ - function isNumberInRange(source, start, end) { - return source > start && source < end; - } - - /** - * Checks if a number is within a range. - * - * @function isNumberNotInRange - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @param {Number} start - Beginning of range. - * @param {Number} end - End of range. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumberNotInRange, assert } from '@universalweb/acid'; - * assert(isNumberNotInRange(1, 0, 2), false); - * assert(isNumberNotInRange(1, 2, 5), true); - */ - function isNumberNotInRange(source, start, end) { - return source < start || source > end; - } - - /** - * Checks if a number is negative & returns true or false. - * - * @function isPositive - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isPositive, assert } from '@universalweb/acid'; - * assert(isPositive(1), true); - */ - const { sign } = Math; - function isPositive(source) { - return sign(source) === 1; - } - - /** - * Strictly checks if a number is zero. - * - * @function isZero - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isZero, assert } from '@universalweb/acid'; - * assert(isZero(0), true); - */ - function isZero(source) { - return source === 0; - } - - const objectEntries = Object.entries; - /** - * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error. - * - * @function getEntries - * @category object - * @param {Object} source - The source object. - * @returns {Array|undefined} - Returns the Object.entries of the source object. - * - * @example - * import { getEntries, assert } from '@universalweb/acid'; - * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]); - */ - function getEntries(source) { - if (hasValue(source)) { - return objectEntries(source); - } - } - - /** - * Extracts all keys from an object whose values are not null or undefined. - * - * @function compactKeys - * @category object - * @type {Function} - * @param {Object} object - Object from which keys are extracted. - * @returns {Array} - Returns an array of key values. - * - * @example - * import { compactKeys, assert } from '@universalweb/acid'; - * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']); - */ - function compactKeys(object) { - const compactedKeys = []; - eachObject(object, (item, key) => { - if (hasValue(item)) { - compactedKeys.push(key); - } - }); - return compactedKeys; - } - - /** - * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function compactMapAsyncObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with mapped properties that are not null or undefined. - * - * @example - * import { compactMapAsyncObject, assert } from '@universalweb/acid'; - * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, c: 3}); - */ - async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) { - await eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => { - const result = await iteratee(item, key, results, original, propertyCount, objectKeys); - if (hasValue(result)) { - results[key] = result; - } - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function compactMapObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with mapped properties that are not null or undefined. - * - * @example - * import { compactMapObject, assert } from '@universalweb/acid'; - * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, c: 3}); - */ - function compactMapObject(source, iteratee = returnValue, results = {}) { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - const result = iteratee(item, key, results, original, propertyCount, objectKeys); - if (hasValue(result)) { - results[key] = result; - } - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. - * - * @function filterObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with properties that passed the test. - * - * @example - * filterObject({a: false, b: true, c: true}, (item) => { - * return item; - * }); - * // => {b: true, c: true} - */ - function filterObject(source, iteratee, results = {}) { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - if (iteratee(item, key, results, original, propertyCount, objectKeys) === true) { - results[key] = item; - } - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. - * - * @function filterAsyncObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with properties that passed the test. - * - * @example - * filterAsyncObject({a: false, b: true, c: true}, (item) => { - * return item; - * }); - * // => {b: true, c: true} - */ - async function filterAsyncObject(source, iteratee, results = {}) { - await eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => { - if ((await iteratee(item, key, results, original, propertyCount, objectKeys)) === true) { - results[key] = item; - } - }); - return results; - } - - /** - * Creates an inverted version of a given object by switching it's keys and values. - * - * @function invert - * @type {Function} - * @category object - * @param {Object} source - Object to be inverted. - * @param {Array} [target = {}] - Empty object to be populated with inverted values from source. - * @returns {Object|undefined} - Returns object with keys and values switched. - * - * @example - * import { invert, assert } from '@universalweb/acid'; - * assert(invert({a:1}), {1:'a'}); - */ - function invert(source, target = {}) { - if (!source) { - return; - } - eachObject(source, (item, key) => { - target[item] = key; - }); - return target; - } - - /** - * Performs a shallow strict comparison between two objects. - * - * @function isMatchObject - * @type {Function} - * @category object - * @param {Object} source - Source object. - * @param {Object} target - Object to compare to source. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { assert, isMatchObject } from '@universalweb/acid'; - * assert(isMatchObject({a: 1}, {a: 1}), true); - */ - const isMatchObject = (source, target) => { - if (source === target) { - return true; - } - const sourceKeys = keys(source); - const targetKeys = keys(target); - if (sourceKeys.length === targetKeys.length) { - return everyArray(sourceKeys, (key) => { - return source[key] === target[key]; - }); - } - return false; - }; - - /** - * Returns a regex safe special characters escaped version of a string. - * - * @function regexSafe - * @category regex - * @type {Function} - * @param {Object} source - String to make safe. - * @returns {Object} - Returns a regex safe version of the string. - * - * @example - * import { regexSafe, assert } from '@universalweb/acid'; - * assert(regexSafe(/.+/), '\/\.\+\/'); - */ - const escapeRegexRegex = /[()[\]{}*+?^$|#.,/\\\s-]/g; - function escapeRegex(source) { - return source.replace(escapeRegexRegex, '\\$&'); - } - - /** - * Convert array of strings to regex. - * - * @function arrayToRegex - * @category regex - * @type {Function} - * @param {Object} source - Array of strings. - * @returns {Object} - Returns a regex safe version of the string. - * - * @example - * import { arrayToRegex, assert } from '@universalweb/acid'; - * assert(String(arrayToRegex(['a','b'])), String(/a|b/)); - */ - function arrayToRegex(source, makeSafe) { - if (makeSafe) { - return arrayToRegex(mapArray(source, escapeRegex)); - } - return RegExp(source.join('|')); - } - - /** - * Checks if the value is a RegExp. - * - * @function isRegex - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isRegex, assert } from '@universalweb/acid'; - * assert(isRegex(/test/), true); - */ - const isRegexCall = isConstructorNameFactory('RegExp'); - const isRegex = isTypeFactory(isRegexCall); - - /** - * Returns a clone of the given object without the given properties. - * - * @function omit - * @category object - * @type {Function} - * @param {Object} source - Object from which keys are extracted. - * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object. - * @returns {Object|undefined} - A new object with the removed. - * - * @example - * import { omit, assert } from '@universalweb/acid'; - * assert(omit({a:1, b:2}, ['a']), {b:2}); - * assert(omit({a:1, b:2}, 'a'), {b:2}); - * assert(omit({1:'test', b:2}, 1), {b:2}); - */ - function omit(source, blacklist) { - if (!source) { - return {}; - } - if (isArray(blacklist)) { - const blacklistRegex = arrayToRegex(blacklist); - return filterObject(source, (item, key) => { - return !blacklistRegex.test(key); - }); - } - if (isRegex(blacklist)) { - return filterObject(source, (item, key) => { - return !blacklist.test(key); - }); - } - if (isString(blacklist)) { - return filterObject(source, (item, key) => { - return key !== blacklist; - }); - } - if (isNumber(blacklist)) { - const numberToString = blacklist.toString(); - return filterObject(source, (item, key) => { - return key !== numberToString; - }); - } - if (isFunction(blacklist)) { - return filterObject(source, (item, key) => { - return !blacklist(item, key); - }); - } - return objectAssign({}, source); - } - - /** - * Returns a clone of the source object with the plucked properties. - * - * @function pick - * @type {Function} - * @category object - * @param {Object} source - Object to be cloned. - * @param {Array} whitelist - Array of property names used to determine what values to pluck. - * @param {Object} [target = {}] - Object to be populated with plucked values. - * @returns {Object|undefined} - A new object with plucked properties. - * - * @example - * import { pick, assert } from '@universalweb/acid'; - * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2}); - */ - const pick = (source, whitelist, target = {}) => { - if (!source) { - return; - } - eachArray(whitelist, (item) => { - target[item] = source[item]; - }); - return target; - }; - - /** - * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object. - * - * @function objectSize - * @category object - * @param {Object} source - The source object. - * @returns {Number|undefined} - The amount of keys. - * - * @example - * import { objectSize, assert } from '@universalweb/acid'; - * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3); - */ - function objectSize(source) { - if (!source) { - return; - } - if (isPlainObject(source)) { - return keys(source).length; - } - const objectLengthProperty = source.length; - if (hasValue(objectLengthProperty)) { - return objectLengthProperty; - } - const objectSizeProperty = source.size; - if (hasValue(objectLengthProperty)) { - return objectSizeProperty; - } - return keys(source).length; - } - - /** - * Creates an object from two arrays, one of property identifiers and one of corresponding values. - * - * @function zipObject - * @type {Function} - * @category object - * @param {Array} properties - The property identifiers. - * @param {Array} values - The property values. - * @returns {Object} - Returns the new object. - * - * @example - * zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ - const zipObject = (properties, values) => { - const zipedObject = {}; - eachArray(properties, (item, key) => { - zipedObject[item] = values[key]; - }); - return zipedObject; - }; - /** - * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. - * - * @function unZipObject - * @type {Function} - * @category object - * @param {Object} object - The object to process. - * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array. - * - * @example - * unZipObject({ 'a': 1, 'b': 2 }); - * // => [['a', 'b'], [1, 2]] - */ - const unZipObject = (object) => { - const unZippedKeys = []; - const values = []; - eachObject(object, (item, key) => { - unZippedKeys.push(key); - values.push(item); - }); - return [unZippedKeys, values]; - }; - - const normalizeCase$4 = /[ _-]+/g; - /** - * Converts a string into Camel case format. - * - * @function camelCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into Camel case. - * @returns {String} - Converted string in Camel case. - * - * @example - * import { camelCase, assert } from '@universalweb/acid'; - * assert(camelCase('camel case'), 'camelCase'); - */ - function camelCase(source) { - let result = ''; - source - .replace(normalizeCase$4, ' ') - .trim() - .split(' ') - .forEach((item, index) => { - if (index === 0) { - result += item.toLowerCase(); - } else { - result += item[0].toUpperCase() + item.slice(1).toLowerCase(); - } - }); - return result; - } - - const normalizeCase$3 = /[ _-]+/g; - const space$1 = /[ ]+/g; - /** - * Converts a string into single space sepperated words in Kebab case. - * - * @function kebabCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into Kebab case. - * @returns {String} - Converted string in Kebab case. - * - * @example - * import { kebabCase, assert } from '@universalweb/acid'; - * assert(kebabCase('kebab case'), 'kebab-case'); - */ - function kebabCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase$3, ' ') - .trim() - .toLowerCase() - .replace(space$1, '-'); - } - - const normalizeCase$2 = /[ _-]+/g; - const space = /[ ]+/g; - /** - * Converts a string into single space sepperated words in snake case. - * - * @function snakeCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into snake case. - * @returns {String} - Converted string in Snake case. - * - * @example - * import { snakeCase, assert } from '@universalweb/acid'; - * assert(snakeCase('snake case'), 'snake_case'); - */ - function snakeCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase$2, ' ') - .trim() - .toLowerCase() - .replace(space, '_'); - } - - const normalizeCase$1 = /[ _-]+/g; - /** - * Converts a string into single space sepperated words in uppercase. - * - * @function upperCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into upper case. - * @returns {String} - Converted string in upper case. - * - * @example - * import { upperCase, assert } from '@universalweb/acid'; - * assert(upperCase('upper-case'), 'UPPER CASE'); - * assert(upperCase('upper_case'), 'UPPER CASE'); - */ - function upperCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase$1, ' ') - .trim() - .toUpperCase(); - } - - const normalizeCase = /[ _-]+/g; - /** - * Converts a string into single space sepperated words in lowerCase. - * - * @function lowerCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into upper case. - * @returns {String} - Converted string in upper case. - * - * @example - * import { lowerCase, assert } from '@universalweb/acid'; - * assert(lowerCase('lower-CASE'), 'lower case'); - */ - function lowerCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase, ' ') - .trim() - .toLowerCase(); - } - - /** - * Inserts text into a string at a given position. - * - * @function insertInRange - * @category string - * @type {Function} - * @param {String} string - String to insert the text into. - * @param {Number} index - Point of insertion. - * @param {String} text - The string to be inserted. - * @returns {String} - The string with the text inserted at the given point. - * - * @example - * import { insertInRange, assert } from '@universalweb/acid'; - * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.'); - */ - function insertInRange(string, index, text) { - return string.slice(0, index) + text + string.slice(index, string.length); - } - /** - * Plucks a letter using the index starting from the right. - * - * @function rightString - * @category string - * @type {Function} - * @param {String} string - String to extract the letter from. - * @param {Number} [index=1] - The starting position. - * @returns {String} - A letter at the given index. - * - * @example - * import { rightString, assert } from '@universalweb/acid'; - * assert(rightString('rightString'), 'g'); - * assert(rightString('rightString', 2), 'n'); - */ - function rightString(string, index = 1) { - return string[string.length - index]; - } - /** - * Splits up a string into chunks. - * - * @function chunkString - * @category string - * @type {Function} - * @param {String} string - String to chunked. - * @param {Number} [size] - The max string length per chunk. - * @returns {Array} - An array with strings that are <= size parameter. - * - * @example - * import { chunkString, assert } from '@universalweb/acid'; - * assert(chunkString('chunk', 2), ['ch', 'un', 'k']); - */ - function chunkString(string, size) { - return string.match(new RegExp(`(.|[\r\n]){1,${size}}`, 'g')); - } - /** - * Truncates everything before the index starting from the right. - * - * @function initialString - * @category string - * @type {Function} - * @param {String} string - String to extract the initial letters from. - * @param {Number} [index=1] - Starting point from the right. - * @returns {String} - A string with the characters before the index starting from the right. - * - * @example - * import { initialString, assert } from '@universalweb/acid'; - * assert(initialString('initialString', 2), 'initialStri'); - */ - function initialString(string, index = 1) { - return string.slice(0, index * -1); - } - /** - * Truncates everything after a index. - * - * @function restString - * @category string - * @type {Function} - * @param {String} string - String to extract the rest of the letters from. - * @param {Number} [index=1] - Starting point. - * @returns {String} - A string without the characters up-to to the index. - * - * @example - * import { restString, assert } from '@universalweb/acid'; - * assert(restString('restString', 2), 'stString'); - */ - function restString(string, index = 1) { - return string.substring(index); - } - - /** - * Replaces all occurrences of strings in an array with a value. - * - * @function replaceList - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @param {Array} words - Strings to replace. - * @param {String} value - The match replacement. - * @returns {String} - The string with the replacement. - * - * @example - * import { replaceList, assert } from '@universalweb/acid'; - * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.'); - */ - function replaceList(string, words, value) { - return string.replace(new RegExp(`\\b${words.join('|')}\\b`, 'gi'), value); - } - - const rawURLDecodeRegex = /%(?![\da-f]{2})/gi; - const andRegex = /&/g; - const lessThanRegex = //g; - const doubleQuoteRegex = /"/g; - /** - * Raw URL decoder. - * - * @function rawURLDecode - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @returns {String} - Converted string into the decoded URI Component . - * - * @example - * import { rawURLDecode, assert } from '@universalweb/acid'; - * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.'); - */ - function rawURLDecode(string) { - return decodeURIComponent( - string.replace(rawURLDecodeRegex, () => { - return '%25'; - }) - ); - } - /** - * Replaced sensitive characters with their matching html entity. - * - * @function htmlEntities - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @returns {String} - Replaced string. - * - * @example - * import { htmlEntities, assert } from '@universalweb/acid'; - * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`); - */ - function htmlEntities(string) { - return string.replace(andRegex, '&').replace(lessThanRegex, '<').replace(moreThanRegex, '>').replace(doubleQuoteRegex, '"'); - } - /** - * Executes rawURLDecode followd by htmlEntities methods on a string. - * - * @function sanitize - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @returns {String} - Replaced string. - * - * @example - * import { sanitize, assert } from '@universalweb/acid'; - * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`); - */ - function sanitize(string) { - return htmlEntities(rawURLDecode(string)); - } - - const tokenizeRegEx = /\S+/g; - const wordsRegEx = /\w+/g; - /** - * Break string by non-white space characters matches. - * - * @function tokenize - * @type {Function} - * @category string - * @param {String} string - String to be broken up. - * @returns {Array} - Array of words without white space characters. - * - * @example - * import { tokenize, assert } from '@universalweb/acid'; - * assert(tokenize('I am Lucy!'), ["I", "am", "Acid!"]); - */ - function tokenize(string) { - return string.match(tokenizeRegEx) || []; - } - /** - * Break string into word matches. - * - * @function words - * @type {Function} - * @param {String} string - String to be broken up. - * @returns {Array} - Array of words with word characters only. - * - * @example - * import { words, assert } from '@universalweb/acid'; - * assert(words('I am Acid!'), ["I", "am", "Acid"]); - */ - function words(string) { - return string.match(wordsRegEx) || []; - } - - const truncateDown = (string, maxLength, stringLength) => { - const breakAll = string.split(''); - const breakAllLength = breakAll.length; - let item; - let index = stringLength - maxLength; - for (; index < breakAllLength && index >= 0; index--) { - item = breakAll[index]; - if (item === ' ') { - break; - } - } - return string.slice(0, index).trim(); - }; - const truncateUp = (string, maxLength, stringLength) => { - const breakAll = string.split(''); - const breakAllLength = breakAll.length; - let item; - let index = maxLength; - for (; index < breakAllLength && index > 0; index++) { - item = breakAll[index]; - if (item === ' ') { - break; - } - } - return string.substring(index, stringLength).trim(); - }; - /** - * Truncates the string, accounting for word placement and character count. - * - * @function truncate - * @type {Function} - * @category string - * @param {String} string - String to be truncated. - * @param {Number} maxLength - The desired max length of the string. - * @returns {String} - The mutated string. - * - * @example - * import { truncate, assert } from '@universalweb/acid'; - * assert(truncate('Where is Lucy?', 2), 'Where is'); - */ - function truncate(string, maxLength) { - const stringLength = string.length; - return stringLength > maxLength ? truncateDown(string, maxLength, stringLength) : string; - } - /** - * Truncates the string, accounting for word placement and character count from the right. - * - * @function truncateRight - * @type {Function} - * @category string - * @param {String} string - String to be truncated. - * @param {Number} maxLength - The desired max length of the string. - * @returns {String} - The mutated string. - * - * @example - * import { truncateRight, assert } from '@universalweb/acid'; - * assert(truncateRight('Where is Lucy?', 6), 'Lucy?'); - */ - function truncateRight(string, maxLength) { - const stringLength = string.length; - return stringLength > maxLength ? truncateUp(string, maxLength, stringLength) : string; - } - - const getWords = /\w+/g; - /** - * Returns the first letter capitalized. - * - * @function upperFirstLetter - * @type {Function} - * @category string - * @param {String} string - String to extract first letter from. - * @returns {String} - An upper case letter. - * - * @example - * import { upperFirstLetter, assert } from '@universalweb/acid'; - * assert(upperFirstLetter('upper'), 'U'); - */ - function upperFirstLetter(string) { - return string[0].toUpperCase(); - } - /** - * Capitalizes the first letter. - * - * @function upperFirst - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with first letter capitalized. - * - * @example - * import { upperFirst, assert } from '@universalweb/acid'; - * assert(upperFirstLetter('upper'), 'U'); - * upperFirst('upper'); - * // => 'Upper' - */ - function upperFirst(string) { - return upperFirstLetter(string) + restString(string); - } - /** - * Capitalize first letter and lower case the rest. - * - * @function upperFirstOnly - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with first letter capitalized. - * - * @example - * import { upperFirstOnly, assert } from '@universalweb/acid'; - * assert(upperFirstOnly('upper'), 'Upper'); - */ - function upperFirstOnly(string) { - return upperFirstLetter(string) + restString(string).toLowerCase(); - } - /** - * Capitalize all first letters. - * - * @function upperFirstAll - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with all first letters capitalized. - * - * @example - * import { upperFirstAll, assert } from '@universalweb/acid'; - * assert(upperFirstAll('uPPer'), 'UPPer'); - */ - function upperFirstAll(string) { - return string.replace(getWords, (match) => { - return upperFirst(match); - }); - } - /** - * Capitalize all first letters and lower case the rest. - * - * @function upperFirstOnlyAll - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with all first letters capitalized. - * - * @example - * import { upperFirstOnlyAll, assert } from '@universalweb/acid'; - * assert(upperFirstOnlyAll('this is'), 'This Is'); - */ - function upperFirstOnlyAll(string) { - return string.replace(getWords, (match) => { - return upperFirstOnly(match); - }); - } - - /** - * Returns the constructor name of an object. - * - * @function getTypeName - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { getTypeName, assert } from '@universalweb/acid'; - * assert(getTypeName(1), true); - */ - function getTypeName(source) { - return getType(source)?.name; - } - - /** - * Checks if the value is an Arguments object. - * - * @function isArguments - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArguments, assert } from '@universalweb/acid'; - * assert(isArguments((function() { return arguments;})()), true); - * assert(isArguments([]), false); - */ - const objectArguments = '[object Arguments]'; - function isArguments(source) { - return hasValue(source) ? source.toString() === objectArguments : false; - } - - /** - * Checks if an object or objects are a Map. - * - * @function isMap - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isMap } from '@universalweb/acid'; - * isMap(new Map()); - * // => true - */ - const isMapCall = isConstructorNameFactory('Map'); - const isMap = isTypeFactory(isMapCall); - - /** - * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer. - * - * @function isTypedArray - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isTypedArray, assert } from '@universalweb/acid'; - * assert(isTypedArray([]), false); - * assert(isTypedArray(new Int8Array()), true); - */ - const typedArrayRegex = /Array/; - const arrayConstructorName = 'Array'; - function isTypedArray(source) { - if (source) { - const constructorName = getTypeName(source); - if (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) { - return true; - } - } - return false; - } - - /** - * Checks if an object is null or undefined. - * - * @function noValue - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { noValue, assert } from '@universalweb/acid'; - * assert(noValue(null), true); - * assert(noValue(undefined), true); - * assert(noValue(1), false); - * assert(noValue(0), false); - */ - function noValue(source) { - return !hasValue(source); - } - - /** - * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property. - * - * @function isArrayLike - * @category type - * @param {*} source - Object to be checked. - * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArrayLike, assert } from '@universalweb/acid'; - * assert(isArrayLike([]), true); - * assert(isArrayLike(2), false); - */ - function isArrayLike(source, strictFlag) { - if (noValue(source) || isFunction(source)) { - return false; - } - if (isArray(source) || isTypedArray(source)) { - return true; - } - const sourceLength = source.length; - if (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) { - return false; - } - if (strictFlag) { - const indexes = keys(source); - if (indexes) { - return every(indexes, (value, index) => { - return index >= 0 && isNumber(index); - }); - } - return false; - } - return true; - } - - /** - * Checks if an object or objects are a BigInt. - * - * @function isBigInt - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isBigInt, assert } from '@universalweb/acid'; - * assert(isBigInt(BigInt(123)), true); - */ - const isBigIntCall = isConstructorNameFactory('BigInt'); - const isBigInt = isTypeFactory(isBigIntCall); - - /** - * Checks if the value is a Boolean. - * - * @function isBoolean - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isBoolean } from '@universalweb/acid'; - * isBoolean(true); - * // => true - */ - const isBooleanCall = isConstructorNameFactory('Boolean'); - const isBoolean = isTypeFactory(isBooleanCall); - - /** - * Checks if an object or objects are a ArrayBuffer. - * - * @function isArrayBuffer - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArrayBuffer, assert } from '@universalweb/acid'; - * assert(isArrayBuffer(new ArrayBuffer()), true); - */ - const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer'); - const isArrayBuffer = isTypeFactory(isArrayBufferCall); - - /** - * Checks if an object is the child of another. Typically used for classes. - * - * @function isChild - * @category type - * @param {*} sourceChild - Object to be checked as the child. - * @param {*} targetParent - Object to be checked as the parent. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isChild, construct, assert } from '@universalweb/acid'; - * class Grandparent{} - * class Parent extends Grandparent{} - * class Child extends Parent{} - * const child = construct(Child); - * assert(isChild(Child, Grandparent), true); - * assert(isChild(Child, Parent), false); - * assert(isChild(Parent, Grandparent), false); - * assert(isChild(child1, child3), false); - */ - function isChild(sourceChild, targetParent) { - if (!sourceChild || !targetParent) { - return false; - } - return sourceChild instanceof targetParent; - } - - /** - * Checks if an object or objects are a structured-cloneable type. - * - * @function isCloneable - * @category type - * @param {...*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isCloneable, assert } from '@universalweb/acid'; - * assert(isCloneable(function (){}), false); - */ - const constructorNames = RegExp( - 'Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError' - ); - function isCloneable(source) { - if (hasValue(source)) { - const constructorName = source?.constructor?.name; - return constructorNames.test(constructorName); - } - return false; - } - - /** - * Checks if the value is a Date. - * - * @function isDate - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isDate, assert } from '@universalweb/acid'; - * assert(isDate(new Date()), true); - */ - const isDateCall = isConstructorNameFactory('Date'); - const isDate = isTypeFactory(isDateCall); - - /** - * Checks if the value is empty. - * - * @function isEmpty - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isEmpty, assert } from '@universalweb/acid'; - * assert(isEmpty([]), true); - */ - function isEmpty(source) { - if (isString(source) || isArray(source)) { - return !hasLength(source); - } else if (isPlainObject(source)) { - return !objectSize(source); - } - return !hasValue(source); - } - - /** - * Check if a value equals false using strict comparison. - * - * @function isFalse - * @category Utility - * @type {Function} - * @param {Boolean} source - Item to compare. - * @returns {Boolean} - Returns true if the item equals false. - * - * @example - * import { isFalse, assert } from '@universalweb/acid'; - * assert(isFalse(1), false); - * assert(isFalse(true), false); - * assert(isFalse(false), true); - */ - function isFalse(source) { - return source === false; - } - - /** - * Checks if an object or objects are a Float32Array. - * - * @function isF32 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isF32, assert } from '@universalweb/acid'; - * assert(isF32(new Float32Array()), true); - */ - const isF32Call = isConstructorNameFactory('Float32Array'); - const isF32 = isTypeFactory(isF32Call); - - /** - * Checks if an object or objects are a Float64Array. - * - * @function isF64 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isF64 } from '@universalweb/acid'; - * isF64(new Float64Array()); - * // => true - */ - const isF64Call = isConstructorNameFactory('Float64Array'); - const isF64 = isTypeFactory(isF64Call); - - const { isInteger } = Number; - /** - * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. - * - * @function isFloat - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFloat } from '@universalweb/acid'; - * isFloat(1.01); - * // => true - */ - const isFloat = isInteger; - - /** - * Checks if an object or objects are a Int16Array. - * - * @function isI16 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isI16 } from '@universalweb/acid'; - * isI16(new Int16Array()); - * // => true - */ - const isI16Call = isConstructorNameFactory('Int16Array'); - const isI16 = isTypeFactory(isI16Call); - - /** - * Checks if an object or objects are a Int32Array. - * - * @function isI32 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isI32, assert } from '@universalweb/acid'; - * assert(isI32(new Int32Array()), true); - */ - const isI32Call = isConstructorNameFactory('Int32Array'); - const isI32 = isTypeFactory(isI32Call); - - /** - * Checks if an object or objects are a Int8Array. - * - * @function isI8 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isInt8 } from '@universalweb/acid'; - * isInt8(new Int8Array()); - * // => true - */ - const isI8Call = isConstructorNameFactory('Int8Array'); - const isI8 = isTypeFactory(isI8Call); - - /** - * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments. - * - * @function isIterable - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isIterable, assert } from '@universalweb/acid'; - * assert(isIterable([]), true); - * assert(isIterable(new Int8Array()), true); - * assert(isIterable('test'), false); - */ - function isIterable(source) { - return hasValue(source) && typeof source[Symbol.iterator] === 'function'; - } - - /** - * Checks if an object is a promise. - * - * @function isPromise - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isPromise } from '@universalweb/acid'; - * isPromise(new Promise(() => {})); - * // => true - */ - function isPromise(source) { - if (source) { - return source instanceof Promise; - } - return false; - } - - /** - * Checks if an object is a kind of async object such as async function, promise, or generator. - * - * @function isKindAsync - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isKindAsync, assert } from '@universalweb/acid'; - * assert(isKindAsync(async() => {}), true); - */ - function isKindAsync(source) { - if (source) { - return isPromise(source) || isAsync(source) || isGenerator(source); - } - return false; - } - - /** - * Checks if an object is the child of another. Typically used for classes. - * - * @function isParent - * @category type - * @param {*} sourceParent - Object to be checked as the child. - * @param {*} targetChild - Object to be checked as the parent. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isParent, construct, assert } from '@universalweb/acid'; - * class parentClass{} - * class otherClass{} - * const child1 = construct(parentClass); - * const child2 = construct(otherClass); - * assert(isParent(child1, parentClass), true); - * assert(isParent(child3, parentClass), false); - * assert(isParent(parentClass, child1), false); - * assert(isParent(child1, child3), false); - */ - function isParent(sourceParent, targetChild) { - if (!sourceParent || !targetChild || !targetChild.call) { - return false; - } - return sourceParent instanceof targetChild; - } - - /** - * Checks if an object is a primitive. - * - * @function isPrimitive - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isPrimitive, assert } from '@universalweb/acid'; - * assert(isPrimitive(1), true); - * assert(isPrimitive(() => {}), false); - */ - function isPrimitive(source) { - const type = typeof value; - return source === null || source === undefined || (type !== 'object' && type !== 'function'); - } - - /** - * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways. - * - * @function isRelated - * @category type - * @param {*} targetOne - Object to be checked. - * @param {*} targetTwo - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isRelated, construct, assert } from '@universalweb/acid'; - * class parentClass{} - * class otherClass{} - * const child1 = construct(parentClass); - * const child2 = construct(parentClass); - * const child3 = construct(otherClass); - * assert(isRelated(child1, child2), true); - * assert(isRelated(child1, parentClass), true); - * assert(isRelated(parentClass, child2), true); - * assert(isRelated(child1, child3), false); - */ - function isRelated(targetOne, targetTwo) { - if (noValue(targetOne) || noValue(targetTwo)) { - return false; - } - if (targetOne.call) { - return targetTwo instanceof targetOne; - } - if (targetTwo.call) { - return targetOne instanceof targetTwo; - } - return targetTwo.constructor === targetOne.constructor; - } - - const { isSafeInteger } = Number; - /** - * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. - * - * @function isSafeInt - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isSafeInt } from '@universalweb/acid'; - * isSafeInt(1.01); - * // => true - */ - const isSafeInt = isSafeInteger; - - function isSameType(source, other) { - const sourceType = getType(source); - const otherType = getType(other); - if (sourceType === otherType) { - if (sourceType.name === otherType.name) { - return true; - } - } - return false; - } - - /** - * Check if a value equals true using strict comparison. - * - * @function isTrue - * @category Utility - * @type {Function} - * @param {Boolean} source - Item to check. - * @returns {Boolean} - Returns true if the item is true. - * - * @example - * import { isTrue, assert } from '@universalweb/acid'; - * assert(isTrue(1), false); - * assert(isTrue(true), true); - * assert(isTrue(false), false); - */ - function isTrue(source) { - return source === true; - } - - /** - * Checks if an object or objects are a Uint16Array. - * - * @function isU16 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU16 } from '@universalweb/acid'; - * isU16(new Uint16Array()); - * // => true - */ - const isU16Call = isConstructorNameFactory('Uint16Array'); - const isU16 = isTypeFactory(isU16Call); - - /** - * Checks if an object or objects are a Uint32Array. - * - * @function isU32 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU32 } from '@universalweb/acid'; - * isU32(new Uint32Array()); - * // => true - */ - const isU32Call = isConstructorNameFactory('Uint32Array'); - const isU32 = isTypeFactory(isU32Call); - - /** - * Checks if an object or objects are a Uint8Array. - * - * @function isU8 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU8 } from '@universalweb/acid'; - * isU8(new Uint8Array()); - * // => true - */ - const isU8Call = isConstructorNameFactory('Uint8Array'); - const isU8 = isTypeFactory(isU8Call); - - /** - * Checks if an object or objects are a Uint8ClampedArray. - * - * @function isU8C - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU8C } from '@universalweb/acid'; - * isU8C(new Uint8ClampedArray()); - * // => true - */ - const isU8CCall = isConstructorNameFactory('Uint8ClampedArray'); - const isU8C = isTypeFactory(isU8CCall); - - /** - * Checks if an object or objects are a WeakMap. - * - * @function isWeakMap - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isWeakMap } from '@universalweb/acid'; - * assert(isWeakMap(new WeakMap()), true); - */ - const isWeakMapCall = isConstructorNameFactory('WeakMap'); - const isWeakMap = isTypeFactory(isWeakMapCall); - - const isDeno = typeof globalThis.Deno !== 'undefined'; - - const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node; - - /** - * Check if a value is isTruthy which is anything but false, null, 0, "", undefined, and NaN. - * - * @function isTruthy - * @category type - * @type {Function} - * @param {*} source - Item to be isTruthy checked. - * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy. - * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false. - * - * @example - * import { isTruthy, assert } from '@universalweb/acid'; - * assert(isTruthy(1), true); - * assert(isTruthy(0), false); - */ - function isTruthy(source, returnIfTrue = true) { - return Boolean(source) && returnIfTrue; - } - - /** - * Check if a value is isFalsy which are false, null, 0, "", undefined, and NaN. - * - * @function isFalsy - * @category type - * @type {Function} - * @param {*} source - Item to be isFalsy checked. - * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy. - * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false. - * - * @example - * import { isFalsy, assert } from '@universalweb/acid'; - * assert(isFalsy(0), true); - * assert(isFalsy(1), false); - */ - function isFalsy(source, returnIfTrue = true) { - return Boolean(source) === false && returnIfTrue; - } - - /** - * If source has a value then assign it to an object or call a function. - * - * @function ifValue - * @category utility - * @param {*} source - The source object to be hasValue checked. - * @param {Function|Object} target - The target which is either a function or object. - * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target). - * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function. - * @returns {source|undefined} The source object if it passes the hasValue check. - * - * @example - * import { ifValue, assert } from '@universalweb/acid'; - * assert(ifValue(1, {}, 'a'), {a:1}); - */ - function ifValue(source, target, optional, args) { - if (hasValue(source)) { - if (isFunction(target)) { - if (optional) { - return apply(target, optional, args); - } - return target(...args); - } else if (isPlainObject(target)) { - target[optional] = source; - return target; - } - } - } - - /** - * Performs a deep comparison between two objects & determines if they're different using strict comparison. - * - * @function notEqual - * @type {Function} - * @category utility - * @param {*} source - Source object. - * @param {*} target - Object to be compared. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { notEqual, assert } from '@universalweb/acid'; - * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true); - */ - function notEqual(source, target) { - return isFalse(isEqual(source, target)); - } - - const jsonNative = JSON; - /** - * Parses JSON string with safety check for undefined. - * - * @function jsonParse - * @category utility - * @type {Function} - * @param {String} source - String to be parsed. - * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned. - * @returns {Object|undefined} - Returns the parsed object. - * - * @example - * import { jsonParse, assert } from '@universalweb/acid'; - * assert(jsonParse('{a:1}'), {a:1}); - */ - function jsonParse(source, reviver) { - if (source) { - return jsonNative.parse(source, reviver); - } - } - /** - * Stringify an object into a JSON string. - * - * @function stringify - * @category utility - * @type {Function} - * @param {Object} object - Object to Stringify. - * @returns {String} - Returns the object as a valid JSON string. - * - * @example - * import { stringify, assert } from '@universalweb/acid'; - * assert(stringify({a:1}), '{a:1}'); - */ - const stringify = jsonNative.stringify; - - function createAssertError(source, expected, localOptions) { - const options = globalThis.options || localOptions; - let errorTitle; - if (isFunction(options)) { - errorTitle = `${options.name} : ${options.constructor.name}`; - } else if (options) { - errorTitle = `${options.title || options.method.name} -> ${options.file}`; - } - return new Error( - `Test Failed: ${errorTitle} + "use strict"; + + /** + * Chunks an array according to a user defined number. + * + * @function chunk + * @category Array + * @type {Function} + * @param {Array} array - Array to be chunked. + * @param {Number} size - Number which determines the size of each chunk. + * @returns {Array} - A chunked version of the source array. + * + * @example + * import { chunk, assert } from '@universalweb/acid'; + * assert(chunk([1,2,3], 1), [[1],[2],[3]]); + */ + function chunk(array, size = 1) { + const chunked = []; + let index = 0; + array.forEach((item, key) => { + if (!(key % size)) { + chunked.push([]); + if (key) { + index++; + } + } + chunked[index].push(item); + }); + return chunked; + } + + /** + * Clears the values out of an array. + * + * @function clearArray + * @category Array + * @type {Function} + * @param {Array} source - Takes an array to be emptied. + * @returns {Array} - The originally given array. + * + * @example + * import { clearArray, assert } from '@universalweb/acid'; + * assert(clearArray([1,'B', 'Cat']), []); + */ + function clearArray(source) { + source.length = 0; + return source; + } + + /** + * Clone an array (uses .slice()) and assign the source arrays values to the new array. + * + * @function cloneArray + * @category Array + * @type {Function} + * @param {Array} source - The array to be quick cloned. + * @returns {Array} - The newly cloned array with assigned items. + * + * @example + * import { cloneArray, assert } from '@universalweb/acid'; + * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']); + */ + function cloneArray(source) { + return source.slice(); + } + + /** Checks if the value is undefined. + * + * @function isUndefined + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isUndefined, assert } from '@universalweb/acid'; + * assert(isUndefined(undefined), true); + */ + function isUndefined(source) { + return source === undefined; + } + + /** + * Checks if the value has length greater than 0. + * + * @function hasLength + * @category utility + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { hasLength, assert } from '@universalweb/acid'; + * assert(hasLength([1]), true); + */ + function hasLength(source) { + return Boolean(source.length); + } + + /** + * Checks if the value is null. + * + * @function isNull + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNull, assert } from '@universalweb/acid'; + * assert(isNull(null), true); + */ + function isNull(source) { + return source === null; + } + + /** + * Checks if the value is not null or undefined. + * + * @function hasValue + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { hasValue, assert } from '@universalweb/acid'; + * assert(hasValue(1), true); + */ + function hasValue(source) { + return !isUndefined(source) && !isNull(source); + } + + /** + * A simple function which returns the value it's given. + * + * @function returnValue + * @category utility + * @param {*} source - The source object. + * @returns {source} The source object. + */ + function returnValue(source) { + return source; + } + + /** + * Iterates through the given array. + * + * @function eachArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. + * @param {*} thisBind - Iteratee called with thisBind as this. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array|undefined} - The originally given array. + * + * @example + * import { eachArray, assert } from '@universalweb/acid'; + * const list = []; + * eachArray([1, 2, 3], (item, index) => { + * list[index] = item; + * }); + * assert(list, [1, 2, 3]); + */ + function eachArray(source, iteratee, thisBind, additionalArg) { + if (!source) { + return; + } + const arrayLength = source.length; + if (hasValue(thisBind)) { + for (let index = 0; index < arrayLength; index++) { + iteratee.call( + thisBind, + source[index], + index, + source, + arrayLength, + additionalArg, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + iteratee(source[index], index, source, arrayLength, additionalArg); + } + } + return source; + } + + /** + * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. + * + * @function compactMapArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array} - An array with mapped properties that are not null or undefined. + * + * @example + * import { compactMapArray, assert } from '@universalweb/acid'; + * assert(compactMapArray([null, 2, 3], (item) => { + * return item; + * }), [2, 3]); + */ + function compactMapArray( + source, + iteratee = returnValue, + results = [], + thisCall, + additionalArg, + ) { + if (hasValue(thisCall)) { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + const returned = iteratee.call( + thisCall, + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArg, + ); + if (hasValue(returned)) { + results.push(returned); + } + }); + } else { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + const returned = iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + thisCall, + additionalArg, + ); + if (hasValue(returned)) { + results.push(returned); + } + }); + } + return results; + } + + /** + * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order. + * + * @function eachAsyncArray + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. + * @param {*} thisCall - Iteratee called with thisCall as this. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array|undefined} - Returns source the originally given array. + * + * @example + * import { eachAsyncArray, assert } from '@universalweb/acid'; + * const tempList = []; + * await eachAsyncArray([1, 2, 3], async (item) => { + * tempList.push(item); + * }); + * assert(tempList, [1, 2, 3]); + */ + async function eachAsyncArray(source, iteratee, thisCall, additionalArg) { + if (!source) { + return; + } + const arrayLength = source.length; + if (hasValue(thisCall)) { + for (let index = 0; index < arrayLength; index++) { + await iteratee.call( + thisCall, + source[index], + index, + source, + arrayLength, + additionalArg, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + await iteratee( + source[index], + index, + source, + arrayLength, + additionalArg, + ); + } + } + return source; + } + + /** + * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. + * + * @function compactMapAsyncArray + * @type {Function} + * @category array + * @async + * @param {Array} source - Array to be compacted. + * @param {Function} iteratee - Iteratee to be performed on array. + * @returns {Array} - Array values after being put through an iterator. + * + * @example + * import { compactMapAsync, assert } from '@universalweb/acid'; + * assert(await compactMapAsync([1, 2, 3, null], async (item) => { + * return item; + * }), [1, 2, 3]); + */ + async function compactMapAsyncArray(source, iteratee = returnValue) { + const results = []; + await eachAsyncArray(source, async (item, index, arrayLength) => { + const result = await iteratee(item, index, results, arrayLength); + if (hasValue(result)) { + results.push(result); + } + }); + return results; + } + + /** + * Checks if a number is negative & returns true or false. + * + * @function isNegative + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNegative, assert } from '@universalweb/acid'; + * assert(isNegative(-1), true); + */ + const { sign: sign$1 } = Math; + function isNegative(source) { + return sign$1(source) === -1; + } + + function rangeUp(start, end, step, sourceArray) { + let position = start; + while (position < end) { + sourceArray.push(position); + position += step; + } + return sourceArray; + } + function rangeDown(start, end, step, sourceArray) { + let position = start; + while (position > end) { + sourceArray.push(position); + position -= step; + } + return sourceArray; + } + /** + * Create a numbered list of integers. + * + * @function range + * @category array + * @type {Function} + * @param {Number} start - Value which determines the start of the range. + * @param {Number} end - Value which determines the end of the range. + * @param {Number} step - Value used to step between integers. + * @returns {Array} - An array of integers. + * + * @example + * import { range, assert } from '@universalweb/acid'; + * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]); + */ + function range(start, end, step = 1, sourceArray = []) { + if (isNegative(step)) { + return sourceArray; + } + if (start < end) { + return rangeUp(start, end, step, sourceArray); + } else { + return rangeDown(start, end, step, sourceArray); + } + } + + /** + * Checks if the value is an array. This references Array.isArray. + * + * @function isArray + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArray, assert } from '@universalweb/acid'; + * assert(isArray([]), true); + * assert(isArray(2), false); + */ + const isArray = Array.isArray; + /** + * Checks if the value is not an array. This references Array.isArray. + * + * @function isNotArray + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNotArray, assert } from '@universalweb/acid'; + * assert(isNotArray([]), false); + * assert(isNotArray(2), true); + */ + function isNotArray(source) { + return !isArray(source); + } + + /** + * A function which acts like the "new" operator and can pass arguments. This is a safe version of the original which will error if given undefined + * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects. + * + * @function construct + * @category class + * @param {Function} target - The target function or class. + * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array. + * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target. + * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList. + * + * @example + * import { construct, assert } from '@universalweb/acid'; + * class test { + * constructor(a) { + * return 1; + * } + * } + * const newClass = construct(test, [1]); + * assert(test, 1); + */ + const reflectConstruct = Reflect.construct; + function construct(target, argumentsList = [], newTarget) { + const args = isArray(argumentsList) ? argumentsList : [argumentsList]; + if (newTarget) { + return reflectConstruct(target, args, newTarget); + } + return reflectConstruct(target, args); + } + + /** + * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned. + * + * @function ensureArray + * @category array + * @type {Function} + * @param {*} source - Object to be checked. + * @returns {Array} - Returns an array. + * + * @example + * import { isArray, ensureArray, assert } from '@universalweb/acid'; + * assert(isArray(ensureArray('test')), ['test']); + */ + function ensureArray(source) { + return (isArray(source) && source) || (hasValue(source) && [source]) || []; + } + + /** + * Flattens an array to a single level. + * + * @function flattenDeep + * @type {Function} + * @category array + * @param {Array} source - Array to flatten. + * @returns {Array} - Returns a completely flattened array. + * + * @example + * import { flattenDeep, assert } from '@universalweb/acid'; + * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]); + */ + function flattenDeep(source) { + return source.flat(Infinity); + } + + function forEach(source, callback) { + source.forEach(callback); + return source; + } + + /** + * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences. + * + * @function difference + * @category array + * @type {Function} + * @param {...Array} sources - List of arrays to be compared. + * @returns {Array|undefined} - An array which contains the differences between the source and compare array. + * + * @example + * import { difference, assert } from '@universalweb/acid'; + * assert(difference([1, 2, 3], [1, 2]), [3]); + */ + function difference(...sources) { + const differencesMap = construct(Map); + const differences = []; + eachArray(sources, (currentArray, parentIndex) => { + eachArray(currentArray, (child, childIndex) => { + let childRoot = differencesMap.get(child); + if (!childRoot) { + childRoot = { + count: 1, + parentIndex, + child, + }; + differencesMap.set(child, childRoot); + } else if (childRoot.parentIndex === parentIndex) { + return; + } else { + childRoot.count++; + } + }); + }); + forEach(differencesMap, (item) => { + if (item.count === 1 && item.parentIndex === 0) { + differences.push(item.child); + } + }); + return differences; + } + + /** + * Removes all items from an array after a specified index. + * + * @function drop + * @category array + * @type {Function} + * @param {Array} array - Source array. + * @param {Number} amount - Amount of items to drop from the array. + * @param {Number} [upTo = array.length] - Index to stop at. + * @returns {Array} - An array with all values removed after a user defined index. + * + * @example + * import { drop, assert } from '@universalweb/acid'; + * assert(drop([1, 2, 3]), [2, 3]); + * assert(drop([1, 2, 3], 2), [3]); + */ + function drop(array, amount = 1, upTo = array.length) { + return array.splice(amount, upTo); + } + + /** + * Removes all items from an array before a specified index. + * + * @function dropRight + * @type {Function} + * @category array + * @param {Array} array - Source array. + * @param {Number} amount - Amount of items to drop from the array. + * @param {Number} [upTo = array.length] - Index to stop at. + * @returns {Array} - An array with all values removed before a user defined index. + * + * @example + * import { dropRight, assert } from '@universalweb/acid'; + * assert(dropRight([1, 2, 3]), [1, 2]); + * assert(dropRight([1, 2, 3], 2), [1]); + */ + const dropRight = (array, amount = 1, upTo = array.length) => { + return drop(array, 0, upTo - amount); + }; + + /** + * Iterates through the given array in reverse. + * + * @function eachRight + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array|undefined} - The originally given array. + * + * @example + * import { eachRight, assert } from '@universalweb/acid'; + * const tempList = []; + * eachRight([1, 2, 3], (item) => { + * tempList.push(item); + * }); + * assert(tempList, [3, 2, 1]); + */ + function eachRight(source, iteratee, additionalArgument) { + if (!source) { + return; + } + const arrayLength = source.length; + for (let index = arrayLength - 1; index >= 0; index--) { + iteratee(source[index], index, source, arrayLength, additionalArgument); + } + return source; + } + + /** + * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order. + * + * @function eachRightAsync + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @returns {Object|undefined} - The originally given array. + * + * @example + * import { eachRightAsync, assert } from '@universalweb/acid'; + * const tempList = []; + * await eachRightAsync([1, 2, 3], async (item) => { + * tempList.push(item); + * }); + * assert(tempList, [3, 2, 1]); + */ + async function eachRightAsync(source, iteratee) { + if (!source) { + return; + } + const arrayLength = source.length; + for (let index = arrayLength - 1; index >= 0; index--) { + await iteratee(source[index], index, source, arrayLength); + } + return source; + } + + /** + * Iterates through the given array while the iteratee returns true else the loop exits & returns false. + * + * @function everyArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. + * + * @example + * import { everyArray, assert } from '@universalweb/acid'; + * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), false); + * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), true); + */ + function everyArray(source, iteratee, additionalArgument) { + if (!source) { + return; + } + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if ( + iteratee( + source[index], + index, + source, + sourceLength, + additionalArgument, + ) === false + ) { + return false; + } + } + return true; + } + + /** + * Iterates through the given array while the iteratee returns true else the loop exits & returns false. + * + * @function everyAsyncArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. + * + * @example + * import { everyAsyncArray, assert } from '@universalweb/acid'; + * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), false); + * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), true); + */ + async function everyAsyncArray(source, iteratee, additionalArgument) { + if (!source) { + return; + } + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if ( + (await iteratee( + source[index], + index, + source, + sourceLength, + additionalArgument, + )) === false + ) { + return false; + } + } + return true; + } + + /** + * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. + * + * @function filterArray + * @category array + * @type {Function} + * @category array + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array with properties that passed the test. + * + * @example + * import { filterArray, assert } from '@universalweb/acid'; + * assert(filterArray([false, true, true], (item) => { + * return item; + * }), [true, true]); + */ + function filterArray(source, iteratee, results = [], additionalArgument) { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + if ( + iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArgument, + ) === true + ) { + results.push(item); + } + }); + return results; + } + + /** + * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. + * + * @function filterAsyncArray + * @category array + * @type {Function} + * @category array + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array with properties that passed the test. + * + * @example + * import { filterAsyncArray, assert } from '@universalweb/acid'; + * assert(filterAsyncArray([false, true, true], (item) => { + * return item; + * }), [true, true]); + */ + async function filterAsyncArray( + source, + iteratee, + results = [], + additionalArgument, + ) { + await eachAsyncArray( + source, + async (item, index, arrayOriginal, arrayLength) => { + if ( + (await iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArgument, + )) === true + ) { + results.push(item); + } + }, + ); + return results; + } + + /** + * Takes the first or multiple items from an array. + * + * @function first + * @type {Function} + * @category array + * @param {Array} array - Array to extract from. + * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array. + * @returns {Array} - Returns an array. + * + * @example + * import { first, assert } from '@universalweb/acid'; + * assert(first([1, 2, 3]), 1); + */ + function first(array, upTo) { + return upTo ? array.slice(0, upTo) : array[0]; + } + + /** + * Flattens an array up to the provided level. + * + * @function flatten + * @type {Function} + * @category array + * @param {Array} source - Array to flatten. + * @param {Number} [level = 1] - Number which determines how deep the array nest can be. + * @returns {Array|undefined} - Returns an array. + * + * @example + * import { flatten, assert } from '@universalweb/acid'; + * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]); + */ + function flatten(source, level = 1) { + if (!source) { + return; + } + let sourceArray = source; + for (let i = 0; i < level; i++) { + sourceArray = sourceArray.reduce((previousValue, currentValue) => { + return previousValue.concat(ensureArray(currentValue)); + }, []); + } + return sourceArray; + } + + /** + * Takes all but the last item in the array. + * + * @function initial + * @category array + * @type {Function} + * @param {Array} array - Array to have items extracted from. + * @returns {Array} - Returns a completely flattened array. + * + * @example + * import { initial, assert } from '@universalweb/acid'; + * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]); + */ + function initial(array) { + return array.slice(0, array.length - 1); + } + + // Add intersectionBy & intersectionWith + /** + * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory)) + * of the array and the input array(s). + * + * @function intersection + * @param {Array} array - Array to compare other arrays to. + * @param {...Array} arrays - A variable number of arrays. + * @category array + * @returns {Array} - The new array of unique values shared by all of the arrays. + * + * @example + * import { intersection, assert } from '@universalweb/acid'; + * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]); + */ + function intersection(array, ...arrays) { + return compactMapArray(array, (item) => { + const shouldReturn = everyArray(arrays, (otherItem) => { + return otherItem.includes(item); + }); + if (shouldReturn) { + return item; + } + }); + } + + /** + * Invoke each function in the given array. + * + * @function invokeArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} additionalArg - An object to be given each time to the iteratee. + * @param {*} thisCall - Iteratee called with thisCall as this. + * @returns {Array|undefined} - The originally given array. + * + * @example + * import { invokeArray, assert } from '@universalweb/acid'; + * function test(arg){ + * return [this, arg]; + * } + * const results = invokeArray([test], 1, test); + * assert(results, [test, 1]); + */ + function invokeArray(source, additionalArg, thisCall) { + if (!source) { + return; + } + const arrayLength = source.length; + if (hasValue(thisCall)) { + for (let index = 0; index < arrayLength; index++) { + source[index].call(thisCall, additionalArg); + } + } else { + for (let index = 0; index < arrayLength; index++) { + source[index](additionalArg); + } + } + return source; + } + + const regexToPath = /\.|\[/; + const regexCloseBracket = /]/g; + const emptyString = ""; + /** + * Breaks up string into object chain list. + * + * @function toPath + * @type {Function} + * @category utility + * @param {String} source - String to be broken up. + * @returns {Array} - Array used to go through object chain. + * + * @example + * import { toPath, assert } from '@universalweb/acid'; + * assert(toPath('post.like[2]'), ['post', 'like', '2']); + */ + function toPath(source) { + return source.replace(regexCloseBracket, emptyString).split(regexToPath); + } + + /** + * Returns property on an object. + * + * @function get + * @category utility + * @type {Function} + * @param {String} propertyString - String used to retrieve properties. + * @param {Object} target - Object which has a property retrieved from it. + * @returns {Object} - Returns property from the given object. + * + * @example + * import { get, assert } from '@universalweb/acid'; + * const objectTarget = { + * post: { + * like: ['a','b','c'] + * } + * }; + * assert(get('post.like[2]', objectTarget), 'c'); + */ + function get(propertyString, target) { + if (!target) { + return false; + } + let link = target; + const pathArray = isArray(propertyString) + ? propertyString + : toPath(propertyString); + everyArray(pathArray, (item) => { + link = link[item]; + return hasValue(link); + }); + return link; + } + + /** + * Get object's keys. + * + * @function keys + * @category object + * @param {*} source - The source object to pull keys from. + * @returns {Array} - Array of keys. + * + * @example + * keys({a: 1, b: 2}); + * // => ['a', 'b'] + */ + const objectKeys = Object.keys; + function keys(source) { + if (source) { + return objectKeys(source); + } + } + + const hasOwn = Object.hasOwn; + /** + * Checks to see if an object has all of the given property names. + * + * @function hasKeys + * @category object + * @type {Function} + * @param {Object} source - Source object to check for keys. + * @param {...String} properties - List of strings to check. + * @returns {Boolean|undefined} - Returns true or false. + * + * @example + * import { hasKeys, assert } from '@universalweb/acid'; + * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true); + */ + function hasKeys(source, ...properties) { + if (!source) { + return; + } + return everyArray(properties, (item) => { + const pathArray = toPath(item); + if (pathArray.length === 1) { + return hasOwn(source, item); + } else { + const lastPath = pathArray.pop(); + const initialPathObject = get(pathArray, source); + if (initialPathObject) { + return hasOwn(initialPathObject, lastPath); + } + return false; + } + }); + } + /** + * Checks to see if an object has any of the given property names. + * + * @function hasAnyKeys + * @category object + * @type {Function} + * @param {Object} source - Source object to check for keys. + * @param {Array} properties - List of strings to check. + * @returns {Boolean|undefined} - Returns true or false. + * + * @example + * import { hasAnyKeys, assert } from '@universalweb/acid'; + * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true); + * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false); + */ + function hasAnyKeys(source, ...properties) { + if (!source) { + return; + } + return Boolean( + properties.find((item) => { + const pathArray = toPath(item); + if (pathArray.length === 1) { + return hasOwn(source, item); + } else { + const lastPath = pathArray.pop(); + const initialPathObject = get(pathArray, source); + if (initialPathObject) { + return hasOwn(initialPathObject, lastPath); + } + return false; + } + }), + ); + } + + /** + * Checks to see if the constructor is that of a native object. + * + * @function isConstructor + * @category type + * @param {Object} target - The object to be checked. + * @param {Object} source - The source constructor object. + * @returns {Object} - Returns the target object. + * + * @example + * import { isConstructor, assert } from '@universalweb/acid'; + * assert(isConstructor(2, Number), true); + */ + function isConstructor(target, source) { + return target?.constructor === source || false; + } + function isConstructorFactory(source) { + return (target) => { + return isConstructor(target, source); + }; + } + function constructorName(source) { + return source?.constructor?.name; + } + function isConstructorNameFactory(source) { + return (target) => { + return constructorName(target) === source || false; + }; + } + + function isTypeFactory(method) { + return function (primarySource, ...otherSources) { + if (otherSources) { + return method(primarySource) && everyArray(otherSources, method); + } + return method(primarySource); + }; + } + + /** + * Checks if an object or objects are a Buffer. + * + * @function isBuffer + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isBuffer, assert } from '@universalweb/acid'; + * assert(isBuffer(Buffer.from('test')), true); + */ + const isBufferCall = isConstructorNameFactory("Buffer"); + const isBuffer = isTypeFactory(isBufferCall); + + /** + * Checks if the value is a plain object. + * + * @function isPlainObject + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isPlainObject } from '@universalweb/acid'; + * isPlainObject({}); + * // => true + */ + const isPlainObject = (source) => { + if (hasValue(source)) { + return source.constructor.toString().trim().slice(9, 16) === "Object("; + } + return false; + }; + + /** + * Performs a deep comparison between two objects & determines if the value is the same using strict comparison. + * + * @function isEqual + * @type {Function} + * @category utility + * @param {*} source - Source object. + * @param {*} target - Object to be compared. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEqual, assert } from '@universalweb/acid'; + * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true); + */ + // Add map & buffer Support - Review required for performance and support for more types + const isEqual = (source, target) => { + if (source === target) { + return true; + } else if (isBuffer(source)) { + return source.equals(target); + } else if (source.toString() === target.toString()) { + if (isPlainObject(source)) { + const sourceProperties = keys(source); + if (hasKeys(target, sourceProperties)) { + return everyArray(sourceProperties, (key) => { + return isEqual(source[key], target[key]); + }); + } + } else if (isArray(source)) { + if (source.length === target.length) { + return everyArray(source, (item, index) => { + return isEqual(item, target[index]); + }); + } + } + } + return false; + }; + + /** + * Performs a shallow strict comparison between two objects. + * + * @function isMatchArray + * @type {Function} + * @category array + * @param {Array} source - Source object. + * @param {Array} compareArray - Object to compare to source. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isMatchArray, assert } from '@universalweb/acid'; + * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true); + */ + function isMatchArray(source, compareArray) { + if (source.length === compareArray.length) { + return everyArray(source, (item, index) => { + return isEqual(compareArray[index], item); + }); + } + return false; + } + + const mathNativeMax = Math.max; + /** + * Plucks the largest value from an array. + * + * @function largest + * @type {Function} + * @category array + * @param {Array} array - Array from which largest number is taken. + * @returns {Number} - The largest number. + * + * @example + * import { largest, assert } from '@universalweb/acid'; + * assert(largest([1,2,3]), 3); + */ + function largest(array) { + return mathNativeMax(...array); + } + + /** + * Extracts item(s) from an array starting from the last item in the array. + * + * @function last + * @type {Function} + * @category array + * @param {Array} array - Array to have items extracted from. + * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array. + * @returns {Array} - Items from the array. + * + * @example + * import { last, assert } from '@universalweb/acid'; + * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]); + */ + function last(array, indexFrom) { + const arrayLength = array.length; + return indexFrom + ? array.slice(arrayLength - indexFrom, arrayLength) + : array[arrayLength - 1]; + } + + /** + * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. + * + * @function mapArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array} - An array of the same calling array's type. + * + * @example + * import { mapArray, assert } from '@universalweb/acid'; + * assert(mapArray([1, 2, 3], (item) => { + * return item * 2; + * }), [2, 4, 6]); + */ + function mapArray(source, iteratee, results = [], thisCall, additionalArg) { + if (hasValue(thisCall)) { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + results[index] = iteratee.call( + thisCall, + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArg, + ); + }); + } else { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + results[index] = iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArg, + ); + }); + } + return results; + } + + /** + * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee. + * + * @function concurrentEachArray + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {*} thisBind - Object to use as the "this" within the function. + * @returns {Promise|Array|undefined} - An array of the same calling array's type. + * + * @example + * import { concurrentEachArray, has, assert } from '@universalweb/acid'; + * const results = await concurrentEachArray([1, 2, 3], async (item) => { + * return item * 2; + * }); + * assert(has(results, [2, 4, 6]), true); + */ + async function concurrentEachArray(source, iteratee, thisBind) { + if (!source) { + return; + } + const results = []; + const arrayLength = source.length; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + results[index] = iteratee.call( + thisBind, + source[index], + index, + results, + arrayLength, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + results[index] = iteratee(source[index], index, results, arrayLength); + } + } + return Promise.all(results); + } + + /** + * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray. + * + * @function mapAsyncArray + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @returns {Array} - An array of the same calling array's type. + * + * @example + * import { mapAsyncArray, assert } from '@universalweb/acid'; + * assert(await mapAsyncArray([1, 2, 3], async (item) => { + * return item * 2; + * }), [2, 4, 6]); + */ + async function mapAsyncArray(source, iteratee) { + const results = []; + await eachAsyncArray(source, async (item, index, arrayLength) => { + results[index] = await iteratee(item, index, results, arrayLength); + }); + return results; + } + + /** + * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse. + * + * @function mapRightArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array of the same calling array's type. + * + * @example + * import { mapRightArray, assert } from '@universalweb/acid'; + * assert(mapRightArray([1, 2, 3], (item) => { + * return item * 2; + * }), [6, 4, 2]); + */ + function mapRightArray(source, iteratee, results = [], additionalArgument) { + let trueIndex = 0; + const arrayLength = source.length; + for (let index = arrayLength - 1; index >= 0; index--) { + results[trueIndex] = iteratee( + source[index], + index, + source, + arrayLength, + additionalArgument, + ); + trueIndex++; + } + return results; + } + + /** + * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee. + * + * @function mapWhile + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array with properties that passed the test. + * + * @example + * import { mapWhile, assert } from '@universalweb/acid'; + * assert(mapWhile([1, 2, 0], (item) => { + * return Boolean(item); + * }), [1, 2]); + */ + function mapWhile(source, iteratee, results = [], additionalArgument) { + const arrayLength = source.length; + for (let index = 0; index < arrayLength; index++) { + const item = source[index]; + const returned = iteratee( + item, + index, + results, + source, + arrayLength, + additionalArgument, + ); + if (returned === false) { + break; + } + results[index] = item; + } + return results; + } + + /** + * Subtracts the subtrahend (second argument) from the minuend (first argument). + * + * @function subtract + * @category math + * @type {Function} + * @param {Number} minuend - The minuend. + * @param {Number} subtrahend - The subtrahend. + * @returns {Number} - Returns the difference. + * + * @example + * import { subtract, assert } from '@universalweb/acid'; + * assert(subtract(3, 1), 2); + */ + function subtract(minuend, subtrahend) { + return minuend - subtrahend; + } + + /** + * Sorts an array of numbers in ascending order. Smallest to largest. + * + * @function sortNumberAscending + * @category array + * @param {Array} numberList - Array of numbers. + * @returns {Array} - The array this method was called on. + * + * @example + * import { sortNumberAscending, assert } from '@universalweb/acid'; + * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]); + */ + function sortNumberAscending(numberList) { + return numberList.sort(subtract); + } + + /** + * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. + * + * @function partition + * @type {Function} + * @category array + * @param {Array} array - Takes an array to split. + * @param {Function} predicate - Function run on each item in the array. + * @returns {Array} - One array split into two arrays. + * + * @example + * import { partition, assert } from '@universalweb/acid'; + * const result = partition([ + * {user: 'barney', age: 36, active: false}, + * {user: 'fred', age: 40, active: true}, + * {user: 'pebbles', age: 1, active: false} + * ], (item) => { return item.active; }); + * assert(result, [{"user":"fred","age":40,"active":true}], + * [{"user":"barney","age":36,"active":false}, + * {"user":"pebbles","age":1,"active":false}]); + */ + function partition(array, predicate) { + const rejected = []; + return [ + compactMapArray(array, (item, index) => { + if (predicate(item, index)) { + return item; + } + rejected.push(item); + }), + rejected, + ]; + } + + /** + * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function. + * + * @function subtractReverse + * @category math + * @type {Function} + * @param {Number} subtrahend - The subtrahend. + * @param {Number} minuend - The minuend. + * @returns {Number} - Returns the difference. + * + * @example + * import { subtractReverse, assert } from '@universalweb/acid'; + * assert(subtractReverse(1, 3), 2); + */ + function subtractReverse(subtrahend, minuend) { + return minuend - subtrahend; + } + + /** + * Sorts an array of numbers in descending order. Largest to smallest. + * + * @function sortNumberDescening + * @category array + * @param {Array} numberList - Array of numbers. + * @returns {Array} - The array this method was called on. + * + * @example + * import { sortNumberDescening, assert } from '@universalweb/acid'; + * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]); + */ + function sortNumberDescening(numberList) { + return numberList.sort(subtractReverse); + } + + /** + * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation. + * + * @function remove + * @category array + * @param {Array} array - Array to be mutated. + * @param {String|Array} removeThese - Items to remove from the array. + * @returns {Array} - The array this method was called on. + * + * @example + * remove([1, 2, 3, 3, 4, 3, 5], 1); + * // => [2, 3, 3, 4, 3, 5] + * @example + * remove([3, 3, 4, 5], 3, 4); + * // => [5] + */ + function remove(array, removeThese) { + let arrayLength = array.length; + for (let index = 0; index < arrayLength; index++) { + const item = array[index]; + if (removeThese.includes(item)) { + array.splice(index, 1); + index--; + arrayLength--; + } + } + return array; + } + /** + * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation. + * + * @function removeBy + * @category array + * @param {Array} source - Array to be mutated. + * @param {Function} iteratee - Function used to check object. Return true to remove the value. + * @returns {Array} - The array this method was called on. + * + * @example + * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);}); + * // => [2, 4] + */ + function removeBy(source, iteratee) { + let arrayLength = source.length; + for (let index = 0; index < arrayLength; index++) { + const item = source[index]; + if (iteratee(item, index)) { + source.splice(index, 1); + index--; + arrayLength--; + } + } + return source; + } + + /** + * Extracts all items in array except the first and last item. + * + * @function rest + * @type {Function} + * @category array + * @param {Array} array - Array to be sliced. + * @returns {Array} - Returns the aggregated array. + * + * @example + * rest([1, 2, 3, 4, 5]); + * // => [2, 3, 4, 5] + */ + function rest(array) { + return array.slice(1, array.length); + } + + /** + * Get the item at the supplied index starting at the end of the array. + * + * @function right + * @type {Function} + * @category array + * @param {Array} source - Array to be sliced. + * @param {Number} amount - Amount from the right. + * @returns {*} - Returns the object at the evaluated position. + * + * @example + * right([1, 2, 3, 4, 5] , 1); + * // => 4 + */ + function right(source, amount) { + return source[source.length - 1 - amount]; + } + + const { floor, random: random$1 } = Math; + /** + * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption.. + * + * @function randomInt + * @category number + * @type {Function} + * @param {Number} max - The highest possible value for the random number. + * @param {Number} [min = 0] - Establishes lowest possible value for the random number. + * @returns {Number} - Returns random integer between the max and min range. + * + * @example + * import { randomInt, assert } from '@universalweb/acid'; + * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;}); + */ + function randomInt(max, min = 0) { + return floor(random$1() * (max - min)) + min; + } + + /** + * Checks if two numbers are the same. + * + * @function isNumberEqual + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @param {Number} target - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumberEqual, assert } from '@universalweb/acid'; + * assert(isNumberEqual(0, 0), true); + */ + function isNumberEqual(source, target) { + return source === target; + } + + const arrayFrom = Array.from; + /** + * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check. + * + * @function toArray + * @category array + * @param {*} arrayLike - Array like object. + * @param {Function} mapFn - Function to map over the array. + * @param {*} thisArg - MapFn's "this". + * @returns {Array|undefined} - New array. + * + * @example + * import { toArray, assert } from '@universalweb/acid'; + * assert(toArray(new Map([[1, 2]])), [[1, 2]]); + */ + function toArray(arrayLike, mapFn, thisArg) { + if (hasValue(arrayLike)) { + return arrayFrom(arrayLike, mapFn, thisArg); + } + } + + /** + * Shuffle an array and return a new array. + * + * @function shuffle + * @category array + * @param {Array} target - Target Array to be shuffled. + * @param {Number} amount - The amount of times to shuffle the array. + * @returns {Array} - An array with the shuffled results. + * + * @example + * import { shuffle, assert } from '@universalweb/acid'; + * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]); + */ + function shuffle(target, amount = target.length) { + if (target.length <= 1) { + return toArray(target); + } + const shuffleArray = toArray(target); + let count = 0; + let index; + let value; + while (count < amount) { + index = randomInt(shuffleArray.length - 1, 0); + value = shuffleArray[count]; + shuffleArray[count] = shuffleArray[index]; + shuffleArray[index] = value; + count++; + } + return shuffleArray; + } + + /** + * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned. + * + * @function sample + * @category array + * @param {Array} source - The array to pull sample(s) from. + * @param {Number} amount - The amount of samples to take. + * @returns {Array} - An array of randomly pulled samples. + * + * @example + * sample([1, 2, 3, 4] , 2); + * // => [1, 3] + */ + function sample(source, amount) { + if (!source) { + return false; + } + const arrayLength = source.length; + if (arrayLength === amount || amount > arrayLength) { + return shuffle(source); + } + if (amount === 1) { + return [source[randomInt(arrayLength - 1, 0)]]; + } + const sampleArray = []; + const used = {}; + let count = 0; + let index; + while (count < amount) { + index = randomInt(source.length - 1, 0); + if (!used[index]) { + sampleArray.push(source[index]); + used[index] = true; + count++; + } + } + return sampleArray; + } + + const mathNativeMin = Math.min; + /** + * Plucks the smallest value from an array. + * + * @function smallest + * @category array + * @type {Function} + * @param {Array} array - Array from which smallest number is taken. + * @returns {Number} - The smallest number. + * + * @example + * smallest([1,2,3]); + * // => 1 + */ + function smallest(array) { + return mathNativeMin(...array); + } + + /** + * What index should the number be inserted at to keep a sorted array still sorted. + * + * @function getNumberInsertIndex + * @category array + * @type {Function} + * @param {Array} source - Array to be checked. + * @param {Number} target - Number to check where to be inserted. + * @returns {Number} - The index at which to insert. + * + * @example + * import { getNumberInsertIndex, assert } from '@universalweb/acid'; + * assert(getNumberInsertIndex([30, 39, 50], 40), 1); + */ + function getNumberInsertIndex(source, target) { + let insertIndex = 0; + everyArray(source, (item, index) => { + insertIndex = index; + if (target >= item) { + insertIndex = index + 1; + return true; + } else { + return false; + } + }); + return insertIndex; + } + + /** + * Returns a shallow copy of the array up to an amount. + * + * @function take + * @category array + * @type {Function} + * @param {Array} source - The source array to take from. + * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction. + * @returns {Array} - The aggregated array. + * + * @example + * import { take, assert } from '@universalweb/acid'; + * assert(take([1,2,3], 2), [1, 2]); + */ + function take(source, endIndex = 1) { + return source.slice(0, endIndex); + } + + /** + * Returns a shallow copy of the array up to an amount starting from the right. + * + * @function takeRight + * @category array + * @type {Function} + * @param {Array} source - The source array to take right from. + * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction. + * @returns {Array} - The aggregated array. + * + * @example + * import { takeRight, assert } from '@universalweb/acid'; + * assert(takeRight([1,2,3], 2), [2, 3]); + */ + function takeRight(source, indexRight = 1) { + const arrayLength = source.length; + return source.slice(arrayLength - indexRight, arrayLength); + } + + function onlyUnique(value, index, array) { + return array.indexOf(value) === index; + } + function sortUnique(item, index, array) { + return item !== array[index - 1]; + } + /** + * Filters the array down to unique elements. + * + * @function unique + * @category array + * @type {Function} + * @param {Array} source - The array to be filtered. + * @param {Boolean} isSorted - Flag which means the array is already sorted. + * @returns {Array} - The filtered array. + * + * @example + * unique([1, 2, 2, 4]); + * // => [1, 2, 4] + */ + function unique(source, isSorted) { + if (isSorted) { + return source.filter(sortUnique); + } + return source.filter(onlyUnique); + } + + /** + * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays. + * + * @function union + * @category array + * @type {Function} + * @param {...Array} arrays - The arrays to be evaluated. + * @returns {Array} - The aggregated array. + * + * @example + * union([1,2,4], [1,2,3]); + * // => [1, 2, 4, 3] + */ + function union(...arrays) { + return unique(flattenDeep(arrays)); + } + + /** + * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned. + * If and when the iteratee yields false the loop stops & false is returned. + * + * @function untilFalseArray + * @category array + * @type {Function} + * @param {Array} source - The array to iterate over. + * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. + * @returns {Array} - Returns true if all returns are true or false if one value returns false. + * + * @example + * import { untilFalseArray, assert } from '@universalweb/acid'; + * assert(untilFalseArray([true, true, false], (item) => { + * return item; + * }), false); + * assert(untilFalseArray([true, true, true], (item) => { + * return item; + * }), true); + */ + function untilFalseArray(source, iteratee) { + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if (iteratee(source[index], index) === false) { + return false; + } + } + return true; + } + + /** + * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned. + * If and when the iteratee yields true the loop stops & false is returned. + * + * @function untilTrueArray + * @category array + * @type {Function} + * @param {Array} source - The array to iterate over. + * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. + * @returns {Array} - Returns true if all returns are false or false if one value returns true. + * + * @example + * import { untilTrueArray, assert } from '@universalweb/acid'; + * assert(untilTrueArray([true], (item) => { + * return item; + * }), false); + * assert(untilTrueArray([true, true, true], (item) => { + * return item; + * }), true); + */ + function untilTrueArray(source, iteratee) { + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if (iteratee(source[index], index) === true) { + return false; + } + } + return true; + } + + /** + * Iterates through the calling object and creates a new object based on the calling object's type with the results, + * (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * Re-checks the length each loop. + * + * @function whileCompactMap + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The originally given array. + * + * @example + * import { whileCompactMap, assert } from '@universalweb/acid'; + * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => { + * return item; + * }), [1, 2, 3, false]); + */ + function whileCompactMap(source, iteratee, results = [], additionalArgument) { + let index = 0; + while (index < source.length) { + const result = results.push( + iteratee( + source[index], + index, + source, + source.length, + additionalArgument, + ), + ); + index++; + if (hasValue(result)) { + results.push(result); + } + } + return source; + } + + /** + * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over. + * + * @function whileEachArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The originally given array. + * + * @example + * import { whileEachArray, assert } from '@universalweb/acid'; + * const list = []; + * whileEachArray([1, 2, 3], (item, index) => { + * list[index] = item; + * }); + * assert(list, [1, 2, 3]); + */ + function whileEachArray(source, iteratee, additionalArgument) { + let index = 0; + while (index < source.length) { + iteratee(source[index], index, source, source.length, additionalArgument); + index++; + } + return source; + } + + /** + * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. + * Re-checks the length each loop. + * + * @function whileMapArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The originally given array. + * + * @example + * import { whileMapArray, assert } from '@universalweb/acid'; + * assert(whileMapArray([1, 2, 3], (item, index, source) => { + * if (index === 0) { + * source.push(4); + * } + * return item; + * }), [1, 2, 3, 4]); + */ + function whileMapArray(source, iteratee, results = [], additionalArgument) { + let index = 0; + while (index < source.length) { + results.push( + iteratee( + source[index], + index, + source, + source.length, + additionalArgument, + ), + ); + index++; + } + return source; + } + + /** + * Returns a copy of the array with all instances of the values removed. + * + * @function without + * @type {Function} + * @category array + * @param {Array} target - The target array to be filtered. + * @param {Array} sources - Items to be removed. + * @returns {Array} - The target array filtered. + * + * @example + * import { without, assert } from '@universalweb/acid'; + * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]); + */ + function without(target, sources) { + if (!sources) { + return target; + } + const sourcesSet = construct(Set, sources); + return target.filter((item) => { + return !sourcesSet.has(item); + }); + } + + /** + * Creates an array that is the symmetric difference of the provided arrays. + * + * @function xor + * @category array + * @type {Function} + * @param {...Array} sources - The array(s) to be filtered. + * @returns {Array|undefined} - The filtered array. + * + * @example + * xor([2, 1], [2, 3, 5], [6]); + * // => [1, 3, 5, 6] + */ + function xor(...sources) { + const xorMap = construct(Map); + const xored = []; + const sourcesLength = sources.length; + if (sourcesLength === 2) { + return difference(sources[0], sources[1]); + } + eachArray(sources, (currentArray, parentIndex) => { + eachArray(currentArray, (child, childIndex) => { + let childRoot = xorMap.get(child); + if (!childRoot) { + childRoot = { + count: 1, + parentIndex, + child, + }; + xorMap.set(child, childRoot); + } else if (childRoot.parentIndex === parentIndex) { + return; + } else { + childRoot.count++; + } + }); + }); + forEach(xorMap, (item) => { + if (item.count === 1) { + xored.push(item.child); + } + }); + return xored; + } + + /** + * Merges together the values of each of the arrays with the values at the corresponding position. + * + * @function zip + * @type {Function} + * @category array + * @param {Array} arrays - The arrays to process. + * @returns {Array} - Returns the new array of regrouped elements. + * + * @example + * zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + function zip(...arrays) { + return arrays[0].map((item, index) => { + return arrays.map((array) => { + return array[index]; + }); + }); + } + /** + * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration. + * + * @function unZip + * @type {Function} + * @category array + * @param {Array} source - The array of grouped elements to process. + * @returns {Array} - Returns the new array of regrouped elements. + * + * @example + * unZip([['a', 1, true], ['b', 2, false]]); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unZip(source) { + return source[0].map((item, index) => { + return source.map((arraySet) => { + return arraySet[index]; + }); + }); + } + + /** + * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer. + * + * @function ensureBuffer + * @category buffer + * @type {Function} + * @param {*} source - Object to be checked. + * @returns {Array} - Returns an array. + * + * @example + * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid'; + * assert(isBuffer(ensureBuffer('test')), true); + */ + function ensureBuffer(source) { + return ( + (isBuffer(source) && source) || + (hasValue(source) && Buffer.from(source)) || + Buffer.alloc(0) + ); + } + + /** + * Clears the values out of a buffer. + * + * @function clearBuffer + * @category buffer + * @type {Function} + * @param {Array} source - Takes an array to be emptied. + * @returns {Array} - The originally given array. + * + * @example + * import { clearBuffer, assert } from '@universalweb/acid'; + * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([])); + */ + function clearBuffer(source) { + source.fill(0); + return source; + } + + /** + * Checks if an object or objects are a plain object. + * + * @function isFunction + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFunction } from '@universalweb/acid'; + * isFunction(() => {}); + * // => true + */ + const isFunction = (source) => { + return hasValue(source) ? source instanceof Function : false; + }; + + /** + * Checks if the value is a number. + * + * @function isNumber + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumber, assert } from '@universalweb/acid'; + * assert(isNumber(1), true); + */ + const isNumberCall = isConstructorNameFactory("Number"); + const isNumber = isTypeFactory(isNumberCall); + /** + * Checks if the value is not a number. + * + * @function isNotNumber + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNotNumber, assert } from '@universalweb/acid'; + * assert(isNotNumber(1), false); + */ + function isNotNumber(source) { + return !isNumber(source); + } + + /** + * Checks if the value is a string. + * + * @function isString + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isString, assert } from '@universalweb/acid'; + * assert(isString('hello'), true); + * assert(isString(1), false); + */ + const isString = isConstructorFactory(String); + /** + * Checks if the value is not a string. + * + * @function isNotString + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNotString, assert } from '@universalweb/acid'; + * assert(isNotString(1), true); + * assert(isNotString('hello'), false); + */ + function isNotString(source) { + return !isString(source); + } + + const objectAssign = Object.assign; + function assignToObject(target, source) { + if (isPlainObject(source)) { + objectAssign(target, source); + } else if (isFunction(source)) { + const key = source.name; + if (key) { + target[key] = source; + } else { + objectAssign(target, source); + } + } else if (isString(source) || isNumber(source)) { + target[source] = source; + } + return target; + } + /** + * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module. + * + * @function assign + * @category object + * @param {Object} target - The target object. + * @param {...Object} sources - The source object(s). + * @returns {Object} - Returns the target object. + * + * @example + * import { assign, assert } from '@universalweb/acid'; + * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5}); + */ + function assign(target, ...sources) { + const sourceLength = sources.length; + for (let index = 0; index < sourceLength; index++) { + assignToObject(target, sources[index]); + } + return target; + } + + function assignToClass(target, source) { + if (isPlainObject(source)) { + objectAssign(target.prototype, source); + } else if (isFunction(source)) { + const key = source.name; + if (key) { + target.prototype[key] = source; + } + } else if (isConstructor(source)) { + const key = source.constructor?.name; + if (key) { + target.prototype[key] = source; + } + } else if (isString(source) || isNumber(source)) { + target.prototype[source] = source; + } + return target; + } + /** + * The function adds a new method to a class. + * @param {Class} target - The target parameter refers to the Class or constructor function to which you want + * to add a new method. + * @param {Function|Object|String|Number} sources - What you want to add to the class. + * @returns {Class} - Returns the Class provided in the target parameter. + * + * @example + * import { extendClass, assert } from '@universalweb/acid'; + * class Test {} + * function a(){return 1;} + * extendClass(Test, a) + * assert((new Test()).a(), 1); + */ + function extendClass(target, ...sources) { + const sourceLength = sources.length; + for (let index = 0; index < sourceLength; index++) { + assignToClass(target, sources[index]); + } + return target; + } + + /** + * Creates an object composed of keys generated from the results of running each element of collection through iteratee. + * + * @function countBy + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {Function} iteratee - The iteratee to transform keys. + * @returns {Object} - Returns the composed aggregate object. + * + * @example + * import { countBy, assert } from '@universalweb/acid'; + * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2}); + */ + function countBy(collection, iteratee) { + const object = {}; + let result; + eachArray(collection, (item) => { + result = iteratee(item); + if (!object[result]) { + object[result] = 0; + } + object[result]++; + }); + return object; + } + + /** + * Count the amount of times a key is present in a collection. + * + * @function countKey + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {Function} propertyName - The name of the key. + * @returns {Number} - The count. + * + * @example + * import { countKey, assert } from '@universalweb/acid'; + * assert(countKey([{a:1}, {a:3}], 'a'), 2); + */ + function countKey(collection, propertyName) { + let count = 0; + eachArray(collection, (item) => { + if (item[propertyName]) { + count++; + } + }); + return count; + } + + /** + * Count the amount of times a key is not present in a collection. + * + * @function countWithoutKey + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {String} propertyName - The name of the key. + * @returns {Number} - The count. + * + * @example + * import { countWithoutKey, assert } from '@universalweb/acid'; + * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2); + */ + function countWithoutKey(collection, propertyName) { + let count = 0; + eachArray(collection, (item) => { + if (!item[propertyName]) { + count++; + } + }); + return count; + } + + function findIndexCache(element, index, array, indexMatch, propertyName) { + if (element[propertyName] === indexMatch) { + return true; + } + } + + /** + * Finds an object in a collection by the given id and property name and returns the array index of the object. + * + * @function findIndex + * @type {Function} + * @category collection + * @param {Array} collection - Collection to be checked for an item. + * @param {Number|string} id - The value to look for. + * @param {String} [propertyName = 'id'] - The name of the property to compare. + * @returns {Number} - The index of the object. + * + * @example + * findIndex([{id: 1}, {id: 2}], 1); + * // => 0 + */ + function findIndex(collection, id, propertyName = "id") { + const result = collection.findIndex((element, index) => { + return findIndexCache(element, index, collection, id, propertyName); + }); + return result === -1 ? false : result; + } + + /** + * Finds an object in a collection by the given id and property name. + * + * @function findItem + * @type {Function} + * @category collection + * @param {Array} collection - Collection to be checked for an item. + * @param {Number|string} id - The value to look for. + * @param {String} [propertyName = 'id'] - The name of the property to compare. + * @returns {Object} - The found object. + * + * @example + * findItem([{id: 1}, {id: 2}], 1); + * // => {id: 1} + */ + function findItem(collection, id, propertyName = "id") { + const result = collection.find((element, index) => { + return findIndexCache(element, index, collection, id, propertyName); + }); + return result === -1 ? false : result; + } + + function sortCollectionDescendingFilter( + previous, + next, + propertyName, + ifMatch, + ) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + if (!nextKey) { + return -1; + } else if (!previousKey) { + return 1; + } else if (previousKey < nextKey) { + return 1; + } else if (previousKey > nextKey) { + return -1; + } + return 0; + } + /** + * Sorts an array in place using a key in descending order. + * + * @function sortCollectionDescending + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array and or a clone of the array sorted. + * + * @example + * import { sortCollectionDescending, assert } from '@universalweb/acid'; + * const result = [{id: 1}, {id: 0}]; + * const collect = [{id: 0}, {id: 1}]; + * const prop = 'id'; + * assert(sortCollectionDescending(collect, prop), result); + */ + function sortCollectionDescending(collection, propertyName = "id", ifMatch) { + return collection.sort((previous, next) => { + return sortCollectionDescendingFilter( + previous, + next, + propertyName, + ifMatch, + ); + }); + } + + /** + * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array. + * + * @function getLowest + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @returns {Object} - The newest object in the collection. + * + * @example + * import { getLowest, assert } from '@universalweb/acid'; + * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1}); + */ + function getLowest(collection, propertyName) { + return sortCollectionDescending(collection, propertyName, false)[0]; + } + + function sortCollectionAscendingFilter( + previous, + next, + propertyName, + ifMatch, + ) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + if (!nextKey) { + return 1; + } else if (!previousKey) { + return -1; + } else if (previousKey < nextKey) { + return -1; + } else if (previousKey > nextKey) { + return 1; + } + return 0; + } + /** + * Sorts an array in place using a key in ascending order. + * + * @function sortCollectionAscending + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array and or a clone of the array sorted. + * + * @example + * import { sortCollectionAscending, assert } from '@universalweb/acid'; + * const result = [{id: 0}, {id: 1}]; + * const collect = [{id: 1}, {id: 0}]; + * const prop = 'id'; + * assert(sortCollectionAscending(collect, prop), result); + */ + function sortCollectionAscending(collection, propertyName = "id", ifMatch) { + return collection.sort((previous, next) => { + return sortCollectionAscendingFilter( + previous, + next, + propertyName, + ifMatch, + ); + }); + } + + /** + * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array. + * + * @function getHighest + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @returns {Object} - The newest object in the collection. + * + * @example + * import { getHighest, assert } from '@universalweb/acid'; + * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0}); + */ + function getHighest(collection, propertyName = "id") { + return sortCollectionAscending(collection, propertyName)[0]; + } + + /** + * Creates an object composed of keys generated from the results of running each element of collection thru iteratee. + * The order of grouped values is determined by the order they occur in collection. + * The corresponding value of each key is an array of elements responsible for generating the key. + * + * @function groupBy + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {Function} iteratee - The iteratee to transform keys. + * @returns {Object} - Returns the composed aggregate object. + * + * @example + * groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + */ + function groupBy(collection, iteratee) { + const sortedObject = {}; + eachArray(collection, (item) => { + const results = iteratee(item); + if (!sortedObject[results]) { + sortedObject[results] = []; + } + sortedObject[results].push(item); + }); + return sortedObject; + } + + /** + * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique. + * + * @function indexBy + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {String} propertyName - The property name to index by. + * @returns {Object} - Returns the composed aggregate object. + * + * @example + * import { indexBy, assert } from '@universalweb/acid'; + * const result = { "0": {name: 'test', id: 0}, "1": {name: 'test2', id: 1}}; + * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id'); + * assert(indexed, result); + */ + function indexBy(collection, propertyName = "id") { + const sortedObject = {}; + eachArray(collection, (item) => { + sortedObject[item[propertyName]] = item; + }); + return sortedObject; + } + + /** + * Invokes a function on the provided property name in each object in the collection. + * + * @function invokeCollection + * @category collection + * @type {Function} + * @param {Array} collection - Collection from which method will be taken. + * @param {String} property - Value used to pluck method from object. + * @param {*} value - Value to be passed to callable property. + * @returns {Array} - Returns the results of the invoked method. + * + * @example + * import { invokeCollection, assert } from '@universalweb/acid'; + * const results = invokeCollection([{ + * test(item, index) { return [item, index];} + * }], 'test', ['EXAMPLE']); + * assert(results, [['EXAMPLE', 0]]); + */ + function invokeCollection(collection, property, value, thisBind) { + if (thisBind) { + return mapArray(collection, (item, index) => { + return item[property].call(thisBind, value); + }); + } + return mapArray(collection, (item, index) => { + return item[property](value); + }); + } + + /** + * Asynchronously awaits & invokes a function on the provided property name in each object in the collection. + * + * @function invokeCollectionAsync + * @category collection + * @type {Function} + * @async + * @param {Array} collection - Collection from which method will be taken. + * @param {String} property - Value used to pluck method from object. + * @param {*} value - Value to be passed to callable property. + * @returns {Array} - Returns the results of the invoked method. + * + * @example + * import { invokeCollectionAsync, assert } from '@universalweb/acid'; + * const results = await invokeCollectionAsync([{ + * async test(item, index) { return [item, index];} + * }], 'test', ['EXAMPLE']); + * assert(results, [['EXAMPLE', 0]]); + */ + function invokeCollectionAsync(collection, property, value, thisBind) { + if (thisBind) { + return mapAsyncArray(collection, (item) => { + return item[property].call(thisBind, value); + }); + } + return mapAsyncArray(collection, async (item) => { + return item[property](value); + }); + } + + /** + * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array. + * + * @function pluckObject + * @category object + * @type {Function} + * @param {Object} source - Array used to determine what sources to be plucked. + * @param {String|Array} targets - Property name. + * @returns {Array|undefined} - An array of plucked sources. + * + * @example + * import { pluckObject, assert } from '@universalweb/acid'; + * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]); + */ + function pluckObject(source, targets) { + if (!source) { + return; + } else if (isString(targets)) { + return source[targets]; + } + return mapArray(targets, (item) => { + return source[item]; + }); + } + + /** + * Returns an array of the plucked values from the collection. + * + * @function pluck + * @category collection + * @type {Function} + * @param {Array} collection - Array used to determine what value to be plucked. + * @param {(String|Number|Array.)} targets - Property name. + * @returns {Array} - An array of plucked values. + * + * @example + * import { pluck, assert } from '@universalweb/acid'; + * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]); + * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]); + */ + function pluck(collection, targets) { + return mapArray(collection, (item) => { + return pluckObject(item, targets); + }); + } + + function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + return previousKey.localeCompare(nextKey); + } + /** + * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array. + * + * @function sortCollectionAlphabetically + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - Name of property to compare. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array. + * + * @example + * import { sortCollectionAlphabetically, assert } from '@universalweb/acid'; + * const result = [{"letter":"a"},{"letter":"c", g: 0},{"letter":"c", g: 2}, {letter:'f'}]; + * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c", g: 2}, {letter:'c', g: 0}]; + * const prop = 'letter'; + * function ifMatchSort(c, n) { + * if (c.g < n.g) { + * return -1; + * } + * if (c.g > n.g) { + * return 1; + * } + * } + * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result); + */ + function sortCollectionAlphabetically( + collection, + propertyName = "id", + ifMatch, + ) { + return collection.sort((previous, next) => { + return sortObjectsAlphabetically(previous, next, propertyName, ifMatch); + }); + } + + function sortObjectsAlphabeticallyReverse( + previous, + next, + propertyName, + ifMatch, + ) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + return nextKey.localeCompare(previousKey); + } + /** + * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array. + * + * @function sortCollectionAlphabeticallyReverse + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - Name of property to compare. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array. + * + * @example + * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid'; + * const result = [{letter:'f'},{"letter":"c"}, {"letter":"a"}]; + * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c"}]; + * const prop = 'letter'; + * assert(sortCollectionAlphabeticallyReverse(collect, prop), result); + */ + function sortCollectionAlphabeticallyReverse( + collection, + propertyName = "id", + ifMatch, + ) { + return collection.sort((previous, next) => { + return sortObjectsAlphabeticallyReverse( + previous, + next, + propertyName, + ifMatch, + ); + }); + } + + /** + * Return the file extension. + * + * @function getFileExtension + * @category file + * @param {*} source - Object to be checked. + * @returns {String|undefined} - Returns the extension. + * + * @example + * import { getFileExtension, assert } from '@universalweb/acid'; + * assert(getFileExtension('test.js'),'js'); + */ + function getFileExtension(source) { + if (source) { + return source.substring(source.lastIndexOf(".") + 1); + } + } + + /** + * Return the file extension. + * + * @function getFilename + * @category file + * @param {*} source - Object to be checked. + * @returns {String|undefined} - Returns the extension. + * + * @example + * import { getFilename, assert } from '@universalweb/acid'; + * assert(getFilename('./universalweb/test.js'),'test.js'); + */ + function getFilename(source) { + if (source) { + return source.substring(source.lastIndexOf("/") + 1); + } + } + + function regexTestFactory(regexType) { + return (item) => { + return hasValue(item) ? regexType.test(item) : false; + }; + } + + /** + * Checks if the string has a .css extension. + * + * @function isFileCSS + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileCSS, assert } from '@universalweb/acid'; + * assert(isFileCSS('test.css'), true); + */ + const isFileCSS = regexTestFactory(/\.css$/); + + /** + * Checks if the string has a .html extension. + * + * @function isFileHTML + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileHTML, assert } from '@universalweb/acid'; + * assert(isFileHTML('test.html'), true); + */ + const isFileHTML = regexTestFactory(/\.html$/); + + /** + * Checks if the string has a .js extension. + * + * @function isFileJS + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileJS, assert } from '@universalweb/acid'; + * assert(isFileJS('test.js'), true); + */ + const isFileJS = regexTestFactory(/\.js$/); + + /** + * Checks if the string has a .json extension. + * + * @function isFileJSON + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileJSON, assert } from '@universalweb/acid'; + * assert(isFileJSON('test.json'), true); + */ + const isFileJSON = regexTestFactory(/\.json$/); + + /** + * Creates a function that executes callable, only after being called n times. + * + * @function after + * @category function + * @type {Function} + * @param {Number} amount - The number of calls until method is invoked. + * @param {Function} callable - The function to be called. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * import { after, assert } from '@universalweb/acid'; + * const onlyAfter = after(1, (item) => { return item;}); + * assert(onlyAfter(1), undefined); + * assert(onlyAfter(2), 2); + */ + function after(amount, callable) { + let point = amount; + let value; + const onlyAfter = (...args) => { + if (point !== null) { + point--; + } + if (point <= 0) { + value = callable(...args); + point = null; + } + return value; + }; + return onlyAfter; + } + + /** + * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments. + * + * @function ary + * @category function + * @type {Function} + * @param {Function} callable - The function to cap arguments for. + * @param {Number} amount - The arity cap. + * @returns {Object} - Returns the new capped function. + * + * @example + * import { ary, assert } from '@universalweb/acid'; + * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]); + */ + function ary(callable, amount) { + return (...args) => { + return callable(...args.splice(0, amount)); + }; + } + + /** + * Creates a function that executes callable, only before n times. + * + * @function before + * @category function + * @type {Function} + * @param {Number} amount - The number of calls before n. + * @param {Function} callable - The function to be called. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * import { before, assert } from '@universalweb/acid'; + * const onlyBefore = before(3, () => { return 1;}); + * assert(onlyBefore(1), 1); + */ + function before(amount, callable) { + let point = amount; + let value; + const onlyBefore = (...args) => { + if (point !== null) { + point--; + } + if (point >= 1) { + value = callable(...args); + } else { + point = null; + } + return value; + }; + return onlyBefore; + } + + /** + * Asynchronously iterates through the given object. + * + * @function eachAsyncObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg. + * @param {*} thisCall - Iteratee called with thisCall as this. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Object|Function|undefined} - Returns source. + * + * @example + * import { eachAsyncObject, assert } from '@universalweb/acid'; + * const tempList = []; + * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => { + * tempList[key] = item; + * }); + * assert(tempList, {a: 1, b: 2, c: 3}); + */ + const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => { + if (!source) { + return; + } + const objectKeys = keys(source); + if (hasValue(thisCall)) { + await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { + return iteratee.call( + thisCall, + source[key], + key, + source, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } else { + await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { + return iteratee( + source[key], + key, + source, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } + return source; + }; + + /** + * Iterates through the given object. + * + * @function eachObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Object|Function|undefined} - Returns the calling object. + * + * @example + * import { eachObject, assert } from '@universalweb/acid'; + * assert(eachObject({a: 1, b: 2, c: 3}, (item) => { + * console.log(item); + * }), {a: 1, b: 2, c: 3}); + */ + function eachObject(source, iteratee, thisCall, additionalArg) { + if (!source) { + return; + } + const objectKeys = keys(source); + if (hasValue(thisCall)) { + eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { + iteratee.call( + thisCall, + source[key], + key, + source, + propertyCount, + objectKeysArray, + additionalArg, + ); + }); + } else { + eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { + iteratee( + source[key], + key, + source, + propertyCount, + objectKeysArray, + additionalArg, + ); + }); + } + return source; + } + + async function forEachAsync(source, callback) { + const values = []; + const properties = []; + let valuesLength = 0; + source.forEach((item, key) => { + values[valuesLength] = item; + properties[valuesLength] = item; + valuesLength++; + }); + for (let index = 0; index < valuesLength; index++) { + await callback(values[index], properties[index]); + } + return source; + } + + /** + * Checks if an object(s) is a Set. + * + * @function isSet + * @category type + * @param {...*} sources - Objects to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isSet, assert } from '@universalweb/acid'; + * assert(isSet(new Set()), true); + */ + const isSetCall = isConstructorNameFactory("Set"); + const isSet = isTypeFactory(isSetCall); + + function forOf(source, iteratee) { + if (isSet(source)) { + for (const value of source) { + iteratee(value, source); + } + return source; + } + for (const [key, value] of source) { + iteratee(value, key, source); + } + return source; + } + + /** + * Checks if an object or objects are a Int16Array. + * + * @function isGenerator + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isGenerator } from '@universalweb/acid'; + * isGenerator(function* (){}); + * // => true + */ + const isGeneratorCall = isConstructorNameFactory("GeneratorFunction"); + const isGenerator = isTypeFactory(isGeneratorCall); + + async function forOfAsync(source, iteratee, generatorArgs) { + if (isSet(source)) { + for (const value of source) { + await iteratee(value, source); + } + return source; + } + if (isGenerator(source)) { + for await (const item of source(...generatorArgs)) { + await iteratee(item, source); + } + } + for (const [key, value] of source) { + await iteratee(value, key, source); + } + return source; + } + + /** + * Checks if an object is an async function. + * + * @function isAsync + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isAsync, assert } from '@universalweb/acid'; + * assert(isAsync(async() => {}), true); + */ + const isAsyncCall = isConstructorNameFactory("AsyncFunction"); + const isAsync = isTypeFactory(isAsyncCall); + + function generateLoop( + arrayLoop, + arrayLoopAsync, + objectLoop, + objectLoopAsync, + forOfLoop, + forOfLoopAsync, + ) { + return (source, iteratee, argument1, argument2, argument3) => { + let returned; + const isIterateeAsync = isAsync(iteratee); + if (!hasValue(source) || !iteratee) { + return; + } else if (isArray(source)) { + returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; + } else if (isPlainObject(source) || isFunction(source)) { + returned = isIterateeAsync ? objectLoopAsync : objectLoop; + } else if (forOfLoop) { + returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; + } else if (isGenerator(source)) { + returned = forOfLoopAsync; + } else { + returned = isIterateeAsync ? objectLoopAsync : objectLoop; + } + return returned(source, iteratee, argument1, argument2, argument3); + }; + } + + /** + * Iterates through the given object. + * + * @function each + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array | object | Function} - The originally given object. + * + * @example + * import { each, assert } from '@universalweb/acid'; + * const list = {}; + * each({a: 1, b: 2, c: 3}, (item, key) => { + * list[key] = item; + * }); + * assert(list, {a: 1, b: 2, c: 3}); + */ + const each = generateLoop( + eachArray, + eachAsyncArray, + eachObject, + eachAsyncObject, + forOf, + forOfAsync, + ); + + class Chain { + constructor(methods) { + this.addChainMethod(methods); + } + addChainMethod(methods) { + const thisChain = this; + each(methods, (method, methodName) => { + thisChain[methodName] = function (...args) { + this.value = method.call(thisChain, thisChain.value, ...args); + return thisChain; + }; + }); + } + setValue(value) { + this.value = value; + return this; + } + done() { + const value = this.value; + this.value = null; + return value; + } + value = null; + } + /** + * Creates a chainable set of functions. + * + * @function chain + * @category function + * @type {Function} + * @param {Array|Object} config - The object to take methods from. + * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining. + * + * @example + * import { chain, assert } from '@universalweb/acid'; + * const chained = chain({ + * a(value, c) { + * return value + c; + * } + * }).setValue(2).a(1).done(); + * assert(chained, 3); + */ + function chain(config) { + return construct(Chain, [config]); + } + + /** + * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient. + * + * @function curry + * @category function + * @type {Function} + * @param {Function} callable - The function to curry. + * @param {Number} arity - The arity of method. + * @returns {*} - Returns the new curried function. + * + * @example + * import { curry, assert } from '@universalweb/acid'; + * const result = curry((a, b, c) => { + * return [a, b, c]; + * })(1)(2)(3); + * assert(result, [1, 2, 3]); + */ + function curry(callable, arity = callable.length) { + const curries = []; + const curried = (...curryArgs) => { + curries.push(...curryArgs); + if (curries.length === arity) { + const result = callable(...curries); + clearArray(curries); + return result; + } + return curried; + }; + return curried; + } + + /** + * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order. + * + * @function curryRight + * @type {Function} + * @param {Function} callable - The function to curry. + * @param {Number} arity - The arity of method. + * @returns {*} - Returns the new curried function. + * + * @example + * import { curryRight, assert } from '@universalweb/acid'; + * const result = curryRight((a, b, c) => { + * return [a, b, c]; + * })(1)(2)(3); + * assert(result, [3, 2, 1]); + */ + function curryRight(callable, arity = callable.length) { + const curries = []; + const curried = (...curryArgs) => { + curries.unshift(...curryArgs); + if (curries.length === arity) { + const result = callable(...curries); + clearArray(curries); + return result; + } + return curried; + }; + return curried; + } + + /** + * This method returns undefined. + * + * @function noop + * @category function + * @type {Function} + * @returns {undefined} - Returns undefined. + * + * @example + * import { noop, assert } from '@universalweb/acid'; + * assert(noop(), undefined); + */ + function noop() { + return; + } + + /** + * Iterates based on the amount given invoking the iteratee with the current index as an argument. + * + * @function times + * @category utility + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @returns {undefined} - Nothing. + * + * @example + * import { times } from '@universalweb/acid'; + * times(3, (item) => { + * console.log(item); + * }); + * // 0 + * // 1 + * // 2 + * // => undefined + */ + function times(amount, iteratee) { + for (let index = 0; index < amount; index++) { + iteratee(index); + } + } + /** + * Iterates based on the amount given and maps the results returned by the iteratee each time to an array. + * + * @function timesMap + * @category utility + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @param {Array} [results = []] - Array that will have iteratee return pushed to. + * @returns {Array} - An array with iteratee's returned values. + * + * @example + * import { timesMap } from '@universalweb/acid'; + * timesMap(3, (item) => { + * return item; + * }); + * // => [0, 1, 2] + */ + function timesMap(amount, iteratee, results = []) { + for (let index = 0; index < amount; index++) { + results[index] = iteratee(amount); + } + return results; + } + + class Timers { + list = construct(Map); + construct() {} + /** + * Remove a timer that was created using the timer function. + * + * @param {Number} id - The id of the timer to remove. + * @returns {undefined} - Returns nothing. + * + * @example + * import { timer, assert } from '@universalweb/acid'; + * timer(() => {}, 100); + * // => 0 + */ + remove(id) { + clearTimeout(id); + this.list.delete(id); + } + has(id) { + return this.list.has(id); + } + get(id) { + return this.list.get(id); + } + /** + * Create a timer and add it to the list of timers. + * + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setTimeoutId ID. + * + * @example + * import { timers, assert } from '@universalweb/acid'; + * timers.set(() => {}, 100); + * // => 0 + */ + set(callable, time) { + const currentThis = this; + const id = setTimeout(() => { + callable(); + currentThis.remove(id); + }, time); + this.list.set(id, true); + return id; + } + /** + * Clear all active timers. + * + * @returns {undefined} - Returns undefined. + * + * @example + * import { timers, assert } from '@universalweb/acid'; + * timers.clear(); + * // => undefined + */ + clear() { + const currentThis = this; + currentThis.list.forEach((id) => { + currentThis.remove(id); + }); + } + } + const timers = construct(Timers); + /** + * Timer wrapper. + * + * @function timer + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setTimeoutId ID. + * + * @example + * import { timer, assert } from '@universalweb/acid'; + * timer(() => {}, 100); + * // => 0 + */ + function timer(callable, time) { + return timers.set(callable, time); + } + /** + * Clear all active timers. + * + * @function clearTimers + * @category function + * @returns {undefined} - Returns undefined. + * + * @example + * import { clearTimers, assert } from '@universalweb/acid'; + * clearTimers(); + * // => undefined + */ + function clearTimers() { + const id = setTimeout(noop, 0); + times(id, (index) => { + timers.remove(index); + }); + } + + const applyNative = Reflect.apply; + /** + * Calls a target function with an optional "this" and optional arguments as specified. Same as Reflect.apply but with a function check. + * + * @function apply + * @category function + * @param {Function} target - The target function to call. + * @param {*} thisArgument - Array like object. + * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called. + * @returns {*} - The result of calling the given target function with the specified this value and arguments. + * + * @example + * import { apply, assert } from '@universalweb/acid'; + * assert(apply(function (a) {return a;}, undefined, [2]), 2); + */ + function apply(target, thisArgument, argumentsList) { + if (isFunction(target)) { + return applyNative(target, thisArgument, argumentsList); + } + } + + /** + * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer. + * + * @function debounce + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Function} - The debounced function. + * + * @example + * import { debounce, promise, assert } from '@universalweb/acid'; + * const promised = promise((a) => { + * const debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0); + * }); + * assert(await promised(), 'debounced'); + */ + function debounce(callable, time) { + function debounced(...args) { + if (debounced.id !== false) { + timers.remove(debounced.id); + } + debounced.id = timer(() => { + debounced.callable(...args); + debounced.id = false; + }, time); + } + debounced.id = false; + debounced.callable = callable.bind(debounced); + debounced.clear = () => { + if (debounced.id !== false) { + timers.remove(debounced.id); + debounced.id = false; + } + }; + return debounced; + } + + /** + * Checks if the given method is a function. If it is then it invokes it with the given arguments. + * + * @function ifInvoke + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked if possible. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args - Arguments to pass to the function. + * @returns {*} - Returns the method invoked or undefined. + * + * @example + * import { ifInvoke, assert } from '@universalweb/acid'; + * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]); + */ + function ifInvoke(callable, thisBind, ...args) { + if (isFunction(callable)) { + if (thisBind) { + return callable.call(thisBind, ...args); + } + return callable(...args); + } + } + + /** + * Creates a function that negates the result of the predicate callable. + * + * @function negate + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @returns {*} - Returns the given methods result. + * + * @example + * negate(() => { return false;})(); + * // => true + */ + function negate(callable) { + return (...args) => { + return !callable(...args); + }; + } + + /** + * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned. + * + * @function nthArg + * @category function + * @type {Function} + * @param {Number} [index = 0] - The index of the argument to return. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * nthArg(1)('a', 'b'); + * // => 'b' + */ + function nthArg(index = 0) { + return (...args) => { + return args[index]; + }; + } + + /** + * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function. + * + * @function once + * @category function + * @type {Function} + * @param {Function} callable - The function to be called. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * const onceOnly = once((item) => { return item;}); + * onceOnly(5); + * onceOnly(3); + * // => 5 + */ + const once = (callable) => { + let value; + const onlyOnce = (...args) => { + if (!hasValue(value)) { + value = callable(...args); + } + return value; + }; + return onlyOnce; + }; + + /** + * Returns the constructor of an object. + * + * @function getType + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { getType, assert } from '@universalweb/acid'; + * assert(getType(1), true); + */ + function getType(source) { + return source?.constructor; + } + + /** + * Returns a new empty object of the same type. + * + * @function cloneType + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { cloneType, assert } from '@universalweb/acid'; + * assert(cloneType([1]), []); + */ + function cloneType(source, args = []) { + const sourceType = getType(source); + if (sourceType === Function) { + if (sourceType.name === "function") { + return function () {}; + } + } + return construct(sourceType, args); + } + + /** + * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object. + * + * @function forOfCompactMap + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => { + * return item; + * }); + * // => {b: 2, c: 3} + */ + function forOfMap(source, iteratee = returnValue, resultsObject) { + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = iteratee(value, results, source); + methodPushBound(result); + } + return results; + } + const methodSet = isFunction(results.set); + for (const [key, value] of source) { + const result = iteratee(value, key, results, source); + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + return results; + } + + /** + * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function forOfCompactMapAsync + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * import { forOfCompactMapAsync, assert } from '@universalweb/acid'; + * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => { + * return item; + * }), {b: 2, c: 3}); + */ + async function forOfMapAsync( + source, + iteratee = returnValue, + resultsObject, + generatorArgs, + ) { + if (isGenerator(source)) { + const resultsGenerator = []; + for await (const item of source(...generatorArgs)) { + resultsGenerator.push(await iteratee(item, resultsGenerator, source)); + } + return resultsGenerator; + } + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = await iteratee(value, results, source); + methodPushBound(result); + } + return results; + } + const methodSet = isFunction(results.set); + for await (const [key, value] of source) { + const result = await iteratee(value, key, results, source); + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + return results; + } + + /** + * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. + * + * @function mapObjectAsync + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function|undefined} - An object of the same calling object's type. + * + * @example + * import { mapAsyncObject, assert } from '@universalweb/acid'; + * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, b: undefined, c: 3}); + */ + async function mapAsyncObject(source, iteratee, results = {}) { + if (!source) { + return; + } + await eachAsyncObject( + source, + async (item, key, thisObject, propertyCount, objectKeys) => { + results[key] = await iteratee( + item, + key, + results, + thisObject, + propertyCount, + objectKeys, + ); + }, + ); + return results; + } + + /** + * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. + * + * @function mapObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Object|Function|undefined} - An object of the same calling object's type. + * + * @example + * import { mapObject, assert } from '@universalweb/acid'; + * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, b: undefined, c: 3}); + */ + function mapObject(source, iteratee, results = {}, thisCall, additionalArg) { + if (!source) { + return; + } + if (hasValue(thisCall)) { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + results[key] = iteratee.call( + thisCall, + item, + key, + results, + original, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } else { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + results[key] = iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } + return results; + } + + /** + * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object. + * + * @function map + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {Object | Function} [results = {}] - Object that will be used to assign results. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array | object | Function} - A new object of the same calling object's type. + * + * @example + * import { map, assert } from '@universalweb/acid'; + * assert(map({a: 1, b: 2, c: 3}, (item) => { + * return item * 2; + * }), {a: 2, b: 4, c: 6}); + */ + const map = generateLoop( + mapArray, + mapAsyncArray, + mapObject, + mapAsyncObject, + forOfMap, + forOfMapAsync, + ); + + /** + * Creates a function that invokes iteratee with the arguments it receives and returns their results. + * + * @function over + * @category function + * @type {Function} + * @param {(Array.|Object.)} iteratees - The list of functions to loop through. + * @returns {Function} - Returns the new over wrapped function. + * + * @example + * import { overEvery, assert } from '@universalweb/acid'; + * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]); + */ + function over(iteratees) { + return (...args) => { + return map(iteratees, (item) => { + return item(...args); + }); + }; + } + + /** + * Iterates through the given object while the iteratee returns true. + * + * @function everyAsyncObject + * @category object + * @type {Function} + * @param {Object} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { everyAsyncObject, assert } from '@universalweb/acid'; + * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => { + * return item; + * }); + * assert(result, true); + */ + async function everyAsyncObject(source, iteratee) { + if (!source) { + return; + } + const objectKeys = keys(source); + return everyAsyncArray( + objectKeys, + (key, index, original, propertyCount) => { + return iteratee(source[key], key, source, propertyCount, original); + }, + ); + } + + /** + * Iterates through the given object while the iteratee returns true. + * + * @function everyObject + * @category object + * @type {Function} + * @param {Object} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { everyObject, assert } from '@universalweb/acid'; + * const result = everyObject({a: true, b: true, c: true}, (item) => { + * return item; + * }); + * assert(result, true); + */ + function everyObject(source, iteratee) { + if (!source) { + return; + } + const objectKeys = keys(source); + return everyArray(objectKeys, (key, index, original, propertyCount) => { + return iteratee(source[key], key, source, propertyCount, original); + }); + } + + /** + * Iterates (for of) through the given object while the iteratee returns true using a for of loop. + * + * @function forOfEvery + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { every, assert } from '@universalweb/acid'; + * assert(forOfEvery({a: false, b: true, c: true}, (item) => { + * return item; + * }), false); + */ + function forOfEvery(source, iteratee = returnValue) { + if (isArray(source) || isSet(source)) { + for (const value of source) { + const result = iteratee(value, source); + if (result === false) { + return false; + } + } + } else { + for (const [key, value] of source) { + const result = iteratee(value, key, source); + if (result === false) { + return false; + } + } + } + return true; + } + + /** + * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop. + * + * @function forOfEveryAsync + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { every, assert } from '@universalweb/acid'; + * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => { + * return item; + * }), false); + */ + async function forOfEveryAsync( + source, + iteratee = returnValue, + generatorArgs, + ) { + if (isGenerator(source)) { + for await (const item of source(...generatorArgs)) { + const result = await iteratee(item, source); + if (result === false) { + return false; + } + } + } else if (isArray(source) || isSet(source)) { + for (const value of source) { + const result = await iteratee(value, source); + if (result === false) { + return false; + } + } + } else { + for (const [key, value] of source) { + const result = await iteratee(value, key, source); + if (result === false) { + return false; + } + } + } + return true; + } + + /** + * Iterates through the given object while the iteratee returns true. + * + * @function every + * @category utility + * @type {Function} + * @param {Object | Array | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { every, assert } from '@universalweb/acid'; + * assert(every({a: false, b: true, c: true}, (item) => { + * return item; + * }), false); + */ + const every = generateLoop( + everyArray, + everyAsyncArray, + everyObject, + everyAsyncObject, + forOfEvery, + forOfEveryAsync, + ); + + /** + * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives. + * + * @function overEvery + * @category function + * @type {Function} + * @param {(Array.|Object.)} predicates - The list of functions to loop through. + * @returns {Function} - Returns the new overEvery wrapped function. + * + * @example + * import { overEvery, assert } from '@universalweb/acid'; + * assert(overEvery([Boolean, isFinite])('1'), true); + */ + function overEvery(predicates) { + return (arg) => { + return every(predicates, (predicate) => { + return predicate(arg); + }); + }; + } + + /** + * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on. + * + * @function reArg + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Array} indexes - The arranged argument indexes. + * @returns {Function} - Returns the new function. + * + * @example + * reArg((a, b, c) => { + * return [a, b, c]; + * }, [1,2,0])(1,2,3); + * // => [2, 3, 1] + */ + function reArg(callable, indexes) { + return (...args) => { + return callable( + ...indexes.map((item) => { + return args[item]; + }), + ); + }; + } + + /** + * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer. + * + * @function throttle + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Function|undefined} - The throttled function. + * + * @example + * const throttled = throttle(() => { console.log('throttle'); }, 0)(); + * throttled(); + * // 'throttle' + */ + function throttle(callable, time) { + function throttled(...args) { + if (throttled.id) { + throttled.shouldThrottle = true; + return; + } + throttled.callable(...args); + throttled.id = timer(() => { + if (throttled.shouldThrottle) { + throttled.callable(...args); + } + throttled.id = false; + }, time); + } + throttled.id = false; + throttled.callable = callable.bind(throttled); + throttled.clear = () => { + timers.remove(throttled.id); + throttled.id = false; + }; + return throttled; + } + + /** + * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function. + * + * @function wrap + * @category function + * @type {Function} + * @param {*} value - The value to wrap. + * @param {Function} wrapper - The wrapper function. + * @returns {Function} - The new function. + * + * @example + * wrap('Lucy', (firstName, lastName) => { + * return `My name is ${firstName} ${lastName}.`; + * })('Diamonds'); + * // => 'My name is Lucy Diamonds.' + */ + function wrap(value, wrapper) { + return (...arg) => { + return wrapper(value, ...arg); + }; + } + + const functionPrototype = Function.prototype; + /** + * Caches a prototype method. + * + * @function cacheNativeMethod + * @category utility + * @type {Function} + * @param {Function} method - Prototype method. + * @returns {Function} - Cached method. + * + * @example + * import { cacheNativeMethod, assert } from '@universalweb/acid'; + * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1); + */ + function cacheNativeMethod(method) { + return functionPrototype.call.bind(method); + } + + /** + * Returns an array of all properties (enumerable or not) found directly upon a given object. + * + * @function getPropNames + * @category object + * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned. + * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object. + * + * @example + * import { getPropNames, assert } from '@universalweb/acid'; + * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']); + */ + const getPropNames = Object.getOwnPropertyNames; + /** + * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object. + * + * @function getPropDesc + * @category object + * @param {Object} target - The target object. + * @param {String} property - The name of the property whose description is to be retrieved. + * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise. + * + * @example + * getPropDesc({ bar: 42 }, 'bar'); + * // => { configurable: true, enumerable: true, value: 42, writable: true } + */ + const getPropDesc = Object.getOwnPropertyDescriptor; + /** + * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object. + * + * @function defProp + * @category object + * @param {Object} target - The object on which to define the property. + * @param {String} property - The name of the property whose description is to be retrieved. + * @param {Object} descriptor - The descriptor for the property being defined or modified. + * @returns {Object} - The object that was passed to the function. + * + * @example + * defProp({}, 'key', { + * enumerable: false, + * configurable: false, + * writable: false, + * value: 'static' + * }).key; + * // => 'static' + */ + const defProp = Object.defineProperty; + const hasProp = cacheNativeMethod(Object.hasOwnProperty); + + /** + * Determines whether two values are the same value. + * + * @function isSame + * @category object + * @param {*} source - Value to compare to. + * @param {*} target - A value to compare. + * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value. + * + * @example + * import { isSame, assert } from '@universalweb/acid'; + * assert(isSame('foo', 'foo'), true); + */ + const isSame = Object.is; + + /** + * Adds two numbers. + * + * @function add + * @category math + * @type {Function} + * @param {Number} augend - First number. + * @param {Number} addend - Second number which is being added to another (augend). + * @returns {Number} - Returns the sum of the arguments. + * + * @example + * import { add, assert } from '@universalweb/acid'; + * assert(add(1, 1), 2); + */ + function add(augend, addend) { + return augend + addend; + } + + /** + * Decrements a number. + * + * @function deduct + * @category math + * @type {Function} + * @param {Number} source - First number. + * @returns {Number} - Returns a decremented version of the number. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + * deduct(10); + * // => 9 + */ + function deduct(source) { + return source - 1; + } + + /** + * Divides two numbers. + * + * @function divide + * @category math + * @type {Function} + * @param {Number} source - First number. + * @param {Number} value - Second number. + * @returns {Number} - Returns the quotient of the arguments. + * + * @example + * import { divide, assert } from '@universalweb/acid'; + * assert(divide(10, 5), 2); + */ + function divide(source, value) { + return source / value; + } + + /** + * Increments a number. + * + * @function increment + * @category math + * @type {Function} + * @param {Number} source - First number. + * @returns {Number} - Returns an incremented version of the number. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + * increment(10); + * // => 11 + */ + function increment(source) { + return source + 1; + } + + /** + * Multiplies two numbers. + * + * @function multiply + * @category math + * @type {Function} + * @param {Number} source - First number. + * @param {Number} value - Second number. + * @returns {Number} - Returns the product of the arguments. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + */ + function multiply(source, value) { + return source * value; + } + + /** + * Calculate the progress from a given total and current amount. + * + * @function calcProgress + * @category utility + * @type {Function} + * @param {Number} total - The total amount. + * @param {Number} currentAmount - The current amount. + * @returns {Number} - The progress as a percentage. + * + * @example + * import { calcProgress, assert } from '@universalweb/acid'; + * assert(calcProgress(100, 1), 1); + */ + function calcProgress(total, currentAmount) { + if (total === 0) { + return false; + } + if (currentAmount === 0) { + return 0; + } + return (currentAmount / total) * 100; + } + + const { random } = Math; + /** + * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption.. + * + * @function randomFloat + * @category math + * @type {Function} + * @param {Number} max - Establishes highest possible value for the random number. + * @param {Number} [min = 0] - Establishes lowest possible value for the random number. + * @returns {Number} - Returns random integer between the max and min range. + * + * @example + * import { randomFloat, assert } from '@universalweb/acid'; + * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;}); + * // => 9.1 + */ + function randomFloat(max, min = 0) { + return random() * (max - min) + min; + } + + /** + * Extracts the remainder between two numbers. + * + * @function remainder + * @category math + * @type {Function} + * @param {Number} source - First number. + * @param {Number} value - Second number. + * @returns {Number} - Returns the remainder of the arguments. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + * remainder(10, 6); + * // => 4 + */ + function remainder(source, value) { + return source % value; + } + + /** + * Subtract all numbers in the array starting from left to right & return the difference. + * + * @function subtractAll + * @category math + * @type {Function} + * @param {Number[]} source - Array of numbers. + * @returns {Number} - Returns the final difference. + * + * @example + * import { subtractAll, assert } from '@universalweb/acid'; + * assert(subtractAll([10, 1, 2, 3]), 5); + */ + function subtractAll(source) { + return source.reduce((a, b) => { + return a - b; + }, 0); + } + + /** + * Sum all numbers in a given array. + * + * @function sumAll + * @category math + * @type {Function} + * @param {Number[]} source - Array of numbers. + * @returns {Number} - Returns a single number. + * + * @example + * import { sumAll, assert } from '@universalweb/acid'; + * assert(sumAll([10, 1, 2, 3]), 5); + */ + function sumAll(source) { + return source.reduce((a, b) => { + return a + b; + }, 0); + } + + /** + * Checks if a number is within a range. + * + * @function isNumberInRange + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @param {Number} start - Beginning of range. + * @param {Number} end - End of range. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumberInRange, assert } from '@universalweb/acid'; + * assert(isNumberInRange(1, 0, 2), true); + * assert(isNumberInRange(1, 2, 5), false); + */ + function isNumberInRange(source, start, end) { + return source > start && source < end; + } + + /** + * Checks if a number is within a range. + * + * @function isNumberNotInRange + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @param {Number} start - Beginning of range. + * @param {Number} end - End of range. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumberNotInRange, assert } from '@universalweb/acid'; + * assert(isNumberNotInRange(1, 0, 2), false); + * assert(isNumberNotInRange(1, 2, 5), true); + */ + function isNumberNotInRange(source, start, end) { + return source < start || source > end; + } + + /** + * Checks if a number is negative & returns true or false. + * + * @function isPositive + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isPositive, assert } from '@universalweb/acid'; + * assert(isPositive(1), true); + */ + const { sign } = Math; + function isPositive(source) { + return sign(source) === 1; + } + + /** + * Strictly checks if a number is zero. + * + * @function isZero + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isZero, assert } from '@universalweb/acid'; + * assert(isZero(0), true); + */ + function isZero(source) { + return source === 0; + } + + /** + * Checks if a number is odd & returns true or false. + * + * @function isOdd + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isOdd, assert } from '@universalweb/acid'; + * assert(isOdd(1), true); + */ + function isOdd(source) { + return (source & 1) === 1; + } + + /** + * Checks if a number is even & returns true or false. + * + * @function isEven + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEven, assert } from '@universalweb/acid'; + * assert(isEven(1), true); + */ + function isEven(source) { + return (source & 1) === 0; + } + + const objectEntries = Object.entries; + /** + * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error. + * + * @function getEntries + * @category object + * @param {Object} source - The source object. + * @returns {Array|undefined} - Returns the Object.entries of the source object. + * + * @example + * import { getEntries, assert } from '@universalweb/acid'; + * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]); + */ + function getEntries(source) { + if (hasValue(source)) { + return objectEntries(source); + } + } + + /** + * Extracts all keys from an object whose values are not null or undefined. + * + * @function compactKeys + * @category object + * @type {Function} + * @param {Object} object - Object from which keys are extracted. + * @returns {Array} - Returns an array of key values. + * + * @example + * import { compactKeys, assert } from '@universalweb/acid'; + * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']); + */ + function compactKeys(object) { + const compactedKeys = []; + eachObject(object, (item, key) => { + if (hasValue(item)) { + compactedKeys.push(key); + } + }); + return compactedKeys; + } + + /** + * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function compactMapAsyncObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with mapped properties that are not null or undefined. + * + * @example + * import { compactMapAsyncObject, assert } from '@universalweb/acid'; + * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, c: 3}); + */ + async function compactMapAsyncObject( + source, + iteratee = returnValue, + results = {}, + ) { + await eachAsyncObject( + source, + async (item, key, original, propertyCount, objectKeys) => { + const result = await iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + ); + if (hasValue(result)) { + results[key] = result; + } + }, + ); + return results; + } + + /** + * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function compactMapObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with mapped properties that are not null or undefined. + * + * @example + * import { compactMapObject, assert } from '@universalweb/acid'; + * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, c: 3}); + */ + function compactMapObject(source, iteratee = returnValue, results = {}) { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + const result = iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + ); + if (hasValue(result)) { + results[key] = result; + } + }); + return results; + } + + /** + * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. + * + * @function filterObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with properties that passed the test. + * + * @example + * filterObject({a: false, b: true, c: true}, (item) => { + * return item; + * }); + * // => {b: true, c: true} + */ + function filterObject(source, iteratee, results = {}) { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + if ( + iteratee(item, key, results, original, propertyCount, objectKeys) === + true + ) { + results[key] = item; + } + }); + return results; + } + + /** + * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. + * + * @function filterAsyncObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with properties that passed the test. + * + * @example + * filterAsyncObject({a: false, b: true, c: true}, (item) => { + * return item; + * }); + * // => {b: true, c: true} + */ + async function filterAsyncObject(source, iteratee, results = {}) { + await eachAsyncObject( + source, + async (item, key, original, propertyCount, objectKeys) => { + if ( + (await iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + )) === true + ) { + results[key] = item; + } + }, + ); + return results; + } + + /** + * Creates an inverted version of a given object by switching it's keys and values. + * + * @function invert + * @type {Function} + * @category object + * @param {Object} source - Object to be inverted. + * @param {Array} [target = {}] - Empty object to be populated with inverted values from source. + * @returns {Object|undefined} - Returns object with keys and values switched. + * + * @example + * import { invert, assert } from '@universalweb/acid'; + * assert(invert({a:1}), {1:'a'}); + */ + function invert(source, target = {}) { + if (!source) { + return; + } + eachObject(source, (item, key) => { + target[item] = key; + }); + return target; + } + + /** + * Performs a shallow strict comparison between two objects. + * + * @function isMatchObject + * @type {Function} + * @category object + * @param {Object} source - Source object. + * @param {Object} target - Object to compare to source. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { assert, isMatchObject } from '@universalweb/acid'; + * assert(isMatchObject({a: 1}, {a: 1}), true); + */ + const isMatchObject = (source, target) => { + if (source === target) { + return true; + } + const sourceKeys = keys(source); + const targetKeys = keys(target); + if (sourceKeys.length === targetKeys.length) { + return everyArray(sourceKeys, (key) => { + return source[key] === target[key]; + }); + } + return false; + }; + + /** + * Returns a regex safe special characters escaped version of a string. + * + * @function regexSafe + * @category regex + * @type {Function} + * @param {Object} source - String to make safe. + * @returns {Object} - Returns a regex safe version of the string. + * + * @example + * import { regexSafe, assert } from '@universalweb/acid'; + * assert(regexSafe(/.+/), '\/\.\+\/'); + */ + const escapeRegexRegex = /[()[\]{}*+?^$|#.,/\\\s-]/g; + function escapeRegex(source) { + return source.replace(escapeRegexRegex, "\\$&"); + } + + /** + * Convert array of strings to regex. + * + * @function arrayToRegex + * @category regex + * @type {Function} + * @param {Object} source - Array of strings. + * @returns {Object} - Returns a regex safe version of the string. + * + * @example + * import { arrayToRegex, assert } from '@universalweb/acid'; + * assert(String(arrayToRegex(['a','b'])), String(/a|b/)); + */ + function arrayToRegex(source, makeSafe) { + if (makeSafe) { + return arrayToRegex(mapArray(source, escapeRegex)); + } + return RegExp(source.join("|")); + } + + /** + * Checks if the value is a RegExp. + * + * @function isRegex + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isRegex, assert } from '@universalweb/acid'; + * assert(isRegex(/test/), true); + */ + const isRegexCall = isConstructorNameFactory("RegExp"); + const isRegex = isTypeFactory(isRegexCall); + + /** + * Returns a clone of the given object without the given properties. + * + * @function omit + * @category object + * @type {Function} + * @param {Object} source - Object from which keys are extracted. + * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object. + * @returns {Object|undefined} - A new object with the removed. + * + * @example + * import { omit, assert } from '@universalweb/acid'; + * assert(omit({a:1, b:2}, ['a']), {b:2}); + * assert(omit({a:1, b:2}, 'a'), {b:2}); + * assert(omit({1:'test', b:2}, 1), {b:2}); + */ + function omit(source, blacklist) { + if (!source) { + return {}; + } + if (isArray(blacklist)) { + const blacklistRegex = arrayToRegex(blacklist); + return filterObject(source, (item, key) => { + return !blacklistRegex.test(key); + }); + } + if (isRegex(blacklist)) { + return filterObject(source, (item, key) => { + return !blacklist.test(key); + }); + } + if (isString(blacklist)) { + return filterObject(source, (item, key) => { + return key !== blacklist; + }); + } + if (isNumber(blacklist)) { + const numberToString = blacklist.toString(); + return filterObject(source, (item, key) => { + return key !== numberToString; + }); + } + if (isFunction(blacklist)) { + return filterObject(source, (item, key) => { + return !blacklist(item, key); + }); + } + return objectAssign({}, source); + } + + /** + * Returns a clone of the source object with the plucked properties. + * + * @function pick + * @type {Function} + * @category object + * @param {Object} source - Object to be cloned. + * @param {Array} whitelist - Array of property names used to determine what values to pluck. + * @param {Object} [target = {}] - Object to be populated with plucked values. + * @returns {Object|undefined} - A new object with plucked properties. + * + * @example + * import { pick, assert } from '@universalweb/acid'; + * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2}); + */ + const pick = (source, whitelist, target = {}) => { + if (!source) { + return; + } + eachArray(whitelist, (item) => { + target[item] = source[item]; + }); + return target; + }; + + /** + * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object. + * + * @function objectSize + * @category object + * @param {Object} source - The source object. + * @returns {Number|undefined} - The amount of keys. + * + * @example + * import { objectSize, assert } from '@universalweb/acid'; + * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3); + */ + function objectSize(source) { + if (!source) { + return; + } + if (isPlainObject(source)) { + return keys(source).length; + } + const objectLengthProperty = source.length; + if (hasValue(objectLengthProperty)) { + return objectLengthProperty; + } + const objectSizeProperty = source.size; + if (hasValue(objectLengthProperty)) { + return objectSizeProperty; + } + return keys(source).length; + } + + /** + * Creates an object from two arrays, one of property identifiers and one of corresponding values. + * + * @function zipObject + * @type {Function} + * @category object + * @param {Array} properties - The property identifiers. + * @param {Array} values - The property values. + * @returns {Object} - Returns the new object. + * + * @example + * zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + const zipObject = (properties, values) => { + const source = {}; + eachArray(properties, (item, key) => { + source[item] = values[key]; + }); + return source; + }; + /** + * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. + * + * @function unZipObject + * @type {Function} + * @category object + * @param {Object} object - The object to process. + * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array. + * + * @example + * unZipObject({ 'a': 1, 'b': 2 }); + * // => [['a', 'b'], [1, 2]] + */ + const unZipObject = (object) => { + const objectKeys = []; + const objectValues = []; + eachObject(object, (item, key) => { + objectKeys.push(key); + objectValues.push(item); + }); + return [objectKeys, objectValues]; + }; + + const normalizeCase$4 = /[ _-]+/g; + /** + * Converts a string into Camel case format. + * + * @function camelCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into Camel case. + * @returns {String} - Converted string in Camel case. + * + * @example + * import { camelCase, assert } from '@universalweb/acid'; + * assert(camelCase('camel case'), 'camelCase'); + */ + function camelCase(source) { + let result = ""; + source + .replace(normalizeCase$4, " ") + .trim() + .split(" ") + .forEach((item, index) => { + if (index === 0) { + result += item.toLowerCase(); + } else { + result += item[0].toUpperCase() + item.slice(1).toLowerCase(); + } + }); + return result; + } + + const normalizeCase$3 = /[ _-]+/g; + const space$1 = /[ ]+/g; + /** + * Converts a string into single space sepperated words in Kebab case. + * + * @function kebabCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into Kebab case. + * @returns {String} - Converted string in Kebab case. + * + * @example + * import { kebabCase, assert } from '@universalweb/acid'; + * assert(kebabCase('kebab case'), 'kebab-case'); + */ + function kebabCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase$3, " ") + .trim() + .toLowerCase() + .replace(space$1, "-"); + } + + const normalizeCase$2 = /[ _-]+/g; + const space = /[ ]+/g; + /** + * Converts a string into single space sepperated words in snake case. + * + * @function snakeCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into snake case. + * @returns {String} - Converted string in Snake case. + * + * @example + * import { snakeCase, assert } from '@universalweb/acid'; + * assert(snakeCase('snake case'), 'snake_case'); + */ + function snakeCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase$2, " ") + .trim() + .toLowerCase() + .replace(space, "_"); + } + + const normalizeCase$1 = /[ _-]+/g; + /** + * Converts a string into single space sepperated words in uppercase. + * + * @function upperCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into upper case. + * @returns {String} - Converted string in upper case. + * + * @example + * import { upperCase, assert } from '@universalweb/acid'; + * assert(upperCase('upper-case'), 'UPPER CASE'); + * assert(upperCase('upper_case'), 'UPPER CASE'); + */ + function upperCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase$1, " ") + .trim() + .toUpperCase(); + } + + const normalizeCase = /[ _-]+/g; + /** + * Converts a string into single space sepperated words in lowerCase. + * + * @function lowerCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into upper case. + * @returns {String} - Converted string in upper case. + * + * @example + * import { lowerCase, assert } from '@universalweb/acid'; + * assert(lowerCase('lower-CASE'), 'lower case'); + */ + function lowerCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase, " ") + .trim() + .toLowerCase(); + } + + /** + * Inserts text into a string at a given position. + * + * @function insertInRange + * @category string + * @type {Function} + * @param {String} string - String to insert the text into. + * @param {Number} index - Point of insertion. + * @param {String} text - The string to be inserted. + * @returns {String} - The string with the text inserted at the given point. + * + * @example + * import { insertInRange, assert } from '@universalweb/acid'; + * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.'); + */ + function insertInRange(string, index, text) { + return string.slice(0, index) + text + string.slice(index, string.length); + } + /** + * Plucks a letter using the index starting from the right. + * + * @function rightString + * @category string + * @type {Function} + * @param {String} string - String to extract the letter from. + * @param {Number} [index=1] - The starting position. + * @returns {String} - A letter at the given index. + * + * @example + * import { rightString, assert } from '@universalweb/acid'; + * assert(rightString('rightString'), 'g'); + * assert(rightString('rightString', 2), 'n'); + */ + function rightString(string, index = 1) { + return string[string.length - index]; + } + /** + * Splits up a string into chunks. + * + * @function chunkString + * @category string + * @type {Function} + * @param {String} string - String to chunked. + * @param {Number} [size] - The max string length per chunk. + * @returns {Array} - An array with strings that are <= size parameter. + * + * @example + * import { chunkString, assert } from '@universalweb/acid'; + * assert(chunkString('chunk', 2), ['ch', 'un', 'k']); + */ + function chunkString(string, size) { + return string.match(new RegExp(`(.|[\r\n]){1,${size}}`, "g")); + } + /** + * Truncates everything before the index starting from the right. + * + * @function initialString + * @category string + * @type {Function} + * @param {String} string - String to extract the initial letters from. + * @param {Number} [index=1] - Starting point from the right. + * @returns {String} - A string with the characters before the index starting from the right. + * + * @example + * import { initialString, assert } from '@universalweb/acid'; + * assert(initialString('initialString', 2), 'initialStri'); + */ + function initialString(string, index = 1) { + return string.slice(0, index * -1); + } + /** + * Truncates everything after a index. + * + * @function restString + * @category string + * @type {Function} + * @param {String} string - String to extract the rest of the letters from. + * @param {Number} [index=1] - Starting point. + * @returns {String} - A string without the characters up-to to the index. + * + * @example + * import { restString, assert } from '@universalweb/acid'; + * assert(restString('restString', 2), 'stString'); + */ + function restString(string, index = 1) { + return string.substring(index); + } + + /** + * Replaces all occurrences of strings in an array with a value. + * + * @function replaceList + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @param {Array} words - Strings to replace. + * @param {String} value - The match replacement. + * @returns {String} - The string with the replacement. + * + * @example + * import { replaceList, assert } from '@universalweb/acid'; + * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.'); + */ + function replaceList(string, words, value) { + return string.replace(new RegExp(`\\b${words.join("|")}\\b`, "gi"), value); + } + + const rawURLDecodeRegex = /%(?![\da-f]{2})/gi; + const andRegex = /&/g; + const lessThanRegex = //g; + const doubleQuoteRegex = /"/g; + /** + * Raw URL decoder. + * + * @function rawURLDecode + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @returns {String} - Converted string into the decoded URI Component . + * + * @example + * import { rawURLDecode, assert } from '@universalweb/acid'; + * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.'); + */ + function rawURLDecode(string) { + return decodeURIComponent( + string.replace(rawURLDecodeRegex, () => { + return "%25"; + }), + ); + } + /** + * Replaced sensitive characters with their matching html entity. + * + * @function htmlEntities + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @returns {String} - Replaced string. + * + * @example + * import { htmlEntities, assert } from '@universalweb/acid'; + * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`); + */ + function htmlEntities(string) { + return string + .replace(andRegex, "&") + .replace(lessThanRegex, "<") + .replace(moreThanRegex, ">") + .replace(doubleQuoteRegex, """); + } + /** + * Executes rawURLDecode followd by htmlEntities methods on a string. + * + * @function sanitize + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @returns {String} - Replaced string. + * + * @example + * import { sanitize, assert } from '@universalweb/acid'; + * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`); + */ + function sanitize(string) { + return htmlEntities(rawURLDecode(string)); + } + + const tokenizeRegEx = /\S+/g; + const wordsRegEx = /\w+/g; + /** + * Break string by non-white space characters matches. + * + * @function tokenize + * @type {Function} + * @category string + * @param {String} string - String to be broken up. + * @returns {Array} - Array of words without white space characters. + * + * @example + * import { tokenize, assert } from '@universalweb/acid'; + * assert(tokenize('I am Lucy!'), ["I", "am", "Acid!"]); + */ + function tokenize(string) { + return string.match(tokenizeRegEx) || []; + } + /** + * Break string into word matches. + * + * @function words + * @type {Function} + * @param {String} string - String to be broken up. + * @returns {Array} - Array of words with word characters only. + * + * @example + * import { words, assert } from '@universalweb/acid'; + * assert(words('I am Acid!'), ["I", "am", "Acid"]); + */ + function words(string) { + return string.match(wordsRegEx) || []; + } + + const truncateDown = (string, maxLength, stringLength) => { + const breakAll = string.split(""); + const breakAllLength = breakAll.length; + let item; + let index = stringLength - maxLength; + for (; index < breakAllLength && index >= 0; index--) { + item = breakAll[index]; + if (item === " ") { + break; + } + } + return string.slice(0, index).trim(); + }; + const truncateUp = (string, maxLength, stringLength) => { + const breakAll = string.split(""); + const breakAllLength = breakAll.length; + let item; + let index = maxLength; + for (; index < breakAllLength && index > 0; index++) { + item = breakAll[index]; + if (item === " ") { + break; + } + } + return string.substring(index, stringLength).trim(); + }; + /** + * Truncates the string, accounting for word placement and character count. + * + * @function truncate + * @type {Function} + * @category string + * @param {String} string - String to be truncated. + * @param {Number} maxLength - The desired max length of the string. + * @returns {String} - The mutated string. + * + * @example + * import { truncate, assert } from '@universalweb/acid'; + * assert(truncate('Where is Lucy?', 2), 'Where is'); + */ + function truncate(string, maxLength) { + const stringLength = string.length; + return stringLength > maxLength + ? truncateDown(string, maxLength, stringLength) + : string; + } + /** + * Truncates the string, accounting for word placement and character count from the right. + * + * @function truncateRight + * @type {Function} + * @category string + * @param {String} string - String to be truncated. + * @param {Number} maxLength - The desired max length of the string. + * @returns {String} - The mutated string. + * + * @example + * import { truncateRight, assert } from '@universalweb/acid'; + * assert(truncateRight('Where is Lucy?', 6), 'Lucy?'); + */ + function truncateRight(string, maxLength) { + const stringLength = string.length; + return stringLength > maxLength + ? truncateUp(string, maxLength, stringLength) + : string; + } + + const getWords = /\w+/g; + /** + * Returns the first letter capitalized. + * + * @function upperFirstLetter + * @type {Function} + * @category string + * @param {String} string - String to extract first letter from. + * @returns {String} - An upper case letter. + * + * @example + * import { upperFirstLetter, assert } from '@universalweb/acid'; + * assert(upperFirstLetter('upper'), 'U'); + */ + function upperFirstLetter(string) { + return string[0].toUpperCase(); + } + /** + * Capitalizes the first letter. + * + * @function upperFirst + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with first letter capitalized. + * + * @example + * import { upperFirst, assert } from '@universalweb/acid'; + * assert(upperFirstLetter('upper'), 'U'); + * upperFirst('upper'); + * // => 'Upper' + */ + function upperFirst(string) { + return upperFirstLetter(string) + restString(string); + } + /** + * Capitalize first letter and lower case the rest. + * + * @function upperFirstOnly + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with first letter capitalized. + * + * @example + * import { upperFirstOnly, assert } from '@universalweb/acid'; + * assert(upperFirstOnly('upper'), 'Upper'); + */ + function upperFirstOnly(string) { + return upperFirstLetter(string) + restString(string).toLowerCase(); + } + /** + * Capitalize all first letters. + * + * @function upperFirstAll + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with all first letters capitalized. + * + * @example + * import { upperFirstAll, assert } from '@universalweb/acid'; + * assert(upperFirstAll('uPPer'), 'UPPer'); + */ + function upperFirstAll(string) { + return string.replace(getWords, (match) => { + return upperFirst(match); + }); + } + /** + * Capitalize all first letters and lower case the rest. + * + * @function upperFirstOnlyAll + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with all first letters capitalized. + * + * @example + * import { upperFirstOnlyAll, assert } from '@universalweb/acid'; + * assert(upperFirstOnlyAll('this is'), 'This Is'); + */ + function upperFirstOnlyAll(string) { + return string.replace(getWords, (match) => { + return upperFirstOnly(match); + }); + } + + /** + * Returns the constructor name of an object. + * + * @function getTypeName + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { getTypeName, assert } from '@universalweb/acid'; + * assert(getTypeName(1), true); + */ + function getTypeName(source) { + return getType(source)?.name; + } + + /** + * Checks if the value is an Arguments object. + * + * @function isArguments + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArguments, assert } from '@universalweb/acid'; + * assert(isArguments((function() { return arguments;})()), true); + * assert(isArguments([]), false); + */ + const objectArguments = "[object Arguments]"; + function isArguments(source) { + return hasValue(source) ? source.toString() === objectArguments : false; + } + + /** + * Checks if an object or objects are a Map. + * + * @function isMap + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isMap } from '@universalweb/acid'; + * isMap(new Map()); + * // => true + */ + const isMapCall = isConstructorNameFactory("Map"); + const isMap = isTypeFactory(isMapCall); + + /** + * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer. + * + * @function isTypedArray + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isTypedArray, assert } from '@universalweb/acid'; + * assert(isTypedArray([]), false); + * assert(isTypedArray(new Int8Array()), true); + */ + const typedArrayRegex = /Array/; + const arrayConstructorName = "Array"; + function isTypedArray(source) { + if (source) { + const constructorName = getTypeName(source); + if ( + typedArrayRegex.test(constructorName) && + constructorName !== arrayConstructorName + ) { + return true; + } + } + return false; + } + + /** + * Checks if an object is null or undefined. + * + * @function noValue + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { noValue, assert } from '@universalweb/acid'; + * assert(noValue(null), true); + * assert(noValue(undefined), true); + * assert(noValue(1), false); + * assert(noValue(0), false); + */ + function noValue(source) { + return !hasValue(source); + } + + /** + * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property. + * + * @function isArrayLike + * @category type + * @param {*} source - Object to be checked. + * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArrayLike, assert } from '@universalweb/acid'; + * assert(isArrayLike([]), true); + * assert(isArrayLike(2), false); + */ + function isArrayLike(source, strictFlag) { + if (noValue(source) || isFunction(source)) { + return false; + } + if (isArray(source) || isTypedArray(source)) { + return true; + } + const sourceLength = source.length; + if (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) { + return false; + } + if (strictFlag) { + const indexes = keys(source); + if (indexes) { + return every(indexes, (value, index) => { + return index >= 0 && isNumber(index); + }); + } + return false; + } + return true; + } + + /** + * Checks if an object or objects are a BigInt. + * + * @function isBigInt + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isBigInt, assert } from '@universalweb/acid'; + * assert(isBigInt(BigInt(123)), true); + */ + const isBigIntCall = isConstructorNameFactory("BigInt"); + const isBigInt = isTypeFactory(isBigIntCall); + + /** + * Checks if the value is a Boolean. + * + * @function isBoolean + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isBoolean } from '@universalweb/acid'; + * isBoolean(true); + * // => true + */ + const isBooleanCall = isConstructorNameFactory("Boolean"); + const isBoolean = isTypeFactory(isBooleanCall); + + /** + * Checks if an object or objects are a ArrayBuffer. + * + * @function isArrayBuffer + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArrayBuffer, assert } from '@universalweb/acid'; + * assert(isArrayBuffer(new ArrayBuffer()), true); + */ + const isArrayBufferCall = isConstructorNameFactory("ArrayBuffer"); + const isArrayBuffer = isTypeFactory(isArrayBufferCall); + + /** + * Checks if an object is the child of another. Typically used for classes. + * + * @function isChild + * @category type + * @param {*} sourceChild - Object to be checked as the child. + * @param {*} targetParent - Object to be checked as the parent. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isChild, construct, assert } from '@universalweb/acid'; + * class Grandparent{} + * class Parent extends Grandparent{} + * class Child extends Parent{} + * const child = construct(Child); + * assert(isChild(Child, Grandparent), true); + * assert(isChild(Child, Parent), false); + * assert(isChild(Parent, Grandparent), false); + * assert(isChild(child1, child3), false); + */ + function isChild(sourceChild, targetParent) { + if (!sourceChild || !targetParent) { + return false; + } + return sourceChild instanceof targetParent; + } + + /** + * Checks if an object or objects are a structured-cloneable type. + * + * @function isCloneable + * @category type + * @param {...*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isCloneable, assert } from '@universalweb/acid'; + * assert(isCloneable(function (){}), false); + */ + const constructorNames = RegExp( + "Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError", + ); + function isCloneable(source) { + if (hasValue(source)) { + const constructorName = source?.constructor?.name; + return constructorNames.test(constructorName); + } + return false; + } + + /** + * Checks if the value is a Date. + * + * @function isDate + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isDate, assert } from '@universalweb/acid'; + * assert(isDate(new Date()), true); + */ + const isDateCall = isConstructorNameFactory("Date"); + const isDate = isTypeFactory(isDateCall); + + /** + * Checks if the value is empty. + * + * @function isEmpty + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEmpty, assert } from '@universalweb/acid'; + * assert(isEmpty([]), true); + */ + function isEmpty(source) { + if (isString(source) || isArray(source)) { + return !hasLength(source); + } else if (isPlainObject(source)) { + return !objectSize(source); + } + return !hasValue(source); + } + + /** + * Check if a value equals false using strict comparison. + * + * @function isFalse + * @category Utility + * @type {Function} + * @param {Boolean} source - Item to compare. + * @returns {Boolean} - Returns true if the item equals false. + * + * @example + * import { isFalse, assert } from '@universalweb/acid'; + * assert(isFalse(1), false); + * assert(isFalse(true), false); + * assert(isFalse(false), true); + */ + function isFalse(source) { + return source === false; + } + + /** + * Checks if an object or objects are a Float32Array. + * + * @function isF32 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isF32, assert } from '@universalweb/acid'; + * assert(isF32(new Float32Array()), true); + */ + const isF32Call = isConstructorNameFactory("Float32Array"); + const isF32 = isTypeFactory(isF32Call); + + /** + * Checks if an object or objects are a Float64Array. + * + * @function isF64 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isF64 } from '@universalweb/acid'; + * isF64(new Float64Array()); + * // => true + */ + const isF64Call = isConstructorNameFactory("Float64Array"); + const isF64 = isTypeFactory(isF64Call); + + const { isInteger } = Number; + /** + * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. + * + * @function isFloat + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFloat } from '@universalweb/acid'; + * isFloat(1.01); + * // => true + */ + const isFloat = isInteger; + + /** + * Checks if an object or objects are a Int16Array. + * + * @function isI16 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isI16 } from '@universalweb/acid'; + * isI16(new Int16Array()); + * // => true + */ + const isI16Call = isConstructorNameFactory("Int16Array"); + const isI16 = isTypeFactory(isI16Call); + + /** + * Checks if an object or objects are a Int32Array. + * + * @function isI32 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isI32, assert } from '@universalweb/acid'; + * assert(isI32(new Int32Array()), true); + */ + const isI32Call = isConstructorNameFactory("Int32Array"); + const isI32 = isTypeFactory(isI32Call); + + /** + * Checks if an object or objects are a Int8Array. + * + * @function isI8 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isInt8 } from '@universalweb/acid'; + * isInt8(new Int8Array()); + * // => true + */ + const isI8Call = isConstructorNameFactory("Int8Array"); + const isI8 = isTypeFactory(isI8Call); + + /** + * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments. + * + * @function isIterable + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isIterable, assert } from '@universalweb/acid'; + * assert(isIterable([]), true); + * assert(isIterable(new Int8Array()), true); + * assert(isIterable('test'), false); + */ + function isIterable(source) { + return hasValue(source) && typeof source[Symbol.iterator] === "function"; + } + + /** + * Checks if an object is a promise. + * + * @function isPromise + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isPromise } from '@universalweb/acid'; + * isPromise(new Promise(() => {})); + * // => true + */ + function isPromise(source) { + if (source) { + return source instanceof Promise; + } + return false; + } + + /** + * Checks if an object is a kind of async object such as async function, promise, or generator. + * + * @function isKindAsync + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isKindAsync, assert } from '@universalweb/acid'; + * assert(isKindAsync(async() => {}), true); + */ + function isKindAsync(source) { + if (source) { + return isPromise(source) || isAsync(source) || isGenerator(source); + } + return false; + } + + /** + * Checks if an object is the child of another. Typically used for classes. + * + * @function isParent + * @category type + * @param {*} sourceParent - Object to be checked as the child. + * @param {*} targetChild - Object to be checked as the parent. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isParent, construct, assert } from '@universalweb/acid'; + * class parentClass{} + * class otherClass{} + * const child1 = construct(parentClass); + * const child2 = construct(otherClass); + * assert(isParent(child1, parentClass), true); + * assert(isParent(child3, parentClass), false); + * assert(isParent(parentClass, child1), false); + * assert(isParent(child1, child3), false); + */ + function isParent(sourceParent, targetChild) { + if (!sourceParent || !targetChild || !targetChild.call) { + return false; + } + return sourceParent instanceof targetChild; + } + + /** + * Checks if an object is a primitive. + * + * @function isPrimitive + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isPrimitive, assert } from '@universalweb/acid'; + * assert(isPrimitive(1), true); + * assert(isPrimitive(() => {}), false); + */ + function isPrimitive(source) { + const type = typeof value; + return ( + source === null || + source === undefined || + (type !== "object" && type !== "function") + ); + } + + /** + * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways. + * + * @function isRelated + * @category type + * @param {*} targetOne - Object to be checked. + * @param {*} targetTwo - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isRelated, construct, assert } from '@universalweb/acid'; + * class parentClass{} + * class otherClass{} + * const child1 = construct(parentClass); + * const child2 = construct(parentClass); + * const child3 = construct(otherClass); + * assert(isRelated(child1, child2), true); + * assert(isRelated(child1, parentClass), true); + * assert(isRelated(parentClass, child2), true); + * assert(isRelated(child1, child3), false); + */ + function isRelated(targetOne, targetTwo) { + if (noValue(targetOne) || noValue(targetTwo)) { + return false; + } + if (targetOne.call) { + return targetTwo instanceof targetOne; + } + if (targetTwo.call) { + return targetOne instanceof targetTwo; + } + return targetTwo.constructor === targetOne.constructor; + } + + const { isSafeInteger } = Number; + /** + * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. + * + * @function isSafeInt + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isSafeInt } from '@universalweb/acid'; + * isSafeInt(1.01); + * // => true + */ + const isSafeInt = isSafeInteger; + + function isSameType(source, other) { + const sourceType = getType(source); + const otherType = getType(other); + if (sourceType === otherType) { + if (sourceType.name === otherType.name) { + return true; + } + } + return false; + } + + /** + * Check if a value equals true using strict comparison. + * + * @function isTrue + * @category Utility + * @type {Function} + * @param {Boolean} source - Item to check. + * @returns {Boolean} - Returns true if the item is true. + * + * @example + * import { isTrue, assert } from '@universalweb/acid'; + * assert(isTrue(1), false); + * assert(isTrue(true), true); + * assert(isTrue(false), false); + */ + function isTrue(source) { + return source === true; + } + + /** + * Checks if an object or objects are a Uint16Array. + * + * @function isU16 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU16 } from '@universalweb/acid'; + * isU16(new Uint16Array()); + * // => true + */ + const isU16Call = isConstructorNameFactory("Uint16Array"); + const isU16 = isTypeFactory(isU16Call); + + /** + * Checks if an object or objects are a Uint32Array. + * + * @function isU32 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU32 } from '@universalweb/acid'; + * isU32(new Uint32Array()); + * // => true + */ + const isU32Call = isConstructorNameFactory("Uint32Array"); + const isU32 = isTypeFactory(isU32Call); + + /** + * Checks if an object or objects are a Uint8Array. + * + * @function isU8 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU8 } from '@universalweb/acid'; + * isU8(new Uint8Array()); + * // => true + */ + const isU8Call = isConstructorNameFactory("Uint8Array"); + const isU8 = isTypeFactory(isU8Call); + + /** + * Checks if an object or objects are a Uint8ClampedArray. + * + * @function isU8C + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU8C } from '@universalweb/acid'; + * isU8C(new Uint8ClampedArray()); + * // => true + */ + const isU8CCall = isConstructorNameFactory("Uint8ClampedArray"); + const isU8C = isTypeFactory(isU8CCall); + + /** + * Checks if an object or objects are a WeakMap. + * + * @function isWeakMap + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isWeakMap } from '@universalweb/acid'; + * assert(isWeakMap(new WeakMap()), true); + */ + const isWeakMapCall = isConstructorNameFactory("WeakMap"); + const isWeakMap = isTypeFactory(isWeakMapCall); + + const isDeno = typeof globalThis.Deno !== "undefined"; + + const isNodejs = + typeof globalThis.process !== "undefined" && + process.versions && + process.versions.node; + + /** + * Check if a value is isTruthy which is anything but false, null, 0, "", undefined, and NaN. + * + * @function isTruthy + * @category type + * @type {Function} + * @param {*} source - Item to be isTruthy checked. + * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy. + * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false. + * + * @example + * import { isTruthy, assert } from '@universalweb/acid'; + * assert(isTruthy(1), true); + * assert(isTruthy(0), false); + */ + function isTruthy(source, returnIfTrue = true) { + return Boolean(source) && returnIfTrue; + } + + /** + * Check if a value is isFalsy which are false, null, 0, "", undefined, and NaN. + * + * @function isFalsy + * @category type + * @type {Function} + * @param {*} source - Item to be isFalsy checked. + * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy. + * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false. + * + * @example + * import { isFalsy, assert } from '@universalweb/acid'; + * assert(isFalsy(0), true); + * assert(isFalsy(1), false); + */ + function isFalsy(source, returnIfTrue = true) { + return Boolean(source) === false && returnIfTrue; + } + + /** + * If source has a value then assign it to an object or call a function. + * + * @function ifValue + * @category utility + * @param {*} source - The source object to be hasValue checked. + * @param {Function|Object} target - The target which is either a function or object. + * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target). + * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function. + * @returns {source|undefined} The source object if it passes the hasValue check. + * + * @example + * import { ifValue, assert } from '@universalweb/acid'; + * assert(ifValue(1, {}, 'a'), {a:1}); + */ + function ifValue(source, target, optional, args) { + if (hasValue(source)) { + if (isFunction(target)) { + if (optional) { + return apply(target, optional, args); + } + return target(...args); + } else if (isPlainObject(target)) { + target[optional] = source; + return target; + } + } + } + + /** + * Performs a deep comparison between two objects & determines if they're different using strict comparison. + * + * @function notEqual + * @type {Function} + * @category utility + * @param {*} source - Source object. + * @param {*} target - Object to be compared. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { notEqual, assert } from '@universalweb/acid'; + * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true); + */ + function notEqual(source, target) { + return isFalse(isEqual(source, target)); + } + + const jsonNative = JSON; + /** + * Parses JSON string with safety check for undefined. + * + * @function jsonParse + * @category utility + * @type {Function} + * @param {String} source - String to be parsed. + * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned. + * @returns {Object|undefined} - Returns the parsed object. + * + * @example + * import { jsonParse, assert } from '@universalweb/acid'; + * assert(jsonParse('{a:1}'), {a:1}); + */ + function jsonParse(source, reviver) { + if (source) { + return jsonNative.parse(source, reviver); + } + } + /** + * Stringify an object into a JSON string. + * + * @function stringify + * @category utility + * @type {Function} + * @param {Object} object - Object to Stringify. + * @returns {String} - Returns the object as a valid JSON string. + * + * @example + * import { stringify, assert } from '@universalweb/acid'; + * assert(stringify({a:1}), '{a:1}'); + */ + const stringify = jsonNative.stringify; + + function createAssertError(source, expected, localOptions) { + const options = globalThis.options || localOptions; + let errorTitle; + if (isFunction(options)) { + errorTitle = `${options.name} : ${options.constructor.name}`; + } else if (options) { + errorTitle = `${options.title || options.method.name} -> ${options.file}`; + } + return new Error( + `Test Failed: ${errorTitle} Result: ${stringify(source)} Expected: ${stringify(expected)}`, - options - ); - } - async function assertAsync(sourceArg, expected, options) { - const source = await sourceArg; - const expectedFunction = isFunction(expected) && (await expected(source, options)) === false; - if (expectedFunction || notEqual(source, expected)) { - return createAssertError(source, expected, options); - } - return true; - } - /** - * Check if source value matches the expected value. - * - * @function assert - * @category utility - * @type {Function} - * @param {*} source - The source object to compare to. - * @param {*} expected - The expected result that's compared to the source. - * @param {*} options - Additional options for the Error instance & unit test information. - * @returns {Object} - Returns a deep clone of an object. - * - * @example - * import { assert } from '@universalweb/acid'; - * if (!assert(1,1)) { - * new Error('Assert Method Failed'); - * } - */ - function assert(source, expected, options) { - if (isKindAsync(source) || isKindAsync(expected)) { - return assertAsync(source, expected, options); - } - const expectedFunction = isFunction(expected) && expected(source, options) === false; - if (expectedFunction || notEqual(source, expected)) { - return createAssertError(source, expected, options); - } - return true; - } - - /** - * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to. - * - * @function bindAll - * @category utility - * @type {Function} - * @param {Object|Function|Array} collection - The functions to bind. - * @param {*} bindThis - Object to be bound to functions. - * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to. - * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided. - * - * @example - * import { assert, bindAll } from '@universalweb/acid'; - * const bounded = bindAll([function () { return this;}], 'Bounded'); - * assert(bounded[0](), 'Bounded'); - */ - function bindAll(collection, bindThis, targetAssign) { - const results = map(collection, (item) => { - return isFunction(item) ? item.bind(bindThis) : item; - }); - return targetAssign ? assign(targetAssign, results) : results; - } - - /** - * Clears the values out of an array, buffer, and objects like Map that have a clear method. - * - * @function clear - * @category utility - * @type {Function} - * @param {Array} source - Takes an array to be emptied. - * @returns {Array} - The originally given array. - * - * @example - * import { clear, assert } from '@universalweb/acid'; - * assert(clear(Buffer.from([1,'B', 'Cat'])), []); - */ - function clear(source) { - if (source) { - if (isBuffer(source)) { - return clearBuffer(source); - } else if (isArray(source)) { - return clearArray(source); - } else if (source.clear) { - source.clear(); - } else if (source.length) { - source.length = 0; - } - } - return source; - } - - /** - * Creates a structured clone of an object which is a "structured-cloneable type". - * - * @function clone - * @category utility - * @type {Function} - * @param {Object} source - Any structured-cloneable type object. - * @returns {Object} - Returns a deep clone of an object. - * - * @example - * import { clone, assert } from '@universalweb/acid'; - * assert(clone({a:{b:[2]}}), {a:{b:[2]}}); - */ - const structuredCloneSafe = globalThis.structuredClone; - function clone(source) { - return structuredCloneSafe(source); - } - - /** - * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next. - * - * @function concurrent - * @type {Function} - * @category Utility - * @async - * @param {Array} source - Array of async functions that will be looped through. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. - * @returns {Object} - The originally given array. - * - * @example - * import { concurrent, assert } from '@universalweb/acid'; - * const list = []; - * await concurrent([async (item) => { - * return item; - * }, async (item) => { - * return item; - * }], null, 1); - * assert(list, [1, 1]); - */ - async function concurrent(source, thisBind, ...args) { - const arrayLength = source.length; - const results = []; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = source[index].call(thisBind, ...args, index, results, callable); - } - } else { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = source[index](...args, index, results, callable); - } - } - return Promise.all(results); - } - - /** - * Creates an array with all isFalsy values removed. The values false, null, 0, "", undefined, and NaN are isFalsy. - * - * @function compact - * @category Utility - * @type {Function} - * @param {Array|Object} source - Array or Object to be compacted. - * @returns {Array|Object} - A new object or array containing the filtered values. - * - * @example - * import { compact, assert } from '@universalweb/acid'; - * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']); - */ - function compact(source) { - if (isPlainObject(source)) { - const sourceKeys = keys(source); - const sourceKeysLength = sourceKeys.length; - const targetObject = {}; - for (let i = 0; i < sourceKeysLength; i++) { - const keyName = sourceKeys[i]; - const item = source[keyName]; - const isisTruthy = isTruthy(item); - if (isisTruthy) { - targetObject[keyName] = item; - } - } - return targetObject; - } - return source.filter((item) => { - return isTruthy(item); - }); - } - - /** - * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function forOfCompactMapAsync - * @category utility - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * import { assert,forOfCompactMapAsync } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = await forOfCompactMapAsync(source, async (item) => { - * return item; - * }); - * assert(temp, {b: 2, c: 3}); - */ - async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) { - if (isGenerator(source)) { - const resultsGenerator = []; - for await (const item of source(...generatorArgs)) { - const result = await iteratee(item, resultsGenerator, source); - if (hasValue(result)) { - resultsGenerator.push(result); - } - } - return resultsGenerator; - } - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = await iteratee(value, results, source); - if (hasValue(result)) { - methodPushBound(result); - } - } - return results; - } - const methodSet = isFunction(results.set); - for await (const [key, value] of source) { - const result = await iteratee(value, key, results, source); - if (hasValue(result)) { - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - } - return results; - } - - /** - * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function forOfCompactMap - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * import { assert,forOfCompactMap } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = forOfCompactMap(source, (item) => { - * return item; - * }); - * assert(temp, {b: 2, c: 3}); - */ - function forOfCompactMap(source, iteratee = returnValue, resultsObject) { - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = iteratee(value, results, source); - if (hasValue(result)) { - methodPushBound(result); - } - } - return results; - } - const methodSet = isFunction(results.set); - for (const [key, value] of source) { - const result = iteratee(value, key, results, source); - if (hasValue(result)) { - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - } - return results; - } - - /** - * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function compactMap - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {Object | Function} [results = {}] - Object that will be used to assign results. - * @returns {Array | object | Function} - A new object of the same calling object's type. - * - * @example - * import { compactMap, assert } from '@universalweb/acid'; - * assert(compactMap({a: null, b: 2, c: 3}, (item) => { - * return item; - * }), {b: 2, c: 3}); - */ - const compactMap = generateLoop( - compactMapArray, - compactMapAsyncArray, - compactMapObject, - compactMapAsyncObject, - forOfCompactMap, - forOfCompactMapAsync - ); - - function everyArg(...methods) { - if (isAsync(methods[0])) { - return async function (...args) { - return every(methods, async (method) => { - return every(args, async (item) => { - return method(item); - }); - }); - }; - } - return function (...args) { - return every(methods, (method) => { - return every(args, (item) => { - return method(item); - }); - }); - }; - } - - /** - * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. - * - * @function forOfFilter - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. - * - * @example - * import { assert, forOfFilter } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = forOfFilter(source, (item) => { - * return Boolean(item); - * }); - * assert(temp, {b: 2, c: 3}); - */ - function forOfFilter(source, iteratee = returnValue, resultsObject) { - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = iteratee(value, results, source); - if (result === true) { - methodPushBound(value); - } - } - } else { - const methodSet = isFunction(results.set); - for (const [key, value] of source) { - const result = iteratee(value, key, results, source); - if (result === true) { - if (methodSet) { - results.set(key, value); - } else { - results[key] = value; - } - } - } - } - return results; - } - - /** - * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. - * - * @function forOfFilterAsync - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. - * - * @example - * import { assert, forOfFilterAsync } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = forOfFilterAsync(source, (item) => { - * return Boolean(item); - * }); - * assert(temp, {b: 2, c: 3}); - */ - async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) { - if (isGenerator(source)) { - const resultsGenerator = []; - for await (const item of source(...generatorArgs)) { - if ((await iteratee(item, resultsGenerator, source)) === true) { - resultsGenerator.push(item); - } - } - return resultsGenerator; - } - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = await iteratee(value, results, source); - if (result === true) { - methodPushBound(value); - } - } - } else { - const methodSet = isFunction(results.set); - for await (const [key, value] of source) { - const result = await iteratee(value, key, results, source); - if (result === true) { - if (methodSet) { - results.set(key, value); - } else { - results[key] = value; - } - } - } - } - return results; - } - - /** - * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. - * - * @function filter - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {Object | Function} [results = {}] - Object that will be used to assign results. - * @returns {Array | object | Function} - A new object of the same calling object's type. - * - * @example - * import { filter, assert } from '@universalweb/acid'; - * assert(filter({a: false, b: true, c: true}, (item) => { - * return item; - * }), {b: true, c: true}); - */ - const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync); - - function returnFlow$1(callable) { - return (...methods) => { - return (arg) => { - let value = arg; - callable(methods, (item) => { - value = item(value); - }); - return value; - }; - }; - } - /** - * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. - * - * @function flow - * @category utility - * @type {Function} - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flow(increment, increment, deduct)(0); - * // => 1 - */ - const flow = returnFlow$1(eachArray); - /** - * This method is like flow except that it creates a function that invokes the given functions from right to left. - * - * @function flowRight - * @category utility - * @type {Function} - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flowRight(increment, increment, deduct)(0); - * // => 1 - */ - const flowRight = returnFlow$1(eachRight); - - function returnFlow(callable) { - return (...methods) => { - return async (arg) => { - let value = arg; - await callable(methods, async (item) => { - value = await item(value); - }); - return value; - }; - }; - } - /** - * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. - * - * @function flowAsync - * @category utility - * @type {Function} - * @async - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); - * // => 2 - */ - const flowAsync = returnFlow(eachAsyncArray); - /** - * This method is like flow except that it creates a function that invokes the given functions from right to left. - * - * @function flowAsyncRight - * @category utility - * @type {Function} - * @async - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); - * // => 2 - */ - const flowAsyncRight = returnFlow(eachRightAsync); - - function forMap(source, callback) { - const cloned = cloneType(source); - const method = cloned.push || cloned.add; - if (method && isFunction(method)) { - const methodBound = method.bind(cloned); - source.forEach((item) => { - const result = callback(item, cloned); - methodBound(result); - }); - } else if (isFunction(cloned.set)) { - source.forEach((item, key) => { - const result = callback(item, key, cloned); - cloned.set(key, result); - }); - } else { - source.forEach((item, key) => { - const result = callback(item, key, cloned); - cloned[key] = result; - }); - } - return cloned; - } - - /** - * Takes all but the last item in the array. - * - * @function arraysToObject - * @type {Function} - * @category utility - * @param {Array} source - Array to have items extracted from. - * @param {Array} properties - Array to have items extracted from. - * @returns {Array} - Returns a completely flattened array. - * - * @example - * import { arraysToObject, assert } from '@universalweb/acid'; - * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3}); - */ - function arraysToObject(source, properties) { - const sortedObject = {}; - eachArray(source, (item, key) => { - sortedObject[properties[key]] = item; - }); - return sortedObject; - } - - /** - * Checks if an object contains something. For basic searches. - * - * @function has - * @category utility - * @param {Array|String|Object} source - Object to be checked. - * @param {String|Array|Function|RegExp} search - Object that is being searched for. - * @param {Number} position - Index at which to start searching. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { has, assert } from '@universalweb/acid'; - * assert(has('Hello World', 'Hello'), true); - * assert(has(['Hello', 'World'], 'hello'), true); - */ - function has(source, search, position) { - if (noValue(source) || noValue(search)) { - return false; - } - if (source === search) { - return true; - } - if (isString(source)) { - if (isString(search)) { - return source.includes(search, position); - } - if (isRegex(search)) { - return search.test(source); - } - if (isFunction(search)) { - return search(source); - } - if (isArray(search)) { - return everyArray(search, (item) => { - return has(source, item); - }); - } - return every(search, (item) => { - return has(source, item); - }); - } - if (isArray(source)) { - if (isRegex(search)) { - return everyArray(source, (item) => { - return item.test(search); - }); - } - if (isFunction(search)) { - return everyArray(source, search); - } - if (isArray(search)) { - return everyArray(search, (item) => { - return has(source, item); - }); - } - return source.includes(search, position); - } - if (isPlainObject(source)) { - if (isRegex(search)) { - return everyObject(source, (item) => { - return item.test(search); - }); - } - if (isFunction(search)) { - return everyObject(source, search); - } - if (isPlainObject(search)) { - return everyObject(source, (item, key) => { - return item === search[key]; - }); - } - return everyObject(source, (item) => { - return has(item, search); - }); - } - return false; - } - - /** - * Checks if the string has a '.'. - * - * @function hasDot - * @category utility - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { hasDot, assert } from '@universalweb/acid'; - * assert(hasDot('test.js'), true); - */ - const hasDot = regexTestFactory(/\./); - - /** - * Checks if a property on an object has a value. If not, it will assign a value. - * - * @function ifNotAssign - * @category utility - * @type {Function} - * @param {Object} rootObject - The object to check. - * @param {String} property - The property name which is to be checked. - * @param {*} equalThis - The reassignment value for the property being checked. - * @returns {Object} - Returns the provided rootObject. - * - * @example - * import { ifNotAssign, assert } from '@universalweb/acid'; - * assert(ifNotAssign({}, 'a', 1), {a:1}); - */ - const ifNotAssign = (rootObject, property, equalThis) => { - if (property && !hasValue(rootObject[property])) { - rootObject[property] = equalThis; - } - return rootObject; - }; - - class Intervals { - list = construct(Map); - construct() {} - /** - * Remove a setInterval that was created using the intervals function. - * - * @param {Number} id - The id of the setInterval to remove. - * @returns {undefined} - Returns nothing. - * - * @example - * timer(() => {}, 100); - * // => 0 - */ - remove(id) { - clearInterval(id); - this.list.delete(id); - } - has(id) { - return this.list.has(id); - } - get(id) { - return this.list.get(id); - } - /** - * Create a setInterval & add it to the list of interval timers. - * - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setTimeoutId ID. - * - * @example - * timers.set(() => {}, 100); - * // => 0 - */ - set(callable, time) { - const id = setInterval(() => { - callable(); - }, time); - this.list.set(id, true); - return id; - } - /** - * Clear all active setIntervals. - * - * @returns {undefined} - Returns undefined. - * - * @example - * intervals.clear(); - * // => undefined - */ - clear() { - const currentThis = this; - currentThis.list.forEach((id) => { - currentThis.remove(id); - }); - } - } - const intervals = construct(Intervals); - /** - * Create an interval timer. - * - * @function interval - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setInterval ID. - * - * @example - * interval(() => {}, 100); - * // => 0 - */ - function interval(callable, time) { - return intervals.set(callable, time); - } - /** - * Clear all active interval timers. - * - * @function clearIntervals - * @category function - * @returns {undefined} - Returns undefined. - * - * @example - * clearIntervals(); - * // => undefined - */ - function clearIntervals() { - const id = setTimeout(noop, 0); - times(id, (index) => { - intervals.remove(index); - }); - } - - function merge(target, ...sources) { - each(sources, (currentSource) => { - each(currentSource, (sourceItem, sourceKey) => { - if (target[sourceKey]) { - if (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) { - return merge(target[sourceKey], sourceItem); - } - } - target[sourceKey] = sourceItem; - }); - }); - return target; - } - - /** - * Returns the model with the given name. - * - * @function Model - * @type {Class} - * @category utility - * @param {String} modelName - The name of the model to return. - * @param {*} modelSource - The value of the model to return. - * @returns {Model} - The model with the given name. - * - * @example - * import { Model, model, assert } from '@universalweb/acid'; - * const test = new Model('test', {a: 1}); - * assert(model('test'), {a: 1}); - */ - class Model { - static models = new Map(); - constructor(modelName, modelSource) { - if (hasValue(modelSource)) { - assign(this, modelSource); - this.modelName = modelName; - Model.models.set(modelName, modelSource); - } else { - assign(this, modelName); - } - } - delete(modelName) { - Model.models.delete(modelName || this.modelName); - } - set(modelName) { - if (modelName) { - this.modelName = modelName; - } - Model.models.set(modelName || this.modelName, this); - } - has(modelName) { - return Model.models.has(modelName || this.modelName); - } - get(modelName) { - return Model.models.get(modelName || this.modelName); - } - } - /** - * Set & Get a model. - * - * @function model - * @type {Function} - * @category utility - * @param {String} modelName - Name of the model. - * @param {Object} modelSource - The model object. - * @returns {Model} - Returns the associated model. - * - * @example - * import { model, assert } from '@universalweb/acid'; - * model('test', {a: 1}); - * assert(model('test'), {a: 1}); - */ - function model(modelName, modelSource) { - if (hasValue(modelSource)) { - return construct(Model, [modelName, modelSource]); - } - return get(modelName, Model.models); - } - - /** - * Takes the first two arguments given and returns them inside a new array. - * - * @function pair - * @category utility - * @param {*} argument1 - The source object. - * @param {*} argument2 - The source object. - * @returns {Array} The array which holds the pair. - * - * @example - * import { pair, assert } from '@universalweb/acid'; - * assert(air(1, 2), [1, 2]); - */ - function pair(argument1, argument2) { - return [argument1, argument2]; - } - - /** - * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee. - * - * @function concurrentStatus - * @category utility - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The array from Promise.allSettled. - * - * @example - * import { concurrentStatus, assert } from '@universalweb/acid'; - * const tempList = []; - * await concurrentStatus([1, 2], async (item) => { - * return item; - * }); - * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]); - */ - function concurrentStatus(source, iteratee, additionalArgument) { - const arrayLength = source.length; - const queue = []; - for (let index = 0; index < arrayLength; index++) { - queue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument); - } - return Promise.allSettled(queue); - } - - /** - * A wrapper around the promise constructor. - * - * @function promise - * @type {Function} - * @category utility - * @param {Function} callback - Function to be called back. - * @returns {Promise} - A constructor with a callback function.). - * - * @example - * promise((a) => {}); - * // => Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined} - */ - function promise(callback) { - return new Promise(callback); - } - - /** - * Using a deep comparison it checks if properties of two objects using an array are equal. - * - * @function propertyMatch - * @type {Function} - * @category utility - * @param {Object} source - The source object to compare. - * @param {Object} compared - Object to be compared to source. - * @param {Array} properties - List of properties to compare defaults to keys(source). - * @returns {Array} - Returns an array of properties. - * - * @example - * import { propertyMatch, assert } from '@universalweb/acid'; - * assert(propertyMatch({ - * a: 1, - * b: 2 - * }, { - * a: 1, - * b: 2 - * }, ['a', 'b']), true); - */ - const propertyMatch = (source, compared, properties = keys(source)) => { - return everyArray(properties, (property) => { - return isEqual(source[property], compared[property]); - }); - }; - - function setKey(source, key, value) { - if (key && isPlainObject(source)) { - source[key] = value; - } else if (isNumber(key) && isArray(source)) { - source[key] = value; - } else if (source.set) { - source.set(key, value); - } else if (source.push) { - source.push(value); - } else if (source.add) { - source.add(value); - } else { - source[key] = value; - } - return source; - } - - function setValue(source, value, key) { - if (isNumber(key) && isArray(source)) { - source[key] = value; - } else if (source.push) { - source.push(value); - } else if (source.add) { - source.add(value); - } else { - source[key] = value; - } - return source; - } - - class Store { - source; - constructor(source = {}) { - this.source = source; - if (source === null || typeof source !== 'object') { - return source; - } - eachObject(source, (property) => { - source[property] = new Store(source[property]); - }); - this.data = new Proxy(source, { - get(proxySource, property) { - console.log(proxySource, property, proxySource[property]); - return proxySource[property]; - }, - set(proxySource, property, value) { - console.log(proxySource, property, proxySource[property]); - proxySource[property] = new Store(value); - return true; - } - }); - } - } - - /** - * This method returns a new empty array. - * - * @function stubArray - * @category utility - * @type {Function} - * @returns {Array} - Returns the new empty array. - * - * @example - * import { stubArray, assert } from '@universalweb/acid'; - * assert(stubArray(), []); - */ - function stubArray() { - return []; - } - - /** - * This method returns false. - * - * @function stubFalse - * @category utility - * @type {Function} - * @returns {Boolean} - Returns false. - * - * @example - * import { stubFalse, assert } from '@universalweb/acid'; - * assert(stubFalse(), false); - */ - function stubFalse() { - return false; - } - - /** - * This method returns a new empty object. - * - * @function stubObject - * @category utility - * @type {Function} - * @returns {Object} - Returns the new empty object. - * - * @example - * import { stubObject, assert } from '@universalweb/acid'; - * assert(stubObject(), {}); - */ - const stubObject = () => { - return {}; - }; - - /** - * This method returns a new empty string. - * - * @function stubString - * @category utility - * @type {Function} - * @returns {String} - Returns the new empty string. - * - * @example - * import { stubString, assert } from '@universalweb/acid'; - * assert(stubString(), ''); - */ - const stubString = () => { - return ''; - }; - - /** - * This method returns true. - * - * @function stubTrue - * @category utility - * @type {Function} - * @returns {Boolean} - Returns true. - * - * @example - * import { stubTrue, assert } from '@universalweb/acid'; - * assert(stubTrue(), true); - */ - const stubTrue = () => { - return true; - }; - - /** - * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument. - * - * @async - * @function timesAsync - * @category utility - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @returns {undefined} - Nothing. - * - * @example - * import { timesAsync } from '@universalweb/acid'; - * await timesAsync(3, async (item) => { - * console.log(item); - * }); - * // 0 - * // 1 - * // 2 - * // => undefined - */ - async function timesAsync(amount, iteratee) { - for (let index = 0; index < amount; index++) { - await iteratee(amount); - } - } - /** - * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array. - * - * @async - * @function timesMapAsync - * @category array - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @param {Array} [results = []] - Array that will have iteratee return pushed to. - * @returns {Array} - An array with iteratee's returned values. - * - * @example - * import { timesMapAsync } from '@universalweb/acid'; - * await timesMapAsync(3, (item) => { - * return item; - * }); - * // => [0, 1, 2] - */ - async function timesMapAsync(amount, iteratee, results = []) { - for (let index = 0; index < amount; index++) { - results[index] = await iteratee(amount); - } - return results; - } - - /** - * Performs a toggle between 2 values using a deep or strict comparison. - * - * @function toggle - * @type {Function} - * @category utility - * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments. - * @param {(string|number|Object|Array)} on - The first object to be compared to. - * @param {(string|number|Object|Array)} off - The second object to be compared to. - * @returns {(string|number|Object|Array)} - The opposing value to the current. - * - * @example - * import { toggle } from '@universalweb/acid'; - * let toggleMe = true; - * toggleMe = toggle(toggleMe, true, false); - * // => false - */ - function toggle(value, on = true, off = false) { - return isEqual(on, value) ? off : on; - } - - /** - * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available. - * - * @class UniqID - * @type {Class} - * @category utility - * @returns {UniqID} - Returns a new instance of UniqID. - * - * @example - * import { UniqID, construct, assert } from '@universalweb/acid'; - * const gen = construct(UniqID); - * assert(gen.get(), 0); - * assert(gen.get(), 1); - * gen.free(0); - * assert(gen.get(), 0); - */ - class UniqID { - totalActive = 0; - freed = []; - totalFree = 0; - /** - * Generates a new ID or recycle one that is no longer used. - * - * @function get - * @class UniqID - * @category utility - * @type {Function} - * @returns {Number} - Returns a unique id. - * - * @example - * import { UniqID, construct, assert } from '@universalweb/acid'; - * const gen = construct(UniqID); - * assert(gen.get(), 0); - */ - get() { - let result = this.freed.shift(); - if (hasValue(result)) { - this.totalFree--; - } else { - result = this.totalActive; - this.totalActive++; - } - return result; - } - /** - * Frees an UID so that it may be recycled for later use. - * - * @function free - * @class UniqID - * @category utility - * @type {Function} - * @param {Number} id - Number to be freed. - * @returns {undefined} - Nothing is returned. - * - * @example - * import { UniqID, construct, assert } from '@universalweb/acid'; - * const gen = construct(UniqID); - * assert(gen.get(), 0); - * gen.free(0); - * assert(gen.get(), 0); - */ - free(id) { - this.freed.push(id); - this.totalFree++; - const isActive = this.totalActive > 0; - const shouldReset = this.totalActive === this.totalFree; - if (isActive && shouldReset) { - this.reset(); - } - } - reset() { - this.totalActive = 0; - this.freed.length = 0; - this.totalFree = 0; - } - } - /** - * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available. - * - * @function uniqID - * @category utility - * - * @example - * import { uniqID, assert } from '@universalweb/acid'; - * assert(uniqID.get(), 0); - * assert(uniqID.get(), 1); - * uniqID.free(0); - * assert(uniqID.get(), 0); - */ - const uniqID = construct(UniqID); - - /** - * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. - * - * @function VirtualStorage - * @category utility - * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. - * @returns {*} - Returns a new VirtualStorage Object. - * - * @example - * import { VirtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = new VirtualStorage(); - * // => New VirtualStorage Object - */ - class VirtualStorage { - constructor(initialObject = new Map()) { - this.items = initialObject; - } - /** - * Get an item from a virtual storage object. - * - * @param {String} key - The key used to store the data. - * @returns {undefined} - Returns undefined. - * - * @example - * import { VirtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = virtualStorage(); - * myVirtualStorage.setItem('key', 'value'); - * myVirtualStorage.getItem('key'); - * // => 'value' - */ - getItem(key) { - if (this.isMap) { - return this.items.get(key); - } else { - return this.items[key]; - } - } - get(...args) { - return this.getItem(...args); - } - hasItem(key) { - if (this.isMap) { - return this.items.has(key); - } else { - return hasValue(this.items[key]); - } - } - has(...args) { - return this.hasItem(...args); - } - /** - * Save an item to a virtual storage object. - * - * @param {String} key - The key used to store the data. - * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify. - * @returns {undefined} - Returns undefined. - * - * @example - * import { VirtualStorage, assert } from '@universalweb/acid'; - * const vStorage = new VirtualStorage(); - * vStorage.setItem('title', 'value'); - * assert(vStorage.getItem('title'), 'value'); - */ - setItem(key, value) { - if (this.isMap) { - this.items.set(key, value); - } else { - this.items[key] = value; - } - return this; - } - set(...args) { - return this.setItem(...args); - } - /** - * Clears all data from the virtual storage object by replacing with a new object. - * - * @returns {undefined} - Returns undefined. - * - * @example - * import { virtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = virtualStorage(); - * myVirtualStorage.setItem('key', 'value'); - * myVirtualStorage.clear(); - * myVirtualStorage.getItem('key'); - * // => undefined - */ - clear() { - if (this.isMap) { - this.items.clear(); - } else { - this.items = cloneType(this.items); - } - return this; - } - /** - * Remove an item from a virtual storage object. - * - * @param {String} key - The key used to remove data. - * @returns {undefined} - Returns undefined. - * - * @example - * import { virtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = virtualStorage(); - * myVirtualStorage.setItem('key', 'value'); - * myVirtualStorage.removeItem('key'); - * myVirtualStorage.getItem('key'); - * // => undefined - */ - removeItem(key) { - if (this.isMap) { - this.items.delete(key); - } else { - this.items[key] = null; - } - return this; - } - remove(...args) { - return this.removeItem(...args); - } - } - /** - * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. - * - * @function virtualStorage - * @category browser - * @type {Function} - * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. - * @returns {*} - Returns a new VirtualStorage Object. - * - * @example - * import { virtualStorage, assert } from '@universalweb/acid'; - * const vStorage = virtualStorage(); - * vStorage.setItem('title', 'value'); - * assert(vStorage.getItem('title'), 'value'); - */ - function virtualStorage(initialObject) { - return new VirtualStorage(initialObject); - } - - /** - * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object. - * - * @function inAsync - * @type {Function} - * @category Utility - * @async - * @param {Array} source - Array of async functions that will be looped through. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. - * @returns {Object} - The originally given array. - * - * @example - * import { inAsync, assert } from '@universalweb/acid'; - * const list = []; - * await inAsync([async (firstArgument, item, index) => { - * list.push(index + firstArgument.a); - * }, async (firstArgument, item, index) => { - * list.push(index); - * }], {a:1}); - * assert(list, [1, 1]); - */ - async function inAsync(source, thisBind, ...args) { - const arrayLength = source.length; - const results = []; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = await source[index].call(thisBind, ...args, index, callable); - } - } else { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = await source[index](...args, index, callable); - } - } - return results; - } - - /** - * Invoke an array of functions. - * - * @function inSync - * @category Utility - * @type {Function} - * @param {Array} source - Array of functions that will be looped through. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function. - * @returns {undefined} - Returns undefined. - * - * @example - * inSync([() => {console.log(1);}, () => {console.log(2);}]); - * // 1 - * // 2 - * // => undefined - */ - function inSync(source, thisBind, ...args) { - const arrayLength = source.length; - const results = []; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = callable.call(thisBind, ...args, index, callable); - } - } else { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = callable(...args, index, callable); - } - } - return results; - } - - /** - * Checks to see of the browser agent has a string. - * - * @function isAgent - * @category browser - * @type {Function} - * @param {String} source - The string to search for. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isAgent, assert } from '@universalweb/acid'; - * assert(isAgent('NotThere'), false); - */ - function isAgent(source) { - return hasValue(source) ? isAgent[source] : keys(isAgent); - } - const userAgent = globalThis.navigator?.userAgentData; - if (userAgent) { - eachObject(userAgent, (value, key) => { - if (isBoolean(value) && value) { - isAgent[key] = value; - } - }); - eachArray(userAgent.brands, (value) => { - isAgent[value.brand] = value.version; - }); - } else if (navigator.userAgent) { - let userAgentNormalized = navigator.userAgent.toLowerCase(); - userAgentNormalized = userAgentNormalized.replace(/_/g, '.'); - userAgentNormalized = userAgentNormalized.replace(/[#_,;()]/g, ''); - const userAgentSplit = userAgentNormalized.split(/ |\//); - eachArray(userAgentSplit, (item) => { - isAgent[item] = true; - }); - } - - /** - * Attaches an event listener to a node. - * - * @function eventAdd - * @category browser - * @type {Function} - * @param {Node} node - Given node. - * @param {String} eventName - A string representing the event type. - * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs. - * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation. - * @returns {Node} - Returns given node. - * - * @example - * eventAdd(document.body, 'click', () => {console.log('CLICKED');}); - * // = > document.body - */ - function eventAdd(node, eventName, callback, useCapture) { - node.addEventListener(eventName, callback, useCapture); - return node; - } - /** - * Attaches an event listener to a node. - * - * @function eventRemove - * @category browser - * @type {Function} - * @param {Node} node - Given node. - * @param {String} eventName - A string representing the event type. - * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs. - * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation. - * @returns {Node} - Returns given node. - * - * @example - * eventRemove(document.body, () => {console.log('CLICKED');}); - * // = > Undefined - */ - function eventRemove(node, eventName, callback, useCapture) { - node.removeEventListener(eventName, callback, useCapture); - return node; - } - - /** - * Checks if the keycode of the event is strictly equal to 13. - * - * @function isEnter - * @category browser - * @type {Function} - * @param {Object} eventObject - Object to be checked. - * @returns {Boolean} - Returns true if the keycode property of the object equals 13. - * - * @example - * isEnter('click'); - * // => false - */ - function isEnter(eventObject) { - return eventObject.keyCode === 13; - } - - /** - * Create a document fragment. - * - * @function createFragment - * @category browser - * @type {Function} - * @ignore - * @returns {Fragment} - Returns a new document fragment. - */ - const createFragment = document.createDocumentFragment.bind(document); - - /** - * Append a DOM node. - * - * @function append - * @category browser - * @ignoreTest - * @type {Function} - * @ignore - * @param {Node} parentNode - The parent node. - * @param {Node} child - The node to be appended. - * @returns {undefined} - Returns the child. - */ - function append(parentNode, child) { - parentNode.appendChild(child); - return child; - } - - /** - * Assign attributes to a DOM node. - * - * @function nodeAttribute - * @category browser - * @ignoreTest - * @type {Function} - * @async - * @param {Node} node - The DOM node. - * @param {Object|Array} object - Object with key being the attribute name and the value being the attribute value. If an array is given it will get the values corresponding to the array items. - * @returns {Object|Node} - If using an array this returns an object of attribute names as keys and their values as the property value. If using an object this will return the provided node. - * - * @example - * nodeAttribute(document.body, { 'data-example': 'test'}); - */ - function nodeAttribute(node, object) { - if (isArray(object)) { - return zipObject( - object, - mapArray(object, (item) => { - return node.getAttribute(item); - }) - ); - } - eachObject(object, (item, key) => { - node.setAttribute(key, item); - }); - return node; - } - - const dotString = '.'; - const poundString = '#'; - const classTest = /^.[\w_-]+$/; - const tagTest = /^[A-Za-z]+$/; - const regexSpace = /\s/; - /** - * Wrapper around getElementsByClassName. - * - * @function getByClass - * @category browser - * @ignoreTest - * @type {Function} - */ - const getByClass = document.getElementsByClassName.bind(document); - /** - * Wrapper around getElementsByTagName. - * - * @function getByTag - * @category browser - * @ignoreTest - * @type {Function} - */ - const getByTag = document.getElementsByTagName.bind(document); - /** - * Wrapper around getElementsByIdName. - * - * @function getById - * @category browser - * @ignoreTest - * @type {Function} - */ - const getById = document.getElementById.bind(document); - /** - * Wrapper around querySelector. - * - * @function querySelector - * @category browser - * @ignoreTest - * @type {Function} - */ - const querySelector = document.querySelector.bind(document); - /** - * Wrapper around querySelectorAll. - * - * @function querySelectorAll - * @category browser - * @ignoreTest - * @type {Function} - */ - const querySelectorAll = document.querySelectorAll.bind(document); - /** - * Returns relevant DOM node. - * - * @function selector - * @category browser - * @ignoreTest - * @param {String} select - String to be evaluated. - * @type {Function} - * @returns {Node} - Returns a DOM node. - * - * @example - * selector('#node'); - * // =>
- */ - function selector(select) { - const firstLetter = select[0]; - switch (firstLetter) { - case poundString: { - if (!regexSpace.test(select)) { - return getById(restString(select)); - } - break; - } - case dotString: { - if (classTest.test(select)) { - return getByClass(restString(select)); - } - break; - } - default: { - if (tagTest.test(select)) { - return getByTag(select); - } - } - } - return querySelectorAll(select); - } - - const createElementCache = document.createElement.bind(document); - const nodeAttachLoadingEvents = (node) => { - return promise((accept) => { - eventAdd(node, 'load', accept, true); - eventAdd(node, 'error', accept, true); - append(querySelector('head'), node); - }); - }; - /** - * Asynchronously import a js file and append it to the head node. - * If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity. - * - * @function importjs - * @category browser - * @type {Function} - * @async - * @param {*} url - URL of the script to import. If not "." is found in the file name ".js" will be appended. - * @returns {Promise} - Returns a promise which returns a "load" or "error" event associated with the script. - * - * @example - * importjs('core.js'); - * importjs('core'); - */ - function importjs(url) { - const src = (hasDot(url) && url) || `${url}.js`; - const node = nodeAttribute(createElementCache('script'), { - async: '', - src - }); - return nodeAttachLoadingEvents(node); - } - - /** - * Runs a function if the document has finished loading. If not, add an eventlistener. - * - * @function isDocumentReady - * @category browser - * @ignoreTest - * @type {Function} - * @param {Function} callable - Function to be run. - * @returns {Boolean|Function} - If the document is ready, returns a function. If not, return false. - * - * @example - * isDocumentReady(() => {return 1}); - * // => 1 - */ - function isDocumentReady(callable) { - const state = document.readyState; - const checkStatus = state === 'interactive' || state === 'completed' || state === 'complete'; - if (checkStatus) { - return callable ? callable() : true; - } - if (callable) { - eventAdd(document, 'DOMContentLoaded', callable); - } - return false; - } - isDocumentReady(() => { - const scriptTag = getById('AcidLib'); - const scriptName = (scriptTag && scriptTag.getAttribute('data-index')) || '/index'; - importjs(scriptName); - }); - - const protocol = location.protocol; - const protocolSocket = protocol === 'http:' ? 'ws' : 'wss'; - const hostname = location.hostname; - /** - * Holds client hardware, browser, and host info. - * - * @memberof $ - * @category browser - * @ignoreTest - * @property {Object} info - Client hardware & host info. - * @type {Object} - */ - const info = { - hardware: { - cores: navigator.hardwareConcurrency - }, - host: { - name: hostname, - protocol, - protocolSocket - } - }; - - function saveDimensions() { - assign(info, { - bodyHeight: document.body.offsetHeight, - bodyWidth: document.body.offsetWidth, - windowHeight: window.innerHeight, - windowWidth: window.innerWidth - }); - } - /** - * Save current document & window dimensions to the info property. - * - * @function updateDimensions - * @category browser - * @ignoreTest - * @type {Function} - * @returns {undefined} - Returns undefined. - * - * @example - * updateDimensions(); - */ - function updateDimensions() { - saveDimensions(); - } - isDocumentReady(updateDimensions); - eventAdd(window, 'load', updateDimensions, true); - eventAdd(window, 'resize', updateDimensions, true); - - /** - * LocalStorage Module.. - * - * @module browser/storage - */ - exports.hasLocal = void 0; - function hasStorage(storeCheck) { - try { - storeCheck().removeItem('TESTING'); - exports.hasLocal = true; - } catch (e) { - exports.hasLocal = false; - } - } - hasStorage(() => { - return localStorage; - }); - /** - * Constructs a virtual storage container with localStorage support. - * BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported. - * If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed. - * BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed. - * - * @class BrowserStorage - * @category browser - * @returns {BrowserStorage} - Returns a new instance of BrowserStorage. - * - * @example - * import { BrowserStorage, construct, assert } from '@universalweb/acid'; - * const storageBrowserStorage = construct(BrowserStorage); - * storageBrowserStorage.setItem('key', 'value'); - * assert(storageBrowserStorage.getItem('key'), 'value'); - */ - class BrowserStorage { - constructor(initialObject) { - if (this.hasLocal) { - this.local = localStorage; - } - this.storage = virtualStorage(initialObject); - } - hasLocal = exports.hasLocal; - /** - * Save an item to a browserStorage. - * - * @function setItem - * @class BrowserStorage - * @category browser - * @param {String} key - The key used to store the data. - * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify. - * @returns {undefined} - Returns undefined. - * - * @example - * import { BrowserStorage, construct, assert } from '@universalweb/acid'; - * const storageBrowserStorage = construct(BrowserStorage); - * storageBrowserStorage.setItem('key', 'value'); - * assert(storageBrowserStorage.getItem('key'), 'value'); - */ - setItem(key, value) { - if (this.hasLocal) { - this.local.setItem(key, isString(value) ? value : stringify(value)); - } - return this.storage.setItem(key, value); - } - /** - * Get an item from a browserStorage. - * - * @function getItem - * @class BrowserStorage - * @category browser - * @param {String} key - The key used to store the data. - * @returns {undefined} - Returns undefined. - * - * @example - * import { BrowserStorage, construct, assert } from '@universalweb/acid'; - * const storageBrowserStorage = construct(BrowserStorage); - * storageBrowserStorage.setItem('key', 'value'); - * assert(storageBrowserStorage.getItem('key'), 'value'); - */ - getItem(key) { - const item = this.storage.getItem(key); - if (hasValue(item)) { - return item; - } - if (!hasValue(item) && this.hasLocal) { - return this.local.getItem(key); - } - } - /** - * Clears all data for the browserStorage including all of localStorage if supported. - * - * @function clear - * @class BrowserStorage - * @category browser - * @returns {undefined} - Returns undefined. - * - * @example - * import { BrowserStorage, construct, assert } from '@universalweb/acid'; - * const storageBrowserStorage = construct(BrowserStorage); - * storageBrowserStorage.setItem('key', 'value'); - * assert(storageBrowserStorage.getItem('key'), 'value'); - * storageBrowserStorage.clear(); - * assert(storageBrowserStorage.getItem('key'), undefined); - */ - clear() { - if (this.hasLocal) { - this.local.clear(); - } - this.storage.clear(); - } - /** - * Remove an item from a browserStorage. - * - * @class BrowserStorage - * @category browser - * @function removeItem - * @param {String} key - The key used to remove data. - * @returns {undefined} - Returns undefined. - * - * @example - * import { BrowserStorage, construct, assert } from '@universalweb/acid'; - * const storageBrowserStorage = construct(BrowserStorage); - * storageBrowserStorage.setItem('key', 'value'); - * assert(storageBrowserStorage.getItem('key'), 'value'); - * storageBrowserStorage.removeItem('key'); - * assert(storageBrowserStorage.getItem('key'), undefined); - */ - removeItem(key) { - if (this.hasLocal) { - this.local.removeItem(key); - } - this.storage.removeItem(key); - } - } - /** - * The browserStorage function is a factory which wraps the BrowserStorage class constructor. - * - * @function browserStorage - * @category browser - * @type {Function} - * @returns {*} - Returns a new BrowserStorage Object. - * - * @example - * const storageBrowserStorage = browserStorage(); - * // => New BrowserStorage Object - */ - function browserStorage(virtualFlag) { - return new BrowserStorage(virtualFlag); - } - - const generateTheme = (color, bg) => { - return `color:${color};background:${bg};`; - }; - const themes = { - alert: generateTheme('#fff', '#f44336'), - important: generateTheme('#fff', '#E91E63'), - notify: generateTheme('#fff', '#651FFF'), - warning: generateTheme('#000', '#FFEA00') - }; - /** - * Console.trace wrapper with theme support. - * - * @function cnsl - * @category browser - * @ignoreTest - * @type {Function} - * @param {Object} value - The value to be logged. - * @param {String} themeName - The name of the theme to be used. - * @returns {undefined} - Returns undefined. - * - * @example - * cnsl('Lucy', 'notify'); - * // 'Lucy' - */ - const cnsl = (value, themeName) => { - const data = isString(value) ? value : stringify(value); - if (themeName === 'alert' || themeName === 'warning') { - return console.trace(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`); - } - console.log(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`); - }; - /** - * Create color themes for cnsl method. - * - * @function cnslTheme - * @category browser - * @ignoreTest - * @type {Function} - * @param {String} themeName - The name of the theme. - * @param {String} color - The text color. - * @param {String} background - The background color of the block. - * @returns {undefined} - Returns undefined. - * - * @example - * cnslTheme('BlackNWhite', '#fff', '#000'); - */ - const cnslTheme = (themeName, color, background) => { - themes[themeName] = generateTheme(color, background); - }; - - /** - * Checks if value is a plain DOM Node. - * - * @function isDom - * @category browser - * @ignoreTest - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isDom, assert } from '@universalweb/acid'; - * assert(isDom(document.querySelectorAll('head')), true); - */ - function isDom(source) { - return source && source.nodeType !== 9; - } - /** - * Checks if the value is a HTMLCollection. - * - * @function isHTMLCollection - * @category browser - * @ignoreTest - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isHTMLCollection, assert } from '@universalweb/acid'; - * document.body.innerHTML = '
'; - * assert(isHTMLCollection(document.getElementsByClassName('test')), true); - */ - const objectHTMLCollection = '[object HTMLCollection]'; - function isHTMLCollection(source) { - return hasValue(source) ? source.toString() === objectHTMLCollection : false; - } - /** - * Checks if the value is a NodeList. - * - * @function isNodeList - * @category browser - * @ignoreTest - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNodeList, assert } from '@universalweb/acid'; - * document.body.innerHTML = '
'; - * assert(isNodeList(document.querySelectorAll('.test')), true); - */ - const objectNodeList = '[object NodeList]'; - function isNodeList(source) { - return hasValue(source) ? source.toString() === objectNodeList : false; - } - - exports.BrowserStorage = BrowserStorage; - exports.Chain = Chain; - exports.Intervals = Intervals; - exports.Model = Model; - exports.Store = Store; - exports.Timers = Timers; - exports.UniqID = UniqID; - exports.VirtualStorage = VirtualStorage; - exports.add = add; - exports.after = after; - exports.append = append; - exports.apply = apply; - exports.arrayToRegex = arrayToRegex; - exports.arraysToObject = arraysToObject; - exports.ary = ary; - exports.assert = assert; - exports.assertAsync = assertAsync; - exports.assign = assign; - exports.assignToClass = assignToClass; - exports.assignToObject = assignToObject; - exports.before = before; - exports.bindAll = bindAll; - exports.browserStorage = browserStorage; - exports.cacheNativeMethod = cacheNativeMethod; - exports.calcProgress = calcProgress; - exports.camelCase = camelCase; - exports.chain = chain; - exports.chunk = chunk; - exports.chunkString = chunkString; - exports.clear = clear; - exports.clearArray = clearArray; - exports.clearBuffer = clearBuffer; - exports.clearIntervals = clearIntervals; - exports.clearTimers = clearTimers; - exports.clone = clone; - exports.cloneArray = cloneArray; - exports.cloneType = cloneType; - exports.cnsl = cnsl; - exports.cnslTheme = cnslTheme; - exports.compact = compact; - exports.compactKeys = compactKeys; - exports.compactMap = compactMap; - exports.compactMapArray = compactMapArray; - exports.compactMapAsyncArray = compactMapAsyncArray; - exports.compactMapAsyncObject = compactMapAsyncObject; - exports.compactMapObject = compactMapObject; - exports.concurrent = concurrent; - exports.concurrentEachArray = concurrentEachArray; - exports.concurrentStatus = concurrentStatus; - exports.construct = construct; - exports.constructorName = constructorName; - exports.countBy = countBy; - exports.countKey = countKey; - exports.countWithoutKey = countWithoutKey; - exports.createFragment = createFragment; - exports.curry = curry; - exports.curryRight = curryRight; - exports.debounce = debounce; - exports.deduct = deduct; - exports.defProp = defProp; - exports.difference = difference; - exports.divide = divide; - exports.drop = drop; - exports.dropRight = dropRight; - exports.each = each; - exports.eachArray = eachArray; - exports.eachAsyncArray = eachAsyncArray; - exports.eachAsyncObject = eachAsyncObject; - exports.eachObject = eachObject; - exports.eachRight = eachRight; - exports.eachRightAsync = eachRightAsync; - exports.ensureArray = ensureArray; - exports.ensureBuffer = ensureBuffer; - exports.equalsZero = isZero; - exports.escapeRegex = escapeRegex; - exports.escapeRegexRegex = escapeRegexRegex; - exports.eventAdd = eventAdd; - exports.eventRemove = eventRemove; - exports.every = every; - exports.everyArg = everyArg; - exports.everyArray = everyArray; - exports.everyAsyncArray = everyAsyncArray; - exports.everyAsyncObject = everyAsyncObject; - exports.everyObject = everyObject; - exports.extendClass = extendClass; - exports.filter = filter; - exports.filterArray = filterArray; - exports.filterAsyncArray = filterAsyncArray; - exports.filterAsyncObject = filterAsyncObject; - exports.filterObject = filterObject; - exports.findIndex = findIndex; - exports.findIndexCache = findIndexCache; - exports.findItem = findItem; - exports.first = first; - exports.flatten = flatten; - exports.flattenDeep = flattenDeep; - exports.flow = flow; - exports.flowAsync = flowAsync; - exports.flowAsyncRight = flowAsyncRight; - exports.flowRight = flowRight; - exports.forEach = forEach; - exports.forEachAsync = forEachAsync; - exports.forMap = forMap; - exports.forOf = forOf; - exports.forOfAsync = forOfAsync; - exports.forOfCompactMap = forOfCompactMap; - exports.forOfCompactMapAsync = forOfCompactMapAsync; - exports.forOfEvery = forOfEvery; - exports.forOfEveryAsync = forOfEveryAsync; - exports.forOfFilter = forOfFilter; - exports.forOfFilterAsync = forOfFilterAsync; - exports.forOfMap = forOfMap; - exports.forOfMapAsync = forOfMapAsync; - exports.generateLoop = generateLoop; - exports.get = get; - exports.getByClass = getByClass; - exports.getById = getById; - exports.getByTag = getByTag; - exports.getEntries = getEntries; - exports.getFileExtension = getFileExtension; - exports.getFilename = getFilename; - exports.getHighest = getHighest; - exports.getLowest = getLowest; - exports.getNumberInsertIndex = getNumberInsertIndex; - exports.getPropDesc = getPropDesc; - exports.getPropNames = getPropNames; - exports.getType = getType; - exports.getTypeName = getTypeName; - exports.groupBy = groupBy; - exports.has = has; - exports.hasAnyKeys = hasAnyKeys; - exports.hasDot = hasDot; - exports.hasKeys = hasKeys; - exports.hasLength = hasLength; - exports.hasProp = hasProp; - exports.hasValue = hasValue; - exports.htmlEntities = htmlEntities; - exports.ifInvoke = ifInvoke; - exports.ifNotAssign = ifNotAssign; - exports.ifValue = ifValue; - exports.importjs = importjs; - exports.inAsync = inAsync; - exports.inSync = inSync; - exports.increment = increment; - exports.indexBy = indexBy; - exports.info = info; - exports.initial = initial; - exports.initialString = initialString; - exports.insertInRange = insertInRange; - exports.intersection = intersection; - exports.interval = interval; - exports.intervals = intervals; - exports.invert = invert; - exports.invokeArray = invokeArray; - exports.invokeCollection = invokeCollection; - exports.invokeCollectionAsync = invokeCollectionAsync; - exports.isAgent = isAgent; - exports.isArguments = isArguments; - exports.isArray = isArray; - exports.isArrayBuffer = isArrayBuffer; - exports.isArrayBufferCall = isArrayBufferCall; - exports.isArrayLike = isArrayLike; - exports.isAsync = isAsync; - exports.isAsyncCall = isAsyncCall; - exports.isBigInt = isBigInt; - exports.isBigIntCall = isBigIntCall; - exports.isBoolean = isBoolean; - exports.isBooleanCall = isBooleanCall; - exports.isBuffer = isBuffer; - exports.isBufferCall = isBufferCall; - exports.isChild = isChild; - exports.isCloneable = isCloneable; - exports.isConstructor = isConstructor; - exports.isConstructorFactory = isConstructorFactory; - exports.isConstructorNameFactory = isConstructorNameFactory; - exports.isDate = isDate; - exports.isDateCall = isDateCall; - exports.isDeno = isDeno; - exports.isDocumentReady = isDocumentReady; - exports.isDom = isDom; - exports.isEmpty = isEmpty; - exports.isEnter = isEnter; - exports.isEqual = isEqual; - exports.isF32 = isF32; - exports.isF32Call = isF32Call; - exports.isF64 = isF64; - exports.isF64Call = isF64Call; - exports.isFalse = isFalse; - exports.isFalsy = isFalsy; - exports.isFileCSS = isFileCSS; - exports.isFileHTML = isFileHTML; - exports.isFileJS = isFileJS; - exports.isFileJSON = isFileJSON; - exports.isFloat = isFloat; - exports.isFunction = isFunction; - exports.isGenerator = isGenerator; - exports.isGeneratorCall = isGeneratorCall; - exports.isHTMLCollection = isHTMLCollection; - exports.isI16 = isI16; - exports.isI16Call = isI16Call; - exports.isI32 = isI32; - exports.isI32Call = isI32Call; - exports.isI8 = isI8; - exports.isI8Call = isI8Call; - exports.isIterable = isIterable; - exports.isKindAsync = isKindAsync; - exports.isMap = isMap; - exports.isMapCall = isMapCall; - exports.isMatchArray = isMatchArray; - exports.isMatchObject = isMatchObject; - exports.isNegative = isNegative; - exports.isNodeList = isNodeList; - exports.isNodejs = isNodejs; - exports.isNotArray = isNotArray; - exports.isNotNumber = isNotNumber; - exports.isNotString = isNotString; - exports.isNull = isNull; - exports.isNumber = isNumber; - exports.isNumberCall = isNumberCall; - exports.isNumberEqual = isNumberEqual; - exports.isNumberInRange = isNumberInRange; - exports.isNumberNotInRange = isNumberNotInRange; - exports.isParent = isParent; - exports.isPlainObject = isPlainObject; - exports.isPositive = isPositive; - exports.isPrimitive = isPrimitive; - exports.isPromise = isPromise; - exports.isRegex = isRegex; - exports.isRegexCall = isRegexCall; - exports.isRelated = isRelated; - exports.isSafeInt = isSafeInt; - exports.isSame = isSame; - exports.isSameType = isSameType; - exports.isSet = isSet; - exports.isSetCall = isSetCall; - exports.isString = isString; - exports.isTrue = isTrue; - exports.isTruthy = isTruthy; - exports.isTypeFactory = isTypeFactory; - exports.isTypedArray = isTypedArray; - exports.isU16 = isU16; - exports.isU16Call = isU16Call; - exports.isU32 = isU32; - exports.isU32Call = isU32Call; - exports.isU8 = isU8; - exports.isU8C = isU8C; - exports.isU8CCall = isU8CCall; - exports.isU8Call = isU8Call; - exports.isUndefined = isUndefined; - exports.isWeakMap = isWeakMap; - exports.isWeakMapCall = isWeakMapCall; - exports.isZero = isZero; - exports.jsonParse = jsonParse; - exports.kebabCase = kebabCase; - exports.keys = keys; - exports.largest = largest; - exports.last = last; - exports.lowerCase = lowerCase; - exports.map = map; - exports.mapArray = mapArray; - exports.mapAsyncArray = mapAsyncArray; - exports.mapAsyncObject = mapAsyncObject; - exports.mapObject = mapObject; - exports.mapRightArray = mapRightArray; - exports.mapWhile = mapWhile; - exports.merge = merge; - exports.model = model; - exports.multiply = multiply; - exports.negate = negate; - exports.noValue = noValue; - exports.nodeAttribute = nodeAttribute; - exports.noop = noop; - exports.notEqual = notEqual; - exports.nthArg = nthArg; - exports.objectAssign = objectAssign; - exports.objectEntries = objectEntries; - exports.objectSize = objectSize; - exports.omit = omit; - exports.once = once; - exports.onlyUnique = onlyUnique; - exports.over = over; - exports.overEvery = overEvery; - exports.pair = pair; - exports.partition = partition; - exports.pick = pick; - exports.pluck = pluck; - exports.pluckObject = pluckObject; - exports.promise = promise; - exports.propertyMatch = propertyMatch; - exports.querySelector = querySelector; - exports.querySelectorAll = querySelectorAll; - exports.randomFloat = randomFloat; - exports.randomInt = randomInt; - exports.range = range; - exports.rangeDown = rangeDown; - exports.rangeUp = rangeUp; - exports.rawURLDecode = rawURLDecode; - exports.reArg = reArg; - exports.regexTestFactory = regexTestFactory; - exports.remainder = remainder; - exports.remove = remove; - exports.removeBy = removeBy; - exports.replaceList = replaceList; - exports.rest = rest; - exports.restString = restString; - exports.returnValue = returnValue; - exports.right = right; - exports.rightString = rightString; - exports.sample = sample; - exports.sanitize = sanitize; - exports.saveDimensions = saveDimensions; - exports.selector = selector; - exports.setKey = setKey; - exports.setValue = setValue; - exports.shuffle = shuffle; - exports.smallest = smallest; - exports.snakeCase = snakeCase; - exports.sortCollectionAlphabetically = sortCollectionAlphabetically; - exports.sortCollectionAlphabeticallyReverse = sortCollectionAlphabeticallyReverse; - exports.sortCollectionAscending = sortCollectionAscending; - exports.sortCollectionAscendingFilter = sortCollectionAscendingFilter; - exports.sortCollectionDescending = sortCollectionDescending; - exports.sortCollectionDescendingFilter = sortCollectionDescendingFilter; - exports.sortNumberAscending = sortNumberAscending; - exports.sortNumberDescening = sortNumberDescening; - exports.sortObjectsAlphabetically = sortObjectsAlphabetically; - exports.sortObjectsAlphabeticallyReverse = sortObjectsAlphabeticallyReverse; - exports.sortUnique = sortUnique; - exports.stringify = stringify; - exports.stubArray = stubArray; - exports.stubFalse = stubFalse; - exports.stubObject = stubObject; - exports.stubString = stubString; - exports.stubTrue = stubTrue; - exports.subtract = subtract; - exports.subtractAll = subtractAll; - exports.subtractReverse = subtractReverse; - exports.sumAll = sumAll; - exports.take = take; - exports.takeRight = takeRight; - exports.themes = themes; - exports.throttle = throttle; - exports.timer = timer; - exports.timers = timers; - exports.times = times; - exports.timesAsync = timesAsync; - exports.timesMap = timesMap; - exports.timesMapAsync = timesMapAsync; - exports.toArray = toArray; - exports.toPath = toPath; - exports.toggle = toggle; - exports.tokenize = tokenize; - exports.truncate = truncate; - exports.truncateRight = truncateRight; - exports.unZip = unZip; - exports.unZipObject = unZipObject; - exports.union = union; - exports.uniqID = uniqID; - exports.unique = unique; - exports.untilFalseArray = untilFalseArray; - exports.untilTrueArray = untilTrueArray; - exports.updateDimensions = updateDimensions; - exports.upperCase = upperCase; - exports.upperFirst = upperFirst; - exports.upperFirstAll = upperFirstAll; - exports.upperFirstLetter = upperFirstLetter; - exports.upperFirstOnly = upperFirstOnly; - exports.upperFirstOnlyAll = upperFirstOnlyAll; - exports.virtualStorage = virtualStorage; - exports.whileCompactMap = whileCompactMap; - exports.whileEachArray = whileEachArray; - exports.whileMapArray = whileMapArray; - exports.without = without; - exports.words = words; - exports.wrap = wrap; - exports.xor = xor; - exports.zip = zip; - exports.zipObject = zipObject; + options, + ); + } + async function assertAsync(sourceArg, expected, options) { + const source = await sourceArg; + const expectedFunction = + isFunction(expected) && (await expected(source, options)) === false; + if (expectedFunction || notEqual(source, expected)) { + return createAssertError(source, expected, options); + } + return true; + } + /** + * Check if source value matches the expected value. + * + * @function assert + * @category utility + * @type {Function} + * @param {*} source - The source object to compare to. + * @param {*} expected - The expected result that's compared to the source. + * @param {*} options - Additional options for the Error instance & unit test information. + * @returns {Object} - Returns a deep clone of an object. + * + * @example + * import { assert } from '@universalweb/acid'; + * if (!assert(1,1)) { + * new Error('Assert Method Failed'); + * } + */ + function assert(source, expected, options) { + if (isKindAsync(source) || isKindAsync(expected)) { + return assertAsync(source, expected, options); + } + const expectedFunction = + isFunction(expected) && expected(source, options) === false; + if (expectedFunction || notEqual(source, expected)) { + return createAssertError(source, expected, options); + } + return true; + } + + /** + * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to. + * + * @function bindAll + * @category utility + * @type {Function} + * @param {Object|Function|Array} collection - The functions to bind. + * @param {*} bindThis - Object to be bound to functions. + * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to. + * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided. + * + * @example + * import { assert, bindAll } from '@universalweb/acid'; + * const bounded = bindAll([function () { return this;}], 'Bounded'); + * assert(bounded[0](), 'Bounded'); + */ + function bindAll(collection, bindThis, targetAssign) { + const results = map(collection, (item) => { + return isFunction(item) ? item.bind(bindThis) : item; + }); + return targetAssign ? assign(targetAssign, results) : results; + } + + /** + * Clears the values out of an array, buffer, and objects like Map that have a clear method. + * + * @function clear + * @category utility + * @type {Function} + * @param {Array} source - Takes an array to be emptied. + * @returns {Array} - The originally given array. + * + * @example + * import { clear, assert } from '@universalweb/acid'; + * assert(clear(Buffer.from([1,'B', 'Cat'])), []); + */ + function clear(source) { + if (source) { + if (isBuffer(source)) { + return clearBuffer(source); + } else if (isArray(source)) { + return clearArray(source); + } else if (source.clear) { + source.clear(); + } else if (source.length) { + source.length = 0; + } + } + return source; + } + + /** + * Creates a structured clone of an object which is a "structured-cloneable type". + * + * @function clone + * @category utility + * @type {Function} + * @param {Object} source - Any structured-cloneable type object. + * @returns {Object} - Returns a deep clone of an object. + * + * @example + * import { clone, assert } from '@universalweb/acid'; + * assert(clone({a:{b:[2]}}), {a:{b:[2]}}); + */ + const structuredCloneSafe = globalThis.structuredClone; + function clone(source) { + return structuredCloneSafe(source); + } + + /** + * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next. + * + * @function concurrent + * @type {Function} + * @category Utility + * @async + * @param {Array} source - Array of async functions that will be looped through. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. + * @returns {Object} - The originally given array. + * + * @example + * import { concurrent, assert } from '@universalweb/acid'; + * const list = []; + * await concurrent([async (item) => { + * return item; + * }, async (item) => { + * return item; + * }], null, 1); + * assert(list, [1, 1]); + */ + async function concurrent(source, thisBind, ...args) { + const arrayLength = source.length; + const results = []; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = source[index].call( + thisBind, + ...args, + index, + results, + callable, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = source[index](...args, index, results, callable); + } + } + return Promise.all(results); + } + + /** + * Creates an array with all isFalsy values removed. The values false, null, 0, "", undefined, and NaN are isFalsy. + * + * @function compact + * @category Utility + * @type {Function} + * @param {Array|Object} source - Array or Object to be compacted. + * @returns {Array|Object} - A new object or array containing the filtered values. + * + * @example + * import { compact, assert } from '@universalweb/acid'; + * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']); + */ + function compact(source) { + if (isPlainObject(source)) { + const sourceKeys = keys(source); + const sourceKeysLength = sourceKeys.length; + const targetObject = {}; + for (let i = 0; i < sourceKeysLength; i++) { + const keyName = sourceKeys[i]; + const item = source[keyName]; + const isisTruthy = isTruthy(item); + if (isisTruthy) { + targetObject[keyName] = item; + } + } + return targetObject; + } + return source.filter((item) => { + return isTruthy(item); + }); + } + + /** + * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function forOfCompactMapAsync + * @category utility + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * import { assert,forOfCompactMapAsync } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = await forOfCompactMapAsync(source, async (item) => { + * return item; + * }); + * assert(temp, {b: 2, c: 3}); + */ + async function forOfCompactMapAsync( + source, + iteratee = returnValue, + resultsObject, + generatorArgs, + ) { + if (isGenerator(source)) { + const resultsGenerator = []; + for await (const item of source(...generatorArgs)) { + const result = await iteratee(item, resultsGenerator, source); + if (hasValue(result)) { + resultsGenerator.push(result); + } + } + return resultsGenerator; + } + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = await iteratee(value, results, source); + if (hasValue(result)) { + methodPushBound(result); + } + } + return results; + } + const methodSet = isFunction(results.set); + for await (const [key, value] of source) { + const result = await iteratee(value, key, results, source); + if (hasValue(result)) { + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + } + return results; + } + + /** + * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function forOfCompactMap + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * import { assert,forOfCompactMap } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = forOfCompactMap(source, (item) => { + * return item; + * }); + * assert(temp, {b: 2, c: 3}); + */ + function forOfCompactMap(source, iteratee = returnValue, resultsObject) { + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = iteratee(value, results, source); + if (hasValue(result)) { + methodPushBound(result); + } + } + return results; + } + const methodSet = isFunction(results.set); + for (const [key, value] of source) { + const result = iteratee(value, key, results, source); + if (hasValue(result)) { + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + } + return results; + } + + /** + * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function compactMap + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {Object | Function} [results = {}] - Object that will be used to assign results. + * @returns {Array | object | Function} - A new object of the same calling object's type. + * + * @example + * import { compactMap, assert } from '@universalweb/acid'; + * assert(compactMap({a: null, b: 2, c: 3}, (item) => { + * return item; + * }), {b: 2, c: 3}); + */ + const compactMap = generateLoop( + compactMapArray, + compactMapAsyncArray, + compactMapObject, + compactMapAsyncObject, + forOfCompactMap, + forOfCompactMapAsync, + ); + + function everyArg(...methods) { + if (isAsync(methods[0])) { + return async function (...args) { + return every(methods, async (method) => { + return every(args, async (item) => { + return method(item); + }); + }); + }; + } + return function (...args) { + return every(methods, (method) => { + return every(args, (item) => { + return method(item); + }); + }); + }; + } + + /** + * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. + * + * @function forOfFilter + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. + * + * @example + * import { assert, forOfFilter } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = forOfFilter(source, (item) => { + * return Boolean(item); + * }); + * assert(temp, {b: 2, c: 3}); + */ + function forOfFilter(source, iteratee = returnValue, resultsObject) { + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = iteratee(value, results, source); + if (result === true) { + methodPushBound(value); + } + } + } else { + const methodSet = isFunction(results.set); + for (const [key, value] of source) { + const result = iteratee(value, key, results, source); + if (result === true) { + if (methodSet) { + results.set(key, value); + } else { + results[key] = value; + } + } + } + } + return results; + } + + /** + * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. + * + * @function forOfFilterAsync + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. + * + * @example + * import { assert, forOfFilterAsync } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = forOfFilterAsync(source, (item) => { + * return Boolean(item); + * }); + * assert(temp, {b: 2, c: 3}); + */ + async function forOfFilterAsync( + source, + iteratee = returnValue, + resultsObject, + generatorArgs, + ) { + if (isGenerator(source)) { + const resultsGenerator = []; + for await (const item of source(...generatorArgs)) { + if ((await iteratee(item, resultsGenerator, source)) === true) { + resultsGenerator.push(item); + } + } + return resultsGenerator; + } + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = await iteratee(value, results, source); + if (result === true) { + methodPushBound(value); + } + } + } else { + const methodSet = isFunction(results.set); + for await (const [key, value] of source) { + const result = await iteratee(value, key, results, source); + if (result === true) { + if (methodSet) { + results.set(key, value); + } else { + results[key] = value; + } + } + } + } + return results; + } + + /** + * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. + * + * @function filter + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {Object | Function} [results = {}] - Object that will be used to assign results. + * @returns {Array | object | Function} - A new object of the same calling object's type. + * + * @example + * import { filter, assert } from '@universalweb/acid'; + * assert(filter({a: false, b: true, c: true}, (item) => { + * return item; + * }), {b: true, c: true}); + */ + const filter = generateLoop( + filterArray, + filterAsyncArray, + filterObject, + filterAsyncObject, + forOfFilter, + forOfFilterAsync, + ); + + function returnFlow$1(callable) { + return (...methods) => { + return (arg) => { + let value = arg; + callable(methods, (item) => { + value = item(value); + }); + return value; + }; + }; + } + /** + * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. + * + * @function flow + * @category utility + * @type {Function} + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flow(increment, increment, deduct)(0); + * // => 1 + */ + const flow = returnFlow$1(eachArray); + /** + * This method is like flow except that it creates a function that invokes the given functions from right to left. + * + * @function flowRight + * @category utility + * @type {Function} + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flowRight(increment, increment, deduct)(0); + * // => 1 + */ + const flowRight = returnFlow$1(eachRight); + + function returnFlow(callable) { + return (...methods) => { + return async (arg) => { + let value = arg; + await callable(methods, async (item) => { + value = await item(value); + }); + return value; + }; + }; + } + /** + * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. + * + * @function flowAsync + * @category utility + * @type {Function} + * @async + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); + * // => 2 + */ + const flowAsync = returnFlow(eachAsyncArray); + /** + * This method is like flow except that it creates a function that invokes the given functions from right to left. + * + * @function flowAsyncRight + * @category utility + * @type {Function} + * @async + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); + * // => 2 + */ + const flowAsyncRight = returnFlow(eachRightAsync); + + function forMap(source, callback) { + const cloned = cloneType(source); + const method = cloned.push || cloned.add; + if (method && isFunction(method)) { + const methodBound = method.bind(cloned); + source.forEach((item) => { + const result = callback(item, cloned); + methodBound(result); + }); + } else if (isFunction(cloned.set)) { + source.forEach((item, key) => { + const result = callback(item, key, cloned); + cloned.set(key, result); + }); + } else { + source.forEach((item, key) => { + const result = callback(item, key, cloned); + cloned[key] = result; + }); + } + return cloned; + } + + /** + * Takes all but the last item in the array. + * + * @function arraysToObject + * @type {Function} + * @category utility + * @param {Array} source - Array to have items extracted from. + * @param {Array} properties - Array to have items extracted from. + * @returns {Array} - Returns a completely flattened array. + * + * @example + * import { arraysToObject, assert } from '@universalweb/acid'; + * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3}); + */ + function arraysToObject(source, properties) { + const sortedObject = {}; + eachArray(source, (item, key) => { + sortedObject[properties[key]] = item; + }); + return sortedObject; + } + + /** + * Checks if an object contains something. For basic searches. + * + * @function has + * @category utility + * @param {Array|String|Object} source - Object to be checked. + * @param {String|Array|Function|RegExp} search - Object that is being searched for. + * @param {Number} position - Index at which to start searching. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { has, assert } from '@universalweb/acid'; + * assert(has('Hello World', 'Hello'), true); + * assert(has(['Hello', 'World'], 'hello'), true); + */ + function has(source, search, position) { + if (noValue(source) || noValue(search)) { + return false; + } + if (source === search) { + return true; + } + if (isString(source)) { + if (isString(search)) { + return source.includes(search, position); + } + if (isRegex(search)) { + return search.test(source); + } + if (isFunction(search)) { + return search(source); + } + if (isArray(search)) { + return everyArray(search, (item) => { + return has(source, item); + }); + } + return every(search, (item) => { + return has(source, item); + }); + } + if (isArray(source)) { + if (isRegex(search)) { + return everyArray(source, (item) => { + return item.test(search); + }); + } + if (isFunction(search)) { + return everyArray(source, search); + } + if (isArray(search)) { + return everyArray(search, (item) => { + return has(source, item); + }); + } + return source.includes(search, position); + } + if (isPlainObject(source)) { + if (isRegex(search)) { + return everyObject(source, (item) => { + return item.test(search); + }); + } + if (isFunction(search)) { + return everyObject(source, search); + } + if (isPlainObject(search)) { + return everyObject(source, (item, key) => { + return item === search[key]; + }); + } + return everyObject(source, (item) => { + return has(item, search); + }); + } + return false; + } + + /** + * Checks if the string has a '.'. + * + * @function hasDot + * @category utility + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { hasDot, assert } from '@universalweb/acid'; + * assert(hasDot('test.js'), true); + */ + const hasDot = regexTestFactory(/\./); + + /** + * Checks if a property on an object has a value. If not, it will assign a value. + * + * @function ifNotAssign + * @category utility + * @type {Function} + * @param {Object} rootObject - The object to check. + * @param {String} property - The property name which is to be checked. + * @param {*} equalThis - The reassignment value for the property being checked. + * @returns {Object} - Returns the provided rootObject. + * + * @example + * import { ifNotAssign, assert } from '@universalweb/acid'; + * assert(ifNotAssign({}, 'a', 1), {a:1}); + */ + const ifNotAssign = (rootObject, property, equalThis) => { + if (property && !hasValue(rootObject[property])) { + rootObject[property] = equalThis; + } + return rootObject; + }; + + class Intervals { + list = construct(Map); + construct() {} + /** + * Remove a setInterval that was created using the intervals function. + * + * @param {Number} id - The id of the setInterval to remove. + * @returns {undefined} - Returns nothing. + * + * @example + * timer(() => {}, 100); + * // => 0 + */ + remove(id) { + clearInterval(id); + this.list.delete(id); + } + has(id) { + return this.list.has(id); + } + get(id) { + return this.list.get(id); + } + /** + * Create a setInterval & add it to the list of interval timers. + * + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setTimeoutId ID. + * + * @example + * timers.set(() => {}, 100); + * // => 0 + */ + set(callable, time) { + const id = setInterval(() => { + callable(); + }, time); + this.list.set(id, true); + return id; + } + /** + * Clear all active setIntervals. + * + * @returns {undefined} - Returns undefined. + * + * @example + * intervals.clear(); + * // => undefined + */ + clear() { + const currentThis = this; + currentThis.list.forEach((id) => { + currentThis.remove(id); + }); + } + } + const intervals = construct(Intervals); + /** + * Create an interval timer. + * + * @function interval + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setInterval ID. + * + * @example + * interval(() => {}, 100); + * // => 0 + */ + function interval(callable, time) { + return intervals.set(callable, time); + } + /** + * Clear all active interval timers. + * + * @function clearIntervals + * @category function + * @returns {undefined} - Returns undefined. + * + * @example + * clearIntervals(); + * // => undefined + */ + function clearIntervals() { + const id = setTimeout(noop, 0); + times(id, (index) => { + intervals.remove(index); + }); + } + + function merge(target, ...sources) { + each(sources, (currentSource) => { + each(currentSource, (sourceItem, sourceKey) => { + if (target[sourceKey]) { + if ( + isPlainObject(sourceItem) || + isArray(sourceItem) || + sourceItem.forEach + ) { + return merge(target[sourceKey], sourceItem); + } + } + target[sourceKey] = sourceItem; + }); + }); + return target; + } + + /** + * Returns the model with the given name. + * + * @function Model + * @type {Class} + * @category utility + * @param {String} modelName - The name of the model to return. + * @param {*} modelSource - The value of the model to return. + * @returns {Model} - The model with the given name. + * + * @example + * import { Model, model, assert } from '@universalweb/acid'; + * const test = new Model('test', {a: 1}); + * assert(model('test'), {a: 1}); + */ + class Model { + static models = new Map(); + constructor(modelName, modelSource) { + if (hasValue(modelSource)) { + assign(this, modelSource); + this.modelName = modelName; + Model.models.set(modelName, modelSource); + } else { + assign(this, modelName); + } + } + delete(modelName) { + Model.models.delete(modelName || this.modelName); + } + set(modelName) { + if (modelName) { + this.modelName = modelName; + } + Model.models.set(modelName || this.modelName, this); + } + has(modelName) { + return Model.models.has(modelName || this.modelName); + } + get(modelName) { + return Model.models.get(modelName || this.modelName); + } + } + /** + * Set & Get a model. + * + * @function model + * @type {Function} + * @category utility + * @param {String} modelName - Name of the model. + * @param {Object} modelSource - The model object. + * @returns {Model} - Returns the associated model. + * + * @example + * import { model, assert } from '@universalweb/acid'; + * model('test', {a: 1}); + * assert(model('test'), {a: 1}); + */ + function model(modelName, modelSource) { + if (hasValue(modelSource)) { + return construct(Model, [modelName, modelSource]); + } + return get(modelName, Model.models); + } + + /** + * Takes the first two arguments given and returns them inside a new array. + * + * @function pair + * @category utility + * @param {*} argument1 - The source object. + * @param {*} argument2 - The source object. + * @returns {Array} The array which holds the pair. + * + * @example + * import { pair, assert } from '@universalweb/acid'; + * assert(air(1, 2), [1, 2]); + */ + function pair(argument1, argument2) { + return [argument1, argument2]; + } + + /** + * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee. + * + * @function concurrentStatus + * @category utility + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The array from Promise.allSettled. + * + * @example + * import { concurrentStatus, assert } from '@universalweb/acid'; + * const tempList = []; + * await concurrentStatus([1, 2], async (item) => { + * return item; + * }); + * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]); + */ + function concurrentStatus(source, iteratee, additionalArgument) { + const arrayLength = source.length; + const queue = []; + for (let index = 0; index < arrayLength; index++) { + queue[index] = iteratee( + source[index], + index, + source, + arrayLength, + additionalArgument, + ); + } + return Promise.allSettled(queue); + } + + /** + * A wrapper around the promise constructor. + * + * @function promise + * @type {Function} + * @category utility + * @param {Function} callback - Function to be called back. + * @returns {Promise} - A constructor with a callback function.). + * + * @example + * promise((a) => {}); + * // => Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined} + */ + function promise(callback) { + return new Promise(callback); + } + + /** + * Using a deep comparison it checks if properties of two objects using an array are equal. + * + * @function propertyMatch + * @type {Function} + * @category utility + * @param {Object} source - The source object to compare. + * @param {Object} compared - Object to be compared to source. + * @param {Array} properties - List of properties to compare defaults to keys(source). + * @returns {Array} - Returns an array of properties. + * + * @example + * import { propertyMatch, assert } from '@universalweb/acid'; + * assert(propertyMatch({ + * a: 1, + * b: 2 + * }, { + * a: 1, + * b: 2 + * }, ['a', 'b']), true); + */ + const propertyMatch = (source, compared, properties = keys(source)) => { + return everyArray(properties, (property) => { + return isEqual(source[property], compared[property]); + }); + }; + + function setKey(source, key, value) { + if (key && isPlainObject(source)) { + source[key] = value; + } else if (isNumber(key) && isArray(source)) { + source[key] = value; + } else if (source.set) { + source.set(key, value); + } else if (source.push) { + source.push(value); + } else if (source.add) { + source.add(value); + } else { + source[key] = value; + } + return source; + } + + function setValue(source, value, key) { + if (isNumber(key) && isArray(source)) { + source[key] = value; + } else if (source.push) { + source.push(value); + } else if (source.add) { + source.add(value); + } else { + source[key] = value; + } + return source; + } + + class Store { + source; + constructor(source = {}) { + this.source = source; + if (source === null || typeof source !== "object") { + return source; + } + eachObject(source, (property) => { + source[property] = new Store(source[property]); + }); + this.data = new Proxy(source, { + get(proxySource, property) { + console.log(proxySource, property, proxySource[property]); + return proxySource[property]; + }, + set(proxySource, property, value) { + console.log(proxySource, property, proxySource[property]); + proxySource[property] = new Store(value); + return true; + }, + }); + } + } + + /** + * This method returns a new empty array. + * + * @function stubArray + * @category utility + * @type {Function} + * @returns {Array} - Returns the new empty array. + * + * @example + * import { stubArray, assert } from '@universalweb/acid'; + * assert(stubArray(), []); + */ + function stubArray() { + return []; + } + + /** + * This method returns false. + * + * @function stubFalse + * @category utility + * @type {Function} + * @returns {Boolean} - Returns false. + * + * @example + * import { stubFalse, assert } from '@universalweb/acid'; + * assert(stubFalse(), false); + */ + function stubFalse() { + return false; + } + + /** + * This method returns a new empty object. + * + * @function stubObject + * @category utility + * @type {Function} + * @returns {Object} - Returns the new empty object. + * + * @example + * import { stubObject, assert } from '@universalweb/acid'; + * assert(stubObject(), {}); + */ + const stubObject = () => { + return {}; + }; + + /** + * This method returns a new empty string. + * + * @function stubString + * @category utility + * @type {Function} + * @returns {String} - Returns the new empty string. + * + * @example + * import { stubString, assert } from '@universalweb/acid'; + * assert(stubString(), ''); + */ + const stubString = () => { + return ""; + }; + + /** + * This method returns true. + * + * @function stubTrue + * @category utility + * @type {Function} + * @returns {Boolean} - Returns true. + * + * @example + * import { stubTrue, assert } from '@universalweb/acid'; + * assert(stubTrue(), true); + */ + const stubTrue = () => { + return true; + }; + + /** + * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument. + * + * @async + * @function timesAsync + * @category utility + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @returns {undefined} - Nothing. + * + * @example + * import { timesAsync } from '@universalweb/acid'; + * await timesAsync(3, async (item) => { + * console.log(item); + * }); + * // 0 + * // 1 + * // 2 + * // => undefined + */ + async function timesAsync(amount, iteratee) { + for (let index = 0; index < amount; index++) { + await iteratee(amount); + } + } + /** + * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array. + * + * @async + * @function timesMapAsync + * @category array + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @param {Array} [results = []] - Array that will have iteratee return pushed to. + * @returns {Array} - An array with iteratee's returned values. + * + * @example + * import { timesMapAsync } from '@universalweb/acid'; + * await timesMapAsync(3, (item) => { + * return item; + * }); + * // => [0, 1, 2] + */ + async function timesMapAsync(amount, iteratee, results = []) { + for (let index = 0; index < amount; index++) { + results[index] = await iteratee(amount); + } + return results; + } + + /** + * Performs a toggle between 2 values using a deep or strict comparison. + * + * @function toggle + * @type {Function} + * @category utility + * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments. + * @param {(string|number|Object|Array)} on - The first object to be compared to. + * @param {(string|number|Object|Array)} off - The second object to be compared to. + * @returns {(string|number|Object|Array)} - The opposing value to the current. + * + * @example + * import { toggle } from '@universalweb/acid'; + * let toggleMe = true; + * toggleMe = toggle(toggleMe, true, false); + * // => false + */ + function toggle(value, on = true, off = false) { + return isEqual(on, value) ? off : on; + } + + /** + * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available. + * + * @class UniqID + * @type {Class} + * @category utility + * @returns {UniqID} - Returns a new instance of UniqID. + * + * @example + * import { UniqID, construct, assert } from '@universalweb/acid'; + * const gen = construct(UniqID); + * assert(gen.get(), 0); + * assert(gen.get(), 1); + * gen.free(0); + * assert(gen.get(), 0); + */ + class UniqID { + totalActive = 0; + freed = []; + totalFree = 0; + /** + * Generates a new ID or recycle one that is no longer used. + * + * @function get + * @class UniqID + * @category utility + * @type {Function} + * @returns {Number} - Returns a unique id. + * + * @example + * import { UniqID, construct, assert } from '@universalweb/acid'; + * const gen = construct(UniqID); + * assert(gen.get(), 0); + */ + get() { + let result = this.freed.shift(); + if (hasValue(result)) { + this.totalFree--; + } else { + result = this.totalActive; + this.totalActive++; + } + return result; + } + /** + * Frees an UID so that it may be recycled for later use. + * + * @function free + * @class UniqID + * @category utility + * @type {Function} + * @param {Number} id - Number to be freed. + * @returns {undefined} - Nothing is returned. + * + * @example + * import { UniqID, construct, assert } from '@universalweb/acid'; + * const gen = construct(UniqID); + * assert(gen.get(), 0); + * gen.free(0); + * assert(gen.get(), 0); + */ + free(id) { + this.freed.push(id); + this.totalFree++; + const isActive = this.totalActive > 0; + const shouldReset = this.totalActive === this.totalFree; + if (isActive && shouldReset) { + this.reset(); + } + } + reset() { + this.totalActive = 0; + this.freed.length = 0; + this.totalFree = 0; + } + } + /** + * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available. + * + * @function uniqID + * @category utility + * + * @example + * import { uniqID, assert } from '@universalweb/acid'; + * assert(uniqID.get(), 0); + * assert(uniqID.get(), 1); + * uniqID.free(0); + * assert(uniqID.get(), 0); + */ + const uniqID = construct(UniqID); + + /** + * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. + * + * @function VirtualStorage + * @category utility + * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. + * @returns {*} - Returns a new VirtualStorage Object. + * + * @example + * import { VirtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = new VirtualStorage(); + * // => New VirtualStorage Object + */ + class VirtualStorage { + constructor(initialObject = new Map()) { + this.items = initialObject; + } + /** + * Get an item from a virtual storage object. + * + * @param {String} key - The key used to store the data. + * @returns {undefined} - Returns undefined. + * + * @example + * import { VirtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = virtualStorage(); + * myVirtualStorage.setItem('key', 'value'); + * myVirtualStorage.getItem('key'); + * // => 'value' + */ + getItem(key) { + if (this.isMap) { + return this.items.get(key); + } else { + return this.items[key]; + } + } + get(...args) { + return this.getItem(...args); + } + hasItem(key) { + if (this.isMap) { + return this.items.has(key); + } else { + return hasValue(this.items[key]); + } + } + has(...args) { + return this.hasItem(...args); + } + /** + * Save an item to a virtual storage object. + * + * @param {String} key - The key used to store the data. + * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify. + * @returns {undefined} - Returns undefined. + * + * @example + * import { VirtualStorage, assert } from '@universalweb/acid'; + * const vStorage = new VirtualStorage(); + * vStorage.setItem('title', 'value'); + * assert(vStorage.getItem('title'), 'value'); + */ + setItem(key, value) { + if (this.isMap) { + this.items.set(key, value); + } else { + this.items[key] = value; + } + return this; + } + set(...args) { + return this.setItem(...args); + } + /** + * Clears all data from the virtual storage object by replacing with a new object. + * + * @returns {undefined} - Returns undefined. + * + * @example + * import { virtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = virtualStorage(); + * myVirtualStorage.setItem('key', 'value'); + * myVirtualStorage.clear(); + * myVirtualStorage.getItem('key'); + * // => undefined + */ + clear() { + if (this.isMap) { + this.items.clear(); + } else { + this.items = cloneType(this.items); + } + return this; + } + /** + * Remove an item from a virtual storage object. + * + * @param {String} key - The key used to remove data. + * @returns {undefined} - Returns undefined. + * + * @example + * import { virtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = virtualStorage(); + * myVirtualStorage.setItem('key', 'value'); + * myVirtualStorage.removeItem('key'); + * myVirtualStorage.getItem('key'); + * // => undefined + */ + removeItem(key) { + if (this.isMap) { + this.items.delete(key); + } else { + this.items[key] = null; + } + return this; + } + remove(...args) { + return this.removeItem(...args); + } + } + /** + * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. + * + * @function virtualStorage + * @category browser + * @type {Function} + * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. + * @returns {*} - Returns a new VirtualStorage Object. + * + * @example + * import { virtualStorage, assert } from '@universalweb/acid'; + * const vStorage = virtualStorage(); + * vStorage.setItem('title', 'value'); + * assert(vStorage.getItem('title'), 'value'); + */ + function virtualStorage(initialObject) { + return new VirtualStorage(initialObject); + } + + /** + * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object. + * + * @function inAsync + * @type {Function} + * @category Utility + * @async + * @param {Array} source - Array of async functions that will be looped through. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. + * @returns {Object} - The originally given array. + * + * @example + * import { inAsync, assert } from '@universalweb/acid'; + * const list = []; + * await inAsync([async (firstArgument, item, index) => { + * list.push(index + firstArgument.a); + * }, async (firstArgument, item, index) => { + * list.push(index); + * }], {a:1}); + * assert(list, [1, 1]); + */ + async function inAsync(source, thisBind, ...args) { + const arrayLength = source.length; + const results = []; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = await source[index].call( + thisBind, + ...args, + index, + callable, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = await source[index](...args, index, callable); + } + } + return results; + } + + /** + * Invoke an array of functions. + * + * @function inSync + * @category Utility + * @type {Function} + * @param {Array} source - Array of functions that will be looped through. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function. + * @returns {undefined} - Returns undefined. + * + * @example + * inSync([() => {console.log(1);}, () => {console.log(2);}]); + * // 1 + * // 2 + * // => undefined + */ + function inSync(source, thisBind, ...args) { + const arrayLength = source.length; + const results = []; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = callable.call(thisBind, ...args, index, callable); + } + } else { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = callable(...args, index, callable); + } + } + return results; + } + + /** + * Checks to see of the browser agent has a string. + * + * @function isAgent + * @category browser + * @type {Function} + * @param {String} source - The string to search for. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isAgent, assert } from '@universalweb/acid'; + * assert(isAgent('NotThere'), false); + */ + function isAgent(source) { + return hasValue(source) ? isAgent[source] : keys(isAgent); + } + const userAgent = globalThis.navigator?.userAgentData; + if (userAgent) { + eachObject(userAgent, (value, key) => { + if (isBoolean(value) && value) { + isAgent[key] = value; + } + }); + eachArray(userAgent.brands, (value) => { + isAgent[value.brand] = value.version; + }); + } else if (navigator.userAgent) { + let userAgentNormalized = navigator.userAgent.toLowerCase(); + userAgentNormalized = userAgentNormalized.replace(/_/g, "."); + userAgentNormalized = userAgentNormalized.replace(/[#_,;()]/g, ""); + const userAgentSplit = userAgentNormalized.split(/ |\//); + eachArray(userAgentSplit, (item) => { + isAgent[item] = true; + }); + } + + /** + * Attaches an event listener to a node. + * + * @function eventAdd + * @category browser + * @type {Function} + * @param {Node} node - Given node. + * @param {String} eventName - A string representing the event type. + * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs. + * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation. + * @returns {Node} - Returns given node. + * + * @example + * eventAdd(document.body, 'click', () => {console.log('CLICKED');}); + * // = > document.body + */ + function eventAdd(node, eventName, callback, useCapture) { + node.addEventListener(eventName, callback, useCapture); + return node; + } + /** + * Attaches an event listener to a node. + * + * @function eventRemove + * @category browser + * @type {Function} + * @param {Node} node - Given node. + * @param {String} eventName - A string representing the event type. + * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs. + * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation. + * @returns {Node} - Returns given node. + * + * @example + * eventRemove(document.body, () => {console.log('CLICKED');}); + * // = > Undefined + */ + function eventRemove(node, eventName, callback, useCapture) { + node.removeEventListener(eventName, callback, useCapture); + return node; + } + + /** + * Checks if the keycode of the event is strictly equal to 13. + * + * @function isEnter + * @category browser + * @type {Function} + * @param {Object} eventObject - Object to be checked. + * @returns {Boolean} - Returns true if the keycode property of the object equals 13. + * + * @example + * isEnter('click'); + * // => false + */ + function isEnter(eventObject) { + return eventObject.keyCode === 13; + } + + /** + * Create a document fragment. + * + * @function createFragment + * @category browser + * @type {Function} + * @ignore + * @returns {Fragment} - Returns a new document fragment. + */ + const createFragment = document.createDocumentFragment.bind(document); + + /** + * Append a DOM node. + * + * @function append + * @category browser + * @ignoreTest + * @type {Function} + * @ignore + * @param {Node} parentNode - The parent node. + * @param {Node} child - The node to be appended. + * @returns {undefined} - Returns the child. + */ + function append(parentNode, child) { + parentNode.appendChild(child); + return child; + } + + /** + * Assign attributes to a DOM node. + * + * @function nodeAttribute + * @category browser + * @ignoreTest + * @type {Function} + * @async + * @param {Node} node - The DOM node. + * @param {Object|Array} object - Object with key being the attribute name and the value being the attribute value. If an array is given it will get the values corresponding to the array items. + * @returns {Object|Node} - If using an array this returns an object of attribute names as keys and their values as the property value. If using an object this will return the provided node. + * + * @example + * nodeAttribute(document.body, { 'data-example': 'test'}); + */ + function nodeAttribute(node, object) { + if (isArray(object)) { + return zipObject( + object, + mapArray(object, (item) => { + return node.getAttribute(item); + }), + ); + } + eachObject(object, (item, key) => { + node.setAttribute(key, item); + }); + return node; + } + + const dotString = "."; + const poundString = "#"; + const classTest = /^.[\w_-]+$/; + const tagTest = /^[A-Za-z]+$/; + const regexSpace = /\s/; + /** + * Wrapper around getElementsByClassName. + * + * @function getByClass + * @category browser + * @ignoreTest + * @type {Function} + */ + const getByClass = document.getElementsByClassName.bind(document); + /** + * Wrapper around getElementsByTagName. + * + * @function getByTag + * @category browser + * @ignoreTest + * @type {Function} + */ + const getByTag = document.getElementsByTagName.bind(document); + /** + * Wrapper around getElementsByIdName. + * + * @function getById + * @category browser + * @ignoreTest + * @type {Function} + */ + const getById = document.getElementById.bind(document); + /** + * Wrapper around querySelector. + * + * @function querySelector + * @category browser + * @ignoreTest + * @type {Function} + */ + const querySelector = document.querySelector.bind(document); + /** + * Wrapper around querySelectorAll. + * + * @function querySelectorAll + * @category browser + * @ignoreTest + * @type {Function} + */ + const querySelectorAll = document.querySelectorAll.bind(document); + /** + * Returns relevant DOM node. + * + * @function selector + * @category browser + * @ignoreTest + * @param {String} select - String to be evaluated. + * @type {Function} + * @returns {Node} - Returns a DOM node. + * + * @example + * selector('#node'); + * // =>
+ */ + function selector(select) { + const firstLetter = select[0]; + switch (firstLetter) { + case poundString: { + if (!regexSpace.test(select)) { + return getById(restString(select)); + } + break; + } + case dotString: { + if (classTest.test(select)) { + return getByClass(restString(select)); + } + break; + } + default: { + if (tagTest.test(select)) { + return getByTag(select); + } + } + } + return querySelectorAll(select); + } + + const createElementCache = document.createElement.bind(document); + const nodeAttachLoadingEvents = (node) => { + return promise((accept) => { + eventAdd(node, "load", accept, true); + eventAdd(node, "error", accept, true); + append(querySelector("head"), node); + }); + }; + /** + * Asynchronously import a js file and append it to the head node. + * If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity. + * + * @function importjs + * @category browser + * @type {Function} + * @async + * @param {*} url - URL of the script to import. If not "." is found in the file name ".js" will be appended. + * @returns {Promise} - Returns a promise which returns a "load" or "error" event associated with the script. + * + * @example + * importjs('core.js'); + * importjs('core'); + */ + function importjs(url) { + const src = (hasDot(url) && url) || `${url}.js`; + const node = nodeAttribute(createElementCache("script"), { + async: "", + src, + }); + return nodeAttachLoadingEvents(node); + } + + /** + * Runs a function if the document has finished loading. If not, add an eventlistener. + * + * @function isDocumentReady + * @category browser + * @ignoreTest + * @type {Function} + * @param {Function} callable - Function to be run. + * @returns {Boolean|Function} - If the document is ready, returns a function. If not, return false. + * + * @example + * isDocumentReady(() => {return 1}); + * // => 1 + */ + function isDocumentReady(callable) { + const state = document.readyState; + const checkStatus = + state === "interactive" || state === "completed" || state === "complete"; + if (checkStatus) { + return callable ? callable() : true; + } + if (callable) { + eventAdd(document, "DOMContentLoaded", callable); + } + return false; + } + isDocumentReady(() => { + const scriptTag = getById("AcidLib"); + const scriptName = + (scriptTag && scriptTag.getAttribute("data-index")) || "/index"; + importjs(scriptName); + }); + + const protocol = location.protocol; + const protocolSocket = protocol === "http:" ? "ws" : "wss"; + const hostname = location.hostname; + /** + * Holds client hardware, browser, and host info. + * + * @memberof $ + * @category browser + * @ignoreTest + * @property {Object} info - Client hardware & host info. + * @type {Object} + */ + const info = { + hardware: { + cores: navigator.hardwareConcurrency, + }, + host: { + name: hostname, + protocol, + protocolSocket, + }, + }; + + function saveDimensions() { + assign(info, { + bodyHeight: document.body.offsetHeight, + bodyWidth: document.body.offsetWidth, + windowHeight: window.innerHeight, + windowWidth: window.innerWidth, + }); + } + /** + * Save current document & window dimensions to the info property. + * + * @function updateDimensions + * @category browser + * @ignoreTest + * @type {Function} + * @returns {undefined} - Returns undefined. + * + * @example + * updateDimensions(); + */ + function updateDimensions() { + saveDimensions(); + } + isDocumentReady(updateDimensions); + eventAdd(window, "load", updateDimensions, true); + eventAdd(window, "resize", updateDimensions, true); + + /** + * LocalStorage Module.. + * + * @module browser/storage + */ + exports.hasLocal = void 0; + function hasStorage(storeCheck) { + try { + storeCheck().removeItem("TESTING"); + exports.hasLocal = true; + } catch (e) { + exports.hasLocal = false; + } + } + hasStorage(() => { + return localStorage; + }); + /** + * Constructs a virtual storage container with localStorage support. + * BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported. + * If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed. + * BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed. + * + * @class BrowserStorage + * @category browser + * @returns {BrowserStorage} - Returns a new instance of BrowserStorage. + * + * @example + * import { BrowserStorage, construct, assert } from '@universalweb/acid'; + * const storageBrowserStorage = construct(BrowserStorage); + * storageBrowserStorage.setItem('key', 'value'); + * assert(storageBrowserStorage.getItem('key'), 'value'); + */ + class BrowserStorage { + constructor(initialObject) { + if (this.hasLocal) { + this.local = localStorage; + } + this.storage = virtualStorage(initialObject); + } + hasLocal = exports.hasLocal; + /** + * Save an item to a browserStorage. + * + * @function setItem + * @class BrowserStorage + * @category browser + * @param {String} key - The key used to store the data. + * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify. + * @returns {undefined} - Returns undefined. + * + * @example + * import { BrowserStorage, construct, assert } from '@universalweb/acid'; + * const storageBrowserStorage = construct(BrowserStorage); + * storageBrowserStorage.setItem('key', 'value'); + * assert(storageBrowserStorage.getItem('key'), 'value'); + */ + setItem(key, value) { + if (this.hasLocal) { + this.local.setItem(key, isString(value) ? value : stringify(value)); + } + return this.storage.setItem(key, value); + } + /** + * Get an item from a browserStorage. + * + * @function getItem + * @class BrowserStorage + * @category browser + * @param {String} key - The key used to store the data. + * @returns {undefined} - Returns undefined. + * + * @example + * import { BrowserStorage, construct, assert } from '@universalweb/acid'; + * const storageBrowserStorage = construct(BrowserStorage); + * storageBrowserStorage.setItem('key', 'value'); + * assert(storageBrowserStorage.getItem('key'), 'value'); + */ + getItem(key) { + const item = this.storage.getItem(key); + if (hasValue(item)) { + return item; + } + if (!hasValue(item) && this.hasLocal) { + return this.local.getItem(key); + } + } + /** + * Clears all data for the browserStorage including all of localStorage if supported. + * + * @function clear + * @class BrowserStorage + * @category browser + * @returns {undefined} - Returns undefined. + * + * @example + * import { BrowserStorage, construct, assert } from '@universalweb/acid'; + * const storageBrowserStorage = construct(BrowserStorage); + * storageBrowserStorage.setItem('key', 'value'); + * assert(storageBrowserStorage.getItem('key'), 'value'); + * storageBrowserStorage.clear(); + * assert(storageBrowserStorage.getItem('key'), undefined); + */ + clear() { + if (this.hasLocal) { + this.local.clear(); + } + this.storage.clear(); + } + /** + * Remove an item from a browserStorage. + * + * @class BrowserStorage + * @category browser + * @function removeItem + * @param {String} key - The key used to remove data. + * @returns {undefined} - Returns undefined. + * + * @example + * import { BrowserStorage, construct, assert } from '@universalweb/acid'; + * const storageBrowserStorage = construct(BrowserStorage); + * storageBrowserStorage.setItem('key', 'value'); + * assert(storageBrowserStorage.getItem('key'), 'value'); + * storageBrowserStorage.removeItem('key'); + * assert(storageBrowserStorage.getItem('key'), undefined); + */ + removeItem(key) { + if (this.hasLocal) { + this.local.removeItem(key); + } + this.storage.removeItem(key); + } + } + /** + * The browserStorage function is a factory which wraps the BrowserStorage class constructor. + * + * @function browserStorage + * @category browser + * @type {Function} + * @returns {*} - Returns a new BrowserStorage Object. + * + * @example + * const storageBrowserStorage = browserStorage(); + * // => New BrowserStorage Object + */ + function browserStorage(virtualFlag) { + return new BrowserStorage(virtualFlag); + } + + const generateTheme = (color, bg) => { + return `color:${color};background:${bg};`; + }; + const themes = { + alert: generateTheme("#fff", "#f44336"), + important: generateTheme("#fff", "#E91E63"), + notify: generateTheme("#fff", "#651FFF"), + warning: generateTheme("#000", "#FFEA00"), + }; + /** + * Console.trace wrapper with theme support. + * + * @function cnsl + * @category browser + * @ignoreTest + * @type {Function} + * @param {Object} value - The value to be logged. + * @param {String} themeName - The name of the theme to be used. + * @returns {undefined} - Returns undefined. + * + * @example + * cnsl('Lucy', 'notify'); + * // 'Lucy' + */ + const cnsl = (value, themeName) => { + const data = isString(value) ? value : stringify(value); + if (themeName === "alert" || themeName === "warning") { + return console.trace( + `%c${data}`, + `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`, + ); + } + console.log( + `%c${data}`, + `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`, + ); + }; + /** + * Create color themes for cnsl method. + * + * @function cnslTheme + * @category browser + * @ignoreTest + * @type {Function} + * @param {String} themeName - The name of the theme. + * @param {String} color - The text color. + * @param {String} background - The background color of the block. + * @returns {undefined} - Returns undefined. + * + * @example + * cnslTheme('BlackNWhite', '#fff', '#000'); + */ + const cnslTheme = (themeName, color, background) => { + themes[themeName] = generateTheme(color, background); + }; + + /** + * Checks if value is a plain DOM Node. + * + * @function isDom + * @category browser + * @ignoreTest + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isDom, assert } from '@universalweb/acid'; + * assert(isDom(document.querySelectorAll('head')), true); + */ + function isDom(source) { + return source && source.nodeType !== 9; + } + /** + * Checks if the value is a HTMLCollection. + * + * @function isHTMLCollection + * @category browser + * @ignoreTest + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isHTMLCollection, assert } from '@universalweb/acid'; + * document.body.innerHTML = '
'; + * assert(isHTMLCollection(document.getElementsByClassName('test')), true); + */ + const objectHTMLCollection = "[object HTMLCollection]"; + function isHTMLCollection(source) { + return hasValue(source) + ? source.toString() === objectHTMLCollection + : false; + } + /** + * Checks if the value is a NodeList. + * + * @function isNodeList + * @category browser + * @ignoreTest + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNodeList, assert } from '@universalweb/acid'; + * document.body.innerHTML = '
'; + * assert(isNodeList(document.querySelectorAll('.test')), true); + */ + const objectNodeList = "[object NodeList]"; + function isNodeList(source) { + return hasValue(source) ? source.toString() === objectNodeList : false; + } + + exports.BrowserStorage = BrowserStorage; + exports.Chain = Chain; + exports.Intervals = Intervals; + exports.Model = Model; + exports.Store = Store; + exports.Timers = Timers; + exports.UniqID = UniqID; + exports.VirtualStorage = VirtualStorage; + exports.add = add; + exports.after = after; + exports.append = append; + exports.apply = apply; + exports.arrayToRegex = arrayToRegex; + exports.arraysToObject = arraysToObject; + exports.ary = ary; + exports.assert = assert; + exports.assertAsync = assertAsync; + exports.assign = assign; + exports.assignToClass = assignToClass; + exports.assignToObject = assignToObject; + exports.before = before; + exports.bindAll = bindAll; + exports.browserStorage = browserStorage; + exports.cacheNativeMethod = cacheNativeMethod; + exports.calcProgress = calcProgress; + exports.camelCase = camelCase; + exports.chain = chain; + exports.chunk = chunk; + exports.chunkString = chunkString; + exports.clear = clear; + exports.clearArray = clearArray; + exports.clearBuffer = clearBuffer; + exports.clearIntervals = clearIntervals; + exports.clearTimers = clearTimers; + exports.clone = clone; + exports.cloneArray = cloneArray; + exports.cloneType = cloneType; + exports.cnsl = cnsl; + exports.cnslTheme = cnslTheme; + exports.compact = compact; + exports.compactKeys = compactKeys; + exports.compactMap = compactMap; + exports.compactMapArray = compactMapArray; + exports.compactMapAsyncArray = compactMapAsyncArray; + exports.compactMapAsyncObject = compactMapAsyncObject; + exports.compactMapObject = compactMapObject; + exports.concurrent = concurrent; + exports.concurrentEachArray = concurrentEachArray; + exports.concurrentStatus = concurrentStatus; + exports.construct = construct; + exports.constructorName = constructorName; + exports.countBy = countBy; + exports.countKey = countKey; + exports.countWithoutKey = countWithoutKey; + exports.createFragment = createFragment; + exports.curry = curry; + exports.curryRight = curryRight; + exports.debounce = debounce; + exports.deduct = deduct; + exports.defProp = defProp; + exports.difference = difference; + exports.divide = divide; + exports.drop = drop; + exports.dropRight = dropRight; + exports.each = each; + exports.eachArray = eachArray; + exports.eachAsyncArray = eachAsyncArray; + exports.eachAsyncObject = eachAsyncObject; + exports.eachObject = eachObject; + exports.eachRight = eachRight; + exports.eachRightAsync = eachRightAsync; + exports.ensureArray = ensureArray; + exports.ensureBuffer = ensureBuffer; + exports.equalsZero = isZero; + exports.escapeRegex = escapeRegex; + exports.escapeRegexRegex = escapeRegexRegex; + exports.eventAdd = eventAdd; + exports.eventRemove = eventRemove; + exports.every = every; + exports.everyArg = everyArg; + exports.everyArray = everyArray; + exports.everyAsyncArray = everyAsyncArray; + exports.everyAsyncObject = everyAsyncObject; + exports.everyObject = everyObject; + exports.extendClass = extendClass; + exports.filter = filter; + exports.filterArray = filterArray; + exports.filterAsyncArray = filterAsyncArray; + exports.filterAsyncObject = filterAsyncObject; + exports.filterObject = filterObject; + exports.findIndex = findIndex; + exports.findIndexCache = findIndexCache; + exports.findItem = findItem; + exports.first = first; + exports.flatten = flatten; + exports.flattenDeep = flattenDeep; + exports.flow = flow; + exports.flowAsync = flowAsync; + exports.flowAsyncRight = flowAsyncRight; + exports.flowRight = flowRight; + exports.forEach = forEach; + exports.forEachAsync = forEachAsync; + exports.forMap = forMap; + exports.forOf = forOf; + exports.forOfAsync = forOfAsync; + exports.forOfCompactMap = forOfCompactMap; + exports.forOfCompactMapAsync = forOfCompactMapAsync; + exports.forOfEvery = forOfEvery; + exports.forOfEveryAsync = forOfEveryAsync; + exports.forOfFilter = forOfFilter; + exports.forOfFilterAsync = forOfFilterAsync; + exports.forOfMap = forOfMap; + exports.forOfMapAsync = forOfMapAsync; + exports.generateLoop = generateLoop; + exports.get = get; + exports.getByClass = getByClass; + exports.getById = getById; + exports.getByTag = getByTag; + exports.getEntries = getEntries; + exports.getFileExtension = getFileExtension; + exports.getFilename = getFilename; + exports.getHighest = getHighest; + exports.getLowest = getLowest; + exports.getNumberInsertIndex = getNumberInsertIndex; + exports.getPropDesc = getPropDesc; + exports.getPropNames = getPropNames; + exports.getType = getType; + exports.getTypeName = getTypeName; + exports.groupBy = groupBy; + exports.has = has; + exports.hasAnyKeys = hasAnyKeys; + exports.hasDot = hasDot; + exports.hasKeys = hasKeys; + exports.hasLength = hasLength; + exports.hasProp = hasProp; + exports.hasValue = hasValue; + exports.htmlEntities = htmlEntities; + exports.ifInvoke = ifInvoke; + exports.ifNotAssign = ifNotAssign; + exports.ifValue = ifValue; + exports.importjs = importjs; + exports.inAsync = inAsync; + exports.inSync = inSync; + exports.increment = increment; + exports.indexBy = indexBy; + exports.info = info; + exports.initial = initial; + exports.initialString = initialString; + exports.insertInRange = insertInRange; + exports.intersection = intersection; + exports.interval = interval; + exports.intervals = intervals; + exports.invert = invert; + exports.invokeArray = invokeArray; + exports.invokeCollection = invokeCollection; + exports.invokeCollectionAsync = invokeCollectionAsync; + exports.isAgent = isAgent; + exports.isArguments = isArguments; + exports.isArray = isArray; + exports.isArrayBuffer = isArrayBuffer; + exports.isArrayBufferCall = isArrayBufferCall; + exports.isArrayLike = isArrayLike; + exports.isAsync = isAsync; + exports.isAsyncCall = isAsyncCall; + exports.isBigInt = isBigInt; + exports.isBigIntCall = isBigIntCall; + exports.isBoolean = isBoolean; + exports.isBooleanCall = isBooleanCall; + exports.isBuffer = isBuffer; + exports.isBufferCall = isBufferCall; + exports.isChild = isChild; + exports.isCloneable = isCloneable; + exports.isConstructor = isConstructor; + exports.isConstructorFactory = isConstructorFactory; + exports.isConstructorNameFactory = isConstructorNameFactory; + exports.isDate = isDate; + exports.isDateCall = isDateCall; + exports.isDeno = isDeno; + exports.isDocumentReady = isDocumentReady; + exports.isDom = isDom; + exports.isEmpty = isEmpty; + exports.isEnter = isEnter; + exports.isEqual = isEqual; + exports.isEven = isEven; + exports.isF32 = isF32; + exports.isF32Call = isF32Call; + exports.isF64 = isF64; + exports.isF64Call = isF64Call; + exports.isFalse = isFalse; + exports.isFalsy = isFalsy; + exports.isFileCSS = isFileCSS; + exports.isFileHTML = isFileHTML; + exports.isFileJS = isFileJS; + exports.isFileJSON = isFileJSON; + exports.isFloat = isFloat; + exports.isFunction = isFunction; + exports.isGenerator = isGenerator; + exports.isGeneratorCall = isGeneratorCall; + exports.isHTMLCollection = isHTMLCollection; + exports.isI16 = isI16; + exports.isI16Call = isI16Call; + exports.isI32 = isI32; + exports.isI32Call = isI32Call; + exports.isI8 = isI8; + exports.isI8Call = isI8Call; + exports.isIterable = isIterable; + exports.isKindAsync = isKindAsync; + exports.isMap = isMap; + exports.isMapCall = isMapCall; + exports.isMatchArray = isMatchArray; + exports.isMatchObject = isMatchObject; + exports.isNegative = isNegative; + exports.isNodeList = isNodeList; + exports.isNodejs = isNodejs; + exports.isNotArray = isNotArray; + exports.isNotNumber = isNotNumber; + exports.isNotString = isNotString; + exports.isNull = isNull; + exports.isNumber = isNumber; + exports.isNumberCall = isNumberCall; + exports.isNumberEqual = isNumberEqual; + exports.isNumberInRange = isNumberInRange; + exports.isNumberNotInRange = isNumberNotInRange; + exports.isOdd = isOdd; + exports.isParent = isParent; + exports.isPlainObject = isPlainObject; + exports.isPositive = isPositive; + exports.isPrimitive = isPrimitive; + exports.isPromise = isPromise; + exports.isRegex = isRegex; + exports.isRegexCall = isRegexCall; + exports.isRelated = isRelated; + exports.isSafeInt = isSafeInt; + exports.isSame = isSame; + exports.isSameType = isSameType; + exports.isSet = isSet; + exports.isSetCall = isSetCall; + exports.isString = isString; + exports.isTrue = isTrue; + exports.isTruthy = isTruthy; + exports.isTypeFactory = isTypeFactory; + exports.isTypedArray = isTypedArray; + exports.isU16 = isU16; + exports.isU16Call = isU16Call; + exports.isU32 = isU32; + exports.isU32Call = isU32Call; + exports.isU8 = isU8; + exports.isU8C = isU8C; + exports.isU8CCall = isU8CCall; + exports.isU8Call = isU8Call; + exports.isUndefined = isUndefined; + exports.isWeakMap = isWeakMap; + exports.isWeakMapCall = isWeakMapCall; + exports.isZero = isZero; + exports.jsonParse = jsonParse; + exports.kebabCase = kebabCase; + exports.keys = keys; + exports.largest = largest; + exports.last = last; + exports.lowerCase = lowerCase; + exports.map = map; + exports.mapArray = mapArray; + exports.mapAsyncArray = mapAsyncArray; + exports.mapAsyncObject = mapAsyncObject; + exports.mapObject = mapObject; + exports.mapRightArray = mapRightArray; + exports.mapWhile = mapWhile; + exports.merge = merge; + exports.model = model; + exports.multiply = multiply; + exports.negate = negate; + exports.noValue = noValue; + exports.nodeAttribute = nodeAttribute; + exports.noop = noop; + exports.notEqual = notEqual; + exports.nthArg = nthArg; + exports.objectAssign = objectAssign; + exports.objectEntries = objectEntries; + exports.objectSize = objectSize; + exports.omit = omit; + exports.once = once; + exports.onlyUnique = onlyUnique; + exports.over = over; + exports.overEvery = overEvery; + exports.pair = pair; + exports.partition = partition; + exports.pick = pick; + exports.pluck = pluck; + exports.pluckObject = pluckObject; + exports.promise = promise; + exports.propertyMatch = propertyMatch; + exports.querySelector = querySelector; + exports.querySelectorAll = querySelectorAll; + exports.randomFloat = randomFloat; + exports.randomInt = randomInt; + exports.range = range; + exports.rangeDown = rangeDown; + exports.rangeUp = rangeUp; + exports.rawURLDecode = rawURLDecode; + exports.reArg = reArg; + exports.regexTestFactory = regexTestFactory; + exports.remainder = remainder; + exports.remove = remove; + exports.removeBy = removeBy; + exports.replaceList = replaceList; + exports.rest = rest; + exports.restString = restString; + exports.returnValue = returnValue; + exports.right = right; + exports.rightString = rightString; + exports.sample = sample; + exports.sanitize = sanitize; + exports.saveDimensions = saveDimensions; + exports.selector = selector; + exports.setKey = setKey; + exports.setValue = setValue; + exports.shuffle = shuffle; + exports.smallest = smallest; + exports.snakeCase = snakeCase; + exports.sortCollectionAlphabetically = sortCollectionAlphabetically; + exports.sortCollectionAlphabeticallyReverse = + sortCollectionAlphabeticallyReverse; + exports.sortCollectionAscending = sortCollectionAscending; + exports.sortCollectionAscendingFilter = sortCollectionAscendingFilter; + exports.sortCollectionDescending = sortCollectionDescending; + exports.sortCollectionDescendingFilter = sortCollectionDescendingFilter; + exports.sortNumberAscending = sortNumberAscending; + exports.sortNumberDescening = sortNumberDescening; + exports.sortObjectsAlphabetically = sortObjectsAlphabetically; + exports.sortObjectsAlphabeticallyReverse = sortObjectsAlphabeticallyReverse; + exports.sortUnique = sortUnique; + exports.stringify = stringify; + exports.stubArray = stubArray; + exports.stubFalse = stubFalse; + exports.stubObject = stubObject; + exports.stubString = stubString; + exports.stubTrue = stubTrue; + exports.subtract = subtract; + exports.subtractAll = subtractAll; + exports.subtractReverse = subtractReverse; + exports.sumAll = sumAll; + exports.take = take; + exports.takeRight = takeRight; + exports.themes = themes; + exports.throttle = throttle; + exports.timer = timer; + exports.timers = timers; + exports.times = times; + exports.timesAsync = timesAsync; + exports.timesMap = timesMap; + exports.timesMapAsync = timesMapAsync; + exports.toArray = toArray; + exports.toPath = toPath; + exports.toggle = toggle; + exports.tokenize = tokenize; + exports.truncate = truncate; + exports.truncateRight = truncateRight; + exports.unZip = unZip; + exports.unZipObject = unZipObject; + exports.union = union; + exports.uniqID = uniqID; + exports.unique = unique; + exports.untilFalseArray = untilFalseArray; + exports.untilTrueArray = untilTrueArray; + exports.updateDimensions = updateDimensions; + exports.upperCase = upperCase; + exports.upperFirst = upperFirst; + exports.upperFirstAll = upperFirstAll; + exports.upperFirstLetter = upperFirstLetter; + exports.upperFirstOnly = upperFirstOnly; + exports.upperFirstOnlyAll = upperFirstOnlyAll; + exports.virtualStorage = virtualStorage; + exports.whileCompactMap = whileCompactMap; + exports.whileEachArray = whileEachArray; + exports.whileMapArray = whileMapArray; + exports.without = without; + exports.words = words; + exports.wrap = wrap; + exports.xor = xor; + exports.zip = zip; + exports.zipObject = zipObject; }); //# sourceMappingURL=browser.bundle.js.map diff --git a/build/browser.bundle.js.map b/build/browser.bundle.js.map index 18e9c52..28d4a9d 100644 --- a/build/browser.bundle.js.map +++ b/build/browser.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"browser.bundle.js","sources":["../source/arrays/chunk.js","../source/arrays/clear.js","../source/arrays/clone.js","../source/types/isUndefined.js","../source/utilities/hasLength.js","../source/types/isNull.js","../source/types/hasValue.js","../source/utilities/returnValue.js","../source/arrays/each.js","../source/arrays/compactMap.js","../source/arrays/eachAsync.js","../source/arrays/compactMapAsync.js","../source/numbers/isNegative.js","../source/arrays/range.js","../source/types/isArray.js","../source/classes/construct.js","../source/arrays/ensure.js","../source/arrays/flattenDeep.js","../source/utilities/forEach.js","../source/arrays/difference.js","../source/arrays/drop.js","../source/arrays/dropRight.js","../source/arrays/eachRight.js","../source/arrays/eachRightAsync.js","../source/arrays/every.js","../source/arrays/everyAsync.js","../source/arrays/filter.js","../source/arrays/filterAsync.js","../source/arrays/first.js","../source/arrays/flatten.js","../source/arrays/initial.js","../source/arrays/intersect.js","../source/arrays/invoke.js","../source/utilities/toPath.js","../source/utilities/get.js","../source/objects/keys.js","../source/objects/hasKeys.js","../source/types/isConstructor.js","../source/types/isTypeFactory.js","../source/types/isBuffer.js","../source/types/isPlainObject.js","../source/utilities/isEqual.js","../source/arrays/isMatch.js","../source/arrays/largest.js","../source/arrays/last.js","../source/arrays/map.js","../source/arrays/concurrentEach.js","../source/arrays/mapAsync.js","../source/arrays/mapRight.js","../source/arrays/mapWhile.js","../source/math/subtract.js","../source/arrays/sortNumberAscending.js","../source/arrays/partition.js","../source/math/subtractReverse.js","../source/arrays/sortNumberDescening.js","../source/arrays/remove.js","../source/arrays/rest.js","../source/arrays/right.js","../source/math/randomInt.js","../source/numbers/isNumberEqual.js","../source/internal/array.js","../source/arrays/shuffle.js","../source/arrays/sample.js","../source/arrays/smallest.js","../source/arrays/getNumberInsertIndex.js","../source/arrays/take.js","../source/arrays/takeRight.js","../source/arrays/unique.js","../source/arrays/union.js","../source/arrays/untilFalse.js","../source/arrays/untilTrue.js","../source/arrays/whileCompactMap.js","../source/arrays/whileEach.js","../source/arrays/whileMap.js","../source/arrays/without.js","../source/arrays/xor.js","../source/arrays/zip.js","../source/buffers/ensure.js","../source/buffers/clear.js","../source/types/isFunction.js","../source/types/isNumber.js","../source/types/isString.js","../source/objects/assign.js","../source/classes/extendClass.js","../source/collection/countBy.js","../source/collection/countKey.js","../source/collection/countWithoutKey.js","../source/collection/findIndexCache.js","../source/collection/findIndex.js","../source/collection/findItem.js","../source/collection/sortCollectionDescending.js","../source/collection/getLowest.js","../source/collection/sortCollectionAscending.js","../source/collection/getHighest.js","../source/collection/groupBy.js","../source/collection/indexBy.js","../source/collection/invoke.js","../source/collection/invokeAsync.js","../source/objects/pluckObject.js","../source/collection/pluck.js","../source/collection/sortCollectionAlphabetically.js","../source/collection/sortCollectionAlphabeticallyReverse.js","../source/files/getExtension.js","../source/files/getFilename.js","../source/internal/regexTestFactory.js","../source/files/isFileCSS.js","../source/files/isFileHTML.js","../source/files/isFileJS.js","../source/files/isFileJSON.js","../source/functions/after.js","../source/functions/ary.js","../source/functions/before.js","../source/objects/eachAsync.js","../source/objects/each.js","../source/utilities/forEachAsync.js","../source/types/isSet.js","../source/utilities/forOf.js","../source/types/isGenerator.js","../source/utilities/forOfAsync.js","../source/types/isAsync.js","../source/utilities/generateLoop.js","../source/utilities/each.js","../source/functions/chain.js","../source/functions/curry.js","../source/functions/curryRight.js","../source/utilities/noop.js","../source/utilities/times.js","../source/utilities/timer.js","../source/internal/apply.js","../source/functions/debounce.js","../source/functions/ifInvoke.js","../source/functions/negate.js","../source/functions/nthArg.js","../source/functions/once.js","../source/types/getType.js","../source/types/cloneType.js","../source/utilities/forOfMap.js","../source/utilities/forOfMapAsync.js","../source/objects/mapAsync.js","../source/objects/map.js","../source/utilities/map.js","../source/functions/over.js","../source/objects/everyAsync.js","../source/objects/every.js","../source/utilities/forOfEvery.js","../source/utilities/forOfEveryAsync.js","../source/utilities/every.js","../source/functions/overEvery.js","../source/functions/rearged.js","../source/functions/throttle.js","../source/functions/wrap.js","../source/utilities/cacheNativeMethod.js","../source/internal/object.js","../source/internal/isSame.js","../source/math/add.js","../source/math/deduct.js","../source/math/divide.js","../source/math/increment.js","../source/math/multiple.js","../source/math/progress.js","../source/math/randomFloat.js","../source/math/remainder.js","../source/math/subtractAll.js","../source/math/sumAll.js","../source/numbers/isNumberInRange.js","../source/numbers/isNumberNotInRange.js","../source/numbers/isPositive.js","../source/numbers/isZero.js","../source/objects/getEntries.js","../source/objects/compactKeys.js","../source/objects/compactMapAsync.js","../source/objects/compactMap.js","../source/objects/filter.js","../source/objects/filterAsync.js","../source/objects/invert.js","../source/objects/isMatch.js","../source/regexps/escapeRegex.js","../source/regexps/arrayToRegex.js","../source/types/isRegex.js","../source/objects/omit.js","../source/objects/pick.js","../source/objects/size.js","../source/objects/zip.js","../source/strings/camelCase.js","../source/strings/kebabCase.js","../source/strings/snakeCase.js","../source/strings/upperCase.js","../source/strings/lowerCase.js","../source/strings/range.js","../source/strings/replace.js","../source/strings/sanitize.js","../source/strings/tokenize.js","../source/strings/truncate.js","../source/strings/typography.js","../source/types/getTypeName.js","../source/types/isArguments.js","../source/types/isMap.js","../source/types/isTypedArray.js","../source/types/noValue.js","../source/types/isArrayLike.js","../source/types/isBigInt.js","../source/types/isBoolean.js","../source/types/isArrayBuffer.js","../source/types/isChild.js","../source/types/isCloneable.js","../source/types/isDate.js","../source/types/isEmpty.js","../source/types/isFalse.js","../source/types/isF32.js","../source/types/isF64.js","../source/types/isFloat.js","../source/types/isI16.js","../source/types/isI32.js","../source/types/isI8.js","../source/types/isIterable.js","../source/types/isPromise.js","../source/types/isKindAsync.js","../source/types/isParent.js","../source/types/isPrimitive.js","../source/types/isRelated.js","../source/types/isSafeInt.js","../source/types/isSameType.js","../source/types/isTrue.js","../source/types/isU16.js","../source/types/isU32.js","../source/types/isU8.js","../source/types/isU8C.js","../source/types/isWeakMap.js","../source/types/isDeno.js","../source/types/isNode.js","../source/types/isTruthy.js","../source/types/isFalsy.js","../source/utilities/ifValue.js","../source/utilities/notEqual.js","../source/utilities/json.js","../source/utilities/assert.js","../source/utilities/bindAll.js","../source/utilities/clear.js","../source/utilities/clone.js","../source/utilities/concurrent.js","../source/utilities/compact.js","../source/utilities/forOfCompactMapAsync.js","../source/utilities/forOfCompactMap.js","../source/utilities/compactMap.js","../source/utilities/everyArg.js","../source/utilities/forOfFilter.js","../source/utilities/forOfFilterAsync.js","../source/utilities/filter.js","../source/utilities/flow.js","../source/utilities/flowAsync.js","../source/utilities/forMap.js","../source/utilities/arraysToObject.js","../source/utilities/has.js","../source/utilities/hasDot.js","../source/utilities/ifNotAssign.js","../source/utilities/interval.js","../source/utilities/merge.js","../source/utilities/model.js","../source/utilities/pair.js","../source/utilities/concurrentStatus.js","../source/utilities/promise.js","../source/utilities/propertyMatch.js","../source/utilities/setKey.js","../source/utilities/setValue.js","../source/utilities/store.js","../source/utilities/stubArray.js","../source/utilities/stubFalse.js","../source/utilities/stubObject.js","../source/utilities/stubString.js","../source/utilities/stubTrue.js","../source/utilities/timesAsync.js","../source/utilities/toggle.js","../source/utilities/uid.js","../source/utilities/virtualStorage.js","../source/utilities/inAsync.js","../source/utilities/inSync.js","../source/browser/agent.js","../source/browser/event.js","../source/browser/isEnter.js","../source/browser/frag.js","../source/browser/append.js","../source/browser/attribute.js","../source/browser/selector.js","../source/browser/importScript.js","../source/browser/ready.js","../source/browser/info.js","../source/browser/dimensions.js","../source/browser/storage.js","../source/browser/console.js","../source/browser/is.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0;index < arrayLength;index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [key, value] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst zipedObject = {};\n\teachArray(properties, (item, key) => {\n\t\tzipedObject[item] = values[key];\n\t});\n\treturn zipedObject;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst unZippedKeys = [];\n\tconst values = [];\n\teachObject(object, (item, key) => {\n\t\tunZippedKeys.push(key);\n\t\tvalues.push(item);\n\t});\n\treturn [unZippedKeys, values];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(compactMapArray, compactMapAsyncArray,\n\tcompactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0;index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn (isEqual(on, value)) ? off : on;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from '../objects/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isBoolean } from '../types/isBoolean.js';\nimport { keys } from '../objects/keys.js';\nimport { noop } from '../utilities/noop';\n/**\n * Checks to see of the browser agent has a string.\n *\n * @function isAgent\n * @category browser\n * @type {Function}\n * @param {String} source - The string to search for.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isAgent, assert } from '@universalweb/acid';\n * assert(isAgent('NotThere'), false);\n */\nexport function isAgent(source) {\n\treturn (hasValue(source)) ? isAgent[source] : keys(isAgent);\n}\nconst userAgent = globalThis.navigator?.userAgentData;\nif (userAgent) {\n\teachObject(userAgent, (value, key) => {\n\t\tif (isBoolean(value) && value) {\n\t\t\tisAgent[key] = value;\n\t\t}\n\t});\n\teachArray(userAgent.brands, (value) => {\n\t\tisAgent[value.brand] = value.version;\n\t});\n} else if (navigator.userAgent) {\n\tlet userAgentNormalized = navigator.userAgent.toLowerCase();\n\tuserAgentNormalized = userAgentNormalized.replace(/_/g, '.');\n\tuserAgentNormalized = userAgentNormalized.replace(/[#_,;()]/g, '');\n\tconst userAgentSplit = userAgentNormalized.split(/ |\\//);\n\teachArray(userAgentSplit, (item) => {\n\t\tisAgent[item] = true;\n\t});\n}\n\n","/**\n * Attaches an event listener to a node.\n *\n * @function eventAdd\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventAdd(document.body, 'click', () => {console.log('CLICKED');});\n * // = > document.body\n */\nexport function eventAdd(node, eventName, callback, useCapture) {\n\tnode.addEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n/**\n * Attaches an event listener to a node.\n *\n * @function eventRemove\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventRemove(document.body, () => {console.log('CLICKED');});\n * // = > Undefined\n */\nexport function eventRemove(node, eventName, callback, useCapture) {\n\tnode.removeEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n\n","/**\n * Checks if the keycode of the event is strictly equal to 13.\n *\n * @function isEnter\n * @category browser\n * @type {Function}\n * @param {Object} eventObject - Object to be checked.\n * @returns {Boolean} - Returns true if the keycode property of the object equals 13.\n *\n * @example\n * isEnter('click');\n * // => false\n */\nexport function isEnter(eventObject) {\n\treturn eventObject.keyCode === 13;\n}\n\n","/**\n * Create a document fragment.\n *\n * @function createFragment\n * @category browser\n * @type {Function}\n * @ignore\n * @returns {Fragment} - Returns a new document fragment.\n */\nexport const createFragment = document.createDocumentFragment.bind(document);\n","/**\n * Append a DOM node.\n *\n * @function append\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @ignore\n * @param {Node} parentNode - The parent node.\n * @param {Node} child - The node to be appended.\n * @returns {undefined} - Returns the child.\n */\nexport function append(parentNode, child) {\n\tparentNode.appendChild(child);\n\treturn child;\n}\n","import { eachObject } from '../objects/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { mapArray } from '../arrays/map.js';\nimport { zipObject } from '../objects/zip.js';\n/**\n * Assign attributes to a DOM node.\n *\n * @function nodeAttribute\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @async\n * @param {Node} node - The DOM node.\n * @param {Object|Array} object - Object with key being the attribute name and the value being the attribute value. If an array is given it will get the values corresponding to the array items.\n * @returns {Object|Node} - If using an array this returns an object of attribute names as keys and their values as the property value. If using an object this will return the provided node.\n *\n * @example\n * nodeAttribute(document.body, { 'data-example': 'test'});\n */\nexport function nodeAttribute(node, object) {\n\tif (isArray(object)) {\n\t\treturn zipObject(object, mapArray(object, (item) => {\n\t\t\treturn node.getAttribute(item);\n\t\t}));\n\t}\n\teachObject(object, (item, key) => {\n\t\tnode.setAttribute(key, item);\n\t});\n\treturn node;\n}\n\n","import { restString } from '../strings/range.js';\nconst dotString = '.';\nconst poundString = '#';\nconst classTest = /^.[\\w_-]+$/;\nconst tagTest = /^[A-Za-z]+$/;\nconst regexSpace = /\\s/;\n/**\n * Wrapper around getElementsByClassName.\n *\n * @function getByClass\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByClass = document.getElementsByClassName.bind(document);\n/**\n * Wrapper around getElementsByTagName.\n *\n * @function getByTag\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByTag = document.getElementsByTagName.bind(document);\n/**\n * Wrapper around getElementsByIdName.\n *\n * @function getById\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getById = document.getElementById.bind(document);\n/**\n * Wrapper around querySelector.\n *\n * @function querySelector\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelector = document.querySelector.bind(document);\n/**\n * Wrapper around querySelectorAll.\n *\n * @function querySelectorAll\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelectorAll = document.querySelectorAll.bind(document);\n/**\n * Returns relevant DOM node.\n *\n * @function selector\n * @category browser\n * @ignoreTest\n * @param {String} select - String to be evaluated.\n * @type {Function}\n * @returns {Node} - Returns a DOM node.\n *\n * @example\n * selector('#node');\n * // =>
\n */\nexport function selector(select) {\n\tconst firstLetter = select[0];\n\tswitch (firstLetter) {\n\t\tcase poundString: {\n\t\t\tif (!regexSpace.test(select)) {\n\t\t\t\treturn getById(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase dotString: {\n\t\t\tif (classTest.test(select)) {\n\t\t\t\treturn getByClass(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tif (tagTest.test(select)) {\n\t\t\t\treturn getByTag(select);\n\t\t\t}\n\t\t}\n\t}\n\treturn querySelectorAll(select);\n}\n\n","import { append } from './append.js';\nimport { eventAdd } from './event.js';\nimport { hasDot } from '../utilities/hasDot.js';\nimport { nodeAttribute } from './attribute.js';\nimport { promise } from '../utilities/promise.js';\nimport { querySelector } from './selector.js';\nconst createElementCache = document.createElement.bind(document);\nconst nodeAttachLoadingEvents = (node) => {\n\treturn promise((accept) => {\n\t\teventAdd(node, 'load', accept, true);\n\t\teventAdd(node, 'error', accept, true);\n\t\tappend(querySelector('head'), node);\n\t});\n};\n/**\n * Asynchronously import a js file and append it to the head node.\n * If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity.\n *\n * @function importjs\n * @category browser\n * @type {Function}\n * @async\n * @param {*} url - URL of the script to import. If not \".\" is found in the file name \".js\" will be appended.\n * @returns {Promise} - Returns a promise which returns a \"load\" or \"error\" event associated with the script.\n *\n * @example\n * importjs('core.js');\n * importjs('core');\n */\nexport function importjs(url) {\n\tconst src = hasDot(url) && url || `${url}.js`;\n\tconst node = nodeAttribute(createElementCache('script'), {\n\t\tasync: '',\n\t\tsrc\n\t});\n\treturn nodeAttachLoadingEvents(node);\n}\n\n","import { eventAdd } from './event.js';\nimport { getById } from './selector.js';\nimport { importjs } from './importScript.js';\n/**\n * Runs a function if the document has finished loading. If not, add an eventlistener.\n *\n * @function isDocumentReady\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Function} callable - Function to be run.\n * @returns {Boolean|Function} - If the document is ready, returns a function. If not, return false.\n *\n * @example\n * isDocumentReady(() => {return 1});\n * // => 1\n */\nexport function isDocumentReady(callable) {\n\tconst state = document.readyState;\n\tconst checkStatus = state === 'interactive' || state === 'completed' || state === 'complete';\n\tif (checkStatus) {\n\t\treturn (callable) ? callable() : true;\n\t}\n\tif (callable) {\n\t\teventAdd(document, 'DOMContentLoaded', callable);\n\t}\n\treturn false;\n}\nisDocumentReady(() => {\n\tconst scriptTag = getById('AcidLib');\n\tconst scriptName = (scriptTag && scriptTag.getAttribute('data-index')) || '/index';\n\timportjs(scriptName);\n});\n","const protocol = location.protocol;\nconst protocolSocket = (protocol === 'http:') ? 'ws' : 'wss';\nconst hostname = location.hostname;\n/**\n * Holds client hardware, browser, and host info.\n *\n * @memberof $\n * @category browser\n * @ignoreTest\n * @property {Object} info - Client hardware & host info.\n * @type {Object}\n */\nexport const info = {\n\thardware: {\n\t\tcores: navigator.hardwareConcurrency\n\t},\n\thost: {\n\t\tname: hostname,\n\t\tprotocol,\n\t\tprotocolSocket,\n\t}\n};\n\n","import { assign } from '../objects/assign.js';\nimport { eventAdd } from './event.js';\nimport { info } from './info.js';\nimport { isDocumentReady } from './ready.js';\nexport function saveDimensions() {\n\tassign(info, {\n\t\tbodyHeight: document.body.offsetHeight,\n\t\tbodyWidth: document.body.offsetWidth,\n\t\twindowHeight: window.innerHeight,\n\t\twindowWidth: window.innerWidth,\n\t});\n}\n/**\n * Save current document & window dimensions to the info property.\n *\n * @function updateDimensions\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * updateDimensions();\n */\nexport function updateDimensions() {\n\tsaveDimensions();\n}\nisDocumentReady(updateDimensions);\neventAdd(window, 'load', updateDimensions, true);\neventAdd(window, 'resize', updateDimensions, true);\n\n","/**\n * LocalStorage Module..\n *\n * @module browser/storage\n */\nimport { hasValue } from '../types/hasValue.js';\nimport { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nimport { virtualStorage } from '../utilities/virtualStorage.js';\nexport let hasLocal;\nfunction hasStorage(storeCheck) {\n\ttry {\n\t\tstoreCheck().removeItem('TESTING');\n\t\thasLocal = true;\n\t} catch (e) {\n\t\thasLocal = false;\n\t}\n}\nhasStorage(() => {\n\treturn localStorage;\n});\n/**\n * Constructs a virtual storage container with localStorage support.\n * BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported.\n * If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed.\n * BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed.\n *\n * @class BrowserStorage\n * @category browser\n * @returns {BrowserStorage} - Returns a new instance of BrowserStorage.\n *\n * @example\n * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n * const storageBrowserStorage = construct(BrowserStorage);\n * storageBrowserStorage.setItem('key', 'value');\n * assert(storageBrowserStorage.getItem('key'), 'value');\n */\nexport class BrowserStorage {\n\tconstructor(initialObject) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local = localStorage;\n\t\t}\n\t\tthis.storage = virtualStorage(initialObject);\n\t}\n\thasLocal = hasLocal;\n\t/**\n\t * Save an item to a browserStorage.\n\t *\n\t * @function setItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.setItem(key, (isString(value)) ? value : stringify(value));\n\t\t}\n\t\treturn this.storage.setItem(key, value);\n\t}\n\t/**\n\t * Get an item from a browserStorage.\n\t *\n\t * @function getItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tgetItem(key) {\n\t\tconst item = this.storage.getItem(key);\n\t\tif (hasValue(item)) {\n\t\t\treturn item;\n\t\t}\n\t\tif (!hasValue(item) && this.hasLocal) {\n\t\t\treturn this.local.getItem(key);\n\t\t}\n\t}\n\t/**\n\t * Clears all data for the browserStorage including all of localStorage if supported.\n\t *\n\t * @function clear\n\t * @class BrowserStorage\n\t * @category browser\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.clear();\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tclear() {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.clear();\n\t\t}\n\t\tthis.storage.clear();\n\t}\n\t/**\n\t * Remove an item from a browserStorage.\n\t *\n\t * @class BrowserStorage\n\t * @category browser\n\t * @function removeItem\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.removeItem('key');\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tremoveItem(key) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.removeItem(key);\n\t\t}\n\t\tthis.storage.removeItem(key);\n\t}\n}\n/**\n * The browserStorage function is a factory which wraps the BrowserStorage class constructor.\n *\n * @function browserStorage\n * @category browser\n * @type {Function}\n * @returns {*} - Returns a new BrowserStorage Object.\n *\n * @example\n * const storageBrowserStorage = browserStorage();\n * // => New BrowserStorage Object\n */\nexport function browserStorage(virtualFlag) {\n\treturn new BrowserStorage(virtualFlag);\n}\n\n","import { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nconst generateTheme = (color, bg) => {\n\treturn `color:${color};background:${bg};`;\n};\nexport const themes = {\n\talert: generateTheme('#fff', '#f44336'),\n\timportant: generateTheme('#fff', '#E91E63'),\n\tnotify: generateTheme('#fff', '#651FFF'),\n\twarning: generateTheme('#000', '#FFEA00'),\n};\n/**\n * Console.trace wrapper with theme support.\n *\n * @function cnsl\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Object} value - The value to be logged.\n * @param {String} themeName - The name of the theme to be used.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnsl('Lucy', 'notify');\n * // 'Lucy'\n */\nexport const cnsl = (value, themeName) => {\n\tconst data = isString(value) ? value : stringify(value);\n\tif (themeName === 'alert' || themeName === 'warning') {\n\t\treturn console.trace(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n\t}\n\tconsole.log(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n};\n/**\n * Create color themes for cnsl method.\n *\n * @function cnslTheme\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {String} themeName - The name of the theme.\n * @param {String} color - The text color.\n * @param {String} background - The background color of the block.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnslTheme('BlackNWhite', '#fff', '#000');\n */\nexport const cnslTheme = (themeName, color, background) => {\n\tthemes[themeName] = generateTheme(color, background);\n};\n\n","import { difference } from '../arrays/difference.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Checks if value is a plain DOM Node.\n *\n * @function isDom\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDom, assert } from '@universalweb/acid';\n * assert(isDom(document.querySelectorAll('head')), true);\n */\nexport function isDom(source) {\n\treturn source && source.nodeType !== 9;\n}\n/**\n * Checks if the value is a HTMLCollection.\n *\n * @function isHTMLCollection\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isHTMLCollection, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isHTMLCollection(document.getElementsByClassName('test')), true);\n */\nconst objectHTMLCollection = '[object HTMLCollection]';\nexport function isHTMLCollection(source) {\n\treturn (hasValue(source)) ? source.toString() === objectHTMLCollection : false;\n}\n/**\n * Checks if the value is a NodeList.\n *\n * @function isNodeList\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNodeList, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isNodeList(document.querySelectorAll('.test')), true);\n */\nconst objectNodeList = '[object NodeList]';\nexport function isNodeList(source) {\n\treturn (hasValue(source)) ? source.toString() === objectNodeList : false;\n}\n"],"names":["sign","random","normalizeCase","space","returnFlow","hasLocal"],"mappings":";;;;;;CAAA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,KAAK,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,EAAE;CACvC,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;CACpB,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;CACf,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK;CAC9B,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC,EAAE;CACrB,GAA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,OAAC,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,cAAc;;CC/C9D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACY,OAAC,MAAM,GAAG,MAAM,CAAC;;CCd7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE;CACpC,CAAC,OAAO,MAAM,GAAG,MAAM,CAAC;CACxB;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,MAAM,CAAC,MAAM,EAAE;CAC/B,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;CACnB;;CCjBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE;CACtC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;CACvB;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,SAAS,CAAC,MAAM,EAAE;CAClC,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;CACnB;;CCjBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE;CACxC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;CACvB;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE;CACnD,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE;CAClB,EAAE,OAAO,KAAK,CAAC;CACf,EAAE;CACF,CAAC,IAAI,aAAa,KAAK,CAAC,EAAE;CAC1B,EAAE,OAAO,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"browser.bundle.js","sources":["../source/arrays/chunk.js","../source/arrays/clear.js","../source/arrays/clone.js","../source/types/isUndefined.js","../source/utilities/hasLength.js","../source/types/isNull.js","../source/types/hasValue.js","../source/utilities/returnValue.js","../source/arrays/each.js","../source/arrays/compactMap.js","../source/arrays/eachAsync.js","../source/arrays/compactMapAsync.js","../source/numbers/isNegative.js","../source/arrays/range.js","../source/types/isArray.js","../source/classes/construct.js","../source/arrays/ensure.js","../source/arrays/flattenDeep.js","../source/utilities/forEach.js","../source/arrays/difference.js","../source/arrays/drop.js","../source/arrays/dropRight.js","../source/arrays/eachRight.js","../source/arrays/eachRightAsync.js","../source/arrays/every.js","../source/arrays/everyAsync.js","../source/arrays/filter.js","../source/arrays/filterAsync.js","../source/arrays/first.js","../source/arrays/flatten.js","../source/arrays/initial.js","../source/arrays/intersect.js","../source/arrays/invoke.js","../source/utilities/toPath.js","../source/utilities/get.js","../source/objects/keys.js","../source/objects/hasKeys.js","../source/types/isConstructor.js","../source/types/isTypeFactory.js","../source/types/isBuffer.js","../source/types/isPlainObject.js","../source/utilities/isEqual.js","../source/arrays/isMatch.js","../source/arrays/largest.js","../source/arrays/last.js","../source/arrays/map.js","../source/arrays/concurrentEach.js","../source/arrays/mapAsync.js","../source/arrays/mapRight.js","../source/arrays/mapWhile.js","../source/math/subtract.js","../source/arrays/sortNumberAscending.js","../source/arrays/partition.js","../source/math/subtractReverse.js","../source/arrays/sortNumberDescening.js","../source/arrays/remove.js","../source/arrays/rest.js","../source/arrays/right.js","../source/math/randomInt.js","../source/numbers/isNumberEqual.js","../source/internal/array.js","../source/arrays/shuffle.js","../source/arrays/sample.js","../source/arrays/smallest.js","../source/arrays/getNumberInsertIndex.js","../source/arrays/take.js","../source/arrays/takeRight.js","../source/arrays/unique.js","../source/arrays/union.js","../source/arrays/untilFalse.js","../source/arrays/untilTrue.js","../source/arrays/whileCompactMap.js","../source/arrays/whileEach.js","../source/arrays/whileMap.js","../source/arrays/without.js","../source/arrays/xor.js","../source/arrays/zip.js","../source/buffers/ensure.js","../source/buffers/clear.js","../source/types/isFunction.js","../source/types/isNumber.js","../source/types/isString.js","../source/objects/assign.js","../source/classes/extendClass.js","../source/collection/countBy.js","../source/collection/countKey.js","../source/collection/countWithoutKey.js","../source/collection/findIndexCache.js","../source/collection/findIndex.js","../source/collection/findItem.js","../source/collection/sortCollectionDescending.js","../source/collection/getLowest.js","../source/collection/sortCollectionAscending.js","../source/collection/getHighest.js","../source/collection/groupBy.js","../source/collection/indexBy.js","../source/collection/invoke.js","../source/collection/invokeAsync.js","../source/objects/pluckObject.js","../source/collection/pluck.js","../source/collection/sortCollectionAlphabetically.js","../source/collection/sortCollectionAlphabeticallyReverse.js","../source/files/getExtension.js","../source/files/getFilename.js","../source/internal/regexTestFactory.js","../source/files/isFileCSS.js","../source/files/isFileHTML.js","../source/files/isFileJS.js","../source/files/isFileJSON.js","../source/functions/after.js","../source/functions/ary.js","../source/functions/before.js","../source/objects/eachAsync.js","../source/objects/each.js","../source/utilities/forEachAsync.js","../source/types/isSet.js","../source/utilities/forOf.js","../source/types/isGenerator.js","../source/utilities/forOfAsync.js","../source/types/isAsync.js","../source/utilities/generateLoop.js","../source/utilities/each.js","../source/functions/chain.js","../source/functions/curry.js","../source/functions/curryRight.js","../source/utilities/noop.js","../source/utilities/times.js","../source/utilities/timer.js","../source/internal/apply.js","../source/functions/debounce.js","../source/functions/ifInvoke.js","../source/functions/negate.js","../source/functions/nthArg.js","../source/functions/once.js","../source/types/getType.js","../source/types/cloneType.js","../source/utilities/forOfMap.js","../source/utilities/forOfMapAsync.js","../source/objects/mapAsync.js","../source/objects/map.js","../source/utilities/map.js","../source/functions/over.js","../source/objects/everyAsync.js","../source/objects/every.js","../source/utilities/forOfEvery.js","../source/utilities/forOfEveryAsync.js","../source/utilities/every.js","../source/functions/overEvery.js","../source/functions/rearged.js","../source/functions/throttle.js","../source/functions/wrap.js","../source/utilities/cacheNativeMethod.js","../source/internal/object.js","../source/internal/isSame.js","../source/math/add.js","../source/math/deduct.js","../source/math/divide.js","../source/math/increment.js","../source/math/multiple.js","../source/math/progress.js","../source/math/randomFloat.js","../source/math/remainder.js","../source/math/subtractAll.js","../source/math/sumAll.js","../source/numbers/isNumberInRange.js","../source/numbers/isNumberNotInRange.js","../source/numbers/isPositive.js","../source/numbers/isZero.js","../source/numbers/isOdd.js","../source/numbers/isEven.js","../source/objects/getEntries.js","../source/objects/compactKeys.js","../source/objects/compactMapAsync.js","../source/objects/compactMap.js","../source/objects/filter.js","../source/objects/filterAsync.js","../source/objects/invert.js","../source/objects/isMatch.js","../source/regexps/escapeRegex.js","../source/regexps/arrayToRegex.js","../source/types/isRegex.js","../source/objects/omit.js","../source/objects/pick.js","../source/objects/size.js","../source/objects/zip.js","../source/strings/camelCase.js","../source/strings/kebabCase.js","../source/strings/snakeCase.js","../source/strings/upperCase.js","../source/strings/lowerCase.js","../source/strings/range.js","../source/strings/replace.js","../source/strings/sanitize.js","../source/strings/tokenize.js","../source/strings/truncate.js","../source/strings/typography.js","../source/types/getTypeName.js","../source/types/isArguments.js","../source/types/isMap.js","../source/types/isTypedArray.js","../source/types/noValue.js","../source/types/isArrayLike.js","../source/types/isBigInt.js","../source/types/isBoolean.js","../source/types/isArrayBuffer.js","../source/types/isChild.js","../source/types/isCloneable.js","../source/types/isDate.js","../source/types/isEmpty.js","../source/types/isFalse.js","../source/types/isF32.js","../source/types/isF64.js","../source/types/isFloat.js","../source/types/isI16.js","../source/types/isI32.js","../source/types/isI8.js","../source/types/isIterable.js","../source/types/isPromise.js","../source/types/isKindAsync.js","../source/types/isParent.js","../source/types/isPrimitive.js","../source/types/isRelated.js","../source/types/isSafeInt.js","../source/types/isSameType.js","../source/types/isTrue.js","../source/types/isU16.js","../source/types/isU32.js","../source/types/isU8.js","../source/types/isU8C.js","../source/types/isWeakMap.js","../source/types/isDeno.js","../source/types/isNode.js","../source/types/isTruthy.js","../source/types/isFalsy.js","../source/utilities/ifValue.js","../source/utilities/notEqual.js","../source/utilities/json.js","../source/utilities/assert.js","../source/utilities/bindAll.js","../source/utilities/clear.js","../source/utilities/clone.js","../source/utilities/concurrent.js","../source/utilities/compact.js","../source/utilities/forOfCompactMapAsync.js","../source/utilities/forOfCompactMap.js","../source/utilities/compactMap.js","../source/utilities/everyArg.js","../source/utilities/forOfFilter.js","../source/utilities/forOfFilterAsync.js","../source/utilities/filter.js","../source/utilities/flow.js","../source/utilities/flowAsync.js","../source/utilities/forMap.js","../source/utilities/arraysToObject.js","../source/utilities/has.js","../source/utilities/hasDot.js","../source/utilities/ifNotAssign.js","../source/utilities/interval.js","../source/utilities/merge.js","../source/utilities/model.js","../source/utilities/pair.js","../source/utilities/concurrentStatus.js","../source/utilities/promise.js","../source/utilities/propertyMatch.js","../source/utilities/setKey.js","../source/utilities/setValue.js","../source/utilities/store.js","../source/utilities/stubArray.js","../source/utilities/stubFalse.js","../source/utilities/stubObject.js","../source/utilities/stubString.js","../source/utilities/stubTrue.js","../source/utilities/timesAsync.js","../source/utilities/toggle.js","../source/utilities/uid.js","../source/utilities/virtualStorage.js","../source/utilities/inAsync.js","../source/utilities/inSync.js","../source/browser/agent.js","../source/browser/event.js","../source/browser/isEnter.js","../source/browser/frag.js","../source/browser/append.js","../source/browser/attribute.js","../source/browser/selector.js","../source/browser/importScript.js","../source/browser/ready.js","../source/browser/info.js","../source/browser/dimensions.js","../source/browser/storage.js","../source/browser/console.js","../source/browser/is.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = isArray(propertyString) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [\n\t\tkey,\n\t\tvalue\n\t] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = isIterateeAsync ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = isIterateeAsync ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","/**\n * Checks if a number is odd & returns true or false.\n *\n * @function isOdd\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isOdd, assert } from '@universalweb/acid';\n * assert(isOdd(1), true);\n */\nexport function isOdd(source) {\n\treturn (source & 1) === 1;\n}\n","/**\n * Checks if a number is even & returns true or false.\n *\n * @function isEven\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEven, assert } from '@universalweb/acid';\n * assert(isEven(1), true);\n */\nexport function isEven(source) {\n\treturn (source & 1) === 0;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst source = {};\n\teachArray(properties, (item, key) => {\n\t\tsource[item] = values[key];\n\t});\n\treturn source;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst objectKeys = [];\n\tconst objectValues = [];\n\teachObject(object, (item, key) => {\n\t\tobjectKeys.push(key);\n\t\tobjectValues.push(item);\n\t});\n\treturn [\n\t\tobjectKeys,\n\t\tobjectValues,\n\t];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(\n\tcompactMapArray,\n\tcompactMapAsyncArray,\n\tcompactMapObject,\n\tcompactMapAsyncObject,\n\tforOfCompactMap,\n\tforOfCompactMapAsync\n);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn ((isEqual(on, value)) ? off : on);\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from '../objects/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isBoolean } from '../types/isBoolean.js';\nimport { keys } from '../objects/keys.js';\nimport { noop } from '../utilities/noop';\n/**\n * Checks to see of the browser agent has a string.\n *\n * @function isAgent\n * @category browser\n * @type {Function}\n * @param {String} source - The string to search for.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isAgent, assert } from '@universalweb/acid';\n * assert(isAgent('NotThere'), false);\n */\nexport function isAgent(source) {\n\treturn (hasValue(source)) ? isAgent[source] : keys(isAgent);\n}\nconst userAgent = globalThis.navigator?.userAgentData;\nif (userAgent) {\n\teachObject(userAgent, (value, key) => {\n\t\tif (isBoolean(value) && value) {\n\t\t\tisAgent[key] = value;\n\t\t}\n\t});\n\teachArray(userAgent.brands, (value) => {\n\t\tisAgent[value.brand] = value.version;\n\t});\n} else if (navigator.userAgent) {\n\tlet userAgentNormalized = navigator.userAgent.toLowerCase();\n\tuserAgentNormalized = userAgentNormalized.replace(/_/g, '.');\n\tuserAgentNormalized = userAgentNormalized.replace(/[#_,;()]/g, '');\n\tconst userAgentSplit = userAgentNormalized.split(/ |\\//);\n\teachArray(userAgentSplit, (item) => {\n\t\tisAgent[item] = true;\n\t});\n}\n\n","/**\n * Attaches an event listener to a node.\n *\n * @function eventAdd\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventAdd(document.body, 'click', () => {console.log('CLICKED');});\n * // = > document.body\n */\nexport function eventAdd(node, eventName, callback, useCapture) {\n\tnode.addEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n/**\n * Attaches an event listener to a node.\n *\n * @function eventRemove\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventRemove(document.body, () => {console.log('CLICKED');});\n * // = > Undefined\n */\nexport function eventRemove(node, eventName, callback, useCapture) {\n\tnode.removeEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n\n","/**\n * Checks if the keycode of the event is strictly equal to 13.\n *\n * @function isEnter\n * @category browser\n * @type {Function}\n * @param {Object} eventObject - Object to be checked.\n * @returns {Boolean} - Returns true if the keycode property of the object equals 13.\n *\n * @example\n * isEnter('click');\n * // => false\n */\nexport function isEnter(eventObject) {\n\treturn eventObject.keyCode === 13;\n}\n\n","/**\n * Create a document fragment.\n *\n * @function createFragment\n * @category browser\n * @type {Function}\n * @ignore\n * @returns {Fragment} - Returns a new document fragment.\n */\nexport const createFragment = document.createDocumentFragment.bind(document);\n","/**\n * Append a DOM node.\n *\n * @function append\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @ignore\n * @param {Node} parentNode - The parent node.\n * @param {Node} child - The node to be appended.\n * @returns {undefined} - Returns the child.\n */\nexport function append(parentNode, child) {\n\tparentNode.appendChild(child);\n\treturn child;\n}\n","import { eachObject } from '../objects/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { mapArray } from '../arrays/map.js';\nimport { zipObject } from '../objects/zip.js';\n/**\n * Assign attributes to a DOM node.\n *\n * @function nodeAttribute\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @async\n * @param {Node} node - The DOM node.\n * @param {Object|Array} object - Object with key being the attribute name and the value being the attribute value. If an array is given it will get the values corresponding to the array items.\n * @returns {Object|Node} - If using an array this returns an object of attribute names as keys and their values as the property value. If using an object this will return the provided node.\n *\n * @example\n * nodeAttribute(document.body, { 'data-example': 'test'});\n */\nexport function nodeAttribute(node, object) {\n\tif (isArray(object)) {\n\t\treturn zipObject(object, mapArray(object, (item) => {\n\t\t\treturn node.getAttribute(item);\n\t\t}));\n\t}\n\teachObject(object, (item, key) => {\n\t\tnode.setAttribute(key, item);\n\t});\n\treturn node;\n}\n\n","import { restString } from '../strings/range.js';\nconst dotString = '.';\nconst poundString = '#';\nconst classTest = /^.[\\w_-]+$/;\nconst tagTest = /^[A-Za-z]+$/;\nconst regexSpace = /\\s/;\n/**\n * Wrapper around getElementsByClassName.\n *\n * @function getByClass\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByClass = document.getElementsByClassName.bind(document);\n/**\n * Wrapper around getElementsByTagName.\n *\n * @function getByTag\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByTag = document.getElementsByTagName.bind(document);\n/**\n * Wrapper around getElementsByIdName.\n *\n * @function getById\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getById = document.getElementById.bind(document);\n/**\n * Wrapper around querySelector.\n *\n * @function querySelector\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelector = document.querySelector.bind(document);\n/**\n * Wrapper around querySelectorAll.\n *\n * @function querySelectorAll\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelectorAll = document.querySelectorAll.bind(document);\n/**\n * Returns relevant DOM node.\n *\n * @function selector\n * @category browser\n * @ignoreTest\n * @param {String} select - String to be evaluated.\n * @type {Function}\n * @returns {Node} - Returns a DOM node.\n *\n * @example\n * selector('#node');\n * // =>
\n */\nexport function selector(select) {\n\tconst firstLetter = select[0];\n\tswitch (firstLetter) {\n\t\tcase poundString: {\n\t\t\tif (!regexSpace.test(select)) {\n\t\t\t\treturn getById(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase dotString: {\n\t\t\tif (classTest.test(select)) {\n\t\t\t\treturn getByClass(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tif (tagTest.test(select)) {\n\t\t\t\treturn getByTag(select);\n\t\t\t}\n\t\t}\n\t}\n\treturn querySelectorAll(select);\n}\n\n","import { append } from './append.js';\nimport { eventAdd } from './event.js';\nimport { hasDot } from '../utilities/hasDot.js';\nimport { nodeAttribute } from './attribute.js';\nimport { promise } from '../utilities/promise.js';\nimport { querySelector } from './selector.js';\nconst createElementCache = document.createElement.bind(document);\nconst nodeAttachLoadingEvents = (node) => {\n\treturn promise((accept) => {\n\t\teventAdd(node, 'load', accept, true);\n\t\teventAdd(node, 'error', accept, true);\n\t\tappend(querySelector('head'), node);\n\t});\n};\n/**\n * Asynchronously import a js file and append it to the head node.\n * If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity.\n *\n * @function importjs\n * @category browser\n * @type {Function}\n * @async\n * @param {*} url - URL of the script to import. If not \".\" is found in the file name \".js\" will be appended.\n * @returns {Promise} - Returns a promise which returns a \"load\" or \"error\" event associated with the script.\n *\n * @example\n * importjs('core.js');\n * importjs('core');\n */\nexport function importjs(url) {\n\tconst src = hasDot(url) && url || `${url}.js`;\n\tconst node = nodeAttribute(createElementCache('script'), {\n\t\tasync: '',\n\t\tsrc\n\t});\n\treturn nodeAttachLoadingEvents(node);\n}\n\n","import { eventAdd } from './event.js';\nimport { getById } from './selector.js';\nimport { importjs } from './importScript.js';\n/**\n * Runs a function if the document has finished loading. If not, add an eventlistener.\n *\n * @function isDocumentReady\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Function} callable - Function to be run.\n * @returns {Boolean|Function} - If the document is ready, returns a function. If not, return false.\n *\n * @example\n * isDocumentReady(() => {return 1});\n * // => 1\n */\nexport function isDocumentReady(callable) {\n\tconst state = document.readyState;\n\tconst checkStatus = state === 'interactive' || state === 'completed' || state === 'complete';\n\tif (checkStatus) {\n\t\treturn (callable) ? callable() : true;\n\t}\n\tif (callable) {\n\t\teventAdd(document, 'DOMContentLoaded', callable);\n\t}\n\treturn false;\n}\nisDocumentReady(() => {\n\tconst scriptTag = getById('AcidLib');\n\tconst scriptName = (scriptTag && scriptTag.getAttribute('data-index')) || '/index';\n\timportjs(scriptName);\n});\n","const protocol = location.protocol;\nconst protocolSocket = (protocol === 'http:') ? 'ws' : 'wss';\nconst hostname = location.hostname;\n/**\n * Holds client hardware, browser, and host info.\n *\n * @memberof $\n * @category browser\n * @ignoreTest\n * @property {Object} info - Client hardware & host info.\n * @type {Object}\n */\nexport const info = {\n\thardware: {\n\t\tcores: navigator.hardwareConcurrency\n\t},\n\thost: {\n\t\tname: hostname,\n\t\tprotocol,\n\t\tprotocolSocket,\n\t}\n};\n\n","import { assign } from '../objects/assign.js';\nimport { eventAdd } from './event.js';\nimport { info } from './info.js';\nimport { isDocumentReady } from './ready.js';\nexport function saveDimensions() {\n\tassign(info, {\n\t\tbodyHeight: document.body.offsetHeight,\n\t\tbodyWidth: document.body.offsetWidth,\n\t\twindowHeight: window.innerHeight,\n\t\twindowWidth: window.innerWidth,\n\t});\n}\n/**\n * Save current document & window dimensions to the info property.\n *\n * @function updateDimensions\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * updateDimensions();\n */\nexport function updateDimensions() {\n\tsaveDimensions();\n}\nisDocumentReady(updateDimensions);\neventAdd(window, 'load', updateDimensions, true);\neventAdd(window, 'resize', updateDimensions, true);\n\n","/**\n * LocalStorage Module..\n *\n * @module browser/storage\n */\nimport { hasValue } from '../types/hasValue.js';\nimport { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nimport { virtualStorage } from '../utilities/virtualStorage.js';\nexport let hasLocal;\nfunction hasStorage(storeCheck) {\n\ttry {\n\t\tstoreCheck().removeItem('TESTING');\n\t\thasLocal = true;\n\t} catch (e) {\n\t\thasLocal = false;\n\t}\n}\nhasStorage(() => {\n\treturn localStorage;\n});\n/**\n * Constructs a virtual storage container with localStorage support.\n * BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported.\n * If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed.\n * BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed.\n *\n * @class BrowserStorage\n * @category browser\n * @returns {BrowserStorage} - Returns a new instance of BrowserStorage.\n *\n * @example\n * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n * const storageBrowserStorage = construct(BrowserStorage);\n * storageBrowserStorage.setItem('key', 'value');\n * assert(storageBrowserStorage.getItem('key'), 'value');\n */\nexport class BrowserStorage {\n\tconstructor(initialObject) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local = localStorage;\n\t\t}\n\t\tthis.storage = virtualStorage(initialObject);\n\t}\n\thasLocal = hasLocal;\n\t/**\n\t * Save an item to a browserStorage.\n\t *\n\t * @function setItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.setItem(key, (isString(value)) ? value : stringify(value));\n\t\t}\n\t\treturn this.storage.setItem(key, value);\n\t}\n\t/**\n\t * Get an item from a browserStorage.\n\t *\n\t * @function getItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tgetItem(key) {\n\t\tconst item = this.storage.getItem(key);\n\t\tif (hasValue(item)) {\n\t\t\treturn item;\n\t\t}\n\t\tif (!hasValue(item) && this.hasLocal) {\n\t\t\treturn this.local.getItem(key);\n\t\t}\n\t}\n\t/**\n\t * Clears all data for the browserStorage including all of localStorage if supported.\n\t *\n\t * @function clear\n\t * @class BrowserStorage\n\t * @category browser\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.clear();\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tclear() {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.clear();\n\t\t}\n\t\tthis.storage.clear();\n\t}\n\t/**\n\t * Remove an item from a browserStorage.\n\t *\n\t * @class BrowserStorage\n\t * @category browser\n\t * @function removeItem\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.removeItem('key');\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tremoveItem(key) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.removeItem(key);\n\t\t}\n\t\tthis.storage.removeItem(key);\n\t}\n}\n/**\n * The browserStorage function is a factory which wraps the BrowserStorage class constructor.\n *\n * @function browserStorage\n * @category browser\n * @type {Function}\n * @returns {*} - Returns a new BrowserStorage Object.\n *\n * @example\n * const storageBrowserStorage = browserStorage();\n * // => New BrowserStorage Object\n */\nexport function browserStorage(virtualFlag) {\n\treturn new BrowserStorage(virtualFlag);\n}\n\n","import { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nconst generateTheme = (color, bg) => {\n\treturn `color:${color};background:${bg};`;\n};\nexport const themes = {\n\talert: generateTheme('#fff', '#f44336'),\n\timportant: generateTheme('#fff', '#E91E63'),\n\tnotify: generateTheme('#fff', '#651FFF'),\n\twarning: generateTheme('#000', '#FFEA00'),\n};\n/**\n * Console.trace wrapper with theme support.\n *\n * @function cnsl\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Object} value - The value to be logged.\n * @param {String} themeName - The name of the theme to be used.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnsl('Lucy', 'notify');\n * // 'Lucy'\n */\nexport const cnsl = (value, themeName) => {\n\tconst data = isString(value) ? value : stringify(value);\n\tif (themeName === 'alert' || themeName === 'warning') {\n\t\treturn console.trace(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n\t}\n\tconsole.log(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n};\n/**\n * Create color themes for cnsl method.\n *\n * @function cnslTheme\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {String} themeName - The name of the theme.\n * @param {String} color - The text color.\n * @param {String} background - The background color of the block.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnslTheme('BlackNWhite', '#fff', '#000');\n */\nexport const cnslTheme = (themeName, color, background) => {\n\tthemes[themeName] = generateTheme(color, background);\n};\n\n","import { difference } from '../arrays/difference.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Checks if value is a plain DOM Node.\n *\n * @function isDom\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDom, assert } from '@universalweb/acid';\n * assert(isDom(document.querySelectorAll('head')), true);\n */\nexport function isDom(source) {\n\treturn source && source.nodeType !== 9;\n}\n/**\n * Checks if the value is a HTMLCollection.\n *\n * @function isHTMLCollection\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isHTMLCollection, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isHTMLCollection(document.getElementsByClassName('test')), true);\n */\nconst objectHTMLCollection = '[object HTMLCollection]';\nexport function isHTMLCollection(source) {\n\treturn (hasValue(source)) ? source.toString() === objectHTMLCollection : false;\n}\n/**\n * Checks if the value is a NodeList.\n *\n * @function isNodeList\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNodeList, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isNodeList(document.querySelectorAll('.test')), true);\n */\nconst objectNodeList = '[object NodeList]';\nexport function isNodeList(source) {\n\treturn (hasValue(source)) ? source.toString() === objectNodeList : false;\n}\n"],"names":["sign","random","normalizeCase","space","returnFlow","hasLocal"],"mappings":";;;;;;CAAA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,KAAK,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,EAAE;CACvC,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;CACpB,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;CACf,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK;CAC9B,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC,EAAE;CACrB,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;CACpB,GAAG,IAAI,GAAG,EAAE;CACZ,IAAI,KAAK,EAAE,CAAC;CACZ,IAAI;CACJ,GAAG;CACH,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CAC5B,EAAE,CAAC,CAAC;CACJ,CAAC,OAAO,OAAO,CAAC;CAChB;;CC3BA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,UAAU,CAAC,MAAM,EAAE;CACnC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;CACnB,CAAC,OAAO,MAAM,CAAC;CACf;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,UAAU,CAAC,MAAM,EAAE;CACnC,CAAC,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;CACvB;;CCfA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,WAAW,CAAC,MAAM,EAAE;CACpC,CAAC,OAAO,MAAM,KAAK,SAAS,CAAC;CAC7B;;CCZA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,SAAS,CAAC,MAAM,EAAE;CAClC,CAAC,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CAC/B;;CCdA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,MAAM,CAAC,MAAM,EAAE;CAC/B,CAAC,OAAO,MAAM,KAAK,IAAI,CAAC;CACxB;;CCbA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,QAAQ,CAAC,MAAM,EAAE;CACjC,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CAChD;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,WAAW,CAAC,MAAM,EAAE;CACpC,CAAC,OAAO,MAAM,CAAC;CACf;;CCRA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,SAAS,CAAC,MAA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CAAC,EAAE,CAAC,CAAC;CAC9B,EAAE,SAAS,CAAC,EAAE,GAAG,KAAK,CAAC;CACvB,EAAE,CAAC;CACH,CAAC,OAAO,SAAS,CAAC;CAClB;;CCrCA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE;CACrC,CAAC,OAAO,CAAC,GAAG,GAAG,KAAK;CACpB,EAAE,OAAO,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC,CAAC;CAChC,EAAE,CAAC;CACH;;CCpBA,MAAM,iBAAiB,GAAG,QAAQ,CAAC,SAAS,CAAC;CAC7C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,iBAAiB,CAAC,MAAM,EAAE;CAC1C,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;CAC5C;;CCfA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACY,OAAC,YAAY,GAAG,MAAM,CAAC,oBAAoB;CACvD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACY,OAAC,WAAW,GAAG,MAAM,CAAC,yBAAyB;CAC3D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACY,OAAC,OAAO,GAAG,MAAM,CAAC,eAAe;AACjC,OAAC,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,cAAc;;CC/C9D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACY,OAAC,MAAM,GAAG,MAAM,CAAC;;CCd7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE;CACpC,CAAC,OAAO,MAAM,GAAG,MAAM,CAAC;CACxB;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,MAAM,CAAC,MAAM,EAAE;CAC/B,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;CACnB;;CCjBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE;CACtC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;CACvB;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,SAAS,CAAC,MAAM,EAAE;CAClC,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;CACnB;;CCjBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE;CACxC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;CACvB;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE;CACnD,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE;CAClB,EAAE,OAAO,KAAK,CAAC;CACf,EAAE;CACF,CAAC,IAAI,aAAa,KAAK,CAAC,EAAE;CAC1B,EAAE,OAAO,CAAC,CAAC;CACX,EAAE;CACF,CAAC,OAAO,CAAC,aAAa,GAAG,KAAK,IAAI,GAAG,CAAC;CACtC;;CCtBA,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,C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A;CACA;CACA;CACA;CACA;CACO,SAAS,SAAS,GAAG;CAC5B,CAAC,OAAO,KAAK,CAAC;CACd;;CCdA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACY,OAAC,UAAU,GAAG,MAAM;CAChC,CAAC,OAAO,EAAE,CAAC;CACX;;CCdA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACY,OAAC,UAAU,GAAG,MAAM;CAChC,CAAC,OAAO,EAAE,CAAC;CACX;;CCdA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACY,OAAC,QAAQ,GAAG,MAAM;CAC9B,CAAC,OAAO,IAAI,CAAC;CACb;;CCdA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,eAAe,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE;CACnD,CAAC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,KAAK,EAAE,EAAE;CAC9C,EAAE,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;CACzB,EAAE;CACF,CAAC;CACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,eAAe,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,EAAE,EAAE;CACpE,CAAC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,KAAK,EAAE,EAAE;CAC9C,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC1C,EAAE;CACF,CAAC,OAAO,OAAO,CAAC;CAChB;;CCjDA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA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EAAE;CACnC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,QAAQ,EAAE,KAAK,cAAc,GAAG,KAAK,CAAC;CAC1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/build/browser.js b/build/browser.js index b597a51..9c92d54 100644 --- a/build/browser.js +++ b/build/browser.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:f}=Math;function h(t){return-1===f(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const d=Array.isArray;const m=Reflect.construct;function y(t,n=[],e){const r=d(n)?n:[n];return e?m(t,r,e):m(t,r)}function b(t){return d(t)&&t||i(t)&&[t]||[]}function A(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=y(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function I(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function O(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function E(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function M(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const j=/\.|\[/,x=/]/g,T="";function N(t){return t.replace(x,T).split(j)}function R(t,n){if(!n)return!1;let e=n;return E(d(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function L(t){if(t)return B(t)}const $=Object.hasOwn;function k(t,...n){if(t)return E(n,(n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}}))}function D(t,n){return t?.constructor===n||!1}function U(t){return n=>D(n,t)}function P(t){return t?.constructor?.name}function q(t){return n=>P(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&E(e,t):t(n)}}const W=q("Buffer"),Z=z(W),_=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(Z(t))return t.equals(n);if(t.toString()===n.toString())if(_(t)){const e=L(t);if(k(n,e))return E(e,(e=>H(t[e],n[e])))}else if(d(t)&&t.length===n.length)return E(t,((t,e)=>H(t,n[e])));return!1};const V=Math.max;function K(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function G(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function J(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,lt=q("Number"),ft=z(lt);const ht=U(String);const gt=Object.assign;function pt(t,n){if(_(n))gt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:gt(t,n)}else(ht(n)||ft(n))&&(t[n]=n);return t}function dt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function At(t,n="id",e){return t.sort(((t,r)=>bt(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:K(n,(n=>t[n]))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Et(t){return n=>!!i(n)&&t.test(n)}const St=Et(/\.css$/),Ft=Et(/\.html$/),Mt=Et(/\.js$/),jt=Et(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=L(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Tt(t,n,e,r){if(!t)return;const o=L(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Rt=z(Nt);function Bt(t,n){if(Rt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Lt=q("GeneratorFunction"),$t=z(Lt);async function kt(t,n,e){if(Rt(t)){for(const e of t)await n(e,t);return t}if($t(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const Dt=q("AsyncFunction"),Ut=z(Dt);function Pt(t,n,e,r,o,c){return(s,u,a,l,f)=>{let h;const g=Ut(u);if(i(s)&&u)return h=d(s)?g?n:t:_(s)||at(s)?g?r:e:o?g?c:o:$t(s)?c:g?r:e,h(s,u,a,l,f)}}const qt=Pt(s,a,Tt,xt,Bt,kt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Zt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=y(_t);function Vt(t,n){return Ht.set(t,n)}const Kt=Reflect.apply;function Gt(t,n,e){if(at(t))return Kt(t,n,e)}function Jt(t){return t?.constructor}function Qt(t,n=[]){const e=Jt(t);return e===Function&&"function"===e.name?function(){}:y(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Tt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Tt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Pt(K,G,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return S(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return E(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(d(t)||Rt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if($t(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(d(t)||Rt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Pt(E,S,on,rn,cn,sn);const an=Function.prototype;function ln(t){return an.call.bind(t)}const fn=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,gn=Object.defineProperty,pn=ln(Object.hasOwnProperty),dn=Object.is;const{random:mn}=Math;const{sign:yn}=Math;function bn(t){return 0===t}const An=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Tt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Tt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function In(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const On=/[()[\]{}*+?^$|#.,/\\\s-]/g;function En(t){return t.replace(On,"\\$&")}function Sn(t,n){return n?Sn(K(t,En)):RegExp(t.join("|"))}const Fn=q("RegExp"),Mn=z(Fn);function jn(t){if(!t)return;if(_(t))return L(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:L(t).length}const xn=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Tn=/[ _-]+/g;const Nn=/[ _-]+/g,Rn=/[ ]+/g;const Bn=/[ _-]+/g,Ln=/[ ]+/g;const $n=/[ _-]+/g;const kn=/[ _-]+/g;function Dn(t,n=1){return t.substring(n)}const Un=/%(?![\da-f]{2})/gi,Pn=/&/g,qn=//g,Wn=/"/g;function Zn(t){return decodeURIComponent(t.replace(Un,(()=>"%25")))}function _n(t){return t.replace(Pn,"&").replace(qn,"<").replace(zn,">").replace(Wn,""")}const Hn=/\S+/g,Vn=/\w+/g;const Kn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+Dn(t)}function Qn(t){return Gn(t)+Dn(t).toLowerCase()}function Xn(t){return Jt(t)?.name}const Yn=q("Map"),te=z(Yn),ne=/Array/,ee="Array";function re(t){if(t){const n=Xn(t);if(ne.test(n)&&n!==ee)return!0}return!1}function oe(t){return!i(t)}const ie=q("BigInt"),ce=z(ie),se=q("Boolean"),ue=z(se),ae=q("ArrayBuffer"),le=z(ae);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const he=q("Date"),ge=z(he);function pe(t){return!1===t}const de=q("Float32Array"),me=z(de),ye=q("Float64Array"),be=z(ye),{isInteger:Ae}=Number,we=Ae,ve=q("Int16Array"),Ce=z(ve),Ie=q("Int32Array"),Oe=z(Ie),Ee=q("Int8Array"),Se=z(Ee);function Fe(t){return!!t&&t instanceof Promise}function Me(t){return!!t&&(Fe(t)||Ut(t)||$t(t))}const{isSafeInteger:je}=Number,xe=je;const Te=q("Uint16Array"),Ne=z(Te),Re=q("Uint32Array"),Be=z(Re),Le=q("Uint8Array"),$e=z(Le),ke=q("Uint8ClampedArray"),De=z(ke),Ue=q("WeakMap"),Pe=z(Ue),qe=void 0!==globalThis.Deno,ze=void 0!==globalThis.process&&process.versions&&process.versions.node;function We(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(H(t,n))}const _e=JSON;const He=_e.stringify;function Ve(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${He(t)}\n\t\tExpected: ${He(n)}`,r)}async function Ke(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||Ve(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function Qe(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Xe=Pt(u,l,vn,wn,Qe,Je);function Ye(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function tr(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const nr=Pt(F,M,Cn,In,Ye,tr);function er(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const rr=er(s),or=er(I);function ir(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const cr=ir(a),sr=ir(O);const ur=Et(/\./);class ar{list=y(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const lr=y(ar);class fr{static models=new Map;constructor(t,n){i(n)?(dt(this,n),this.modelName=t,fr.models.set(t,n)):dt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}function hr(t){return new Promise(t)}class gr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Tt(t,(n=>{t[n]=new gr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new gr(e),!0)})}}class pr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const dr=y(pr);class mr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function yr(t){return new mr(t)}function br(t){return i(t)?br[t]:L(br)}const Ar=globalThis.navigator?.userAgentData;if(Ar)Tt(Ar,((t,n)=>{ue(t)&&t&&(br[n]=t)})),s(Ar.brands,(t=>{br[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{br[t]=!0}))}function wr(t,n,e,r){return t.addEventListener(n,e,r),t}const vr=document.createDocumentFragment.bind(document);function Cr(t,n){return t.appendChild(n),n}function Ir(t,n){return d(n)?xn(n,K(n,(n=>t.getAttribute(n)))):(Tt(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Or=/^.[\w_-]+$/,Er=/^[A-Za-z]+$/,Sr=/\s/,Fr=document.getElementsByClassName.bind(document),Mr=document.getElementsByTagName.bind(document),jr=document.getElementById.bind(document),xr=document.querySelector.bind(document),Tr=document.querySelectorAll.bind(document);const Nr=document.createElement.bind(document);function Rr(t){const n=ur(t)&&t||`${t}.js`;return(t=>hr((n=>{wr(t,"load",n,!0),wr(t,"error",n,!0),Cr(xr("head"),t)})))(Ir(Nr("script"),{async:"",src:n}))}function Br(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&wr(document,"DOMContentLoaded",t),!1)}Br((()=>{const t=jr("AcidLib");Rr(t&&t.getAttribute("data-index")||"/index")}));const Lr=location.protocol,$r="http:"===Lr?"ws":"wss",kr=location.hostname,Dr={hardware:{cores:navigator.hardwareConcurrency},host:{name:kr,protocol:Lr,protocolSocket:$r}};function Ur(){dt(Dr,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Pr(){Ur()}Br(Pr),wr(window,"load",Pr,!0),wr(window,"resize",Pr,!0),t.hasLocal=void 0,function(n){try{n().removeItem("TESTING"),t.hasLocal=!0}catch(n){t.hasLocal=!1}}((()=>localStorage));class qr{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=yr(t)}hasLocal=t.hasLocal;setItem(t,n){return this.hasLocal&&this.local.setItem(t,ht(n)?n:He(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return i(n)?n:!i(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}const zr=(t,n)=>`color:${t};background:${n};`,Wr={alert:zr("#fff","#f44336"),important:zr("#fff","#E91E63"),notify:zr("#fff","#651FFF"),warning:zr("#000","#FFEA00")};t.BrowserStorage=qr,t.Chain=zt,t.Intervals=ar,t.Model=fr,t.Store=gr,t.Timers=_t,t.UniqID=pr,t.VirtualStorage=mr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.append=Cr,t.apply=Gt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Me(t)||Me(n)?Ke(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||Ve(t,n,e)},t.assertAsync=Ke,t.assign=dt,t.assignToClass=mt,t.assignToObject=pt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?dt(e,r):r},t.browserStorage=function(t){return new qr(t)},t.cacheNativeMethod=ln,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Tn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return y(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(Z(t))return ut(t);if(d(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Zt(setTimeout(Wt,0),(t=>{lr.remove(t)}))},t.clearTimers=function(){Zt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.cnsl=(t,n)=>{const e=ht(t)?t:He(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},t.cnslTheme=(t,n,e)=>{Wr[t]=zr(n,e)},t.compact=function(t){if(_(t)){const n=L(t),e=n.length,r={};for(let o=0;oWe(t)))},t.compactKeys=function(t){const n=[];return Tt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Xe,t.compactMapArray=u,t.compactMapAsyncArray=l,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.createFragment=vr,t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Vt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=gn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Tt,t.eachRight=I,t.eachRightAsync=O,t.ensureArray=b,t.ensureBuffer=function(t){return Z(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=bn,t.escapeRegex=En,t.escapeRegexRegex=On,t.eventAdd=wr,t.eventRemove=function(t,n,e,r){return t.removeEventListener(n,e,r),t},t.every=un,t.everyArg=function(...t){return Ut(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=E,t.everyAsyncArray=S,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;ryt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=yt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>yt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(b(n))),[]);return e},t.flattenDeep=A,t.flow=rr,t.flowAsync=cr,t.flowAsyncRight=sr,t.flowRight=or,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=Qe,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Ye,t.forOfFilterAsync=tr,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Pt,t.get=R,t.getByClass=Fr,t.getById=jr,t.getByTag=Mr,t.getEntries=function(t){if(i(t))return An(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return At(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return E(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=fn,t.getType=Jt,t.getTypeName=Xn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!oe(n)&&!oe(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):Mn(e)?e.test(n):at(e)?e(n):d(e)?E(e,(e=>t(n,e))):un(e,(e=>t(n,e))):d(n)?Mn(e)?E(n,(t=>t.test(e))):at(e)?E(n,e):d(e)?E(e,(e=>t(n,e))):n.includes(e,r):!!_(n)&&(Mn(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):_(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}})))},t.hasDot=ur,t.hasKeys=k,t.hasLength=r,t.hasProp=pn,t.hasValue=i,t.htmlEntities=_n,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Gt(n,e,r):n(...r);if(_(n))return n[e]=t,n}},t.importjs=Rr,t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.info=Dr,t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(E(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return lr.set(t,n)},t.intervals=lr,t.invert=function(t,n={}){if(t)return Tt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return G(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isAgent=br,t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=d,t.isArrayBuffer=le,t.isArrayBufferCall=ae,t.isArrayLike=function(t,n){if(oe(t)||at(t))return!1;if(d(t)||re(t))return!0;const e=t.length;if(!oe(e)||!ft(e)||e<0)return!1;if(n){const n=L(t);return!!n&&un(n,((t,n)=>n>=0&&ft(n)))}return!0},t.isAsync=Ut,t.isAsyncCall=Dt,t.isBigInt=ce,t.isBigIntCall=ie,t.isBoolean=ue,t.isBooleanCall=se,t.isBuffer=Z,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=D,t.isConstructorFactory=U,t.isConstructorNameFactory=q,t.isDate=ge,t.isDateCall=he,t.isDeno=qe,t.isDocumentReady=Br,t.isDom=function(t){return t&&9!==t.nodeType},t.isEmpty=function(t){return ht(t)||d(t)?!r(t):_(t)?!jn(t):!i(t)},t.isEnter=function(t){return 13===t.keyCode},t.isEqual=H,t.isF32=me,t.isF32Call=de,t.isF64=be,t.isF64Call=ye,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=Ft,t.isFileJS=Mt,t.isFileJSON=jt,t.isFloat=we,t.isFunction=at,t.isGenerator=$t,t.isGeneratorCall=Lt,t.isHTMLCollection=function(t){return!!i(t)&&"[object HTMLCollection]"===t.toString()},t.isI16=Ce,t.isI16Call=ve,t.isI32=Oe,t.isI32Call=Ie,t.isI8=Se,t.isI8Call=Ee,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Me,t.isMap=te,t.isMapCall=Yn,t.isMatchArray=function(t,n){return t.length===n.length&&E(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=L(t),r=L(n);return e.length===r.length&&E(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodeList=function(t){return!!i(t)&&"[object NodeList]"===t.toString()},t.isNodejs=ze,t.isNotArray=function(t){return!d(t)},t.isNotNumber=function(t){return!ft(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=ft,t.isNumberCall=lt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=_,t.isPositive=function(t){return 1===yn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Fe,t.isRegex=Mn,t.isRegexCall=Fn,t.isRelated=function(t,n){return!oe(t)&&!oe(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=xe,t.isSame=dn,t.isSameType=function(t,n){const e=Jt(t),r=Jt(n);return e===r&&e.name===r.name},t.isSet=Rt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=We,t.isTypeFactory=z,t.isTypedArray=re,t.isU16=Ne,t.isU16Call=Te,t.isU32=Be,t.isU32Call=Re,t.isU8=$e,t.isU8C=De,t.isU8CCall=ke,t.isU8Call=Le,t.isUndefined=e,t.isWeakMap=Pe,t.isWeakMapCall=Ue,t.isZero=bn,t.jsonParse=function(t,n){if(t)return _e.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Nn," ").trim().toLowerCase().replace(Rn,"-")},t.keys=L,t.largest=function(t){return V(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(kn," ").trim().toLowerCase()},t.map=en,t.mapArray=K,t.mapAsyncArray=G,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(_(e)||d(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?y(fr,[t,n]):R(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=oe,t.nodeAttribute=Ir,t.noop=Wt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=gt,t.objectEntries=An,t.objectSize=jn,t.omit=function(t,n){if(!t)return{};if(d(n)){const e=Sn(n);return Cn(t,((t,n)=>!e.test(n)))}if(Mn(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(ft(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):gt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return K(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=hr,t.propertyMatch=(t,n,e=L(t))=>E(e,(e=>H(t[e],n[e]))),t.querySelector=xr,t.querySelectorAll=Tr,t.randomFloat=function(t,n=0){return mn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Et,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cIt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Ot(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=At,t.sortCollectionDescendingFilter=bt,t.sortNumberAscending=function(t){return t.sort(J)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=It,t.sortObjectsAlphabeticallyReverse=Ot,t.sortUnique=ct,t.stringify=He,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=J,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.themes=Wr,t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Vt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Vt,t.timers=Ht,t.times=Zt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Tt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(A(t))},t.uniqID=dr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Qn,t.upperFirstOnlyAll=function(t){return t.replace(Kn,(t=>Qn(t)))},t.virtualStorage=yr,t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Vn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=y(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=xn})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:f}=Math;function h(t){return-1===f(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const d=Array.isArray;const m=Reflect.construct;function y(t,n=[],e){const r=d(n)?n:[n];return e?m(t,r,e):m(t,r)}function b(t){return d(t)&&t||i(t)&&[t]||[]}function A(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=y(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function I(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function O(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function E(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function M(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const j=/\.|\[/,x=/]/g,T="";function N(t){return t.replace(x,T).split(j)}function R(t,n){if(!n)return!1;let e=n;return E(d(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function L(t){if(t)return B(t)}const $=Object.hasOwn;function k(t,...n){if(t)return E(n,(n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}}))}function D(t,n){return t?.constructor===n||!1}function U(t){return n=>D(n,t)}function P(t){return t?.constructor?.name}function q(t){return n=>P(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&E(e,t):t(n)}}const W=q("Buffer"),Z=z(W),_=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(Z(t))return t.equals(n);if(t.toString()===n.toString())if(_(t)){const e=L(t);if(k(n,e))return E(e,(e=>H(t[e],n[e])))}else if(d(t)&&t.length===n.length)return E(t,((t,e)=>H(t,n[e])));return!1};const V=Math.max;function K(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function G(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function J(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,lt=q("Number"),ft=z(lt);const ht=U(String);const gt=Object.assign;function pt(t,n){if(_(n))gt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:gt(t,n)}else(ht(n)||ft(n))&&(t[n]=n);return t}function dt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function At(t,n="id",e){return t.sort(((t,r)=>bt(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:K(n,(n=>t[n]))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Et(t){return n=>!!i(n)&&t.test(n)}const St=Et(/\.css$/),Ft=Et(/\.html$/),Mt=Et(/\.js$/),jt=Et(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=L(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Tt(t,n,e,r){if(!t)return;const o=L(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Rt=z(Nt);function Bt(t,n){if(Rt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Lt=q("GeneratorFunction"),$t=z(Lt);async function kt(t,n,e){if(Rt(t)){for(const e of t)await n(e,t);return t}if($t(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const Dt=q("AsyncFunction"),Ut=z(Dt);function Pt(t,n,e,r,o,c){return(s,u,a,l,f)=>{let h;const g=Ut(u);if(i(s)&&u)return h=d(s)?g?n:t:_(s)||at(s)?g?r:e:o?g?c:o:$t(s)?c:g?r:e,h(s,u,a,l,f)}}const qt=Pt(s,a,Tt,xt,Bt,kt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Zt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=y(_t);function Vt(t,n){return Ht.set(t,n)}const Kt=Reflect.apply;function Gt(t,n,e){if(at(t))return Kt(t,n,e)}function Jt(t){return t?.constructor}function Qt(t,n=[]){const e=Jt(t);return e===Function&&"function"===e.name?function(){}:y(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Tt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Tt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Pt(K,G,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return S(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return E(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(d(t)||Rt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if($t(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(d(t)||Rt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Pt(E,S,on,rn,cn,sn);const an=Function.prototype;function ln(t){return an.call.bind(t)}const fn=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,gn=Object.defineProperty,pn=ln(Object.hasOwnProperty),dn=Object.is;const{random:mn}=Math;const{sign:yn}=Math;function bn(t){return 0===t}const An=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Tt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Tt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function In(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const On=/[()[\]{}*+?^$|#.,/\\\s-]/g;function En(t){return t.replace(On,"\\$&")}function Sn(t,n){return n?Sn(K(t,En)):RegExp(t.join("|"))}const Fn=q("RegExp"),Mn=z(Fn);function jn(t){if(!t)return;if(_(t))return L(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:L(t).length}const xn=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Tn=/[ _-]+/g;const Nn=/[ _-]+/g,Rn=/[ ]+/g;const Bn=/[ _-]+/g,Ln=/[ ]+/g;const $n=/[ _-]+/g;const kn=/[ _-]+/g;function Dn(t,n=1){return t.substring(n)}const Un=/%(?![\da-f]{2})/gi,Pn=/&/g,qn=//g,Wn=/"/g;function Zn(t){return decodeURIComponent(t.replace(Un,(()=>"%25")))}function _n(t){return t.replace(Pn,"&").replace(qn,"<").replace(zn,">").replace(Wn,""")}const Hn=/\S+/g,Vn=/\w+/g;const Kn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+Dn(t)}function Qn(t){return Gn(t)+Dn(t).toLowerCase()}function Xn(t){return Jt(t)?.name}const Yn=q("Map"),te=z(Yn),ne=/Array/,ee="Array";function re(t){if(t){const n=Xn(t);if(ne.test(n)&&n!==ee)return!0}return!1}function oe(t){return!i(t)}const ie=q("BigInt"),ce=z(ie),se=q("Boolean"),ue=z(se),ae=q("ArrayBuffer"),le=z(ae);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const he=q("Date"),ge=z(he);function pe(t){return!1===t}const de=q("Float32Array"),me=z(de),ye=q("Float64Array"),be=z(ye),{isInteger:Ae}=Number,we=Ae,ve=q("Int16Array"),Ce=z(ve),Ie=q("Int32Array"),Oe=z(Ie),Ee=q("Int8Array"),Se=z(Ee);function Fe(t){return!!t&&t instanceof Promise}function Me(t){return!!t&&(Fe(t)||Ut(t)||$t(t))}const{isSafeInteger:je}=Number,xe=je;const Te=q("Uint16Array"),Ne=z(Te),Re=q("Uint32Array"),Be=z(Re),Le=q("Uint8Array"),$e=z(Le),ke=q("Uint8ClampedArray"),De=z(ke),Ue=q("WeakMap"),Pe=z(Ue),qe=void 0!==globalThis.Deno,ze=void 0!==globalThis.process&&process.versions&&process.versions.node;function We(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(H(t,n))}const _e=JSON;const He=_e.stringify;function Ve(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${He(t)}\n\t\tExpected: ${He(n)}`,r)}async function Ke(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||Ve(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function Qe(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Xe=Pt(u,l,vn,wn,Qe,Je);function Ye(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function tr(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const nr=Pt(F,M,Cn,In,Ye,tr);function er(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const rr=er(s),or=er(I);function ir(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const cr=ir(a),sr=ir(O);const ur=Et(/\./);class ar{list=y(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const lr=y(ar);class fr{static models=new Map;constructor(t,n){i(n)?(dt(this,n),this.modelName=t,fr.models.set(t,n)):dt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}function hr(t){return new Promise(t)}class gr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Tt(t,(n=>{t[n]=new gr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new gr(e),!0)})}}class pr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const dr=y(pr);class mr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function yr(t){return new mr(t)}function br(t){return i(t)?br[t]:L(br)}const Ar=globalThis.navigator?.userAgentData;if(Ar)Tt(Ar,((t,n)=>{ue(t)&&t&&(br[n]=t)})),s(Ar.brands,(t=>{br[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{br[t]=!0}))}function wr(t,n,e,r){return t.addEventListener(n,e,r),t}const vr=document.createDocumentFragment.bind(document);function Cr(t,n){return t.appendChild(n),n}function Ir(t,n){return d(n)?xn(n,K(n,(n=>t.getAttribute(n)))):(Tt(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Or=/^.[\w_-]+$/,Er=/^[A-Za-z]+$/,Sr=/\s/,Fr=document.getElementsByClassName.bind(document),Mr=document.getElementsByTagName.bind(document),jr=document.getElementById.bind(document),xr=document.querySelector.bind(document),Tr=document.querySelectorAll.bind(document);const Nr=document.createElement.bind(document);function Rr(t){const n=ur(t)&&t||`${t}.js`;return(t=>hr((n=>{wr(t,"load",n,!0),wr(t,"error",n,!0),Cr(xr("head"),t)})))(Ir(Nr("script"),{async:"",src:n}))}function Br(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&wr(document,"DOMContentLoaded",t),!1)}Br((()=>{const t=jr("AcidLib");Rr(t&&t.getAttribute("data-index")||"/index")}));const Lr=location.protocol,$r="http:"===Lr?"ws":"wss",kr=location.hostname,Dr={hardware:{cores:navigator.hardwareConcurrency},host:{name:kr,protocol:Lr,protocolSocket:$r}};function Ur(){dt(Dr,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Pr(){Ur()}Br(Pr),wr(window,"load",Pr,!0),wr(window,"resize",Pr,!0),t.hasLocal=void 0,function(n){try{n().removeItem("TESTING"),t.hasLocal=!0}catch(n){t.hasLocal=!1}}((()=>localStorage));class qr{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=yr(t)}hasLocal=t.hasLocal;setItem(t,n){return this.hasLocal&&this.local.setItem(t,ht(n)?n:He(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return i(n)?n:!i(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}const zr=(t,n)=>`color:${t};background:${n};`,Wr={alert:zr("#fff","#f44336"),important:zr("#fff","#E91E63"),notify:zr("#fff","#651FFF"),warning:zr("#000","#FFEA00")};t.BrowserStorage=qr,t.Chain=zt,t.Intervals=ar,t.Model=fr,t.Store=gr,t.Timers=_t,t.UniqID=pr,t.VirtualStorage=mr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.append=Cr,t.apply=Gt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Me(t)||Me(n)?Ke(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||Ve(t,n,e)},t.assertAsync=Ke,t.assign=dt,t.assignToClass=mt,t.assignToObject=pt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?dt(e,r):r},t.browserStorage=function(t){return new qr(t)},t.cacheNativeMethod=ln,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Tn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return y(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(Z(t))return ut(t);if(d(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Zt(setTimeout(Wt,0),(t=>{lr.remove(t)}))},t.clearTimers=function(){Zt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.cnsl=(t,n)=>{const e=ht(t)?t:He(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},t.cnslTheme=(t,n,e)=>{Wr[t]=zr(n,e)},t.compact=function(t){if(_(t)){const n=L(t),e=n.length,r={};for(let o=0;oWe(t)))},t.compactKeys=function(t){const n=[];return Tt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Xe,t.compactMapArray=u,t.compactMapAsyncArray=l,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.createFragment=vr,t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Vt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=gn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Tt,t.eachRight=I,t.eachRightAsync=O,t.ensureArray=b,t.ensureBuffer=function(t){return Z(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=bn,t.escapeRegex=En,t.escapeRegexRegex=On,t.eventAdd=wr,t.eventRemove=function(t,n,e,r){return t.removeEventListener(n,e,r),t},t.every=un,t.everyArg=function(...t){return Ut(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=E,t.everyAsyncArray=S,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;ryt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=yt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>yt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(b(n))),[]);return e},t.flattenDeep=A,t.flow=rr,t.flowAsync=cr,t.flowAsyncRight=sr,t.flowRight=or,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=Qe,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Ye,t.forOfFilterAsync=tr,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Pt,t.get=R,t.getByClass=Fr,t.getById=jr,t.getByTag=Mr,t.getEntries=function(t){if(i(t))return An(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return At(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return E(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=fn,t.getType=Jt,t.getTypeName=Xn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!oe(n)&&!oe(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):Mn(e)?e.test(n):at(e)?e(n):d(e)?E(e,(e=>t(n,e))):un(e,(e=>t(n,e))):d(n)?Mn(e)?E(n,(t=>t.test(e))):at(e)?E(n,e):d(e)?E(e,(e=>t(n,e))):n.includes(e,r):!!_(n)&&(Mn(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):_(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}})))},t.hasDot=ur,t.hasKeys=k,t.hasLength=r,t.hasProp=pn,t.hasValue=i,t.htmlEntities=_n,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Gt(n,e,r):n(...r);if(_(n))return n[e]=t,n}},t.importjs=Rr,t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.info=Dr,t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(E(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return lr.set(t,n)},t.intervals=lr,t.invert=function(t,n={}){if(t)return Tt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return G(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isAgent=br,t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=d,t.isArrayBuffer=le,t.isArrayBufferCall=ae,t.isArrayLike=function(t,n){if(oe(t)||at(t))return!1;if(d(t)||re(t))return!0;const e=t.length;if(!oe(e)||!ft(e)||e<0)return!1;if(n){const n=L(t);return!!n&&un(n,((t,n)=>n>=0&&ft(n)))}return!0},t.isAsync=Ut,t.isAsyncCall=Dt,t.isBigInt=ce,t.isBigIntCall=ie,t.isBoolean=ue,t.isBooleanCall=se,t.isBuffer=Z,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=D,t.isConstructorFactory=U,t.isConstructorNameFactory=q,t.isDate=ge,t.isDateCall=he,t.isDeno=qe,t.isDocumentReady=Br,t.isDom=function(t){return t&&9!==t.nodeType},t.isEmpty=function(t){return ht(t)||d(t)?!r(t):_(t)?!jn(t):!i(t)},t.isEnter=function(t){return 13===t.keyCode},t.isEqual=H,t.isEven=function(t){return!(1&t)},t.isF32=me,t.isF32Call=de,t.isF64=be,t.isF64Call=ye,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=Ft,t.isFileJS=Mt,t.isFileJSON=jt,t.isFloat=we,t.isFunction=at,t.isGenerator=$t,t.isGeneratorCall=Lt,t.isHTMLCollection=function(t){return!!i(t)&&"[object HTMLCollection]"===t.toString()},t.isI16=Ce,t.isI16Call=ve,t.isI32=Oe,t.isI32Call=Ie,t.isI8=Se,t.isI8Call=Ee,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Me,t.isMap=te,t.isMapCall=Yn,t.isMatchArray=function(t,n){return t.length===n.length&&E(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=L(t),r=L(n);return e.length===r.length&&E(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodeList=function(t){return!!i(t)&&"[object NodeList]"===t.toString()},t.isNodejs=ze,t.isNotArray=function(t){return!d(t)},t.isNotNumber=function(t){return!ft(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=ft,t.isNumberCall=lt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=_,t.isPositive=function(t){return 1===yn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Fe,t.isRegex=Mn,t.isRegexCall=Fn,t.isRelated=function(t,n){return!oe(t)&&!oe(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=xe,t.isSame=dn,t.isSameType=function(t,n){const e=Jt(t),r=Jt(n);return e===r&&e.name===r.name},t.isSet=Rt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=We,t.isTypeFactory=z,t.isTypedArray=re,t.isU16=Ne,t.isU16Call=Te,t.isU32=Be,t.isU32Call=Re,t.isU8=$e,t.isU8C=De,t.isU8CCall=ke,t.isU8Call=Le,t.isUndefined=e,t.isWeakMap=Pe,t.isWeakMapCall=Ue,t.isZero=bn,t.jsonParse=function(t,n){if(t)return _e.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Nn," ").trim().toLowerCase().replace(Rn,"-")},t.keys=L,t.largest=function(t){return V(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(kn," ").trim().toLowerCase()},t.map=en,t.mapArray=K,t.mapAsyncArray=G,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(_(e)||d(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?y(fr,[t,n]):R(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=oe,t.nodeAttribute=Ir,t.noop=Wt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=gt,t.objectEntries=An,t.objectSize=jn,t.omit=function(t,n){if(!t)return{};if(d(n)){const e=Sn(n);return Cn(t,((t,n)=>!e.test(n)))}if(Mn(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(ft(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):gt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return K(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=hr,t.propertyMatch=(t,n,e=L(t))=>E(e,(e=>H(t[e],n[e]))),t.querySelector=xr,t.querySelectorAll=Tr,t.randomFloat=function(t,n=0){return mn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Et,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cIt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Ot(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=At,t.sortCollectionDescendingFilter=bt,t.sortNumberAscending=function(t){return t.sort(J)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=It,t.sortObjectsAlphabeticallyReverse=Ot,t.sortUnique=ct,t.stringify=He,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=J,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.themes=Wr,t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Vt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Vt,t.timers=Ht,t.times=Zt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Tt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(A(t))},t.uniqID=dr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Qn,t.upperFirstOnlyAll=function(t){return t.replace(Kn,(t=>Qn(t)))},t.virtualStorage=yr,t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Vn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=y(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=xn})); //# sourceMappingURL=browser.js.map diff --git a/build/browser.js.map b/build/browser.js.map index 9ee367a..714b63c 100644 --- a/build/browser.js.map +++ b/build/browser.js.map @@ -1 +1 @@ -{"version":3,"file":"browser.js","sources":["../source/arrays/clear.js","../source/types/isUndefined.js","../source/utilities/hasLength.js","../source/types/isNull.js","../source/types/hasValue.js","../source/utilities/returnValue.js","../source/arrays/each.js","../source/arrays/compactMap.js","../source/arrays/eachAsync.js","../source/arrays/compactMapAsync.js","../source/numbers/isNegative.js","../source/arrays/range.js","../source/types/isArray.js","../source/classes/construct.js","../source/arrays/ensure.js","../source/arrays/flattenDeep.js","../source/utilities/forEach.js","../source/arrays/difference.js","../source/arrays/drop.js","../source/arrays/eachRight.js","../source/arrays/eachRightAsync.js","../source/arrays/every.js","../source/arrays/everyAsync.js","../source/arrays/filter.js","../source/arrays/filterAsync.js","../source/utilities/toPath.js","../source/utilities/get.js","../source/objects/keys.js","../source/objects/hasKeys.js","../source/types/isConstructor.js","../source/types/isTypeFactory.js","../source/types/isBuffer.js","../source/types/isPlainObject.js","../source/utilities/isEqual.js","../source/arrays/largest.js","../source/arrays/map.js","../source/arrays/mapAsync.js","../source/math/subtract.js","../source/math/subtractReverse.js","../source/math/randomInt.js","../source/internal/array.js","../source/arrays/shuffle.js","../source/arrays/smallest.js","../source/arrays/unique.js","../source/buffers/clear.js","../source/types/isFunction.js","../source/types/isNumber.js","../source/types/isString.js","../source/objects/assign.js","../source/classes/extendClass.js","../source/collection/findIndexCache.js","../source/collection/sortCollectionDescending.js","../source/collection/sortCollectionAscending.js","../source/objects/pluckObject.js","../source/collection/sortCollectionAlphabetically.js","../source/collection/sortCollectionAlphabeticallyReverse.js","../source/internal/regexTestFactory.js","../source/files/isFileCSS.js","../source/files/isFileHTML.js","../source/files/isFileJS.js","../source/files/isFileJSON.js","../source/objects/eachAsync.js","../source/objects/each.js","../source/types/isSet.js","../source/utilities/forOf.js","../source/types/isGenerator.js","../source/utilities/forOfAsync.js","../source/types/isAsync.js","../source/utilities/generateLoop.js","../source/utilities/each.js","../source/functions/chain.js","../source/utilities/noop.js","../source/utilities/times.js","../source/utilities/timer.js","../source/internal/apply.js","../source/types/getType.js","../source/types/cloneType.js","../source/utilities/forOfMap.js","../source/utilities/forOfMapAsync.js","../source/objects/mapAsync.js","../source/objects/map.js","../source/utilities/map.js","../source/objects/everyAsync.js","../source/objects/every.js","../source/utilities/forOfEvery.js","../source/utilities/forOfEveryAsync.js","../source/utilities/every.js","../source/utilities/cacheNativeMethod.js","../source/internal/object.js","../source/internal/isSame.js","../source/math/randomFloat.js","../source/numbers/isPositive.js","../source/numbers/isZero.js","../source/objects/getEntries.js","../source/objects/compactMapAsync.js","../source/objects/compactMap.js","../source/objects/filter.js","../source/objects/filterAsync.js","../source/objects/isMatch.js","../source/regexps/escapeRegex.js","../source/regexps/arrayToRegex.js","../source/types/isRegex.js","../source/objects/size.js","../source/objects/zip.js","../source/strings/camelCase.js","../source/strings/kebabCase.js","../source/strings/snakeCase.js","../source/strings/upperCase.js","../source/strings/lowerCase.js","../source/strings/range.js","../source/strings/sanitize.js","../source/strings/tokenize.js","../source/strings/typography.js","../source/types/getTypeName.js","../source/types/isMap.js","../source/types/isTypedArray.js","../source/types/noValue.js","../source/types/isBigInt.js","../source/types/isBoolean.js","../source/types/isArrayBuffer.js","../source/types/isCloneable.js","../source/types/isDate.js","../source/types/isFalse.js","../source/types/isF32.js","../source/types/isF64.js","../source/types/isFloat.js","../source/types/isI16.js","../source/types/isI32.js","../source/types/isI8.js","../source/types/isPromise.js","../source/types/isKindAsync.js","../source/types/isSafeInt.js","../source/types/isU16.js","../source/types/isU32.js","../source/types/isU8.js","../source/types/isU8C.js","../source/types/isWeakMap.js","../source/types/isDeno.js","../source/types/isNode.js","../source/types/isTruthy.js","../source/utilities/notEqual.js","../source/utilities/json.js","../source/utilities/assert.js","../source/utilities/clone.js","../source/utilities/forOfCompactMapAsync.js","../source/utilities/forOfCompactMap.js","../source/utilities/compactMap.js","../source/utilities/forOfFilter.js","../source/utilities/forOfFilterAsync.js","../source/utilities/filter.js","../source/utilities/flow.js","../source/utilities/flowAsync.js","../source/utilities/hasDot.js","../source/utilities/interval.js","../source/utilities/model.js","../source/utilities/promise.js","../source/utilities/store.js","../source/utilities/uid.js","../source/utilities/virtualStorage.js","../source/browser/agent.js","../source/browser/event.js","../source/browser/frag.js","../source/browser/append.js","../source/browser/attribute.js","../source/browser/selector.js","../source/browser/importScript.js","../source/browser/ready.js","../source/browser/info.js","../source/browser/dimensions.js","../source/browser/storage.js","../source/browser/console.js","../source/math/add.js","../source/functions/after.js","../source/utilities/arraysToObject.js","../source/functions/ary.js","../source/functions/before.js","../source/utilities/bindAll.js","../source/math/progress.js","../source/arrays/chunk.js","../source/utilities/clear.js","../source/arrays/clone.js","../source/utilities/compact.js","../source/objects/compactKeys.js","../source/utilities/concurrent.js","../source/arrays/concurrentEach.js","../source/utilities/concurrentStatus.js","../source/collection/countBy.js","../source/collection/countKey.js","../source/collection/countWithoutKey.js","../source/functions/curry.js","../source/functions/curryRight.js","../source/functions/debounce.js","../source/math/deduct.js","../source/math/divide.js","../source/arrays/dropRight.js","../source/buffers/ensure.js","../source/utilities/everyArg.js","../source/collection/findIndex.js","../source/collection/findItem.js","../source/arrays/first.js","../source/arrays/flatten.js","../source/utilities/forEachAsync.js","../source/utilities/forMap.js","../source/files/getExtension.js","../source/files/getFilename.js","../source/collection/getHighest.js","../source/collection/getLowest.js","../source/arrays/getNumberInsertIndex.js","../source/collection/groupBy.js","../source/utilities/has.js","../source/functions/ifInvoke.js","../source/utilities/ifNotAssign.js","../source/utilities/ifValue.js","../source/utilities/inAsync.js","../source/utilities/inSync.js","../source/math/increment.js","../source/collection/indexBy.js","../source/arrays/initial.js","../source/arrays/intersect.js","../source/objects/invert.js","../source/arrays/invoke.js","../source/collection/invoke.js","../source/collection/invokeAsync.js","../source/types/isArguments.js","../source/types/isArrayLike.js","../source/types/isChild.js","../source/browser/is.js","../source/types/isEmpty.js","../source/browser/isEnter.js","../source/types/isFalsy.js","../source/types/isIterable.js","../source/arrays/isMatch.js","../source/numbers/isNumberEqual.js","../source/numbers/isNumberInRange.js","../source/numbers/isNumberNotInRange.js","../source/types/isParent.js","../source/types/isPrimitive.js","../source/types/isRelated.js","../source/types/isSameType.js","../source/types/isTrue.js","../source/arrays/last.js","../source/arrays/mapRight.js","../source/arrays/mapWhile.js","../source/utilities/merge.js","../source/math/multiple.js","../source/functions/negate.js","../source/functions/nthArg.js","../source/objects/omit.js","../source/functions/once.js","../source/functions/over.js","../source/functions/overEvery.js","../source/utilities/pair.js","../source/arrays/partition.js","../source/objects/pick.js","../source/collection/pluck.js","../source/utilities/propertyMatch.js","../source/functions/rearged.js","../source/math/remainder.js","../source/arrays/remove.js","../source/strings/replace.js","../source/arrays/rest.js","../source/arrays/right.js","../source/arrays/sample.js","../source/utilities/setKey.js","../source/utilities/setValue.js","../source/arrays/sortNumberAscending.js","../source/arrays/sortNumberDescening.js","../source/utilities/stubArray.js","../source/utilities/stubFalse.js","../source/utilities/stubObject.js","../source/utilities/stubString.js","../source/utilities/stubTrue.js","../source/math/subtractAll.js","../source/math/sumAll.js","../source/arrays/take.js","../source/arrays/takeRight.js","../source/functions/throttle.js","../source/utilities/timesAsync.js","../source/utilities/toggle.js","../source/strings/truncate.js","../source/arrays/zip.js","../source/arrays/union.js","../source/arrays/untilFalse.js","../source/arrays/untilTrue.js","../source/arrays/whileCompactMap.js","../source/arrays/whileEach.js","../source/arrays/whileMap.js","../source/arrays/without.js","../source/functions/wrap.js","../source/arrays/xor.js"],"sourcesContent":["/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [key, value] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst zipedObject = {};\n\teachArray(properties, (item, key) => {\n\t\tzipedObject[item] = values[key];\n\t});\n\treturn zipedObject;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst unZippedKeys = [];\n\tconst values = [];\n\teachObject(object, (item, key) => {\n\t\tunZippedKeys.push(key);\n\t\tvalues.push(item);\n\t});\n\treturn [unZippedKeys, values];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(compactMapArray, compactMapAsyncArray,\n\tcompactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from '../objects/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isBoolean } from '../types/isBoolean.js';\nimport { keys } from '../objects/keys.js';\nimport { noop } from '../utilities/noop';\n/**\n * Checks to see of the browser agent has a string.\n *\n * @function isAgent\n * @category browser\n * @type {Function}\n * @param {String} source - The string to search for.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isAgent, assert } from '@universalweb/acid';\n * assert(isAgent('NotThere'), false);\n */\nexport function isAgent(source) {\n\treturn (hasValue(source)) ? isAgent[source] : keys(isAgent);\n}\nconst userAgent = globalThis.navigator?.userAgentData;\nif (userAgent) {\n\teachObject(userAgent, (value, key) => {\n\t\tif (isBoolean(value) && value) {\n\t\t\tisAgent[key] = value;\n\t\t}\n\t});\n\teachArray(userAgent.brands, (value) => {\n\t\tisAgent[value.brand] = value.version;\n\t});\n} else if (navigator.userAgent) {\n\tlet userAgentNormalized = navigator.userAgent.toLowerCase();\n\tuserAgentNormalized = userAgentNormalized.replace(/_/g, '.');\n\tuserAgentNormalized = userAgentNormalized.replace(/[#_,;()]/g, '');\n\tconst userAgentSplit = userAgentNormalized.split(/ |\\//);\n\teachArray(userAgentSplit, (item) => {\n\t\tisAgent[item] = true;\n\t});\n}\n\n","/**\n * Attaches an event listener to a node.\n *\n * @function eventAdd\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventAdd(document.body, 'click', () => {console.log('CLICKED');});\n * // = > document.body\n */\nexport function eventAdd(node, eventName, callback, useCapture) {\n\tnode.addEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n/**\n * Attaches an event listener to a node.\n *\n * @function eventRemove\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventRemove(document.body, () => {console.log('CLICKED');});\n * // = > Undefined\n */\nexport function eventRemove(node, eventName, callback, useCapture) {\n\tnode.removeEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n\n","/**\n * Create a document fragment.\n *\n * @function createFragment\n * @category browser\n * @type {Function}\n * @ignore\n * @returns {Fragment} - Returns a new document fragment.\n */\nexport const createFragment = document.createDocumentFragment.bind(document);\n","/**\n * Append a DOM node.\n *\n * @function append\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @ignore\n * @param {Node} parentNode - The parent node.\n * @param {Node} child - The node to be appended.\n * @returns {undefined} - Returns the child.\n */\nexport function append(parentNode, child) {\n\tparentNode.appendChild(child);\n\treturn child;\n}\n","import { eachObject } from '../objects/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { mapArray } from '../arrays/map.js';\nimport { zipObject } from '../objects/zip.js';\n/**\n * Assign attributes to a DOM node.\n *\n * @function nodeAttribute\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @async\n * @param {Node} node - The DOM node.\n * @param {Object|Array} object - Object with key being the attribute name and the value being the attribute value. If an array is given it will get the values corresponding to the array items.\n * @returns {Object|Node} - If using an array this returns an object of attribute names as keys and their values as the property value. If using an object this will return the provided node.\n *\n * @example\n * nodeAttribute(document.body, { 'data-example': 'test'});\n */\nexport function nodeAttribute(node, object) {\n\tif (isArray(object)) {\n\t\treturn zipObject(object, mapArray(object, (item) => {\n\t\t\treturn node.getAttribute(item);\n\t\t}));\n\t}\n\teachObject(object, (item, key) => {\n\t\tnode.setAttribute(key, item);\n\t});\n\treturn node;\n}\n\n","import { restString } from '../strings/range.js';\nconst dotString = '.';\nconst poundString = '#';\nconst classTest = /^.[\\w_-]+$/;\nconst tagTest = /^[A-Za-z]+$/;\nconst regexSpace = /\\s/;\n/**\n * Wrapper around getElementsByClassName.\n *\n * @function getByClass\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByClass = document.getElementsByClassName.bind(document);\n/**\n * Wrapper around getElementsByTagName.\n *\n * @function getByTag\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByTag = document.getElementsByTagName.bind(document);\n/**\n * Wrapper around getElementsByIdName.\n *\n * @function getById\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getById = document.getElementById.bind(document);\n/**\n * Wrapper around querySelector.\n *\n * @function querySelector\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelector = document.querySelector.bind(document);\n/**\n * Wrapper around querySelectorAll.\n *\n * @function querySelectorAll\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelectorAll = document.querySelectorAll.bind(document);\n/**\n * Returns relevant DOM node.\n *\n * @function selector\n * @category browser\n * @ignoreTest\n * @param {String} select - String to be evaluated.\n * @type {Function}\n * @returns {Node} - Returns a DOM node.\n *\n * @example\n * selector('#node');\n * // =>
\n */\nexport function selector(select) {\n\tconst firstLetter = select[0];\n\tswitch (firstLetter) {\n\t\tcase poundString: {\n\t\t\tif (!regexSpace.test(select)) {\n\t\t\t\treturn getById(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase dotString: {\n\t\t\tif (classTest.test(select)) {\n\t\t\t\treturn getByClass(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tif (tagTest.test(select)) {\n\t\t\t\treturn getByTag(select);\n\t\t\t}\n\t\t}\n\t}\n\treturn querySelectorAll(select);\n}\n\n","import { append } from './append.js';\nimport { eventAdd } from './event.js';\nimport { hasDot } from '../utilities/hasDot.js';\nimport { nodeAttribute } from './attribute.js';\nimport { promise } from '../utilities/promise.js';\nimport { querySelector } from './selector.js';\nconst createElementCache = document.createElement.bind(document);\nconst nodeAttachLoadingEvents = (node) => {\n\treturn promise((accept) => {\n\t\teventAdd(node, 'load', accept, true);\n\t\teventAdd(node, 'error', accept, true);\n\t\tappend(querySelector('head'), node);\n\t});\n};\n/**\n * Asynchronously import a js file and append it to the head node.\n * If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity.\n *\n * @function importjs\n * @category browser\n * @type {Function}\n * @async\n * @param {*} url - URL of the script to import. If not \".\" is found in the file name \".js\" will be appended.\n * @returns {Promise} - Returns a promise which returns a \"load\" or \"error\" event associated with the script.\n *\n * @example\n * importjs('core.js');\n * importjs('core');\n */\nexport function importjs(url) {\n\tconst src = hasDot(url) && url || `${url}.js`;\n\tconst node = nodeAttribute(createElementCache('script'), {\n\t\tasync: '',\n\t\tsrc\n\t});\n\treturn nodeAttachLoadingEvents(node);\n}\n\n","import { eventAdd } from './event.js';\nimport { getById } from './selector.js';\nimport { importjs } from './importScript.js';\n/**\n * Runs a function if the document has finished loading. If not, add an eventlistener.\n *\n * @function isDocumentReady\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Function} callable - Function to be run.\n * @returns {Boolean|Function} - If the document is ready, returns a function. If not, return false.\n *\n * @example\n * isDocumentReady(() => {return 1});\n * // => 1\n */\nexport function isDocumentReady(callable) {\n\tconst state = document.readyState;\n\tconst checkStatus = state === 'interactive' || state === 'completed' || state === 'complete';\n\tif (checkStatus) {\n\t\treturn (callable) ? callable() : true;\n\t}\n\tif (callable) {\n\t\teventAdd(document, 'DOMContentLoaded', callable);\n\t}\n\treturn false;\n}\nisDocumentReady(() => {\n\tconst scriptTag = getById('AcidLib');\n\tconst scriptName = (scriptTag && scriptTag.getAttribute('data-index')) || '/index';\n\timportjs(scriptName);\n});\n","const protocol = location.protocol;\nconst protocolSocket = (protocol === 'http:') ? 'ws' : 'wss';\nconst hostname = location.hostname;\n/**\n * Holds client hardware, browser, and host info.\n *\n * @memberof $\n * @category browser\n * @ignoreTest\n * @property {Object} info - Client hardware & host info.\n * @type {Object}\n */\nexport const info = {\n\thardware: {\n\t\tcores: navigator.hardwareConcurrency\n\t},\n\thost: {\n\t\tname: hostname,\n\t\tprotocol,\n\t\tprotocolSocket,\n\t}\n};\n\n","import { assign } from '../objects/assign.js';\nimport { eventAdd } from './event.js';\nimport { info } from './info.js';\nimport { isDocumentReady } from './ready.js';\nexport function saveDimensions() {\n\tassign(info, {\n\t\tbodyHeight: document.body.offsetHeight,\n\t\tbodyWidth: document.body.offsetWidth,\n\t\twindowHeight: window.innerHeight,\n\t\twindowWidth: window.innerWidth,\n\t});\n}\n/**\n * Save current document & window dimensions to the info property.\n *\n * @function updateDimensions\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * updateDimensions();\n */\nexport function updateDimensions() {\n\tsaveDimensions();\n}\nisDocumentReady(updateDimensions);\neventAdd(window, 'load', updateDimensions, true);\neventAdd(window, 'resize', updateDimensions, true);\n\n","/**\n * LocalStorage Module..\n *\n * @module browser/storage\n */\nimport { hasValue } from '../types/hasValue.js';\nimport { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nimport { virtualStorage } from '../utilities/virtualStorage.js';\nexport let hasLocal;\nfunction hasStorage(storeCheck) {\n\ttry {\n\t\tstoreCheck().removeItem('TESTING');\n\t\thasLocal = true;\n\t} catch (e) {\n\t\thasLocal = false;\n\t}\n}\nhasStorage(() => {\n\treturn localStorage;\n});\n/**\n * Constructs a virtual storage container with localStorage support.\n * BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported.\n * If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed.\n * BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed.\n *\n * @class BrowserStorage\n * @category browser\n * @returns {BrowserStorage} - Returns a new instance of BrowserStorage.\n *\n * @example\n * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n * const storageBrowserStorage = construct(BrowserStorage);\n * storageBrowserStorage.setItem('key', 'value');\n * assert(storageBrowserStorage.getItem('key'), 'value');\n */\nexport class BrowserStorage {\n\tconstructor(initialObject) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local = localStorage;\n\t\t}\n\t\tthis.storage = virtualStorage(initialObject);\n\t}\n\thasLocal = hasLocal;\n\t/**\n\t * Save an item to a browserStorage.\n\t *\n\t * @function setItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.setItem(key, (isString(value)) ? value : stringify(value));\n\t\t}\n\t\treturn this.storage.setItem(key, value);\n\t}\n\t/**\n\t * Get an item from a browserStorage.\n\t *\n\t * @function getItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tgetItem(key) {\n\t\tconst item = this.storage.getItem(key);\n\t\tif (hasValue(item)) {\n\t\t\treturn item;\n\t\t}\n\t\tif (!hasValue(item) && this.hasLocal) {\n\t\t\treturn this.local.getItem(key);\n\t\t}\n\t}\n\t/**\n\t * Clears all data for the browserStorage including all of localStorage if supported.\n\t *\n\t * @function clear\n\t * @class BrowserStorage\n\t * @category browser\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.clear();\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tclear() {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.clear();\n\t\t}\n\t\tthis.storage.clear();\n\t}\n\t/**\n\t * Remove an item from a browserStorage.\n\t *\n\t * @class BrowserStorage\n\t * @category browser\n\t * @function removeItem\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.removeItem('key');\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tremoveItem(key) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.removeItem(key);\n\t\t}\n\t\tthis.storage.removeItem(key);\n\t}\n}\n/**\n * The browserStorage function is a factory which wraps the BrowserStorage class constructor.\n *\n * @function browserStorage\n * @category browser\n * @type {Function}\n * @returns {*} - Returns a new BrowserStorage Object.\n *\n * @example\n * const storageBrowserStorage = browserStorage();\n * // => New BrowserStorage Object\n */\nexport function browserStorage(virtualFlag) {\n\treturn new BrowserStorage(virtualFlag);\n}\n\n","import { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nconst generateTheme = (color, bg) => {\n\treturn `color:${color};background:${bg};`;\n};\nexport const themes = {\n\talert: generateTheme('#fff', '#f44336'),\n\timportant: generateTheme('#fff', '#E91E63'),\n\tnotify: generateTheme('#fff', '#651FFF'),\n\twarning: generateTheme('#000', '#FFEA00'),\n};\n/**\n * Console.trace wrapper with theme support.\n *\n * @function cnsl\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Object} value - The value to be logged.\n * @param {String} themeName - The name of the theme to be used.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnsl('Lucy', 'notify');\n * // 'Lucy'\n */\nexport const cnsl = (value, themeName) => {\n\tconst data = isString(value) ? value : stringify(value);\n\tif (themeName === 'alert' || themeName === 'warning') {\n\t\treturn console.trace(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n\t}\n\tconsole.log(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n};\n/**\n * Create color themes for cnsl method.\n *\n * @function cnslTheme\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {String} themeName - The name of the theme.\n * @param {String} color - The text color.\n * @param {String} background - The background color of the block.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnslTheme('BlackNWhite', '#fff', '#000');\n */\nexport const cnslTheme = (themeName, color, background) => {\n\tthemes[themeName] = generateTheme(color, background);\n};\n\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0;index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { difference } from '../arrays/difference.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Checks if value is a plain DOM Node.\n *\n * @function isDom\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDom, assert } from '@universalweb/acid';\n * assert(isDom(document.querySelectorAll('head')), true);\n */\nexport function isDom(source) {\n\treturn source && source.nodeType !== 9;\n}\n/**\n * Checks if the value is a HTMLCollection.\n *\n * @function isHTMLCollection\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isHTMLCollection, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isHTMLCollection(document.getElementsByClassName('test')), true);\n */\nconst objectHTMLCollection = '[object HTMLCollection]';\nexport function isHTMLCollection(source) {\n\treturn (hasValue(source)) ? source.toString() === objectHTMLCollection : false;\n}\n/**\n * Checks if the value is a NodeList.\n *\n * @function isNodeList\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNodeList, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isNodeList(document.querySelectorAll('.test')), true);\n */\nconst objectNodeList = '[object NodeList]';\nexport function isNodeList(source) {\n\treturn (hasValue(source)) ? source.toString() === objectNodeList : false;\n}\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Checks if the keycode of the event is strictly equal to 13.\n *\n * @function isEnter\n * @category browser\n * @type {Function}\n * @param {Object} eventObject - Object to be checked.\n * @returns {Boolean} - Returns true if the keycode property of the object equals 13.\n *\n * @example\n * isEnter('click');\n * // => false\n */\nexport function isEnter(eventObject) {\n\treturn eventObject.keyCode === 13;\n}\n\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0;index < arrayLength;index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn (isEqual(on, value)) ? off : on;\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n"],"names":["clearArray","source","length","isUndefined","undefined","hasLength","Boolean","isNull","hasValue","returnValue","eachArray","iteratee","thisBind","additionalArg","arrayLength","index","call","compactMapArray","results","thisCall","item","arrayOriginal","returned","push","async","eachAsyncArray","compactMapAsyncArray","result","sign","Math","isNegative","rangeUp","start","end","step","sourceArray","position","rangeDown","isArray","Array","reflectConstruct","Reflect","construct","target","argumentsList","newTarget","args","ensureArray","flattenDeep","flat","Infinity","forEach","callback","difference","sources","differencesMap","Map","differences","currentArray","parentIndex","child","childIndex","childRoot","get","count","set","drop","array","amount","upTo","splice","eachRight","additionalArgument","eachRightAsync","everyArray","sourceLength","everyAsyncArray","filterArray","filterAsyncArray","regexToPath","regexCloseBracket","emptyString","toPath","replace","split","propertyString","link","objectKeys","Object","keys","hasOwn","hasKeys","properties","pathArray","lastPath","pop","initialPathObject","isConstructor","constructor","isConstructorFactory","constructorName","name","isConstructorNameFactory","isTypeFactory","method","primarySource","otherSources","isBufferCall","isBuffer","isPlainObject","toString","trim","slice","isEqual","equals","sourceProperties","key","mathNativeMax","max","mapArray","mapAsyncArray","subtract","minuend","subtrahend","subtractReverse","floor","random","randomInt","min","arrayFrom","from","toArray","arrayLike","mapFn","thisArg","shuffle","shuffleArray","value","mathNativeMin","onlyUnique","indexOf","sortUnique","unique","isSorted","filter","clearBuffer","fill","isFunction","Function","isNumberCall","isNumber","isString","String","objectAssign","assign","assignToObject","assignToClass","prototype","findIndexCache","element","indexMatch","propertyName","sortCollectionDescendingFilter","previous","next","ifMatch","previousKey","nextKey","sortCollectionDescending","collection","sort","sortCollectionAscendingFilter","sortCollectionAscending","pluckObject","targets","sortObjectsAlphabetically","localeCompare","sortObjectsAlphabeticallyReverse","regexTestFactory","regexType","test","isFileCSS","isFileHTML","isFileJS","isFileJSON","eachAsyncObject","propertyCount","eachObject","objectKeysArray","isSetCall","isSet","forOf","isGeneratorCall","isGenerator","forOfAsync","generatorArgs","isAsyncCall","isAsync","generateLoop","arrayLoop","arrayLoopAsync","objectLoop","objectLoopAsync","forOfLoop","forOfLoopAsync","argument1","argument2","argument3","isIterateeAsync","each","Chain","methods","this","addChainMethod","thisChain","methodName","setValue","done","noop","times","Timers","list","remove","id","clearTimeout","delete","has","callable","time","currentThis","setTimeout","clear","timers","timer","applyNative","apply","thisArgument","getType","cloneType","sourceType","forOfMap","resultsObject","methodPush","add","methodPushBound","bind","methodSet","forOfMapAsync","resultsGenerator","mapAsyncObject","thisObject","mapObject","original","map","everyAsyncObject","everyObject","forOfEvery","forOfEveryAsync","every","functionPrototype","cacheNativeMethod","getPropNames","getOwnPropertyNames","getPropDesc","getOwnPropertyDescriptor","defProp","defineProperty","hasProp","hasOwnProperty","isSame","is","isZero","objectEntries","entries","compactMapAsyncObject","compactMapObject","filterObject","filterAsyncObject","escapeRegexRegex","escapeRegex","arrayToRegex","makeSafe","RegExp","join","isRegexCall","isRegex","objectSize","objectLengthProperty","objectSizeProperty","size","zipObject","values","zipedObject","normalizeCase","space","restString","string","substring","rawURLDecodeRegex","andRegex","lessThanRegex","moreThanRegex","doubleQuoteRegex","rawURLDecode","decodeURIComponent","htmlEntities","tokenizeRegEx","wordsRegEx","getWords","upperFirstLetter","toUpperCase","upperFirst","upperFirstOnly","toLowerCase","getTypeName","isMapCall","isMap","typedArrayRegex","arrayConstructorName","isTypedArray","noValue","isBigIntCall","isBigInt","isBooleanCall","isBoolean","isArrayBufferCall","isArrayBuffer","constructorNames","isDateCall","isDate","isFalse","isF32Call","isF32","isF64Call","isF64","isInteger","Number","isFloat","isI16Call","isI16","isI32Call","isI32","isI8Call","isI8","isPromise","Promise","isKindAsync","isSafeInteger","isSafeInt","isU16Call","isU16","isU32Call","isU32","isU8Call","isU8","isU8CCall","isU8C","isWeakMapCall","isWeakMap","isDeno","globalThis","Deno","isNodejs","process","versions","node","isTruthy","returnIfTrue","notEqual","jsonNative","JSON","stringify","createAssertError","expected","localOptions","options","errorTitle","title","file","Error","assertAsync","sourceArg","structuredCloneSafe","structuredClone","forOfCompactMapAsync","forOfCompactMap","compactMap","forOfFilter","forOfFilterAsync","returnFlow","arg","flow","flowRight","flowAsync","flowAsyncRight","hasDot","Intervals","clearInterval","setInterval","intervals","Model","static","modelName","modelSource","models","promise","Store","property","data","Proxy","proxySource","console","log","UniqID","totalActive","freed","totalFree","shift","free","isActive","shouldReset","reset","uniqID","VirtualStorage","initialObject","items","getItem","hasItem","setItem","removeItem","virtualStorage","isAgent","userAgent","navigator","userAgentData","brands","brand","version","userAgentNormalized","eventAdd","eventName","useCapture","addEventListener","createFragment","document","createDocumentFragment","append","parentNode","appendChild","nodeAttribute","object","getAttribute","setAttribute","classTest","tagTest","regexSpace","getByClass","getElementsByClassName","getByTag","getElementsByTagName","getById","getElementById","querySelector","querySelectorAll","createElementCache","createElement","importjs","url","src","accept","nodeAttachLoadingEvents","isDocumentReady","state","readyState","scriptTag","protocol","location","protocolSocket","hostname","info","hardware","cores","hardwareConcurrency","host","saveDimensions","bodyHeight","body","offsetHeight","bodyWidth","offsetWidth","windowHeight","window","innerHeight","windowWidth","innerWidth","updateDimensions","exports","hasLocal","storeCheck","e","hasStorage","localStorage","BrowserStorage","local","storage","generateTheme","color","bg","themes","alert","important","notify","warning","augend","addend","point","sortedObject","bindThis","targetAssign","virtualFlag","total","currentAmount","config","chunked","match","themeName","trace","background","sourceKeys","sourceKeysLength","targetObject","i","keyName","compactedKeys","all","queue","allSettled","arity","curries","curried","curryArgs","unshift","debounced","Buffer","alloc","removeEventListener","findIndex","find","level","reduce","previousValue","currentValue","concat","valuesLength","cloned","methodBound","lastIndexOf","insertIndex","search","includes","rootObject","equalThis","optional","text","arrays","otherItem","strictFlag","indexes","sourceChild","targetParent","nodeType","eventObject","keyCode","Symbol","iterator","compareArray","targetKeys","sourceParent","targetChild","type","targetOne","targetTwo","other","otherType","reviver","parse","indexFrom","trueIndex","merge","currentSource","sourceItem","sourceKey","blacklist","blacklistRegex","numberToString","iteratees","predicates","predicate","rejected","whitelist","compared","removeThese","words","sampleArray","used","select","numberList","a","b","endIndex","indexRight","throttled","shouldThrottle","on","off","maxLength","stringLength","breakAll","breakAllLength","truncateDown","truncateUp","arraySet","unZippedKeys","sourcesSet","Set","wrapper","xorMap","xored"],"mappings":"yOAaO,SAASA,EAAWC,GAE1B,OADAA,EAAOC,OAAS,EACTD,CACR,CCLO,SAASE,EAAYF,GAC3B,YAAkBG,IAAXH,CACR,CCAO,SAASI,EAAUJ,GACzB,OAAOK,QAAQL,EAAOC,OACvB,CCFO,SAASK,EAAON,GACtB,OAAkB,OAAXA,CACR,CCDO,SAASO,EAASP,GACxB,OAAQE,EAAYF,KAAYM,EAAON,EAC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,EAAO,GAAGvT,KAAI,CAACzO,EAAML,IACpBqiB,EAAOvT,KAAK1L,GACXA,EAAMpD,MAGhB"} \ No newline at end of file +{"version":3,"file":"browser.js","sources":["../source/arrays/clear.js","../source/types/isUndefined.js","../source/utilities/hasLength.js","../source/types/isNull.js","../source/types/hasValue.js","../source/utilities/returnValue.js","../source/arrays/each.js","../source/arrays/compactMap.js","../source/arrays/eachAsync.js","../source/arrays/compactMapAsync.js","../source/numbers/isNegative.js","../source/arrays/range.js","../source/types/isArray.js","../source/classes/construct.js","../source/arrays/ensure.js","../source/arrays/flattenDeep.js","../source/utilities/forEach.js","../source/arrays/difference.js","../source/arrays/drop.js","../source/arrays/eachRight.js","../source/arrays/eachRightAsync.js","../source/arrays/every.js","../source/arrays/everyAsync.js","../source/arrays/filter.js","../source/arrays/filterAsync.js","../source/utilities/toPath.js","../source/utilities/get.js","../source/objects/keys.js","../source/objects/hasKeys.js","../source/types/isConstructor.js","../source/types/isTypeFactory.js","../source/types/isBuffer.js","../source/types/isPlainObject.js","../source/utilities/isEqual.js","../source/arrays/largest.js","../source/arrays/map.js","../source/arrays/mapAsync.js","../source/math/subtract.js","../source/math/subtractReverse.js","../source/math/randomInt.js","../source/internal/array.js","../source/arrays/shuffle.js","../source/arrays/smallest.js","../source/arrays/unique.js","../source/buffers/clear.js","../source/types/isFunction.js","../source/types/isNumber.js","../source/types/isString.js","../source/objects/assign.js","../source/classes/extendClass.js","../source/collection/findIndexCache.js","../source/collection/sortCollectionDescending.js","../source/collection/sortCollectionAscending.js","../source/objects/pluckObject.js","../source/collection/sortCollectionAlphabetically.js","../source/collection/sortCollectionAlphabeticallyReverse.js","../source/internal/regexTestFactory.js","../source/files/isFileCSS.js","../source/files/isFileHTML.js","../source/files/isFileJS.js","../source/files/isFileJSON.js","../source/objects/eachAsync.js","../source/objects/each.js","../source/types/isSet.js","../source/utilities/forOf.js","../source/types/isGenerator.js","../source/utilities/forOfAsync.js","../source/types/isAsync.js","../source/utilities/generateLoop.js","../source/utilities/each.js","../source/functions/chain.js","../source/utilities/noop.js","../source/utilities/times.js","../source/utilities/timer.js","../source/internal/apply.js","../source/types/getType.js","../source/types/cloneType.js","../source/utilities/forOfMap.js","../source/utilities/forOfMapAsync.js","../source/objects/mapAsync.js","../source/objects/map.js","../source/utilities/map.js","../source/objects/everyAsync.js","../source/objects/every.js","../source/utilities/forOfEvery.js","../source/utilities/forOfEveryAsync.js","../source/utilities/every.js","../source/utilities/cacheNativeMethod.js","../source/internal/object.js","../source/internal/isSame.js","../source/math/randomFloat.js","../source/numbers/isPositive.js","../source/numbers/isZero.js","../source/objects/getEntries.js","../source/objects/compactMapAsync.js","../source/objects/compactMap.js","../source/objects/filter.js","../source/objects/filterAsync.js","../source/objects/isMatch.js","../source/regexps/escapeRegex.js","../source/regexps/arrayToRegex.js","../source/types/isRegex.js","../source/objects/size.js","../source/objects/zip.js","../source/strings/camelCase.js","../source/strings/kebabCase.js","../source/strings/snakeCase.js","../source/strings/upperCase.js","../source/strings/lowerCase.js","../source/strings/range.js","../source/strings/sanitize.js","../source/strings/tokenize.js","../source/strings/typography.js","../source/types/getTypeName.js","../source/types/isMap.js","../source/types/isTypedArray.js","../source/types/noValue.js","../source/types/isBigInt.js","../source/types/isBoolean.js","../source/types/isArrayBuffer.js","../source/types/isCloneable.js","../source/types/isDate.js","../source/types/isFalse.js","../source/types/isF32.js","../source/types/isF64.js","../source/types/isFloat.js","../source/types/isI16.js","../source/types/isI32.js","../source/types/isI8.js","../source/types/isPromise.js","../source/types/isKindAsync.js","../source/types/isSafeInt.js","../source/types/isU16.js","../source/types/isU32.js","../source/types/isU8.js","../source/types/isU8C.js","../source/types/isWeakMap.js","../source/types/isDeno.js","../source/types/isNode.js","../source/types/isTruthy.js","../source/utilities/notEqual.js","../source/utilities/json.js","../source/utilities/assert.js","../source/utilities/clone.js","../source/utilities/forOfCompactMapAsync.js","../source/utilities/forOfCompactMap.js","../source/utilities/compactMap.js","../source/utilities/forOfFilter.js","../source/utilities/forOfFilterAsync.js","../source/utilities/filter.js","../source/utilities/flow.js","../source/utilities/flowAsync.js","../source/utilities/hasDot.js","../source/utilities/interval.js","../source/utilities/model.js","../source/utilities/promise.js","../source/utilities/store.js","../source/utilities/uid.js","../source/utilities/virtualStorage.js","../source/browser/agent.js","../source/browser/event.js","../source/browser/frag.js","../source/browser/append.js","../source/browser/attribute.js","../source/browser/selector.js","../source/browser/importScript.js","../source/browser/ready.js","../source/browser/info.js","../source/browser/dimensions.js","../source/browser/storage.js","../source/browser/console.js","../source/math/add.js","../source/functions/after.js","../source/utilities/arraysToObject.js","../source/functions/ary.js","../source/functions/before.js","../source/utilities/bindAll.js","../source/math/progress.js","../source/arrays/chunk.js","../source/utilities/clear.js","../source/arrays/clone.js","../source/utilities/compact.js","../source/objects/compactKeys.js","../source/utilities/concurrent.js","../source/arrays/concurrentEach.js","../source/utilities/concurrentStatus.js","../source/collection/countBy.js","../source/collection/countKey.js","../source/collection/countWithoutKey.js","../source/functions/curry.js","../source/functions/curryRight.js","../source/functions/debounce.js","../source/math/deduct.js","../source/math/divide.js","../source/arrays/dropRight.js","../source/buffers/ensure.js","../source/utilities/everyArg.js","../source/collection/findIndex.js","../source/collection/findItem.js","../source/arrays/first.js","../source/arrays/flatten.js","../source/utilities/forEachAsync.js","../source/utilities/forMap.js","../source/files/getExtension.js","../source/files/getFilename.js","../source/collection/getHighest.js","../source/collection/getLowest.js","../source/arrays/getNumberInsertIndex.js","../source/collection/groupBy.js","../source/utilities/has.js","../source/functions/ifInvoke.js","../source/utilities/ifNotAssign.js","../source/utilities/ifValue.js","../source/utilities/inAsync.js","../source/utilities/inSync.js","../source/math/increment.js","../source/collection/indexBy.js","../source/arrays/initial.js","../source/arrays/intersect.js","../source/objects/invert.js","../source/arrays/invoke.js","../source/collection/invoke.js","../source/collection/invokeAsync.js","../source/types/isArguments.js","../source/types/isArrayLike.js","../source/types/isChild.js","../source/browser/is.js","../source/types/isEmpty.js","../source/browser/isEnter.js","../source/numbers/isEven.js","../source/types/isFalsy.js","../source/types/isIterable.js","../source/arrays/isMatch.js","../source/numbers/isNumberEqual.js","../source/numbers/isNumberInRange.js","../source/numbers/isNumberNotInRange.js","../source/numbers/isOdd.js","../source/types/isParent.js","../source/types/isPrimitive.js","../source/types/isRelated.js","../source/types/isSameType.js","../source/types/isTrue.js","../source/arrays/last.js","../source/arrays/mapRight.js","../source/arrays/mapWhile.js","../source/utilities/merge.js","../source/math/multiple.js","../source/functions/negate.js","../source/functions/nthArg.js","../source/objects/omit.js","../source/functions/once.js","../source/functions/over.js","../source/functions/overEvery.js","../source/utilities/pair.js","../source/arrays/partition.js","../source/objects/pick.js","../source/collection/pluck.js","../source/utilities/propertyMatch.js","../source/functions/rearged.js","../source/math/remainder.js","../source/arrays/remove.js","../source/strings/replace.js","../source/arrays/rest.js","../source/arrays/right.js","../source/arrays/sample.js","../source/utilities/setKey.js","../source/utilities/setValue.js","../source/arrays/sortNumberAscending.js","../source/arrays/sortNumberDescening.js","../source/utilities/stubArray.js","../source/utilities/stubFalse.js","../source/utilities/stubObject.js","../source/utilities/stubString.js","../source/utilities/stubTrue.js","../source/math/subtractAll.js","../source/math/sumAll.js","../source/arrays/take.js","../source/arrays/takeRight.js","../source/functions/throttle.js","../source/utilities/timesAsync.js","../source/utilities/toggle.js","../source/strings/truncate.js","../source/arrays/zip.js","../source/arrays/union.js","../source/arrays/untilFalse.js","../source/arrays/untilTrue.js","../source/arrays/whileCompactMap.js","../source/arrays/whileEach.js","../source/arrays/whileMap.js","../source/arrays/without.js","../source/functions/wrap.js","../source/arrays/xor.js"],"sourcesContent":["/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = isArray(propertyString) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [\n\t\tkey,\n\t\tvalue\n\t] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = isIterateeAsync ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = isIterateeAsync ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst source = {};\n\teachArray(properties, (item, key) => {\n\t\tsource[item] = values[key];\n\t});\n\treturn source;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst objectKeys = [];\n\tconst objectValues = [];\n\teachObject(object, (item, key) => {\n\t\tobjectKeys.push(key);\n\t\tobjectValues.push(item);\n\t});\n\treturn [\n\t\tobjectKeys,\n\t\tobjectValues,\n\t];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(\n\tcompactMapArray,\n\tcompactMapAsyncArray,\n\tcompactMapObject,\n\tcompactMapAsyncObject,\n\tforOfCompactMap,\n\tforOfCompactMapAsync\n);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from '../objects/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isBoolean } from '../types/isBoolean.js';\nimport { keys } from '../objects/keys.js';\nimport { noop } from '../utilities/noop';\n/**\n * Checks to see of the browser agent has a string.\n *\n * @function isAgent\n * @category browser\n * @type {Function}\n * @param {String} source - The string to search for.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isAgent, assert } from '@universalweb/acid';\n * assert(isAgent('NotThere'), false);\n */\nexport function isAgent(source) {\n\treturn (hasValue(source)) ? isAgent[source] : keys(isAgent);\n}\nconst userAgent = globalThis.navigator?.userAgentData;\nif (userAgent) {\n\teachObject(userAgent, (value, key) => {\n\t\tif (isBoolean(value) && value) {\n\t\t\tisAgent[key] = value;\n\t\t}\n\t});\n\teachArray(userAgent.brands, (value) => {\n\t\tisAgent[value.brand] = value.version;\n\t});\n} else if (navigator.userAgent) {\n\tlet userAgentNormalized = navigator.userAgent.toLowerCase();\n\tuserAgentNormalized = userAgentNormalized.replace(/_/g, '.');\n\tuserAgentNormalized = userAgentNormalized.replace(/[#_,;()]/g, '');\n\tconst userAgentSplit = userAgentNormalized.split(/ |\\//);\n\teachArray(userAgentSplit, (item) => {\n\t\tisAgent[item] = true;\n\t});\n}\n\n","/**\n * Attaches an event listener to a node.\n *\n * @function eventAdd\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventAdd(document.body, 'click', () => {console.log('CLICKED');});\n * // = > document.body\n */\nexport function eventAdd(node, eventName, callback, useCapture) {\n\tnode.addEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n/**\n * Attaches an event listener to a node.\n *\n * @function eventRemove\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventRemove(document.body, () => {console.log('CLICKED');});\n * // = > Undefined\n */\nexport function eventRemove(node, eventName, callback, useCapture) {\n\tnode.removeEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n\n","/**\n * Create a document fragment.\n *\n * @function createFragment\n * @category browser\n * @type {Function}\n * @ignore\n * @returns {Fragment} - Returns a new document fragment.\n */\nexport const createFragment = document.createDocumentFragment.bind(document);\n","/**\n * Append a DOM node.\n *\n * @function append\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @ignore\n * @param {Node} parentNode - The parent node.\n * @param {Node} child - The node to be appended.\n * @returns {undefined} - Returns the child.\n */\nexport function append(parentNode, child) {\n\tparentNode.appendChild(child);\n\treturn child;\n}\n","import { eachObject } from '../objects/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { mapArray } from '../arrays/map.js';\nimport { zipObject } from '../objects/zip.js';\n/**\n * Assign attributes to a DOM node.\n *\n * @function nodeAttribute\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @async\n * @param {Node} node - The DOM node.\n * @param {Object|Array} object - Object with key being the attribute name and the value being the attribute value. If an array is given it will get the values corresponding to the array items.\n * @returns {Object|Node} - If using an array this returns an object of attribute names as keys and their values as the property value. If using an object this will return the provided node.\n *\n * @example\n * nodeAttribute(document.body, { 'data-example': 'test'});\n */\nexport function nodeAttribute(node, object) {\n\tif (isArray(object)) {\n\t\treturn zipObject(object, mapArray(object, (item) => {\n\t\t\treturn node.getAttribute(item);\n\t\t}));\n\t}\n\teachObject(object, (item, key) => {\n\t\tnode.setAttribute(key, item);\n\t});\n\treturn node;\n}\n\n","import { restString } from '../strings/range.js';\nconst dotString = '.';\nconst poundString = '#';\nconst classTest = /^.[\\w_-]+$/;\nconst tagTest = /^[A-Za-z]+$/;\nconst regexSpace = /\\s/;\n/**\n * Wrapper around getElementsByClassName.\n *\n * @function getByClass\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByClass = document.getElementsByClassName.bind(document);\n/**\n * Wrapper around getElementsByTagName.\n *\n * @function getByTag\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByTag = document.getElementsByTagName.bind(document);\n/**\n * Wrapper around getElementsByIdName.\n *\n * @function getById\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getById = document.getElementById.bind(document);\n/**\n * Wrapper around querySelector.\n *\n * @function querySelector\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelector = document.querySelector.bind(document);\n/**\n * Wrapper around querySelectorAll.\n *\n * @function querySelectorAll\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelectorAll = document.querySelectorAll.bind(document);\n/**\n * Returns relevant DOM node.\n *\n * @function selector\n * @category browser\n * @ignoreTest\n * @param {String} select - String to be evaluated.\n * @type {Function}\n * @returns {Node} - Returns a DOM node.\n *\n * @example\n * selector('#node');\n * // =>
\n */\nexport function selector(select) {\n\tconst firstLetter = select[0];\n\tswitch (firstLetter) {\n\t\tcase poundString: {\n\t\t\tif (!regexSpace.test(select)) {\n\t\t\t\treturn getById(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase dotString: {\n\t\t\tif (classTest.test(select)) {\n\t\t\t\treturn getByClass(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tif (tagTest.test(select)) {\n\t\t\t\treturn getByTag(select);\n\t\t\t}\n\t\t}\n\t}\n\treturn querySelectorAll(select);\n}\n\n","import { append } from './append.js';\nimport { eventAdd } from './event.js';\nimport { hasDot } from '../utilities/hasDot.js';\nimport { nodeAttribute } from './attribute.js';\nimport { promise } from '../utilities/promise.js';\nimport { querySelector } from './selector.js';\nconst createElementCache = document.createElement.bind(document);\nconst nodeAttachLoadingEvents = (node) => {\n\treturn promise((accept) => {\n\t\teventAdd(node, 'load', accept, true);\n\t\teventAdd(node, 'error', accept, true);\n\t\tappend(querySelector('head'), node);\n\t});\n};\n/**\n * Asynchronously import a js file and append it to the head node.\n * If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity.\n *\n * @function importjs\n * @category browser\n * @type {Function}\n * @async\n * @param {*} url - URL of the script to import. If not \".\" is found in the file name \".js\" will be appended.\n * @returns {Promise} - Returns a promise which returns a \"load\" or \"error\" event associated with the script.\n *\n * @example\n * importjs('core.js');\n * importjs('core');\n */\nexport function importjs(url) {\n\tconst src = hasDot(url) && url || `${url}.js`;\n\tconst node = nodeAttribute(createElementCache('script'), {\n\t\tasync: '',\n\t\tsrc\n\t});\n\treturn nodeAttachLoadingEvents(node);\n}\n\n","import { eventAdd } from './event.js';\nimport { getById } from './selector.js';\nimport { importjs } from './importScript.js';\n/**\n * Runs a function if the document has finished loading. If not, add an eventlistener.\n *\n * @function isDocumentReady\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Function} callable - Function to be run.\n * @returns {Boolean|Function} - If the document is ready, returns a function. If not, return false.\n *\n * @example\n * isDocumentReady(() => {return 1});\n * // => 1\n */\nexport function isDocumentReady(callable) {\n\tconst state = document.readyState;\n\tconst checkStatus = state === 'interactive' || state === 'completed' || state === 'complete';\n\tif (checkStatus) {\n\t\treturn (callable) ? callable() : true;\n\t}\n\tif (callable) {\n\t\teventAdd(document, 'DOMContentLoaded', callable);\n\t}\n\treturn false;\n}\nisDocumentReady(() => {\n\tconst scriptTag = getById('AcidLib');\n\tconst scriptName = (scriptTag && scriptTag.getAttribute('data-index')) || '/index';\n\timportjs(scriptName);\n});\n","const protocol = location.protocol;\nconst protocolSocket = (protocol === 'http:') ? 'ws' : 'wss';\nconst hostname = location.hostname;\n/**\n * Holds client hardware, browser, and host info.\n *\n * @memberof $\n * @category browser\n * @ignoreTest\n * @property {Object} info - Client hardware & host info.\n * @type {Object}\n */\nexport const info = {\n\thardware: {\n\t\tcores: navigator.hardwareConcurrency\n\t},\n\thost: {\n\t\tname: hostname,\n\t\tprotocol,\n\t\tprotocolSocket,\n\t}\n};\n\n","import { assign } from '../objects/assign.js';\nimport { eventAdd } from './event.js';\nimport { info } from './info.js';\nimport { isDocumentReady } from './ready.js';\nexport function saveDimensions() {\n\tassign(info, {\n\t\tbodyHeight: document.body.offsetHeight,\n\t\tbodyWidth: document.body.offsetWidth,\n\t\twindowHeight: window.innerHeight,\n\t\twindowWidth: window.innerWidth,\n\t});\n}\n/**\n * Save current document & window dimensions to the info property.\n *\n * @function updateDimensions\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * updateDimensions();\n */\nexport function updateDimensions() {\n\tsaveDimensions();\n}\nisDocumentReady(updateDimensions);\neventAdd(window, 'load', updateDimensions, true);\neventAdd(window, 'resize', updateDimensions, true);\n\n","/**\n * LocalStorage Module..\n *\n * @module browser/storage\n */\nimport { hasValue } from '../types/hasValue.js';\nimport { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nimport { virtualStorage } from '../utilities/virtualStorage.js';\nexport let hasLocal;\nfunction hasStorage(storeCheck) {\n\ttry {\n\t\tstoreCheck().removeItem('TESTING');\n\t\thasLocal = true;\n\t} catch (e) {\n\t\thasLocal = false;\n\t}\n}\nhasStorage(() => {\n\treturn localStorage;\n});\n/**\n * Constructs a virtual storage container with localStorage support.\n * BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported.\n * If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed.\n * BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed.\n *\n * @class BrowserStorage\n * @category browser\n * @returns {BrowserStorage} - Returns a new instance of BrowserStorage.\n *\n * @example\n * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n * const storageBrowserStorage = construct(BrowserStorage);\n * storageBrowserStorage.setItem('key', 'value');\n * assert(storageBrowserStorage.getItem('key'), 'value');\n */\nexport class BrowserStorage {\n\tconstructor(initialObject) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local = localStorage;\n\t\t}\n\t\tthis.storage = virtualStorage(initialObject);\n\t}\n\thasLocal = hasLocal;\n\t/**\n\t * Save an item to a browserStorage.\n\t *\n\t * @function setItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.setItem(key, (isString(value)) ? value : stringify(value));\n\t\t}\n\t\treturn this.storage.setItem(key, value);\n\t}\n\t/**\n\t * Get an item from a browserStorage.\n\t *\n\t * @function getItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tgetItem(key) {\n\t\tconst item = this.storage.getItem(key);\n\t\tif (hasValue(item)) {\n\t\t\treturn item;\n\t\t}\n\t\tif (!hasValue(item) && this.hasLocal) {\n\t\t\treturn this.local.getItem(key);\n\t\t}\n\t}\n\t/**\n\t * Clears all data for the browserStorage including all of localStorage if supported.\n\t *\n\t * @function clear\n\t * @class BrowserStorage\n\t * @category browser\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.clear();\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tclear() {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.clear();\n\t\t}\n\t\tthis.storage.clear();\n\t}\n\t/**\n\t * Remove an item from a browserStorage.\n\t *\n\t * @class BrowserStorage\n\t * @category browser\n\t * @function removeItem\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.removeItem('key');\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tremoveItem(key) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.removeItem(key);\n\t\t}\n\t\tthis.storage.removeItem(key);\n\t}\n}\n/**\n * The browserStorage function is a factory which wraps the BrowserStorage class constructor.\n *\n * @function browserStorage\n * @category browser\n * @type {Function}\n * @returns {*} - Returns a new BrowserStorage Object.\n *\n * @example\n * const storageBrowserStorage = browserStorage();\n * // => New BrowserStorage Object\n */\nexport function browserStorage(virtualFlag) {\n\treturn new BrowserStorage(virtualFlag);\n}\n\n","import { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nconst generateTheme = (color, bg) => {\n\treturn `color:${color};background:${bg};`;\n};\nexport const themes = {\n\talert: generateTheme('#fff', '#f44336'),\n\timportant: generateTheme('#fff', '#E91E63'),\n\tnotify: generateTheme('#fff', '#651FFF'),\n\twarning: generateTheme('#000', '#FFEA00'),\n};\n/**\n * Console.trace wrapper with theme support.\n *\n * @function cnsl\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Object} value - The value to be logged.\n * @param {String} themeName - The name of the theme to be used.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnsl('Lucy', 'notify');\n * // 'Lucy'\n */\nexport const cnsl = (value, themeName) => {\n\tconst data = isString(value) ? value : stringify(value);\n\tif (themeName === 'alert' || themeName === 'warning') {\n\t\treturn console.trace(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n\t}\n\tconsole.log(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n};\n/**\n * Create color themes for cnsl method.\n *\n * @function cnslTheme\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {String} themeName - The name of the theme.\n * @param {String} color - The text color.\n * @param {String} background - The background color of the block.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnslTheme('BlackNWhite', '#fff', '#000');\n */\nexport const cnslTheme = (themeName, color, background) => {\n\tthemes[themeName] = generateTheme(color, background);\n};\n\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { difference } from '../arrays/difference.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Checks if value is a plain DOM Node.\n *\n * @function isDom\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDom, assert } from '@universalweb/acid';\n * assert(isDom(document.querySelectorAll('head')), true);\n */\nexport function isDom(source) {\n\treturn source && source.nodeType !== 9;\n}\n/**\n * Checks if the value is a HTMLCollection.\n *\n * @function isHTMLCollection\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isHTMLCollection, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isHTMLCollection(document.getElementsByClassName('test')), true);\n */\nconst objectHTMLCollection = '[object HTMLCollection]';\nexport function isHTMLCollection(source) {\n\treturn (hasValue(source)) ? source.toString() === objectHTMLCollection : false;\n}\n/**\n * Checks if the value is a NodeList.\n *\n * @function isNodeList\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNodeList, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isNodeList(document.querySelectorAll('.test')), true);\n */\nconst objectNodeList = '[object NodeList]';\nexport function isNodeList(source) {\n\treturn (hasValue(source)) ? source.toString() === objectNodeList : false;\n}\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Checks if the keycode of the event is strictly equal to 13.\n *\n * @function isEnter\n * @category browser\n * @type {Function}\n * @param {Object} eventObject - Object to be checked.\n * @returns {Boolean} - Returns true if the keycode property of the object equals 13.\n *\n * @example\n * isEnter('click');\n * // => false\n */\nexport function isEnter(eventObject) {\n\treturn eventObject.keyCode === 13;\n}\n\n","/**\n * Checks if a number is even & returns true or false.\n *\n * @function isEven\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEven, assert } from '@universalweb/acid';\n * assert(isEven(1), true);\n */\nexport function isEven(source) {\n\treturn (source & 1) === 0;\n}\n\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is odd & returns true or false.\n *\n * @function isOdd\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isOdd, assert } from '@universalweb/acid';\n * assert(isOdd(1), true);\n */\nexport function isOdd(source) {\n\treturn (source & 1) === 1;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn ((isEqual(on, value)) ? off : on);\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n"],"names":["clearArray","source","length","isUndefined","undefined","hasLength","Boolean","isNull","hasValue","returnValue","eachArray","iteratee","thisBind","additionalArg","arrayLength","index","call","compactMapArray","results","thisCall","item","arrayOriginal","returned","push","async","eachAsyncArray","compactMapAsyncArray","result","sign","Math","isNegative","rangeUp","start","end","step","sourceArray","position","rangeDown","isArray","Array","reflectConstruct","Reflect","construct","target","argumentsList","newTarget","args","ensureArray","flattenDeep","flat","Infinity","forEach","callback","difference","sources","differencesMap","Map","differences","currentArray","parentIndex","child","childIndex","childRoot","get","count","set","drop","array","amount","upTo","splice","eachRight","additionalArgument","eachRightAsync","everyArray","sourceLength","everyAsyncArray","filterArray","filterAsyncArray","regexToPath","regexCloseBracket","emptyString","toPath","replace","split","propertyString","link","objectKeys","Object","keys","hasOwn","hasKeys","properties","pathArray","lastPath","pop","initialPathObject","isConstructor","constructor","isConstructorFactory","constructorName","name","isConstructorNameFactory","isTypeFactory","method","primarySource","otherSources","isBufferCall","isBuffer","isPlainObject","toString","trim","slice","isEqual","equals","sourceProperties","key","mathNativeMax","max","mapArray","mapAsyncArray","subtract","minuend","subtrahend","subtractReverse","floor","random","randomInt","min","arrayFrom","from","toArray","arrayLike","mapFn","thisArg","shuffle","shuffleArray","value","mathNativeMin","onlyUnique","indexOf","sortUnique","unique","isSorted","filter","clearBuffer","fill","isFunction","Function","isNumberCall","isNumber","isString","String","objectAssign","assign","assignToObject","assignToClass","prototype","findIndexCache","element","indexMatch","propertyName","sortCollectionDescendingFilter","previous","next","ifMatch","previousKey","nextKey","sortCollectionDescending","collection","sort","sortCollectionAscendingFilter","sortCollectionAscending","pluckObject","targets","sortObjectsAlphabetically","localeCompare","sortObjectsAlphabeticallyReverse","regexTestFactory","regexType","test","isFileCSS","isFileHTML","isFileJS","isFileJSON","eachAsyncObject","propertyCount","eachObject","objectKeysArray","isSetCall","isSet","forOf","isGeneratorCall","isGenerator","forOfAsync","generatorArgs","isAsyncCall","isAsync","generateLoop","arrayLoop","arrayLoopAsync","objectLoop","objectLoopAsync","forOfLoop","forOfLoopAsync","argument1","argument2","argument3","isIterateeAsync","each","Chain","methods","this","addChainMethod","thisChain","methodName","setValue","done","noop","times","Timers","list","remove","id","clearTimeout","delete","has","callable","time","currentThis","setTimeout","clear","timers","timer","applyNative","apply","thisArgument","getType","cloneType","sourceType","forOfMap","resultsObject","methodPush","add","methodPushBound","bind","methodSet","forOfMapAsync","resultsGenerator","mapAsyncObject","thisObject","mapObject","original","map","everyAsyncObject","everyObject","forOfEvery","forOfEveryAsync","every","functionPrototype","cacheNativeMethod","getPropNames","getOwnPropertyNames","getPropDesc","getOwnPropertyDescriptor","defProp","defineProperty","hasProp","hasOwnProperty","isSame","is","isZero","objectEntries","entries","compactMapAsyncObject","compactMapObject","filterObject","filterAsyncObject","escapeRegexRegex","escapeRegex","arrayToRegex","makeSafe","RegExp","join","isRegexCall","isRegex","objectSize","objectLengthProperty","objectSizeProperty","size","zipObject","values","normalizeCase","space","restString","string","substring","rawURLDecodeRegex","andRegex","lessThanRegex","moreThanRegex","doubleQuoteRegex","rawURLDecode","decodeURIComponent","htmlEntities","tokenizeRegEx","wordsRegEx","getWords","upperFirstLetter","toUpperCase","upperFirst","upperFirstOnly","toLowerCase","getTypeName","isMapCall","isMap","typedArrayRegex","arrayConstructorName","isTypedArray","noValue","isBigIntCall","isBigInt","isBooleanCall","isBoolean","isArrayBufferCall","isArrayBuffer","constructorNames","isDateCall","isDate","isFalse","isF32Call","isF32","isF64Call","isF64","isInteger","Number","isFloat","isI16Call","isI16","isI32Call","isI32","isI8Call","isI8","isPromise","Promise","isKindAsync","isSafeInteger","isSafeInt","isU16Call","isU16","isU32Call","isU32","isU8Call","isU8","isU8CCall","isU8C","isWeakMapCall","isWeakMap","isDeno","globalThis","Deno","isNodejs","process","versions","node","isTruthy","returnIfTrue","notEqual","jsonNative","JSON","stringify","createAssertError","expected","localOptions","options","errorTitle","title","file","Error","assertAsync","sourceArg","structuredCloneSafe","structuredClone","forOfCompactMapAsync","forOfCompactMap","compactMap","forOfFilter","forOfFilterAsync","returnFlow","arg","flow","flowRight","flowAsync","flowAsyncRight","hasDot","Intervals","clearInterval","setInterval","intervals","Model","static","modelName","modelSource","models","promise","Store","property","data","Proxy","proxySource","console","log","UniqID","totalActive","freed","totalFree","shift","free","isActive","shouldReset","reset","uniqID","VirtualStorage","initialObject","items","getItem","hasItem","setItem","removeItem","virtualStorage","isAgent","userAgent","navigator","userAgentData","brands","brand","version","userAgentNormalized","eventAdd","eventName","useCapture","addEventListener","createFragment","document","createDocumentFragment","append","parentNode","appendChild","nodeAttribute","object","getAttribute","setAttribute","classTest","tagTest","regexSpace","getByClass","getElementsByClassName","getByTag","getElementsByTagName","getById","getElementById","querySelector","querySelectorAll","createElementCache","createElement","importjs","url","src","accept","nodeAttachLoadingEvents","isDocumentReady","state","readyState","scriptTag","protocol","location","protocolSocket","hostname","info","hardware","cores","hardwareConcurrency","host","saveDimensions","bodyHeight","body","offsetHeight","bodyWidth","offsetWidth","windowHeight","window","innerHeight","windowWidth","innerWidth","updateDimensions","exports","hasLocal","storeCheck","e","hasStorage","localStorage","BrowserStorage","local","storage","generateTheme","color","bg","themes","alert","important","notify","warning","augend","addend","point","sortedObject","bindThis","targetAssign","virtualFlag","total","currentAmount","config","chunked","match","themeName","trace","background","sourceKeys","sourceKeysLength","targetObject","i","keyName","compactedKeys","all","queue","allSettled","arity","curries","curried","curryArgs","unshift","debounced","Buffer","alloc","removeEventListener","findIndex","find","level","reduce","previousValue","currentValue","concat","valuesLength","cloned","methodBound","lastIndexOf","insertIndex","search","includes","rootObject","equalThis","optional","text","arrays","otherItem","strictFlag","indexes","sourceChild","targetParent","nodeType","eventObject","keyCode","Symbol","iterator","compareArray","targetKeys","sourceParent","targetChild","type","targetOne","targetTwo","other","otherType","reviver","parse","indexFrom","trueIndex","merge","currentSource","sourceItem","sourceKey","blacklist","blacklistRegex","numberToString","iteratees","predicates","predicate","rejected","whitelist","compared","removeThese","words","sampleArray","used","select","numberList","a","b","endIndex","indexRight","throttled","shouldThrottle","on","off","maxLength","stringLength","breakAll","breakAllLength","truncateDown","truncateUp","arraySet","objectValues","sourcesSet","Set","wrapper","xorMap","xored"],"mappings":"yOAaO,SAASA,EAAWC,GAE1B,OADAA,EAAOC,OAAS,EACTD,CACR,CCLO,SAASE,EAAYF,GAC3B,YAAkBG,IAAXH,CACR,CCAO,SAASI,EAAUJ,GACzB,OAAOK,QAAQL,EAAOC,OACvB,CCFO,SAASK,EAAON,GACtB,OAAkB,OAAXA,CACR,CCDO,SAASO,EAASP,GACxB,OAAQE,EAAYF,KAAYM,EAAON,EACxC,CCRO,SAASQ,EAAYR,GAC3B,OAAOA,CACR,CCYO,SAASS,EAAUT,EAAQU,EAAUC,EAAUC,GACrD,IAAKZ,EACJ,OAED,MAAMa,EAAcb,EAAOC,OAC3B,GAAIM,EAASI,GACZ,IAAK,IAAIG,EAAQ,EAAGA,EAAQD,EAAaC,IACxCJ,EAASK,KAAKJ,EAAUX,EAAOc,GAAQA,EAAOd,EAAQa,EAAaD,QAGpE,IAAK,IAAIE,EAAQ,EAAGA,EAAQD,EAAaC,IACxCJ,EAASV,EAAOc,GAAQA,EAAOd,EAAQa,EAAaD,GAGtD,OAAOZ,CACR,CCfO,SAASgB,EAAgBhB,EAAQU,EAAWF,EAAaS,EAAU,GAAIC,EAAUN,GAgBvF,OAfIL,EAASW,GACZT,EAAUT,GAAQ,CAACmB,EAAML,EAAOM,EAAeP,KAC9C,MAAMQ,EAAWX,EAASK,KAAKG,EAAUC,EAAML,EAAOG,EAASG,EAAeP,EAAaD,GACvFL,EAASc,IACZJ,EAAQK,KAAKD,EAC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O,MAAMzN,KAAe,EACpC,SmLhBO,SAAczK,EAAOue,GAC3B,MAAO,IAAI3O,IACH2O,EAAQve,KAAU4P,EAE3B,QCHO,YAAgB/U,GACtB,MAAM2jB,EAASvkB,EAAUc,KACnB0jB,EAAQ,GAEd,OAAsB,IADA5jB,EAAQpD,OAEtBmD,EAAWC,EAAQ,GAAIA,EAAQ,KAEvC5C,EAAU4C,GAAS,CAACI,EAAcC,KACjCjD,EAAUgD,GAAc,CAACE,EAAOC,KAC/B,IAAIC,EAAYmjB,EAAOljB,IAAIH,GAC3B,GAAKE,EAOE,IAAIA,EAAUH,cAAgBA,EACpC,OAEAG,EAAUE,OACV,MAVAF,EAAY,CACXE,MAAO,EACPL,cACAC,SAEDqjB,EAAOhjB,IAAIL,EAAOE,EAKlB,GACA,IAEHX,EAAQ8jB,GAAS7lB,IACG,IAAfA,EAAK4C,OACRkjB,EAAM3lB,KAAKH,EAAKwC,MAChB,IAEKsjB,EACR,QTlCO,YAAgB/D,GACtB,OAAOA,EAAO,GAAGtT,KAAI,CAACzO,EAAML,IACpBoiB,EAAOtT,KAAK1L,GACXA,EAAMpD,MAGhB"} \ No newline at end of file diff --git a/build/index.bundle.js b/build/index.bundle.js index e06fc17..806e731 100644 --- a/build/index.bundle.js +++ b/build/index.bundle.js @@ -1,7819 +1,8246 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' - ? factory(exports, require('node:fs/promises'), require('node:path'), require('node:url'), require('path')) - : typeof define === 'function' && define.amd - ? define(['exports', 'node:fs/promises', 'node:path', 'node:url', 'path'], factory) - : ((global = typeof globalThis !== 'undefined' ? globalThis : global || self), - factory((global.$ = {}), global.promises, global.path, global.node_url, global.path$1)); + typeof exports === "object" && typeof module !== "undefined" + ? factory( + exports, + require("node:fs/promises"), + require("node:path"), + require("node:url"), + require("path"), + ) + : typeof define === "function" && define.amd + ? define( + ["exports", "node:fs/promises", "node:path", "node:url", "path"], + factory, + ) + : ((global = + typeof globalThis !== "undefined" ? globalThis : global || self), + factory( + (global.$ = {}), + global.promises, + global.path, + global.node_url, + global.path$1, + )); })(this, function (exports, promises, path, node_url, path$1) { - 'use strict'; - - /** - * Chunks an array according to a user defined number. - * - * @function chunk - * @category Array - * @type {Function} - * @param {Array} array - Array to be chunked. - * @param {Number} size - Number which determines the size of each chunk. - * @returns {Array} - A chunked version of the source array. - * - * @example - * import { chunk, assert } from '@universalweb/acid'; - * assert(chunk([1,2,3], 1), [[1],[2],[3]]); - */ - function chunk(array, size = 1) { - const chunked = []; - let index = 0; - array.forEach((item, key) => { - if (!(key % size)) { - chunked.push([]); - if (key) { - index++; - } - } - chunked[index].push(item); - }); - return chunked; - } - - /** - * Clears the values out of an array. - * - * @function clearArray - * @category Array - * @type {Function} - * @param {Array} source - Takes an array to be emptied. - * @returns {Array} - The originally given array. - * - * @example - * import { clearArray, assert } from '@universalweb/acid'; - * assert(clearArray([1,'B', 'Cat']), []); - */ - function clearArray(source) { - source.length = 0; - return source; - } - - /** - * Clone an array (uses .slice()) and assign the source arrays values to the new array. - * - * @function cloneArray - * @category Array - * @type {Function} - * @param {Array} source - The array to be quick cloned. - * @returns {Array} - The newly cloned array with assigned items. - * - * @example - * import { cloneArray, assert } from '@universalweb/acid'; - * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']); - */ - function cloneArray(source) { - return source.slice(); - } - - /** Checks if the value is undefined. - * - * @function isUndefined - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isUndefined, assert } from '@universalweb/acid'; - * assert(isUndefined(undefined), true); - */ - function isUndefined(source) { - return source === undefined; - } - - /** - * Checks if the value has length greater than 0. - * - * @function hasLength - * @category utility - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { hasLength, assert } from '@universalweb/acid'; - * assert(hasLength([1]), true); - */ - function hasLength(source) { - return Boolean(source.length); - } - - /** - * Checks if the value is null. - * - * @function isNull - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNull, assert } from '@universalweb/acid'; - * assert(isNull(null), true); - */ - function isNull(source) { - return source === null; - } - - /** - * Checks if the value is not null or undefined. - * - * @function hasValue - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { hasValue, assert } from '@universalweb/acid'; - * assert(hasValue(1), true); - */ - function hasValue(source) { - return !isUndefined(source) && !isNull(source); - } - - /** - * A simple function which returns the value it's given. - * - * @function returnValue - * @category utility - * @param {*} source - The source object. - * @returns {source} The source object. - */ - function returnValue(source) { - return source; - } - - /** - * Iterates through the given array. - * - * @function eachArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. - * @param {*} thisBind - Iteratee called with thisBind as this. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array|undefined} - The originally given array. - * - * @example - * import { eachArray, assert } from '@universalweb/acid'; - * const list = []; - * eachArray([1, 2, 3], (item, index) => { - * list[index] = item; - * }); - * assert(list, [1, 2, 3]); - */ - function eachArray(source, iteratee, thisBind, additionalArg) { - if (!source) { - return; - } - const arrayLength = source.length; - if (hasValue(thisBind)) { - for (let index = 0; index < arrayLength; index++) { - iteratee.call(thisBind, source[index], index, source, arrayLength, additionalArg); - } - } else { - for (let index = 0; index < arrayLength; index++) { - iteratee(source[index], index, source, arrayLength, additionalArg); - } - } - return source; - } - - /** - * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. - * - * @function compactMapArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array} - An array with mapped properties that are not null or undefined. - * - * @example - * import { compactMapArray, assert } from '@universalweb/acid'; - * assert(compactMapArray([null, 2, 3], (item) => { - * return item; - * }), [2, 3]); - */ - function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) { - if (hasValue(thisCall)) { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - const returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg); - if (hasValue(returned)) { - results.push(returned); - } - }); - } else { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - const returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg); - if (hasValue(returned)) { - results.push(returned); - } - }); - } - return results; - } - - /** - * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order. - * - * @function eachAsyncArray - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. - * @param {*} thisCall - Iteratee called with thisCall as this. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array|undefined} - Returns source the originally given array. - * - * @example - * import { eachAsyncArray, assert } from '@universalweb/acid'; - * const tempList = []; - * await eachAsyncArray([1, 2, 3], async (item) => { - * tempList.push(item); - * }); - * assert(tempList, [1, 2, 3]); - */ - async function eachAsyncArray(source, iteratee, thisCall, additionalArg) { - if (!source) { - return; - } - const arrayLength = source.length; - if (hasValue(thisCall)) { - for (let index = 0; index < arrayLength; index++) { - await iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg); - } - } else { - for (let index = 0; index < arrayLength; index++) { - await iteratee(source[index], index, source, arrayLength, additionalArg); - } - } - return source; - } - - /** - * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. - * - * @function compactMapAsyncArray - * @type {Function} - * @category array - * @async - * @param {Array} source - Array to be compacted. - * @param {Function} iteratee - Iteratee to be performed on array. - * @returns {Array} - Array values after being put through an iterator. - * - * @example - * import { compactMapAsync, assert } from '@universalweb/acid'; - * assert(await compactMapAsync([1, 2, 3, null], async (item) => { - * return item; - * }), [1, 2, 3]); - */ - async function compactMapAsyncArray(source, iteratee = returnValue) { - const results = []; - await eachAsyncArray(source, async (item, index, arrayLength) => { - const result = await iteratee(item, index, results, arrayLength); - if (hasValue(result)) { - results.push(result); - } - }); - return results; - } - - /** - * Checks if a number is negative & returns true or false. - * - * @function isNegative - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNegative, assert } from '@universalweb/acid'; - * assert(isNegative(-1), true); - */ - const { sign: sign$1 } = Math; - function isNegative(source) { - return sign$1(source) === -1; - } - - function rangeUp(start, end, step, sourceArray) { - let position = start; - while (position < end) { - sourceArray.push(position); - position += step; - } - return sourceArray; - } - function rangeDown(start, end, step, sourceArray) { - let position = start; - while (position > end) { - sourceArray.push(position); - position -= step; - } - return sourceArray; - } - /** - * Create a numbered list of integers. - * - * @function range - * @category array - * @type {Function} - * @param {Number} start - Value which determines the start of the range. - * @param {Number} end - Value which determines the end of the range. - * @param {Number} step - Value used to step between integers. - * @returns {Array} - An array of integers. - * - * @example - * import { range, assert } from '@universalweb/acid'; - * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]); - */ - function range(start, end, step = 1, sourceArray = []) { - if (isNegative(step)) { - return sourceArray; - } - if (start < end) { - return rangeUp(start, end, step, sourceArray); - } else { - return rangeDown(start, end, step, sourceArray); - } - } - - /** - * Checks if the value is an array. This references Array.isArray. - * - * @function isArray - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArray, assert } from '@universalweb/acid'; - * assert(isArray([]), true); - * assert(isArray(2), false); - */ - const isArray = Array.isArray; - /** - * Checks if the value is not an array. This references Array.isArray. - * - * @function isNotArray - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNotArray, assert } from '@universalweb/acid'; - * assert(isNotArray([]), false); - * assert(isNotArray(2), true); - */ - function isNotArray(source) { - return !isArray(source); - } - - /** - * A function which acts like the "new" operator and can pass arguments. This is a safe version of the original which will error if given undefined - * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects. - * - * @function construct - * @category class - * @param {Function} target - The target function or class. - * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array. - * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target. - * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList. - * - * @example - * import { construct, assert } from '@universalweb/acid'; - * class test { - * constructor(a) { - * return 1; - * } - * } - * const newClass = construct(test, [1]); - * assert(test, 1); - */ - const reflectConstruct = Reflect.construct; - function construct(target, argumentsList = [], newTarget) { - const args = isArray(argumentsList) ? argumentsList : [argumentsList]; - if (newTarget) { - return reflectConstruct(target, args, newTarget); - } - return reflectConstruct(target, args); - } - - /** - * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned. - * - * @function ensureArray - * @category array - * @type {Function} - * @param {*} source - Object to be checked. - * @returns {Array} - Returns an array. - * - * @example - * import { isArray, ensureArray, assert } from '@universalweb/acid'; - * assert(isArray(ensureArray('test')), ['test']); - */ - function ensureArray(source) { - return (isArray(source) && source) || (hasValue(source) && [source]) || []; - } - - /** - * Flattens an array to a single level. - * - * @function flattenDeep - * @type {Function} - * @category array - * @param {Array} source - Array to flatten. - * @returns {Array} - Returns a completely flattened array. - * - * @example - * import { flattenDeep, assert } from '@universalweb/acid'; - * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]); - */ - function flattenDeep(source) { - return source.flat(Infinity); - } - - function forEach(source, callback) { - source.forEach(callback); - return source; - } - - /** - * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences. - * - * @function difference - * @category array - * @type {Function} - * @param {...Array} sources - List of arrays to be compared. - * @returns {Array|undefined} - An array which contains the differences between the source and compare array. - * - * @example - * import { difference, assert } from '@universalweb/acid'; - * assert(difference([1, 2, 3], [1, 2]), [3]); - */ - function difference(...sources) { - const differencesMap = construct(Map); - const differences = []; - eachArray(sources, (currentArray, parentIndex) => { - eachArray(currentArray, (child, childIndex) => { - let childRoot = differencesMap.get(child); - if (!childRoot) { - childRoot = { - count: 1, - parentIndex, - child - }; - differencesMap.set(child, childRoot); - } else if (childRoot.parentIndex === parentIndex) { - return; - } else { - childRoot.count++; - } - }); - }); - forEach(differencesMap, (item) => { - if (item.count === 1 && item.parentIndex === 0) { - differences.push(item.child); - } - }); - return differences; - } - - /** - * Removes all items from an array after a specified index. - * - * @function drop - * @category array - * @type {Function} - * @param {Array} array - Source array. - * @param {Number} amount - Amount of items to drop from the array. - * @param {Number} [upTo = array.length] - Index to stop at. - * @returns {Array} - An array with all values removed after a user defined index. - * - * @example - * import { drop, assert } from '@universalweb/acid'; - * assert(drop([1, 2, 3]), [2, 3]); - * assert(drop([1, 2, 3], 2), [3]); - */ - function drop(array, amount = 1, upTo = array.length) { - return array.splice(amount, upTo); - } - - /** - * Removes all items from an array before a specified index. - * - * @function dropRight - * @type {Function} - * @category array - * @param {Array} array - Source array. - * @param {Number} amount - Amount of items to drop from the array. - * @param {Number} [upTo = array.length] - Index to stop at. - * @returns {Array} - An array with all values removed before a user defined index. - * - * @example - * import { dropRight, assert } from '@universalweb/acid'; - * assert(dropRight([1, 2, 3]), [1, 2]); - * assert(dropRight([1, 2, 3], 2), [1]); - */ - const dropRight = (array, amount = 1, upTo = array.length) => { - return drop(array, 0, upTo - amount); - }; - - /** - * Iterates through the given array in reverse. - * - * @function eachRight - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array|undefined} - The originally given array. - * - * @example - * import { eachRight, assert } from '@universalweb/acid'; - * const tempList = []; - * eachRight([1, 2, 3], (item) => { - * tempList.push(item); - * }); - * assert(tempList, [3, 2, 1]); - */ - function eachRight(source, iteratee, additionalArgument) { - if (!source) { - return; - } - const arrayLength = source.length; - for (let index = arrayLength - 1; index >= 0; index--) { - iteratee(source[index], index, source, arrayLength, additionalArgument); - } - return source; - } - - /** - * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order. - * - * @function eachRightAsync - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @returns {Object|undefined} - The originally given array. - * - * @example - * import { eachRightAsync, assert } from '@universalweb/acid'; - * const tempList = []; - * await eachRightAsync([1, 2, 3], async (item) => { - * tempList.push(item); - * }); - * assert(tempList, [3, 2, 1]); - */ - async function eachRightAsync(source, iteratee) { - if (!source) { - return; - } - const arrayLength = source.length; - for (let index = arrayLength - 1; index >= 0; index--) { - await iteratee(source[index], index, source, arrayLength); - } - return source; - } - - /** - * Iterates through the given array while the iteratee returns true else the loop exits & returns false. - * - * @function everyArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. - * - * @example - * import { everyArray, assert } from '@universalweb/acid'; - * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), false); - * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), true); - */ - function everyArray(source, iteratee, additionalArgument) { - if (!source) { - return; - } - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) { - return false; - } - } - return true; - } - - /** - * Iterates through the given array while the iteratee returns true else the loop exits & returns false. - * - * @function everyAsyncArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. - * - * @example - * import { everyAsyncArray, assert } from '@universalweb/acid'; - * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), false); - * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), true); - */ - async function everyAsyncArray(source, iteratee, additionalArgument) { - if (!source) { - return; - } - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if ((await iteratee(source[index], index, source, sourceLength, additionalArgument)) === false) { - return false; - } - } - return true; - } - - /** - * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. - * - * @function filterArray - * @category array - * @type {Function} - * @category array - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array with properties that passed the test. - * - * @example - * import { filterArray, assert } from '@universalweb/acid'; - * assert(filterArray([false, true, true], (item) => { - * return item; - * }), [true, true]); - */ - function filterArray(source, iteratee, results = [], additionalArgument) { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - if (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) { - results.push(item); - } - }); - return results; - } - - /** - * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. - * - * @function filterAsyncArray - * @category array - * @type {Function} - * @category array - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array with properties that passed the test. - * - * @example - * import { filterAsyncArray, assert } from '@universalweb/acid'; - * assert(filterAsyncArray([false, true, true], (item) => { - * return item; - * }), [true, true]); - */ - async function filterAsyncArray(source, iteratee, results = [], additionalArgument) { - await eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => { - if ((await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument)) === true) { - results.push(item); - } - }); - return results; - } - - /** - * Takes the first or multiple items from an array. - * - * @function first - * @type {Function} - * @category array - * @param {Array} array - Array to extract from. - * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array. - * @returns {Array} - Returns an array. - * - * @example - * import { first, assert } from '@universalweb/acid'; - * assert(first([1, 2, 3]), 1); - */ - function first(array, upTo) { - return upTo ? array.slice(0, upTo) : array[0]; - } - - /** - * Flattens an array up to the provided level. - * - * @function flatten - * @type {Function} - * @category array - * @param {Array} source - Array to flatten. - * @param {Number} [level = 1] - Number which determines how deep the array nest can be. - * @returns {Array|undefined} - Returns an array. - * - * @example - * import { flatten, assert } from '@universalweb/acid'; - * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]); - */ - function flatten(source, level = 1) { - if (!source) { - return; - } - let sourceArray = source; - for (let i = 0; i < level; i++) { - sourceArray = sourceArray.reduce((previousValue, currentValue) => { - return previousValue.concat(ensureArray(currentValue)); - }, []); - } - return sourceArray; - } - - /** - * Takes all but the last item in the array. - * - * @function initial - * @category array - * @type {Function} - * @param {Array} array - Array to have items extracted from. - * @returns {Array} - Returns a completely flattened array. - * - * @example - * import { initial, assert } from '@universalweb/acid'; - * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]); - */ - function initial(array) { - return array.slice(0, array.length - 1); - } - - // Add intersectionBy & intersectionWith - /** - * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory)) - * of the array and the input array(s). - * - * @function intersection - * @param {Array} array - Array to compare other arrays to. - * @param {...Array} arrays - A variable number of arrays. - * @category array - * @returns {Array} - The new array of unique values shared by all of the arrays. - * - * @example - * import { intersection, assert } from '@universalweb/acid'; - * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]); - */ - function intersection(array, ...arrays) { - return compactMapArray(array, (item) => { - const shouldReturn = everyArray(arrays, (otherItem) => { - return otherItem.includes(item); - }); - if (shouldReturn) { - return item; - } - }); - } - - /** - * Invoke each function in the given array. - * - * @function invokeArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} additionalArg - An object to be given each time to the iteratee. - * @param {*} thisCall - Iteratee called with thisCall as this. - * @returns {Array|undefined} - The originally given array. - * - * @example - * import { invokeArray, assert } from '@universalweb/acid'; - * function test(arg){ - * return [this, arg]; - * } - * const results = invokeArray([test], 1, test); - * assert(results, [test, 1]); - */ - function invokeArray(source, additionalArg, thisCall) { - if (!source) { - return; - } - const arrayLength = source.length; - if (hasValue(thisCall)) { - for (let index = 0; index < arrayLength; index++) { - source[index].call(thisCall, additionalArg); - } - } else { - for (let index = 0; index < arrayLength; index++) { - source[index](additionalArg); - } - } - return source; - } - - const regexToPath = /\.|\[/; - const regexCloseBracket = /]/g; - const emptyString = ''; - /** - * Breaks up string into object chain list. - * - * @function toPath - * @type {Function} - * @category utility - * @param {String} source - String to be broken up. - * @returns {Array} - Array used to go through object chain. - * - * @example - * import { toPath, assert } from '@universalweb/acid'; - * assert(toPath('post.like[2]'), ['post', 'like', '2']); - */ - function toPath(source) { - return source.replace(regexCloseBracket, emptyString).split(regexToPath); - } - - /** - * Returns property on an object. - * - * @function get - * @category utility - * @type {Function} - * @param {String} propertyString - String used to retrieve properties. - * @param {Object} target - Object which has a property retrieved from it. - * @returns {Object} - Returns property from the given object. - * - * @example - * import { get, assert } from '@universalweb/acid'; - * const objectTarget = { - * post: { - * like: ['a','b','c'] - * } - * }; - * assert(get('post.like[2]', objectTarget), 'c'); - */ - function get(propertyString, target) { - if (!target) { - return false; - } - let link = target; - const pathArray = isArray(propertyString) ? propertyString : toPath(propertyString); - everyArray(pathArray, (item) => { - link = link[item]; - return hasValue(link); - }); - return link; - } - - /** - * Get object's keys. - * - * @function keys - * @category object - * @param {*} source - The source object to pull keys from. - * @returns {Array} - Array of keys. - * - * @example - * keys({a: 1, b: 2}); - * // => ['a', 'b'] - */ - const objectKeys = Object.keys; - function keys(source) { - if (source) { - return objectKeys(source); - } - } - - const hasOwn = Object.hasOwn; - /** - * Checks to see if an object has all of the given property names. - * - * @function hasKeys - * @category object - * @type {Function} - * @param {Object} source - Source object to check for keys. - * @param {...String} properties - List of strings to check. - * @returns {Boolean|undefined} - Returns true or false. - * - * @example - * import { hasKeys, assert } from '@universalweb/acid'; - * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true); - */ - function hasKeys(source, ...properties) { - if (!source) { - return; - } - return everyArray(properties, (item) => { - const pathArray = toPath(item); - if (pathArray.length === 1) { - return hasOwn(source, item); - } else { - const lastPath = pathArray.pop(); - const initialPathObject = get(pathArray, source); - if (initialPathObject) { - return hasOwn(initialPathObject, lastPath); - } - return false; - } - }); - } - /** - * Checks to see if an object has any of the given property names. - * - * @function hasAnyKeys - * @category object - * @type {Function} - * @param {Object} source - Source object to check for keys. - * @param {Array} properties - List of strings to check. - * @returns {Boolean|undefined} - Returns true or false. - * - * @example - * import { hasAnyKeys, assert } from '@universalweb/acid'; - * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true); - * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false); - */ - function hasAnyKeys(source, ...properties) { - if (!source) { - return; - } - return Boolean( - properties.find((item) => { - const pathArray = toPath(item); - if (pathArray.length === 1) { - return hasOwn(source, item); - } else { - const lastPath = pathArray.pop(); - const initialPathObject = get(pathArray, source); - if (initialPathObject) { - return hasOwn(initialPathObject, lastPath); - } - return false; - } - }) - ); - } - - /** - * Checks to see if the constructor is that of a native object. - * - * @function isConstructor - * @category type - * @param {Object} target - The object to be checked. - * @param {Object} source - The source constructor object. - * @returns {Object} - Returns the target object. - * - * @example - * import { isConstructor, assert } from '@universalweb/acid'; - * assert(isConstructor(2, Number), true); - */ - function isConstructor(target, source) { - return target?.constructor === source || false; - } - function isConstructorFactory(source) { - return (target) => { - return isConstructor(target, source); - }; - } - function constructorName(source) { - return source?.constructor?.name; - } - function isConstructorNameFactory(source) { - return (target) => { - return constructorName(target) === source || false; - }; - } - - function isTypeFactory(method) { - return function (primarySource, ...otherSources) { - if (otherSources) { - return method(primarySource) && everyArray(otherSources, method); - } - return method(primarySource); - }; - } - - /** - * Checks if an object or objects are a Buffer. - * - * @function isBuffer - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isBuffer, assert } from '@universalweb/acid'; - * assert(isBuffer(Buffer.from('test')), true); - */ - const isBufferCall = isConstructorNameFactory('Buffer'); - const isBuffer = isTypeFactory(isBufferCall); - - /** - * Checks if the value is a plain object. - * - * @function isPlainObject - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isPlainObject } from '@universalweb/acid'; - * isPlainObject({}); - * // => true - */ - const isPlainObject = (source) => { - if (hasValue(source)) { - return source.constructor.toString().trim().slice(9, 16) === 'Object('; - } - return false; - }; - - /** - * Performs a deep comparison between two objects & determines if the value is the same using strict comparison. - * - * @function isEqual - * @type {Function} - * @category utility - * @param {*} source - Source object. - * @param {*} target - Object to be compared. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isEqual, assert } from '@universalweb/acid'; - * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true); - */ - // Add map & buffer Support - Review required for performance and support for more types - const isEqual = (source, target) => { - if (source === target) { - return true; - } else if (isBuffer(source)) { - return source.equals(target); - } else if (source.toString() === target.toString()) { - if (isPlainObject(source)) { - const sourceProperties = keys(source); - if (hasKeys(target, sourceProperties)) { - return everyArray(sourceProperties, (key) => { - return isEqual(source[key], target[key]); - }); - } - } else if (isArray(source)) { - if (source.length === target.length) { - return everyArray(source, (item, index) => { - return isEqual(item, target[index]); - }); - } - } - } - return false; - }; - - /** - * Performs a shallow strict comparison between two objects. - * - * @function isMatchArray - * @type {Function} - * @category array - * @param {Array} source - Source object. - * @param {Array} compareArray - Object to compare to source. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isMatchArray, assert } from '@universalweb/acid'; - * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true); - */ - function isMatchArray(source, compareArray) { - if (source.length === compareArray.length) { - return everyArray(source, (item, index) => { - return isEqual(compareArray[index], item); - }); - } - return false; - } - - const mathNativeMax = Math.max; - /** - * Plucks the largest value from an array. - * - * @function largest - * @type {Function} - * @category array - * @param {Array} array - Array from which largest number is taken. - * @returns {Number} - The largest number. - * - * @example - * import { largest, assert } from '@universalweb/acid'; - * assert(largest([1,2,3]), 3); - */ - function largest(array) { - return mathNativeMax(...array); - } - - /** - * Extracts item(s) from an array starting from the last item in the array. - * - * @function last - * @type {Function} - * @category array - * @param {Array} array - Array to have items extracted from. - * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array. - * @returns {Array} - Items from the array. - * - * @example - * import { last, assert } from '@universalweb/acid'; - * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]); - */ - function last(array, indexFrom) { - const arrayLength = array.length; - return indexFrom ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1]; - } - - /** - * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. - * - * @function mapArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array} - An array of the same calling array's type. - * - * @example - * import { mapArray, assert } from '@universalweb/acid'; - * assert(mapArray([1, 2, 3], (item) => { - * return item * 2; - * }), [2, 4, 6]); - */ - function mapArray(source, iteratee, results = [], thisCall, additionalArg) { - if (hasValue(thisCall)) { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - results[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg); - }); - } else { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - results[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg); - }); - } - return results; - } - - /** - * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee. - * - * @function concurrentEachArray - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {*} thisBind - Object to use as the "this" within the function. - * @returns {Promise|Array|undefined} - An array of the same calling array's type. - * - * @example - * import { concurrentEachArray, has, assert } from '@universalweb/acid'; - * const results = await concurrentEachArray([1, 2, 3], async (item) => { - * return item * 2; - * }); - * assert(has(results, [2, 4, 6]), true); - */ - async function concurrentEachArray(source, iteratee, thisBind) { - if (!source) { - return; - } - const results = []; - const arrayLength = source.length; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - results[index] = iteratee.call(thisBind, source[index], index, results, arrayLength); - } - } else { - for (let index = 0; index < arrayLength; index++) { - results[index] = iteratee(source[index], index, results, arrayLength); - } - } - return Promise.all(results); - } - - /** - * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray. - * - * @function mapAsyncArray - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @returns {Array} - An array of the same calling array's type. - * - * @example - * import { mapAsyncArray, assert } from '@universalweb/acid'; - * assert(await mapAsyncArray([1, 2, 3], async (item) => { - * return item * 2; - * }), [2, 4, 6]); - */ - async function mapAsyncArray(source, iteratee) { - const results = []; - await eachAsyncArray(source, async (item, index, arrayLength) => { - results[index] = await iteratee(item, index, results, arrayLength); - }); - return results; - } - - /** - * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse. - * - * @function mapRightArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array of the same calling array's type. - * - * @example - * import { mapRightArray, assert } from '@universalweb/acid'; - * assert(mapRightArray([1, 2, 3], (item) => { - * return item * 2; - * }), [6, 4, 2]); - */ - function mapRightArray(source, iteratee, results = [], additionalArgument) { - let trueIndex = 0; - const arrayLength = source.length; - for (let index = arrayLength - 1; index >= 0; index--) { - results[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument); - trueIndex++; - } - return results; - } - - /** - * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee. - * - * @function mapWhile - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array with properties that passed the test. - * - * @example - * import { mapWhile, assert } from '@universalweb/acid'; - * assert(mapWhile([1, 2, 0], (item) => { - * return Boolean(item); - * }), [1, 2]); - */ - function mapWhile(source, iteratee, results = [], additionalArgument) { - const arrayLength = source.length; - for (let index = 0; index < arrayLength; index++) { - const item = source[index]; - const returned = iteratee(item, index, results, source, arrayLength, additionalArgument); - if (returned === false) { - break; - } - results[index] = item; - } - return results; - } - - /** - * Subtracts the subtrahend (second argument) from the minuend (first argument). - * - * @function subtract - * @category math - * @type {Function} - * @param {Number} minuend - The minuend. - * @param {Number} subtrahend - The subtrahend. - * @returns {Number} - Returns the difference. - * - * @example - * import { subtract, assert } from '@universalweb/acid'; - * assert(subtract(3, 1), 2); - */ - function subtract(minuend, subtrahend) { - return minuend - subtrahend; - } - - /** - * Sorts an array of numbers in ascending order. Smallest to largest. - * - * @function sortNumberAscending - * @category array - * @param {Array} numberList - Array of numbers. - * @returns {Array} - The array this method was called on. - * - * @example - * import { sortNumberAscending, assert } from '@universalweb/acid'; - * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]); - */ - function sortNumberAscending(numberList) { - return numberList.sort(subtract); - } - - /** - * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. - * - * @function partition - * @type {Function} - * @category array - * @param {Array} array - Takes an array to split. - * @param {Function} predicate - Function run on each item in the array. - * @returns {Array} - One array split into two arrays. - * - * @example - * import { partition, assert } from '@universalweb/acid'; - * const result = partition([ - * {user: 'barney', age: 36, active: false}, - * {user: 'fred', age: 40, active: true}, - * {user: 'pebbles', age: 1, active: false} - * ], (item) => { return item.active; }); - * assert(result, [{"user":"fred","age":40,"active":true}], - * [{"user":"barney","age":36,"active":false}, - * {"user":"pebbles","age":1,"active":false}]); - */ - function partition(array, predicate) { - const rejected = []; - return [ - compactMapArray(array, (item, index) => { - if (predicate(item, index)) { - return item; - } - rejected.push(item); - }), - rejected - ]; - } - - /** - * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function. - * - * @function subtractReverse - * @category math - * @type {Function} - * @param {Number} subtrahend - The subtrahend. - * @param {Number} minuend - The minuend. - * @returns {Number} - Returns the difference. - * - * @example - * import { subtractReverse, assert } from '@universalweb/acid'; - * assert(subtractReverse(1, 3), 2); - */ - function subtractReverse(subtrahend, minuend) { - return minuend - subtrahend; - } - - /** - * Sorts an array of numbers in descending order. Largest to smallest. - * - * @function sortNumberDescening - * @category array - * @param {Array} numberList - Array of numbers. - * @returns {Array} - The array this method was called on. - * - * @example - * import { sortNumberDescening, assert } from '@universalweb/acid'; - * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]); - */ - function sortNumberDescening(numberList) { - return numberList.sort(subtractReverse); - } - - /** - * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation. - * - * @function remove - * @category array - * @param {Array} array - Array to be mutated. - * @param {String|Array} removeThese - Items to remove from the array. - * @returns {Array} - The array this method was called on. - * - * @example - * remove([1, 2, 3, 3, 4, 3, 5], 1); - * // => [2, 3, 3, 4, 3, 5] - * @example - * remove([3, 3, 4, 5], 3, 4); - * // => [5] - */ - function remove(array, removeThese) { - let arrayLength = array.length; - for (let index = 0; index < arrayLength; index++) { - const item = array[index]; - if (removeThese.includes(item)) { - array.splice(index, 1); - index--; - arrayLength--; - } - } - return array; - } - /** - * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation. - * - * @function removeBy - * @category array - * @param {Array} source - Array to be mutated. - * @param {Function} iteratee - Function used to check object. Return true to remove the value. - * @returns {Array} - The array this method was called on. - * - * @example - * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);}); - * // => [2, 4] - */ - function removeBy(source, iteratee) { - let arrayLength = source.length; - for (let index = 0; index < arrayLength; index++) { - const item = source[index]; - if (iteratee(item, index)) { - source.splice(index, 1); - index--; - arrayLength--; - } - } - return source; - } - - /** - * Extracts all items in array except the first and last item. - * - * @function rest - * @type {Function} - * @category array - * @param {Array} array - Array to be sliced. - * @returns {Array} - Returns the aggregated array. - * - * @example - * rest([1, 2, 3, 4, 5]); - * // => [2, 3, 4, 5] - */ - function rest(array) { - return array.slice(1, array.length); - } - - /** - * Get the item at the supplied index starting at the end of the array. - * - * @function right - * @type {Function} - * @category array - * @param {Array} source - Array to be sliced. - * @param {Number} amount - Amount from the right. - * @returns {*} - Returns the object at the evaluated position. - * - * @example - * right([1, 2, 3, 4, 5] , 1); - * // => 4 - */ - function right(source, amount) { - return source[source.length - 1 - amount]; - } - - const { floor, random: random$1 } = Math; - /** - * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption.. - * - * @function randomInt - * @category number - * @type {Function} - * @param {Number} max - The highest possible value for the random number. - * @param {Number} [min = 0] - Establishes lowest possible value for the random number. - * @returns {Number} - Returns random integer between the max and min range. - * - * @example - * import { randomInt, assert } from '@universalweb/acid'; - * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;}); - */ - function randomInt(max, min = 0) { - return floor(random$1() * (max - min)) + min; - } - - /** - * Checks if two numbers are the same. - * - * @function isNumberEqual - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @param {Number} target - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumberEqual, assert } from '@universalweb/acid'; - * assert(isNumberEqual(0, 0), true); - */ - function isNumberEqual(source, target) { - return source === target; - } - - const arrayFrom = Array.from; - /** - * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check. - * - * @function toArray - * @category array - * @param {*} arrayLike - Array like object. - * @param {Function} mapFn - Function to map over the array. - * @param {*} thisArg - MapFn's "this". - * @returns {Array|undefined} - New array. - * - * @example - * import { toArray, assert } from '@universalweb/acid'; - * assert(toArray(new Map([[1, 2]])), [[1, 2]]); - */ - function toArray(arrayLike, mapFn, thisArg) { - if (hasValue(arrayLike)) { - return arrayFrom(arrayLike, mapFn, thisArg); - } - } - - /** - * Shuffle an array and return a new array. - * - * @function shuffle - * @category array - * @param {Array} target - Target Array to be shuffled. - * @param {Number} amount - The amount of times to shuffle the array. - * @returns {Array} - An array with the shuffled results. - * - * @example - * import { shuffle, assert } from '@universalweb/acid'; - * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]); - */ - function shuffle(target, amount = target.length) { - if (target.length <= 1) { - return toArray(target); - } - const shuffleArray = toArray(target); - let count = 0; - let index; - let value; - while (count < amount) { - index = randomInt(shuffleArray.length - 1, 0); - value = shuffleArray[count]; - shuffleArray[count] = shuffleArray[index]; - shuffleArray[index] = value; - count++; - } - return shuffleArray; - } - - /** - * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned. - * - * @function sample - * @category array - * @param {Array} source - The array to pull sample(s) from. - * @param {Number} amount - The amount of samples to take. - * @returns {Array} - An array of randomly pulled samples. - * - * @example - * sample([1, 2, 3, 4] , 2); - * // => [1, 3] - */ - function sample(source, amount) { - if (!source) { - return false; - } - const arrayLength = source.length; - if (arrayLength === amount || amount > arrayLength) { - return shuffle(source); - } - if (amount === 1) { - return [source[randomInt(arrayLength - 1, 0)]]; - } - const sampleArray = []; - const used = {}; - let count = 0; - let index; - while (count < amount) { - index = randomInt(source.length - 1, 0); - if (!used[index]) { - sampleArray.push(source[index]); - used[index] = true; - count++; - } - } - return sampleArray; - } - - const mathNativeMin = Math.min; - /** - * Plucks the smallest value from an array. - * - * @function smallest - * @category array - * @type {Function} - * @param {Array} array - Array from which smallest number is taken. - * @returns {Number} - The smallest number. - * - * @example - * smallest([1,2,3]); - * // => 1 - */ - function smallest(array) { - return mathNativeMin(...array); - } - - /** - * What index should the number be inserted at to keep a sorted array still sorted. - * - * @function getNumberInsertIndex - * @category array - * @type {Function} - * @param {Array} source - Array to be checked. - * @param {Number} target - Number to check where to be inserted. - * @returns {Number} - The index at which to insert. - * - * @example - * import { getNumberInsertIndex, assert } from '@universalweb/acid'; - * assert(getNumberInsertIndex([30, 39, 50], 40), 1); - */ - function getNumberInsertIndex(source, target) { - let insertIndex = 0; - everyArray(source, (item, index) => { - insertIndex = index; - if (target >= item) { - insertIndex = index + 1; - return true; - } else { - return false; - } - }); - return insertIndex; - } - - /** - * Returns a shallow copy of the array up to an amount. - * - * @function take - * @category array - * @type {Function} - * @param {Array} source - The source array to take from. - * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction. - * @returns {Array} - The aggregated array. - * - * @example - * import { take, assert } from '@universalweb/acid'; - * assert(take([1,2,3], 2), [1, 2]); - */ - function take(source, endIndex = 1) { - return source.slice(0, endIndex); - } - - /** - * Returns a shallow copy of the array up to an amount starting from the right. - * - * @function takeRight - * @category array - * @type {Function} - * @param {Array} source - The source array to take right from. - * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction. - * @returns {Array} - The aggregated array. - * - * @example - * import { takeRight, assert } from '@universalweb/acid'; - * assert(takeRight([1,2,3], 2), [2, 3]); - */ - function takeRight(source, indexRight = 1) { - const arrayLength = source.length; - return source.slice(arrayLength - indexRight, arrayLength); - } - - function onlyUnique(value, index, array) { - return array.indexOf(value) === index; - } - function sortUnique(item, index, array) { - return item !== array[index - 1]; - } - /** - * Filters the array down to unique elements. - * - * @function unique - * @category array - * @type {Function} - * @param {Array} source - The array to be filtered. - * @param {Boolean} isSorted - Flag which means the array is already sorted. - * @returns {Array} - The filtered array. - * - * @example - * unique([1, 2, 2, 4]); - * // => [1, 2, 4] - */ - function unique(source, isSorted) { - if (isSorted) { - return source.filter(sortUnique); - } - return source.filter(onlyUnique); - } - - /** - * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays. - * - * @function union - * @category array - * @type {Function} - * @param {...Array} arrays - The arrays to be evaluated. - * @returns {Array} - The aggregated array. - * - * @example - * union([1,2,4], [1,2,3]); - * // => [1, 2, 4, 3] - */ - function union(...arrays) { - return unique(flattenDeep(arrays)); - } - - /** - * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned. - * If and when the iteratee yields false the loop stops & false is returned. - * - * @function untilFalseArray - * @category array - * @type {Function} - * @param {Array} source - The array to iterate over. - * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. - * @returns {Array} - Returns true if all returns are true or false if one value returns false. - * - * @example - * import { untilFalseArray, assert } from '@universalweb/acid'; - * assert(untilFalseArray([true, true, false], (item) => { - * return item; - * }), false); - * assert(untilFalseArray([true, true, true], (item) => { - * return item; - * }), true); - */ - function untilFalseArray(source, iteratee) { - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if (iteratee(source[index], index) === false) { - return false; - } - } - return true; - } - - /** - * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned. - * If and when the iteratee yields true the loop stops & false is returned. - * - * @function untilTrueArray - * @category array - * @type {Function} - * @param {Array} source - The array to iterate over. - * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. - * @returns {Array} - Returns true if all returns are false or false if one value returns true. - * - * @example - * import { untilTrueArray, assert } from '@universalweb/acid'; - * assert(untilTrueArray([true], (item) => { - * return item; - * }), false); - * assert(untilTrueArray([true, true, true], (item) => { - * return item; - * }), true); - */ - function untilTrueArray(source, iteratee) { - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if (iteratee(source[index], index) === true) { - return false; - } - } - return true; - } - - /** - * Iterates through the calling object and creates a new object based on the calling object's type with the results, - * (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * Re-checks the length each loop. - * - * @function whileCompactMap - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The originally given array. - * - * @example - * import { whileCompactMap, assert } from '@universalweb/acid'; - * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => { - * return item; - * }), [1, 2, 3, false]); - */ - function whileCompactMap(source, iteratee, results = [], additionalArgument) { - let index = 0; - while (index < source.length) { - const result = results.push(iteratee(source[index], index, source, source.length, additionalArgument)); - index++; - if (hasValue(result)) { - results.push(result); - } - } - return source; - } - - /** - * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over. - * - * @function whileEachArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The originally given array. - * - * @example - * import { whileEachArray, assert } from '@universalweb/acid'; - * const list = []; - * whileEachArray([1, 2, 3], (item, index) => { - * list[index] = item; - * }); - * assert(list, [1, 2, 3]); - */ - function whileEachArray(source, iteratee, additionalArgument) { - let index = 0; - while (index < source.length) { - iteratee(source[index], index, source, source.length, additionalArgument); - index++; - } - return source; - } - - /** - * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. - * Re-checks the length each loop. - * - * @function whileMapArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The originally given array. - * - * @example - * import { whileMapArray, assert } from '@universalweb/acid'; - * assert(whileMapArray([1, 2, 3], (item, index, source) => { - * if (index === 0) { - * source.push(4); - * } - * return item; - * }), [1, 2, 3, 4]); - */ - function whileMapArray(source, iteratee, results = [], additionalArgument) { - let index = 0; - while (index < source.length) { - results.push(iteratee(source[index], index, source, source.length, additionalArgument)); - index++; - } - return source; - } - - /** - * Returns a copy of the array with all instances of the values removed. - * - * @function without - * @type {Function} - * @category array - * @param {Array} target - The target array to be filtered. - * @param {Array} sources - Items to be removed. - * @returns {Array} - The target array filtered. - * - * @example - * import { without, assert } from '@universalweb/acid'; - * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]); - */ - function without(target, sources) { - if (!sources) { - return target; - } - const sourcesSet = construct(Set, sources); - return target.filter((item) => { - return !sourcesSet.has(item); - }); - } - - /** - * Creates an array that is the symmetric difference of the provided arrays. - * - * @function xor - * @category array - * @type {Function} - * @param {...Array} sources - The array(s) to be filtered. - * @returns {Array|undefined} - The filtered array. - * - * @example - * xor([2, 1], [2, 3, 5], [6]); - * // => [1, 3, 5, 6] - */ - function xor(...sources) { - const xorMap = construct(Map); - const xored = []; - const sourcesLength = sources.length; - if (sourcesLength === 2) { - return difference(sources[0], sources[1]); - } - eachArray(sources, (currentArray, parentIndex) => { - eachArray(currentArray, (child, childIndex) => { - let childRoot = xorMap.get(child); - if (!childRoot) { - childRoot = { - count: 1, - parentIndex, - child - }; - xorMap.set(child, childRoot); - } else if (childRoot.parentIndex === parentIndex) { - return; - } else { - childRoot.count++; - } - }); - }); - forEach(xorMap, (item) => { - if (item.count === 1) { - xored.push(item.child); - } - }); - return xored; - } - - /** - * Merges together the values of each of the arrays with the values at the corresponding position. - * - * @function zip - * @type {Function} - * @category array - * @param {Array} arrays - The arrays to process. - * @returns {Array} - Returns the new array of regrouped elements. - * - * @example - * zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] - */ - function zip(...arrays) { - return arrays[0].map((item, index) => { - return arrays.map((array) => { - return array[index]; - }); - }); - } - /** - * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration. - * - * @function unZip - * @type {Function} - * @category array - * @param {Array} source - The array of grouped elements to process. - * @returns {Array} - Returns the new array of regrouped elements. - * - * @example - * unZip([['a', 1, true], ['b', 2, false]]); - * // => [['a', 'b'], [1, 2], [true, false]] - */ - function unZip(source) { - return source[0].map((item, index) => { - return source.map((arraySet) => { - return arraySet[index]; - }); - }); - } - - /** - * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer. - * - * @function ensureBuffer - * @category buffer - * @type {Function} - * @param {*} source - Object to be checked. - * @returns {Array} - Returns an array. - * - * @example - * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid'; - * assert(isBuffer(ensureBuffer('test')), true); - */ - function ensureBuffer(source) { - return (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0); - } - - /** - * Clears the values out of a buffer. - * - * @function clearBuffer - * @category buffer - * @type {Function} - * @param {Array} source - Takes an array to be emptied. - * @returns {Array} - The originally given array. - * - * @example - * import { clearBuffer, assert } from '@universalweb/acid'; - * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([])); - */ - function clearBuffer(source) { - source.fill(0); - return source; - } - - /** - * Checks if an object or objects are a plain object. - * - * @function isFunction - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFunction } from '@universalweb/acid'; - * isFunction(() => {}); - * // => true - */ - const isFunction = (source) => { - return hasValue(source) ? source instanceof Function : false; - }; - - /** - * Checks if the value is a number. - * - * @function isNumber - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumber, assert } from '@universalweb/acid'; - * assert(isNumber(1), true); - */ - const isNumberCall = isConstructorNameFactory('Number'); - const isNumber = isTypeFactory(isNumberCall); - /** - * Checks if the value is not a number. - * - * @function isNotNumber - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNotNumber, assert } from '@universalweb/acid'; - * assert(isNotNumber(1), false); - */ - function isNotNumber(source) { - return !isNumber(source); - } - - /** - * Checks if the value is a string. - * - * @function isString - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isString, assert } from '@universalweb/acid'; - * assert(isString('hello'), true); - * assert(isString(1), false); - */ - const isString = isConstructorFactory(String); - /** - * Checks if the value is not a string. - * - * @function isNotString - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNotString, assert } from '@universalweb/acid'; - * assert(isNotString(1), true); - * assert(isNotString('hello'), false); - */ - function isNotString(source) { - return !isString(source); - } - - const objectAssign = Object.assign; - function assignToObject(target, source) { - if (isPlainObject(source)) { - objectAssign(target, source); - } else if (isFunction(source)) { - const key = source.name; - if (key) { - target[key] = source; - } else { - objectAssign(target, source); - } - } else if (isString(source) || isNumber(source)) { - target[source] = source; - } - return target; - } - /** - * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module. - * - * @function assign - * @category object - * @param {Object} target - The target object. - * @param {...Object} sources - The source object(s). - * @returns {Object} - Returns the target object. - * - * @example - * import { assign, assert } from '@universalweb/acid'; - * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5}); - */ - function assign(target, ...sources) { - const sourceLength = sources.length; - for (let index = 0; index < sourceLength; index++) { - assignToObject(target, sources[index]); - } - return target; - } - - function assignToClass(target, source) { - if (isPlainObject(source)) { - objectAssign(target.prototype, source); - } else if (isFunction(source)) { - const key = source.name; - if (key) { - target.prototype[key] = source; - } - } else if (isConstructor(source)) { - const key = source.constructor?.name; - if (key) { - target.prototype[key] = source; - } - } else if (isString(source) || isNumber(source)) { - target.prototype[source] = source; - } - return target; - } - /** - * The function adds a new method to a class. - * @param {Class} target - The target parameter refers to the Class or constructor function to which you want - * to add a new method. - * @param {Function|Object|String|Number} sources - What you want to add to the class. - * @returns {Class} - Returns the Class provided in the target parameter. - * - * @example - * import { extendClass, assert } from '@universalweb/acid'; - * class Test {} - * function a(){return 1;} - * extendClass(Test, a) - * assert((new Test()).a(), 1); - */ - function extendClass(target, ...sources) { - const sourceLength = sources.length; - for (let index = 0; index < sourceLength; index++) { - assignToClass(target, sources[index]); - } - return target; - } - - /** - * Creates an object composed of keys generated from the results of running each element of collection through iteratee. - * - * @function countBy - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {Function} iteratee - The iteratee to transform keys. - * @returns {Object} - Returns the composed aggregate object. - * - * @example - * import { countBy, assert } from '@universalweb/acid'; - * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2}); - */ - function countBy(collection, iteratee) { - const object = {}; - let result; - eachArray(collection, (item) => { - result = iteratee(item); - if (!object[result]) { - object[result] = 0; - } - object[result]++; - }); - return object; - } - - /** - * Count the amount of times a key is present in a collection. - * - * @function countKey - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {Function} propertyName - The name of the key. - * @returns {Number} - The count. - * - * @example - * import { countKey, assert } from '@universalweb/acid'; - * assert(countKey([{a:1}, {a:3}], 'a'), 2); - */ - function countKey(collection, propertyName) { - let count = 0; - eachArray(collection, (item) => { - if (item[propertyName]) { - count++; - } - }); - return count; - } - - /** - * Count the amount of times a key is not present in a collection. - * - * @function countWithoutKey - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {String} propertyName - The name of the key. - * @returns {Number} - The count. - * - * @example - * import { countWithoutKey, assert } from '@universalweb/acid'; - * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2); - */ - function countWithoutKey(collection, propertyName) { - let count = 0; - eachArray(collection, (item) => { - if (!item[propertyName]) { - count++; - } - }); - return count; - } - - function findIndexCache(element, index, array, indexMatch, propertyName) { - if (element[propertyName] === indexMatch) { - return true; - } - } - - /** - * Finds an object in a collection by the given id and property name and returns the array index of the object. - * - * @function findIndex - * @type {Function} - * @category collection - * @param {Array} collection - Collection to be checked for an item. - * @param {Number|string} id - The value to look for. - * @param {String} [propertyName = 'id'] - The name of the property to compare. - * @returns {Number} - The index of the object. - * - * @example - * findIndex([{id: 1}, {id: 2}], 1); - * // => 0 - */ - function findIndex(collection, id, propertyName = 'id') { - const result = collection.findIndex((element, index) => { - return findIndexCache(element, index, collection, id, propertyName); - }); - return result === -1 ? false : result; - } - - /** - * Finds an object in a collection by the given id and property name. - * - * @function findItem - * @type {Function} - * @category collection - * @param {Array} collection - Collection to be checked for an item. - * @param {Number|string} id - The value to look for. - * @param {String} [propertyName = 'id'] - The name of the property to compare. - * @returns {Object} - The found object. - * - * @example - * findItem([{id: 1}, {id: 2}], 1); - * // => {id: 1} - */ - function findItem(collection, id, propertyName = 'id') { - const result = collection.find((element, index) => { - return findIndexCache(element, index, collection, id, propertyName); - }); - return result === -1 ? false : result; - } - - function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - if (!nextKey) { - return -1; - } else if (!previousKey) { - return 1; - } else if (previousKey < nextKey) { - return 1; - } else if (previousKey > nextKey) { - return -1; - } - return 0; - } - /** - * Sorts an array in place using a key in descending order. - * - * @function sortCollectionDescending - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array and or a clone of the array sorted. - * - * @example - * import { sortCollectionDescending, assert } from '@universalweb/acid'; - * const result = [{id: 1}, {id: 0}]; - * const collect = [{id: 0}, {id: 1}]; - * const prop = 'id'; - * assert(sortCollectionDescending(collect, prop), result); - */ - function sortCollectionDescending(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortCollectionDescendingFilter(previous, next, propertyName, ifMatch); - }); - } - - /** - * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array. - * - * @function getLowest - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @returns {Object} - The newest object in the collection. - * - * @example - * import { getLowest, assert } from '@universalweb/acid'; - * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1}); - */ - function getLowest(collection, propertyName) { - return sortCollectionDescending(collection, propertyName, false)[0]; - } - - function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - if (!nextKey) { - return 1; - } else if (!previousKey) { - return -1; - } else if (previousKey < nextKey) { - return -1; - } else if (previousKey > nextKey) { - return 1; - } - return 0; - } - /** - * Sorts an array in place using a key in ascending order. - * - * @function sortCollectionAscending - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array and or a clone of the array sorted. - * - * @example - * import { sortCollectionAscending, assert } from '@universalweb/acid'; - * const result = [{id: 0}, {id: 1}]; - * const collect = [{id: 1}, {id: 0}]; - * const prop = 'id'; - * assert(sortCollectionAscending(collect, prop), result); - */ - function sortCollectionAscending(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortCollectionAscendingFilter(previous, next, propertyName, ifMatch); - }); - } - - /** - * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array. - * - * @function getHighest - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @returns {Object} - The newest object in the collection. - * - * @example - * import { getHighest, assert } from '@universalweb/acid'; - * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0}); - */ - function getHighest(collection, propertyName = 'id') { - return sortCollectionAscending(collection, propertyName)[0]; - } - - /** - * Creates an object composed of keys generated from the results of running each element of collection thru iteratee. - * The order of grouped values is determined by the order they occur in collection. - * The corresponding value of each key is an array of elements responsible for generating the key. - * - * @function groupBy - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {Function} iteratee - The iteratee to transform keys. - * @returns {Object} - Returns the composed aggregate object. - * - * @example - * groupBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': [4.2], '6': [6.1, 6.3] } - */ - function groupBy(collection, iteratee) { - const sortedObject = {}; - eachArray(collection, (item) => { - const results = iteratee(item); - if (!sortedObject[results]) { - sortedObject[results] = []; - } - sortedObject[results].push(item); - }); - return sortedObject; - } - - /** - * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique. - * - * @function indexBy - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {String} propertyName - The property name to index by. - * @returns {Object} - Returns the composed aggregate object. - * - * @example - * import { indexBy, assert } from '@universalweb/acid'; - * const result = { "0": {name: 'test', id: 0}, "1": {name: 'test2', id: 1}}; - * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id'); - * assert(indexed, result); - */ - function indexBy(collection, propertyName = 'id') { - const sortedObject = {}; - eachArray(collection, (item) => { - sortedObject[item[propertyName]] = item; - }); - return sortedObject; - } - - /** - * Invokes a function on the provided property name in each object in the collection. - * - * @function invokeCollection - * @category collection - * @type {Function} - * @param {Array} collection - Collection from which method will be taken. - * @param {String} property - Value used to pluck method from object. - * @param {*} value - Value to be passed to callable property. - * @returns {Array} - Returns the results of the invoked method. - * - * @example - * import { invokeCollection, assert } from '@universalweb/acid'; - * const results = invokeCollection([{ - * test(item, index) { return [item, index];} - * }], 'test', ['EXAMPLE']); - * assert(results, [['EXAMPLE', 0]]); - */ - function invokeCollection(collection, property, value, thisBind) { - if (thisBind) { - return mapArray(collection, (item, index) => { - return item[property].call(thisBind, value); - }); - } - return mapArray(collection, (item, index) => { - return item[property](value); - }); - } - - /** - * Asynchronously awaits & invokes a function on the provided property name in each object in the collection. - * - * @function invokeCollectionAsync - * @category collection - * @type {Function} - * @async - * @param {Array} collection - Collection from which method will be taken. - * @param {String} property - Value used to pluck method from object. - * @param {*} value - Value to be passed to callable property. - * @returns {Array} - Returns the results of the invoked method. - * - * @example - * import { invokeCollectionAsync, assert } from '@universalweb/acid'; - * const results = await invokeCollectionAsync([{ - * async test(item, index) { return [item, index];} - * }], 'test', ['EXAMPLE']); - * assert(results, [['EXAMPLE', 0]]); - */ - function invokeCollectionAsync(collection, property, value, thisBind) { - if (thisBind) { - return mapAsyncArray(collection, (item) => { - return item[property].call(thisBind, value); - }); - } - return mapAsyncArray(collection, async (item) => { - return item[property](value); - }); - } - - /** - * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array. - * - * @function pluckObject - * @category object - * @type {Function} - * @param {Object} source - Array used to determine what sources to be plucked. - * @param {String|Array} targets - Property name. - * @returns {Array|undefined} - An array of plucked sources. - * - * @example - * import { pluckObject, assert } from '@universalweb/acid'; - * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]); - */ - function pluckObject(source, targets) { - if (!source) { - return; - } else if (isString(targets)) { - return source[targets]; - } - return mapArray(targets, (item) => { - return source[item]; - }); - } - - /** - * Returns an array of the plucked values from the collection. - * - * @function pluck - * @category collection - * @type {Function} - * @param {Array} collection - Array used to determine what value to be plucked. - * @param {(String|Number|Array.)} targets - Property name. - * @returns {Array} - An array of plucked values. - * - * @example - * import { pluck, assert } from '@universalweb/acid'; - * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]); - * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]); - */ - function pluck(collection, targets) { - return mapArray(collection, (item) => { - return pluckObject(item, targets); - }); - } - - function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - return previousKey.localeCompare(nextKey); - } - /** - * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array. - * - * @function sortCollectionAlphabetically - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - Name of property to compare. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array. - * - * @example - * import { sortCollectionAlphabetically, assert } from '@universalweb/acid'; - * const result = [{"letter":"a"},{"letter":"c", g: 0},{"letter":"c", g: 2}, {letter:'f'}]; - * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c", g: 2}, {letter:'c', g: 0}]; - * const prop = 'letter'; - * function ifMatchSort(c, n) { - * if (c.g < n.g) { - * return -1; - * } - * if (c.g > n.g) { - * return 1; - * } - * } - * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result); - */ - function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortObjectsAlphabetically(previous, next, propertyName, ifMatch); - }); - } - - function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - return nextKey.localeCompare(previousKey); - } - /** - * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array. - * - * @function sortCollectionAlphabeticallyReverse - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - Name of property to compare. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array. - * - * @example - * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid'; - * const result = [{letter:'f'},{"letter":"c"}, {"letter":"a"}]; - * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c"}]; - * const prop = 'letter'; - * assert(sortCollectionAlphabeticallyReverse(collect, prop), result); - */ - function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch); - }); - } - - /** - * Return the file extension. - * - * @function getFileExtension - * @category file - * @param {*} source - Object to be checked. - * @returns {String|undefined} - Returns the extension. - * - * @example - * import { getFileExtension, assert } from '@universalweb/acid'; - * assert(getFileExtension('test.js'),'js'); - */ - function getFileExtension(source) { - if (source) { - return source.substring(source.lastIndexOf('.') + 1); - } - } - - /** - * Return the file extension. - * - * @function getFilename - * @category file - * @param {*} source - Object to be checked. - * @returns {String|undefined} - Returns the extension. - * - * @example - * import { getFilename, assert } from '@universalweb/acid'; - * assert(getFilename('./universalweb/test.js'),'test.js'); - */ - function getFilename(source) { - if (source) { - return source.substring(source.lastIndexOf('/') + 1); - } - } - - function regexTestFactory(regexType) { - return (item) => { - return hasValue(item) ? regexType.test(item) : false; - }; - } - - /** - * Checks if the string has a .css extension. - * - * @function isFileCSS - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileCSS, assert } from '@universalweb/acid'; - * assert(isFileCSS('test.css'), true); - */ - const isFileCSS = regexTestFactory(/\.css$/); - - /** - * Checks if the string has a .html extension. - * - * @function isFileHTML - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileHTML, assert } from '@universalweb/acid'; - * assert(isFileHTML('test.html'), true); - */ - const isFileHTML = regexTestFactory(/\.html$/); - - /** - * Checks if the string has a .js extension. - * - * @function isFileJS - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileJS, assert } from '@universalweb/acid'; - * assert(isFileJS('test.js'), true); - */ - const isFileJS = regexTestFactory(/\.js$/); - - /** - * Checks if the string has a .json extension. - * - * @function isFileJSON - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileJSON, assert } from '@universalweb/acid'; - * assert(isFileJSON('test.json'), true); - */ - const isFileJSON = regexTestFactory(/\.json$/); - - /** - * Creates a function that executes callable, only after being called n times. - * - * @function after - * @category function - * @type {Function} - * @param {Number} amount - The number of calls until method is invoked. - * @param {Function} callable - The function to be called. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * import { after, assert } from '@universalweb/acid'; - * const onlyAfter = after(1, (item) => { return item;}); - * assert(onlyAfter(1), undefined); - * assert(onlyAfter(2), 2); - */ - function after(amount, callable) { - let point = amount; - let value; - const onlyAfter = (...args) => { - if (point !== null) { - point--; - } - if (point <= 0) { - value = callable(...args); - point = null; - } - return value; - }; - return onlyAfter; - } - - /** - * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments. - * - * @function ary - * @category function - * @type {Function} - * @param {Function} callable - The function to cap arguments for. - * @param {Number} amount - The arity cap. - * @returns {Object} - Returns the new capped function. - * - * @example - * import { ary, assert } from '@universalweb/acid'; - * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]); - */ - function ary(callable, amount) { - return (...args) => { - return callable(...args.splice(0, amount)); - }; - } - - /** - * Creates a function that executes callable, only before n times. - * - * @function before - * @category function - * @type {Function} - * @param {Number} amount - The number of calls before n. - * @param {Function} callable - The function to be called. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * import { before, assert } from '@universalweb/acid'; - * const onlyBefore = before(3, () => { return 1;}); - * assert(onlyBefore(1), 1); - */ - function before(amount, callable) { - let point = amount; - let value; - const onlyBefore = (...args) => { - if (point !== null) { - point--; - } - if (point >= 1) { - value = callable(...args); - } else { - point = null; - } - return value; - }; - return onlyBefore; - } - - /** - * Asynchronously iterates through the given object. - * - * @function eachAsyncObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg. - * @param {*} thisCall - Iteratee called with thisCall as this. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Object|Function|undefined} - Returns source. - * - * @example - * import { eachAsyncObject, assert } from '@universalweb/acid'; - * const tempList = []; - * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => { - * tempList[key] = item; - * }); - * assert(tempList, {a: 1, b: 2, c: 3}); - */ - const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => { - if (!source) { - return; - } - const objectKeys = keys(source); - if (hasValue(thisCall)) { - await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { - return iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg); - }); - } else { - await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { - return iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg); - }); - } - return source; - }; - - /** - * Iterates through the given object. - * - * @function eachObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Object|Function|undefined} - Returns the calling object. - * - * @example - * import { eachObject, assert } from '@universalweb/acid'; - * assert(eachObject({a: 1, b: 2, c: 3}, (item) => { - * console.log(item); - * }), {a: 1, b: 2, c: 3}); - */ - function eachObject(source, iteratee, thisCall, additionalArg) { - if (!source) { - return; - } - const objectKeys = keys(source); - if (hasValue(thisCall)) { - eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { - iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg); - }); - } else { - eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { - iteratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg); - }); - } - return source; - } - - async function forEachAsync(source, callback) { - const values = []; - const properties = []; - let valuesLength = 0; - source.forEach((item, key) => { - values[valuesLength] = item; - properties[valuesLength] = item; - valuesLength++; - }); - for (let index = 0; index < valuesLength; index++) { - await callback(values[index], properties[index]); - } - return source; - } - - /** - * Checks if an object(s) is a Set. - * - * @function isSet - * @category type - * @param {...*} sources - Objects to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isSet, assert } from '@universalweb/acid'; - * assert(isSet(new Set()), true); - */ - const isSetCall = isConstructorNameFactory('Set'); - const isSet = isTypeFactory(isSetCall); - - function forOf(source, iteratee) { - if (isSet(source)) { - for (const value of source) { - iteratee(value, source); - } - return source; - } - for (const [key, value] of source) { - iteratee(value, key, source); - } - return source; - } - - /** - * Checks if an object or objects are a Int16Array. - * - * @function isGenerator - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isGenerator } from '@universalweb/acid'; - * isGenerator(function* (){}); - * // => true - */ - const isGeneratorCall = isConstructorNameFactory('GeneratorFunction'); - const isGenerator = isTypeFactory(isGeneratorCall); - - async function forOfAsync(source, iteratee, generatorArgs) { - if (isSet(source)) { - for (const value of source) { - await iteratee(value, source); - } - return source; - } - if (isGenerator(source)) { - for await (const item of source(...generatorArgs)) { - await iteratee(item, source); - } - } - for (const [key, value] of source) { - await iteratee(value, key, source); - } - return source; - } - - /** - * Checks if an object is an async function. - * - * @function isAsync - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isAsync, assert } from '@universalweb/acid'; - * assert(isAsync(async() => {}), true); - */ - const isAsyncCall = isConstructorNameFactory('AsyncFunction'); - const isAsync = isTypeFactory(isAsyncCall); - - function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) { - return (source, iteratee, argument1, argument2, argument3) => { - let returned; - const isIterateeAsync = isAsync(iteratee); - if (!hasValue(source) || !iteratee) { - return; - } else if (isArray(source)) { - returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; - } else if (isPlainObject(source) || isFunction(source)) { - returned = isIterateeAsync ? objectLoopAsync : objectLoop; - } else if (forOfLoop) { - returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; - } else if (isGenerator(source)) { - returned = forOfLoopAsync; - } else { - returned = isIterateeAsync ? objectLoopAsync : objectLoop; - } - return returned(source, iteratee, argument1, argument2, argument3); - }; - } - - /** - * Iterates through the given object. - * - * @function each - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array | object | Function} - The originally given object. - * - * @example - * import { each, assert } from '@universalweb/acid'; - * const list = {}; - * each({a: 1, b: 2, c: 3}, (item, key) => { - * list[key] = item; - * }); - * assert(list, {a: 1, b: 2, c: 3}); - */ - const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync); - - class Chain { - constructor(methods) { - this.addChainMethod(methods); - } - addChainMethod(methods) { - const thisChain = this; - each(methods, (method, methodName) => { - thisChain[methodName] = function (...args) { - this.value = method.call(thisChain, thisChain.value, ...args); - return thisChain; - }; - }); - } - setValue(value) { - this.value = value; - return this; - } - done() { - const value = this.value; - this.value = null; - return value; - } - value = null; - } - /** - * Creates a chainable set of functions. - * - * @function chain - * @category function - * @type {Function} - * @param {Array|Object} config - The object to take methods from. - * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining. - * - * @example - * import { chain, assert } from '@universalweb/acid'; - * const chained = chain({ - * a(value, c) { - * return value + c; - * } - * }).setValue(2).a(1).done(); - * assert(chained, 3); - */ - function chain(config) { - return construct(Chain, [config]); - } - - /** - * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient. - * - * @function curry - * @category function - * @type {Function} - * @param {Function} callable - The function to curry. - * @param {Number} arity - The arity of method. - * @returns {*} - Returns the new curried function. - * - * @example - * import { curry, assert } from '@universalweb/acid'; - * const result = curry((a, b, c) => { - * return [a, b, c]; - * })(1)(2)(3); - * assert(result, [1, 2, 3]); - */ - function curry(callable, arity = callable.length) { - const curries = []; - const curried = (...curryArgs) => { - curries.push(...curryArgs); - if (curries.length === arity) { - const result = callable(...curries); - clearArray(curries); - return result; - } - return curried; - }; - return curried; - } - - /** - * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order. - * - * @function curryRight - * @type {Function} - * @param {Function} callable - The function to curry. - * @param {Number} arity - The arity of method. - * @returns {*} - Returns the new curried function. - * - * @example - * import { curryRight, assert } from '@universalweb/acid'; - * const result = curryRight((a, b, c) => { - * return [a, b, c]; - * })(1)(2)(3); - * assert(result, [3, 2, 1]); - */ - function curryRight(callable, arity = callable.length) { - const curries = []; - const curried = (...curryArgs) => { - curries.unshift(...curryArgs); - if (curries.length === arity) { - const result = callable(...curries); - clearArray(curries); - return result; - } - return curried; - }; - return curried; - } - - /** - * This method returns undefined. - * - * @function noop - * @category function - * @type {Function} - * @returns {undefined} - Returns undefined. - * - * @example - * import { noop, assert } from '@universalweb/acid'; - * assert(noop(), undefined); - */ - function noop() { - return; - } - - /** - * Iterates based on the amount given invoking the iteratee with the current index as an argument. - * - * @function times - * @category utility - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @returns {undefined} - Nothing. - * - * @example - * import { times } from '@universalweb/acid'; - * times(3, (item) => { - * console.log(item); - * }); - * // 0 - * // 1 - * // 2 - * // => undefined - */ - function times(amount, iteratee) { - for (let index = 0; index < amount; index++) { - iteratee(index); - } - } - /** - * Iterates based on the amount given and maps the results returned by the iteratee each time to an array. - * - * @function timesMap - * @category utility - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @param {Array} [results = []] - Array that will have iteratee return pushed to. - * @returns {Array} - An array with iteratee's returned values. - * - * @example - * import { timesMap } from '@universalweb/acid'; - * timesMap(3, (item) => { - * return item; - * }); - * // => [0, 1, 2] - */ - function timesMap(amount, iteratee, results = []) { - for (let index = 0; index < amount; index++) { - results[index] = iteratee(amount); - } - return results; - } - - class Timers { - list = construct(Map); - construct() {} - /** - * Remove a timer that was created using the timer function. - * - * @param {Number} id - The id of the timer to remove. - * @returns {undefined} - Returns nothing. - * - * @example - * import { timer, assert } from '@universalweb/acid'; - * timer(() => {}, 100); - * // => 0 - */ - remove(id) { - clearTimeout(id); - this.list.delete(id); - } - has(id) { - return this.list.has(id); - } - get(id) { - return this.list.get(id); - } - /** - * Create a timer and add it to the list of timers. - * - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setTimeoutId ID. - * - * @example - * import { timers, assert } from '@universalweb/acid'; - * timers.set(() => {}, 100); - * // => 0 - */ - set(callable, time) { - const currentThis = this; - const id = setTimeout(() => { - callable(); - currentThis.remove(id); - }, time); - this.list.set(id, true); - return id; - } - /** - * Clear all active timers. - * - * @returns {undefined} - Returns undefined. - * - * @example - * import { timers, assert } from '@universalweb/acid'; - * timers.clear(); - * // => undefined - */ - clear() { - const currentThis = this; - currentThis.list.forEach((id) => { - currentThis.remove(id); - }); - } - } - const timers = construct(Timers); - /** - * Timer wrapper. - * - * @function timer - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setTimeoutId ID. - * - * @example - * import { timer, assert } from '@universalweb/acid'; - * timer(() => {}, 100); - * // => 0 - */ - function timer(callable, time) { - return timers.set(callable, time); - } - /** - * Clear all active timers. - * - * @function clearTimers - * @category function - * @returns {undefined} - Returns undefined. - * - * @example - * import { clearTimers, assert } from '@universalweb/acid'; - * clearTimers(); - * // => undefined - */ - function clearTimers() { - const id = setTimeout(noop, 0); - times(id, (index) => { - timers.remove(index); - }); - } - - const applyNative = Reflect.apply; - /** - * Calls a target function with an optional "this" and optional arguments as specified. Same as Reflect.apply but with a function check. - * - * @function apply - * @category function - * @param {Function} target - The target function to call. - * @param {*} thisArgument - Array like object. - * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called. - * @returns {*} - The result of calling the given target function with the specified this value and arguments. - * - * @example - * import { apply, assert } from '@universalweb/acid'; - * assert(apply(function (a) {return a;}, undefined, [2]), 2); - */ - function apply(target, thisArgument, argumentsList) { - if (isFunction(target)) { - return applyNative(target, thisArgument, argumentsList); - } - } - - /** - * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer. - * - * @function debounce - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Function} - The debounced function. - * - * @example - * import { debounce, promise, assert } from '@universalweb/acid'; - * const promised = promise((a) => { - * const debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0); - * }); - * assert(await promised(), 'debounced'); - */ - function debounce(callable, time) { - function debounced(...args) { - if (debounced.id !== false) { - timers.remove(debounced.id); - } - debounced.id = timer(() => { - debounced.callable(...args); - debounced.id = false; - }, time); - } - debounced.id = false; - debounced.callable = callable.bind(debounced); - debounced.clear = () => { - if (debounced.id !== false) { - timers.remove(debounced.id); - debounced.id = false; - } - }; - return debounced; - } - - /** - * Checks if the given method is a function. If it is then it invokes it with the given arguments. - * - * @function ifInvoke - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked if possible. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args - Arguments to pass to the function. - * @returns {*} - Returns the method invoked or undefined. - * - * @example - * import { ifInvoke, assert } from '@universalweb/acid'; - * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]); - */ - function ifInvoke(callable, thisBind, ...args) { - if (isFunction(callable)) { - if (thisBind) { - return callable.call(thisBind, ...args); - } - return callable(...args); - } - } - - /** - * Creates a function that negates the result of the predicate callable. - * - * @function negate - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @returns {*} - Returns the given methods result. - * - * @example - * negate(() => { return false;})(); - * // => true - */ - function negate(callable) { - return (...args) => { - return !callable(...args); - }; - } - - /** - * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned. - * - * @function nthArg - * @category function - * @type {Function} - * @param {Number} [index = 0] - The index of the argument to return. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * nthArg(1)('a', 'b'); - * // => 'b' - */ - function nthArg(index = 0) { - return (...args) => { - return args[index]; - }; - } - - /** - * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function. - * - * @function once - * @category function - * @type {Function} - * @param {Function} callable - The function to be called. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * const onceOnly = once((item) => { return item;}); - * onceOnly(5); - * onceOnly(3); - * // => 5 - */ - const once = (callable) => { - let value; - const onlyOnce = (...args) => { - if (!hasValue(value)) { - value = callable(...args); - } - return value; - }; - return onlyOnce; - }; - - /** - * Returns the constructor of an object. - * - * @function getType - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { getType, assert } from '@universalweb/acid'; - * assert(getType(1), true); - */ - function getType(source) { - return source?.constructor; - } - - /** - * Returns a new empty object of the same type. - * - * @function cloneType - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { cloneType, assert } from '@universalweb/acid'; - * assert(cloneType([1]), []); - */ - function cloneType(source, args = []) { - const sourceType = getType(source); - if (sourceType === Function) { - if (sourceType.name === 'function') { - return function () {}; - } - } - return construct(sourceType, args); - } - - /** - * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object. - * - * @function forOfCompactMap - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => { - * return item; - * }); - * // => {b: 2, c: 3} - */ - function forOfMap(source, iteratee = returnValue, resultsObject) { - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = iteratee(value, results, source); - methodPushBound(result); - } - return results; - } - const methodSet = isFunction(results.set); - for (const [key, value] of source) { - const result = iteratee(value, key, results, source); - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - return results; - } - - /** - * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function forOfCompactMapAsync - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * import { forOfCompactMapAsync, assert } from '@universalweb/acid'; - * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => { - * return item; - * }), {b: 2, c: 3}); - */ - async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) { - if (isGenerator(source)) { - const resultsGenerator = []; - for await (const item of source(...generatorArgs)) { - resultsGenerator.push(await iteratee(item, resultsGenerator, source)); - } - return resultsGenerator; - } - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = await iteratee(value, results, source); - methodPushBound(result); - } - return results; - } - const methodSet = isFunction(results.set); - for await (const [key, value] of source) { - const result = await iteratee(value, key, results, source); - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - return results; - } - - /** - * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. - * - * @function mapObjectAsync - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function|undefined} - An object of the same calling object's type. - * - * @example - * import { mapAsyncObject, assert } from '@universalweb/acid'; - * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, b: undefined, c: 3}); - */ - async function mapAsyncObject(source, iteratee, results = {}) { - if (!source) { - return; - } - await eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => { - results[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys); - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. - * - * @function mapObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Object|Function|undefined} - An object of the same calling object's type. - * - * @example - * import { mapObject, assert } from '@universalweb/acid'; - * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, b: undefined, c: 3}); - */ - function mapObject(source, iteratee, results = {}, thisCall, additionalArg) { - if (!source) { - return; - } - if (hasValue(thisCall)) { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - results[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg); - }); - } else { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - results[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg); - }); - } - return results; - } - - /** - * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object. - * - * @function map - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {Object | Function} [results = {}] - Object that will be used to assign results. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array | object | Function} - A new object of the same calling object's type. - * - * @example - * import { map, assert } from '@universalweb/acid'; - * assert(map({a: 1, b: 2, c: 3}, (item) => { - * return item * 2; - * }), {a: 2, b: 4, c: 6}); - */ - const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync); - - /** - * Creates a function that invokes iteratee with the arguments it receives and returns their results. - * - * @function over - * @category function - * @type {Function} - * @param {(Array.|Object.)} iteratees - The list of functions to loop through. - * @returns {Function} - Returns the new over wrapped function. - * - * @example - * import { overEvery, assert } from '@universalweb/acid'; - * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]); - */ - function over(iteratees) { - return (...args) => { - return map(iteratees, (item) => { - return item(...args); - }); - }; - } - - /** - * Iterates through the given object while the iteratee returns true. - * - * @function everyAsyncObject - * @category object - * @type {Function} - * @param {Object} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { everyAsyncObject, assert } from '@universalweb/acid'; - * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => { - * return item; - * }); - * assert(result, true); - */ - async function everyAsyncObject(source, iteratee) { - if (!source) { - return; - } - const objectKeys = keys(source); - return everyAsyncArray(objectKeys, (key, index, original, propertyCount) => { - return iteratee(source[key], key, source, propertyCount, original); - }); - } - - /** - * Iterates through the given object while the iteratee returns true. - * - * @function everyObject - * @category object - * @type {Function} - * @param {Object} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { everyObject, assert } from '@universalweb/acid'; - * const result = everyObject({a: true, b: true, c: true}, (item) => { - * return item; - * }); - * assert(result, true); - */ - function everyObject(source, iteratee) { - if (!source) { - return; - } - const objectKeys = keys(source); - return everyArray(objectKeys, (key, index, original, propertyCount) => { - return iteratee(source[key], key, source, propertyCount, original); - }); - } - - /** - * Iterates (for of) through the given object while the iteratee returns true using a for of loop. - * - * @function forOfEvery - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { every, assert } from '@universalweb/acid'; - * assert(forOfEvery({a: false, b: true, c: true}, (item) => { - * return item; - * }), false); - */ - function forOfEvery(source, iteratee = returnValue) { - if (isArray(source) || isSet(source)) { - for (const value of source) { - const result = iteratee(value, source); - if (result === false) { - return false; - } - } - } else { - for (const [key, value] of source) { - const result = iteratee(value, key, source); - if (result === false) { - return false; - } - } - } - return true; - } - - /** - * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop. - * - * @function forOfEveryAsync - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { every, assert } from '@universalweb/acid'; - * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => { - * return item; - * }), false); - */ - async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) { - if (isGenerator(source)) { - for await (const item of source(...generatorArgs)) { - const result = await iteratee(item, source); - if (result === false) { - return false; - } - } - } else if (isArray(source) || isSet(source)) { - for (const value of source) { - const result = await iteratee(value, source); - if (result === false) { - return false; - } - } - } else { - for (const [key, value] of source) { - const result = await iteratee(value, key, source); - if (result === false) { - return false; - } - } - } - return true; - } - - /** - * Iterates through the given object while the iteratee returns true. - * - * @function every - * @category utility - * @type {Function} - * @param {Object | Array | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { every, assert } from '@universalweb/acid'; - * assert(every({a: false, b: true, c: true}, (item) => { - * return item; - * }), false); - */ - const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync); - - /** - * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives. - * - * @function overEvery - * @category function - * @type {Function} - * @param {(Array.|Object.)} predicates - The list of functions to loop through. - * @returns {Function} - Returns the new overEvery wrapped function. - * - * @example - * import { overEvery, assert } from '@universalweb/acid'; - * assert(overEvery([Boolean, isFinite])('1'), true); - */ - function overEvery(predicates) { - return (arg) => { - return every(predicates, (predicate) => { - return predicate(arg); - }); - }; - } - - /** - * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on. - * - * @function reArg - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Array} indexes - The arranged argument indexes. - * @returns {Function} - Returns the new function. - * - * @example - * reArg((a, b, c) => { - * return [a, b, c]; - * }, [1,2,0])(1,2,3); - * // => [2, 3, 1] - */ - function reArg(callable, indexes) { - return (...args) => { - return callable( - ...indexes.map((item) => { - return args[item]; - }) - ); - }; - } - - /** - * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer. - * - * @function throttle - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Function|undefined} - The throttled function. - * - * @example - * const throttled = throttle(() => { console.log('throttle'); }, 0)(); - * throttled(); - * // 'throttle' - */ - function throttle(callable, time) { - function throttled(...args) { - if (throttled.id) { - throttled.shouldThrottle = true; - return; - } - throttled.callable(...args); - throttled.id = timer(() => { - if (throttled.shouldThrottle) { - throttled.callable(...args); - } - throttled.id = false; - }, time); - } - throttled.id = false; - throttled.callable = callable.bind(throttled); - throttled.clear = () => { - timers.remove(throttled.id); - throttled.id = false; - }; - return throttled; - } - - /** - * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function. - * - * @function wrap - * @category function - * @type {Function} - * @param {*} value - The value to wrap. - * @param {Function} wrapper - The wrapper function. - * @returns {Function} - The new function. - * - * @example - * wrap('Lucy', (firstName, lastName) => { - * return `My name is ${firstName} ${lastName}.`; - * })('Diamonds'); - * // => 'My name is Lucy Diamonds.' - */ - function wrap(value, wrapper) { - return (...arg) => { - return wrapper(value, ...arg); - }; - } - - const functionPrototype = Function.prototype; - /** - * Caches a prototype method. - * - * @function cacheNativeMethod - * @category utility - * @type {Function} - * @param {Function} method - Prototype method. - * @returns {Function} - Cached method. - * - * @example - * import { cacheNativeMethod, assert } from '@universalweb/acid'; - * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1); - */ - function cacheNativeMethod(method) { - return functionPrototype.call.bind(method); - } - - /** - * Returns an array of all properties (enumerable or not) found directly upon a given object. - * - * @function getPropNames - * @category object - * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned. - * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object. - * - * @example - * import { getPropNames, assert } from '@universalweb/acid'; - * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']); - */ - const getPropNames = Object.getOwnPropertyNames; - /** - * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object. - * - * @function getPropDesc - * @category object - * @param {Object} target - The target object. - * @param {String} property - The name of the property whose description is to be retrieved. - * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise. - * - * @example - * getPropDesc({ bar: 42 }, 'bar'); - * // => { configurable: true, enumerable: true, value: 42, writable: true } - */ - const getPropDesc = Object.getOwnPropertyDescriptor; - /** - * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object. - * - * @function defProp - * @category object - * @param {Object} target - The object on which to define the property. - * @param {String} property - The name of the property whose description is to be retrieved. - * @param {Object} descriptor - The descriptor for the property being defined or modified. - * @returns {Object} - The object that was passed to the function. - * - * @example - * defProp({}, 'key', { - * enumerable: false, - * configurable: false, - * writable: false, - * value: 'static' - * }).key; - * // => 'static' - */ - const defProp = Object.defineProperty; - const hasProp = cacheNativeMethod(Object.hasOwnProperty); - - /** - * Determines whether two values are the same value. - * - * @function isSame - * @category object - * @param {*} source - Value to compare to. - * @param {*} target - A value to compare. - * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value. - * - * @example - * import { isSame, assert } from '@universalweb/acid'; - * assert(isSame('foo', 'foo'), true); - */ - const isSame = Object.is; - - /** - * Adds two numbers. - * - * @function add - * @category math - * @type {Function} - * @param {Number} augend - First number. - * @param {Number} addend - Second number which is being added to another (augend). - * @returns {Number} - Returns the sum of the arguments. - * - * @example - * import { add, assert } from '@universalweb/acid'; - * assert(add(1, 1), 2); - */ - function add(augend, addend) { - return augend + addend; - } - - /** - * Decrements a number. - * - * @function deduct - * @category math - * @type {Function} - * @param {Number} source - First number. - * @returns {Number} - Returns a decremented version of the number. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - * deduct(10); - * // => 9 - */ - function deduct(source) { - return source - 1; - } - - /** - * Divides two numbers. - * - * @function divide - * @category math - * @type {Function} - * @param {Number} source - First number. - * @param {Number} value - Second number. - * @returns {Number} - Returns the quotient of the arguments. - * - * @example - * import { divide, assert } from '@universalweb/acid'; - * assert(divide(10, 5), 2); - */ - function divide(source, value) { - return source / value; - } - - /** - * Increments a number. - * - * @function increment - * @category math - * @type {Function} - * @param {Number} source - First number. - * @returns {Number} - Returns an incremented version of the number. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - * increment(10); - * // => 11 - */ - function increment(source) { - return source + 1; - } - - /** - * Multiplies two numbers. - * - * @function multiply - * @category math - * @type {Function} - * @param {Number} source - First number. - * @param {Number} value - Second number. - * @returns {Number} - Returns the product of the arguments. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - */ - function multiply(source, value) { - return source * value; - } - - /** - * Calculate the progress from a given total and current amount. - * - * @function calcProgress - * @category utility - * @type {Function} - * @param {Number} total - The total amount. - * @param {Number} currentAmount - The current amount. - * @returns {Number} - The progress as a percentage. - * - * @example - * import { calcProgress, assert } from '@universalweb/acid'; - * assert(calcProgress(100, 1), 1); - */ - function calcProgress(total, currentAmount) { - if (total === 0) { - return false; - } - if (currentAmount === 0) { - return 0; - } - return (currentAmount / total) * 100; - } - - const { random } = Math; - /** - * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption.. - * - * @function randomFloat - * @category math - * @type {Function} - * @param {Number} max - Establishes highest possible value for the random number. - * @param {Number} [min = 0] - Establishes lowest possible value for the random number. - * @returns {Number} - Returns random integer between the max and min range. - * - * @example - * import { randomFloat, assert } from '@universalweb/acid'; - * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;}); - * // => 9.1 - */ - function randomFloat(max, min = 0) { - return random() * (max - min) + min; - } - - /** - * Extracts the remainder between two numbers. - * - * @function remainder - * @category math - * @type {Function} - * @param {Number} source - First number. - * @param {Number} value - Second number. - * @returns {Number} - Returns the remainder of the arguments. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - * remainder(10, 6); - * // => 4 - */ - function remainder(source, value) { - return source % value; - } - - /** - * Subtract all numbers in the array starting from left to right & return the difference. - * - * @function subtractAll - * @category math - * @type {Function} - * @param {Number[]} source - Array of numbers. - * @returns {Number} - Returns the final difference. - * - * @example - * import { subtractAll, assert } from '@universalweb/acid'; - * assert(subtractAll([10, 1, 2, 3]), 5); - */ - function subtractAll(source) { - return source.reduce((a, b) => { - return a - b; - }, 0); - } - - /** - * Sum all numbers in a given array. - * - * @function sumAll - * @category math - * @type {Function} - * @param {Number[]} source - Array of numbers. - * @returns {Number} - Returns a single number. - * - * @example - * import { sumAll, assert } from '@universalweb/acid'; - * assert(sumAll([10, 1, 2, 3]), 5); - */ - function sumAll(source) { - return source.reduce((a, b) => { - return a + b; - }, 0); - } - - /** - * Checks if a number is within a range. - * - * @function isNumberInRange - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @param {Number} start - Beginning of range. - * @param {Number} end - End of range. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumberInRange, assert } from '@universalweb/acid'; - * assert(isNumberInRange(1, 0, 2), true); - * assert(isNumberInRange(1, 2, 5), false); - */ - function isNumberInRange(source, start, end) { - return source > start && source < end; - } - - /** - * Checks if a number is within a range. - * - * @function isNumberNotInRange - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @param {Number} start - Beginning of range. - * @param {Number} end - End of range. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumberNotInRange, assert } from '@universalweb/acid'; - * assert(isNumberNotInRange(1, 0, 2), false); - * assert(isNumberNotInRange(1, 2, 5), true); - */ - function isNumberNotInRange(source, start, end) { - return source < start || source > end; - } - - /** - * Checks if a number is negative & returns true or false. - * - * @function isPositive - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isPositive, assert } from '@universalweb/acid'; - * assert(isPositive(1), true); - */ - const { sign } = Math; - function isPositive(source) { - return sign(source) === 1; - } - - /** - * Strictly checks if a number is zero. - * - * @function isZero - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isZero, assert } from '@universalweb/acid'; - * assert(isZero(0), true); - */ - function isZero(source) { - return source === 0; - } - - const objectEntries = Object.entries; - /** - * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error. - * - * @function getEntries - * @category object - * @param {Object} source - The source object. - * @returns {Array|undefined} - Returns the Object.entries of the source object. - * - * @example - * import { getEntries, assert } from '@universalweb/acid'; - * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]); - */ - function getEntries(source) { - if (hasValue(source)) { - return objectEntries(source); - } - } - - /** - * Extracts all keys from an object whose values are not null or undefined. - * - * @function compactKeys - * @category object - * @type {Function} - * @param {Object} object - Object from which keys are extracted. - * @returns {Array} - Returns an array of key values. - * - * @example - * import { compactKeys, assert } from '@universalweb/acid'; - * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']); - */ - function compactKeys(object) { - const compactedKeys = []; - eachObject(object, (item, key) => { - if (hasValue(item)) { - compactedKeys.push(key); - } - }); - return compactedKeys; - } - - /** - * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function compactMapAsyncObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with mapped properties that are not null or undefined. - * - * @example - * import { compactMapAsyncObject, assert } from '@universalweb/acid'; - * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, c: 3}); - */ - async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) { - await eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => { - const result = await iteratee(item, key, results, original, propertyCount, objectKeys); - if (hasValue(result)) { - results[key] = result; - } - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function compactMapObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with mapped properties that are not null or undefined. - * - * @example - * import { compactMapObject, assert } from '@universalweb/acid'; - * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, c: 3}); - */ - function compactMapObject(source, iteratee = returnValue, results = {}) { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - const result = iteratee(item, key, results, original, propertyCount, objectKeys); - if (hasValue(result)) { - results[key] = result; - } - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. - * - * @function filterObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with properties that passed the test. - * - * @example - * filterObject({a: false, b: true, c: true}, (item) => { - * return item; - * }); - * // => {b: true, c: true} - */ - function filterObject(source, iteratee, results = {}) { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - if (iteratee(item, key, results, original, propertyCount, objectKeys) === true) { - results[key] = item; - } - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. - * - * @function filterAsyncObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with properties that passed the test. - * - * @example - * filterAsyncObject({a: false, b: true, c: true}, (item) => { - * return item; - * }); - * // => {b: true, c: true} - */ - async function filterAsyncObject(source, iteratee, results = {}) { - await eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => { - if ((await iteratee(item, key, results, original, propertyCount, objectKeys)) === true) { - results[key] = item; - } - }); - return results; - } - - /** - * Creates an inverted version of a given object by switching it's keys and values. - * - * @function invert - * @type {Function} - * @category object - * @param {Object} source - Object to be inverted. - * @param {Array} [target = {}] - Empty object to be populated with inverted values from source. - * @returns {Object|undefined} - Returns object with keys and values switched. - * - * @example - * import { invert, assert } from '@universalweb/acid'; - * assert(invert({a:1}), {1:'a'}); - */ - function invert(source, target = {}) { - if (!source) { - return; - } - eachObject(source, (item, key) => { - target[item] = key; - }); - return target; - } - - /** - * Performs a shallow strict comparison between two objects. - * - * @function isMatchObject - * @type {Function} - * @category object - * @param {Object} source - Source object. - * @param {Object} target - Object to compare to source. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { assert, isMatchObject } from '@universalweb/acid'; - * assert(isMatchObject({a: 1}, {a: 1}), true); - */ - const isMatchObject = (source, target) => { - if (source === target) { - return true; - } - const sourceKeys = keys(source); - const targetKeys = keys(target); - if (sourceKeys.length === targetKeys.length) { - return everyArray(sourceKeys, (key) => { - return source[key] === target[key]; - }); - } - return false; - }; - - /** - * Returns a regex safe special characters escaped version of a string. - * - * @function regexSafe - * @category regex - * @type {Function} - * @param {Object} source - String to make safe. - * @returns {Object} - Returns a regex safe version of the string. - * - * @example - * import { regexSafe, assert } from '@universalweb/acid'; - * assert(regexSafe(/.+/), '\/\.\+\/'); - */ - const escapeRegexRegex = /[()[\]{}*+?^$|#.,/\\\s-]/g; - function escapeRegex(source) { - return source.replace(escapeRegexRegex, '\\$&'); - } - - /** - * Convert array of strings to regex. - * - * @function arrayToRegex - * @category regex - * @type {Function} - * @param {Object} source - Array of strings. - * @returns {Object} - Returns a regex safe version of the string. - * - * @example - * import { arrayToRegex, assert } from '@universalweb/acid'; - * assert(String(arrayToRegex(['a','b'])), String(/a|b/)); - */ - function arrayToRegex(source, makeSafe) { - if (makeSafe) { - return arrayToRegex(mapArray(source, escapeRegex)); - } - return RegExp(source.join('|')); - } - - /** - * Checks if the value is a RegExp. - * - * @function isRegex - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isRegex, assert } from '@universalweb/acid'; - * assert(isRegex(/test/), true); - */ - const isRegexCall = isConstructorNameFactory('RegExp'); - const isRegex = isTypeFactory(isRegexCall); - - /** - * Returns a clone of the given object without the given properties. - * - * @function omit - * @category object - * @type {Function} - * @param {Object} source - Object from which keys are extracted. - * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object. - * @returns {Object|undefined} - A new object with the removed. - * - * @example - * import { omit, assert } from '@universalweb/acid'; - * assert(omit({a:1, b:2}, ['a']), {b:2}); - * assert(omit({a:1, b:2}, 'a'), {b:2}); - * assert(omit({1:'test', b:2}, 1), {b:2}); - */ - function omit(source, blacklist) { - if (!source) { - return {}; - } - if (isArray(blacklist)) { - const blacklistRegex = arrayToRegex(blacklist); - return filterObject(source, (item, key) => { - return !blacklistRegex.test(key); - }); - } - if (isRegex(blacklist)) { - return filterObject(source, (item, key) => { - return !blacklist.test(key); - }); - } - if (isString(blacklist)) { - return filterObject(source, (item, key) => { - return key !== blacklist; - }); - } - if (isNumber(blacklist)) { - const numberToString = blacklist.toString(); - return filterObject(source, (item, key) => { - return key !== numberToString; - }); - } - if (isFunction(blacklist)) { - return filterObject(source, (item, key) => { - return !blacklist(item, key); - }); - } - return objectAssign({}, source); - } - - /** - * Returns a clone of the source object with the plucked properties. - * - * @function pick - * @type {Function} - * @category object - * @param {Object} source - Object to be cloned. - * @param {Array} whitelist - Array of property names used to determine what values to pluck. - * @param {Object} [target = {}] - Object to be populated with plucked values. - * @returns {Object|undefined} - A new object with plucked properties. - * - * @example - * import { pick, assert } from '@universalweb/acid'; - * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2}); - */ - const pick = (source, whitelist, target = {}) => { - if (!source) { - return; - } - eachArray(whitelist, (item) => { - target[item] = source[item]; - }); - return target; - }; - - /** - * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object. - * - * @function objectSize - * @category object - * @param {Object} source - The source object. - * @returns {Number|undefined} - The amount of keys. - * - * @example - * import { objectSize, assert } from '@universalweb/acid'; - * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3); - */ - function objectSize(source) { - if (!source) { - return; - } - if (isPlainObject(source)) { - return keys(source).length; - } - const objectLengthProperty = source.length; - if (hasValue(objectLengthProperty)) { - return objectLengthProperty; - } - const objectSizeProperty = source.size; - if (hasValue(objectLengthProperty)) { - return objectSizeProperty; - } - return keys(source).length; - } - - /** - * Creates an object from two arrays, one of property identifiers and one of corresponding values. - * - * @function zipObject - * @type {Function} - * @category object - * @param {Array} properties - The property identifiers. - * @param {Array} values - The property values. - * @returns {Object} - Returns the new object. - * - * @example - * zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ - const zipObject = (properties, values) => { - const zipedObject = {}; - eachArray(properties, (item, key) => { - zipedObject[item] = values[key]; - }); - return zipedObject; - }; - /** - * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. - * - * @function unZipObject - * @type {Function} - * @category object - * @param {Object} object - The object to process. - * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array. - * - * @example - * unZipObject({ 'a': 1, 'b': 2 }); - * // => [['a', 'b'], [1, 2]] - */ - const unZipObject = (object) => { - const unZippedKeys = []; - const values = []; - eachObject(object, (item, key) => { - unZippedKeys.push(key); - values.push(item); - }); - return [unZippedKeys, values]; - }; - - const normalizeCase$4 = /[ _-]+/g; - /** - * Converts a string into Camel case format. - * - * @function camelCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into Camel case. - * @returns {String} - Converted string in Camel case. - * - * @example - * import { camelCase, assert } from '@universalweb/acid'; - * assert(camelCase('camel case'), 'camelCase'); - */ - function camelCase(source) { - let result = ''; - source - .replace(normalizeCase$4, ' ') - .trim() - .split(' ') - .forEach((item, index) => { - if (index === 0) { - result += item.toLowerCase(); - } else { - result += item[0].toUpperCase() + item.slice(1).toLowerCase(); - } - }); - return result; - } - - const normalizeCase$3 = /[ _-]+/g; - const space$1 = /[ ]+/g; - /** - * Converts a string into single space sepperated words in Kebab case. - * - * @function kebabCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into Kebab case. - * @returns {String} - Converted string in Kebab case. - * - * @example - * import { kebabCase, assert } from '@universalweb/acid'; - * assert(kebabCase('kebab case'), 'kebab-case'); - */ - function kebabCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase$3, ' ') - .trim() - .toLowerCase() - .replace(space$1, '-'); - } - - const normalizeCase$2 = /[ _-]+/g; - const space = /[ ]+/g; - /** - * Converts a string into single space sepperated words in snake case. - * - * @function snakeCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into snake case. - * @returns {String} - Converted string in Snake case. - * - * @example - * import { snakeCase, assert } from '@universalweb/acid'; - * assert(snakeCase('snake case'), 'snake_case'); - */ - function snakeCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase$2, ' ') - .trim() - .toLowerCase() - .replace(space, '_'); - } - - const normalizeCase$1 = /[ _-]+/g; - /** - * Converts a string into single space sepperated words in uppercase. - * - * @function upperCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into upper case. - * @returns {String} - Converted string in upper case. - * - * @example - * import { upperCase, assert } from '@universalweb/acid'; - * assert(upperCase('upper-case'), 'UPPER CASE'); - * assert(upperCase('upper_case'), 'UPPER CASE'); - */ - function upperCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase$1, ' ') - .trim() - .toUpperCase(); - } - - const normalizeCase = /[ _-]+/g; - /** - * Converts a string into single space sepperated words in lowerCase. - * - * @function lowerCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into upper case. - * @returns {String} - Converted string in upper case. - * - * @example - * import { lowerCase, assert } from '@universalweb/acid'; - * assert(lowerCase('lower-CASE'), 'lower case'); - */ - function lowerCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase, ' ') - .trim() - .toLowerCase(); - } - - /** - * Inserts text into a string at a given position. - * - * @function insertInRange - * @category string - * @type {Function} - * @param {String} string - String to insert the text into. - * @param {Number} index - Point of insertion. - * @param {String} text - The string to be inserted. - * @returns {String} - The string with the text inserted at the given point. - * - * @example - * import { insertInRange, assert } from '@universalweb/acid'; - * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.'); - */ - function insertInRange(string, index, text) { - return string.slice(0, index) + text + string.slice(index, string.length); - } - /** - * Plucks a letter using the index starting from the right. - * - * @function rightString - * @category string - * @type {Function} - * @param {String} string - String to extract the letter from. - * @param {Number} [index=1] - The starting position. - * @returns {String} - A letter at the given index. - * - * @example - * import { rightString, assert } from '@universalweb/acid'; - * assert(rightString('rightString'), 'g'); - * assert(rightString('rightString', 2), 'n'); - */ - function rightString(string, index = 1) { - return string[string.length - index]; - } - /** - * Splits up a string into chunks. - * - * @function chunkString - * @category string - * @type {Function} - * @param {String} string - String to chunked. - * @param {Number} [size] - The max string length per chunk. - * @returns {Array} - An array with strings that are <= size parameter. - * - * @example - * import { chunkString, assert } from '@universalweb/acid'; - * assert(chunkString('chunk', 2), ['ch', 'un', 'k']); - */ - function chunkString(string, size) { - return string.match(new RegExp(`(.|[\r\n]){1,${size}}`, 'g')); - } - /** - * Truncates everything before the index starting from the right. - * - * @function initialString - * @category string - * @type {Function} - * @param {String} string - String to extract the initial letters from. - * @param {Number} [index=1] - Starting point from the right. - * @returns {String} - A string with the characters before the index starting from the right. - * - * @example - * import { initialString, assert } from '@universalweb/acid'; - * assert(initialString('initialString', 2), 'initialStri'); - */ - function initialString(string, index = 1) { - return string.slice(0, index * -1); - } - /** - * Truncates everything after a index. - * - * @function restString - * @category string - * @type {Function} - * @param {String} string - String to extract the rest of the letters from. - * @param {Number} [index=1] - Starting point. - * @returns {String} - A string without the characters up-to to the index. - * - * @example - * import { restString, assert } from '@universalweb/acid'; - * assert(restString('restString', 2), 'stString'); - */ - function restString(string, index = 1) { - return string.substring(index); - } - - /** - * Replaces all occurrences of strings in an array with a value. - * - * @function replaceList - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @param {Array} words - Strings to replace. - * @param {String} value - The match replacement. - * @returns {String} - The string with the replacement. - * - * @example - * import { replaceList, assert } from '@universalweb/acid'; - * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.'); - */ - function replaceList(string, words, value) { - return string.replace(new RegExp(`\\b${words.join('|')}\\b`, 'gi'), value); - } - - const rawURLDecodeRegex = /%(?![\da-f]{2})/gi; - const andRegex = /&/g; - const lessThanRegex = //g; - const doubleQuoteRegex = /"/g; - /** - * Raw URL decoder. - * - * @function rawURLDecode - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @returns {String} - Converted string into the decoded URI Component . - * - * @example - * import { rawURLDecode, assert } from '@universalweb/acid'; - * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.'); - */ - function rawURLDecode(string) { - return decodeURIComponent( - string.replace(rawURLDecodeRegex, () => { - return '%25'; - }) - ); - } - /** - * Replaced sensitive characters with their matching html entity. - * - * @function htmlEntities - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @returns {String} - Replaced string. - * - * @example - * import { htmlEntities, assert } from '@universalweb/acid'; - * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`); - */ - function htmlEntities(string) { - return string.replace(andRegex, '&').replace(lessThanRegex, '<').replace(moreThanRegex, '>').replace(doubleQuoteRegex, '"'); - } - /** - * Executes rawURLDecode followd by htmlEntities methods on a string. - * - * @function sanitize - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @returns {String} - Replaced string. - * - * @example - * import { sanitize, assert } from '@universalweb/acid'; - * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`); - */ - function sanitize(string) { - return htmlEntities(rawURLDecode(string)); - } - - const tokenizeRegEx = /\S+/g; - const wordsRegEx = /\w+/g; - /** - * Break string by non-white space characters matches. - * - * @function tokenize - * @type {Function} - * @category string - * @param {String} string - String to be broken up. - * @returns {Array} - Array of words without white space characters. - * - * @example - * import { tokenize, assert } from '@universalweb/acid'; - * assert(tokenize('I am Lucy!'), ["I", "am", "Acid!"]); - */ - function tokenize(string) { - return string.match(tokenizeRegEx) || []; - } - /** - * Break string into word matches. - * - * @function words - * @type {Function} - * @param {String} string - String to be broken up. - * @returns {Array} - Array of words with word characters only. - * - * @example - * import { words, assert } from '@universalweb/acid'; - * assert(words('I am Acid!'), ["I", "am", "Acid"]); - */ - function words(string) { - return string.match(wordsRegEx) || []; - } - - const truncateDown = (string, maxLength, stringLength) => { - const breakAll = string.split(''); - const breakAllLength = breakAll.length; - let item; - let index = stringLength - maxLength; - for (; index < breakAllLength && index >= 0; index--) { - item = breakAll[index]; - if (item === ' ') { - break; - } - } - return string.slice(0, index).trim(); - }; - const truncateUp = (string, maxLength, stringLength) => { - const breakAll = string.split(''); - const breakAllLength = breakAll.length; - let item; - let index = maxLength; - for (; index < breakAllLength && index > 0; index++) { - item = breakAll[index]; - if (item === ' ') { - break; - } - } - return string.substring(index, stringLength).trim(); - }; - /** - * Truncates the string, accounting for word placement and character count. - * - * @function truncate - * @type {Function} - * @category string - * @param {String} string - String to be truncated. - * @param {Number} maxLength - The desired max length of the string. - * @returns {String} - The mutated string. - * - * @example - * import { truncate, assert } from '@universalweb/acid'; - * assert(truncate('Where is Lucy?', 2), 'Where is'); - */ - function truncate(string, maxLength) { - const stringLength = string.length; - return stringLength > maxLength ? truncateDown(string, maxLength, stringLength) : string; - } - /** - * Truncates the string, accounting for word placement and character count from the right. - * - * @function truncateRight - * @type {Function} - * @category string - * @param {String} string - String to be truncated. - * @param {Number} maxLength - The desired max length of the string. - * @returns {String} - The mutated string. - * - * @example - * import { truncateRight, assert } from '@universalweb/acid'; - * assert(truncateRight('Where is Lucy?', 6), 'Lucy?'); - */ - function truncateRight(string, maxLength) { - const stringLength = string.length; - return stringLength > maxLength ? truncateUp(string, maxLength, stringLength) : string; - } - - const getWords = /\w+/g; - /** - * Returns the first letter capitalized. - * - * @function upperFirstLetter - * @type {Function} - * @category string - * @param {String} string - String to extract first letter from. - * @returns {String} - An upper case letter. - * - * @example - * import { upperFirstLetter, assert } from '@universalweb/acid'; - * assert(upperFirstLetter('upper'), 'U'); - */ - function upperFirstLetter(string) { - return string[0].toUpperCase(); - } - /** - * Capitalizes the first letter. - * - * @function upperFirst - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with first letter capitalized. - * - * @example - * import { upperFirst, assert } from '@universalweb/acid'; - * assert(upperFirstLetter('upper'), 'U'); - * upperFirst('upper'); - * // => 'Upper' - */ - function upperFirst(string) { - return upperFirstLetter(string) + restString(string); - } - /** - * Capitalize first letter and lower case the rest. - * - * @function upperFirstOnly - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with first letter capitalized. - * - * @example - * import { upperFirstOnly, assert } from '@universalweb/acid'; - * assert(upperFirstOnly('upper'), 'Upper'); - */ - function upperFirstOnly(string) { - return upperFirstLetter(string) + restString(string).toLowerCase(); - } - /** - * Capitalize all first letters. - * - * @function upperFirstAll - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with all first letters capitalized. - * - * @example - * import { upperFirstAll, assert } from '@universalweb/acid'; - * assert(upperFirstAll('uPPer'), 'UPPer'); - */ - function upperFirstAll(string) { - return string.replace(getWords, (match) => { - return upperFirst(match); - }); - } - /** - * Capitalize all first letters and lower case the rest. - * - * @function upperFirstOnlyAll - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with all first letters capitalized. - * - * @example - * import { upperFirstOnlyAll, assert } from '@universalweb/acid'; - * assert(upperFirstOnlyAll('this is'), 'This Is'); - */ - function upperFirstOnlyAll(string) { - return string.replace(getWords, (match) => { - return upperFirstOnly(match); - }); - } - - /** - * Returns the constructor name of an object. - * - * @function getTypeName - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { getTypeName, assert } from '@universalweb/acid'; - * assert(getTypeName(1), true); - */ - function getTypeName(source) { - return getType(source)?.name; - } - - /** - * Checks if the value is an Arguments object. - * - * @function isArguments - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArguments, assert } from '@universalweb/acid'; - * assert(isArguments((function() { return arguments;})()), true); - * assert(isArguments([]), false); - */ - const objectArguments = '[object Arguments]'; - function isArguments(source) { - return hasValue(source) ? source.toString() === objectArguments : false; - } - - /** - * Checks if an object or objects are a Map. - * - * @function isMap - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isMap } from '@universalweb/acid'; - * isMap(new Map()); - * // => true - */ - const isMapCall = isConstructorNameFactory('Map'); - const isMap = isTypeFactory(isMapCall); - - /** - * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer. - * - * @function isTypedArray - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isTypedArray, assert } from '@universalweb/acid'; - * assert(isTypedArray([]), false); - * assert(isTypedArray(new Int8Array()), true); - */ - const typedArrayRegex = /Array/; - const arrayConstructorName = 'Array'; - function isTypedArray(source) { - if (source) { - const constructorName = getTypeName(source); - if (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) { - return true; - } - } - return false; - } - - /** - * Checks if an object is null or undefined. - * - * @function noValue - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { noValue, assert } from '@universalweb/acid'; - * assert(noValue(null), true); - * assert(noValue(undefined), true); - * assert(noValue(1), false); - * assert(noValue(0), false); - */ - function noValue(source) { - return !hasValue(source); - } - - /** - * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property. - * - * @function isArrayLike - * @category type - * @param {*} source - Object to be checked. - * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArrayLike, assert } from '@universalweb/acid'; - * assert(isArrayLike([]), true); - * assert(isArrayLike(2), false); - */ - function isArrayLike(source, strictFlag) { - if (noValue(source) || isFunction(source)) { - return false; - } - if (isArray(source) || isTypedArray(source)) { - return true; - } - const sourceLength = source.length; - if (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) { - return false; - } - if (strictFlag) { - const indexes = keys(source); - if (indexes) { - return every(indexes, (value, index) => { - return index >= 0 && isNumber(index); - }); - } - return false; - } - return true; - } - - /** - * Checks if an object or objects are a BigInt. - * - * @function isBigInt - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isBigInt, assert } from '@universalweb/acid'; - * assert(isBigInt(BigInt(123)), true); - */ - const isBigIntCall = isConstructorNameFactory('BigInt'); - const isBigInt = isTypeFactory(isBigIntCall); - - /** - * Checks if the value is a Boolean. - * - * @function isBoolean - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isBoolean } from '@universalweb/acid'; - * isBoolean(true); - * // => true - */ - const isBooleanCall = isConstructorNameFactory('Boolean'); - const isBoolean = isTypeFactory(isBooleanCall); - - /** - * Checks if an object or objects are a ArrayBuffer. - * - * @function isArrayBuffer - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArrayBuffer, assert } from '@universalweb/acid'; - * assert(isArrayBuffer(new ArrayBuffer()), true); - */ - const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer'); - const isArrayBuffer = isTypeFactory(isArrayBufferCall); - - /** - * Checks if an object is the child of another. Typically used for classes. - * - * @function isChild - * @category type - * @param {*} sourceChild - Object to be checked as the child. - * @param {*} targetParent - Object to be checked as the parent. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isChild, construct, assert } from '@universalweb/acid'; - * class Grandparent{} - * class Parent extends Grandparent{} - * class Child extends Parent{} - * const child = construct(Child); - * assert(isChild(Child, Grandparent), true); - * assert(isChild(Child, Parent), false); - * assert(isChild(Parent, Grandparent), false); - * assert(isChild(child1, child3), false); - */ - function isChild(sourceChild, targetParent) { - if (!sourceChild || !targetParent) { - return false; - } - return sourceChild instanceof targetParent; - } - - /** - * Checks if an object or objects are a structured-cloneable type. - * - * @function isCloneable - * @category type - * @param {...*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isCloneable, assert } from '@universalweb/acid'; - * assert(isCloneable(function (){}), false); - */ - const constructorNames = RegExp( - 'Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError' - ); - function isCloneable(source) { - if (hasValue(source)) { - const constructorName = source?.constructor?.name; - return constructorNames.test(constructorName); - } - return false; - } - - /** - * Checks if the value is a Date. - * - * @function isDate - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isDate, assert } from '@universalweb/acid'; - * assert(isDate(new Date()), true); - */ - const isDateCall = isConstructorNameFactory('Date'); - const isDate = isTypeFactory(isDateCall); - - /** - * Checks if the value is empty. - * - * @function isEmpty - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isEmpty, assert } from '@universalweb/acid'; - * assert(isEmpty([]), true); - */ - function isEmpty(source) { - if (isString(source) || isArray(source)) { - return !hasLength(source); - } else if (isPlainObject(source)) { - return !objectSize(source); - } - return !hasValue(source); - } - - /** - * Check if a value equals false using strict comparison. - * - * @function isFalse - * @category Utility - * @type {Function} - * @param {Boolean} source - Item to compare. - * @returns {Boolean} - Returns true if the item equals false. - * - * @example - * import { isFalse, assert } from '@universalweb/acid'; - * assert(isFalse(1), false); - * assert(isFalse(true), false); - * assert(isFalse(false), true); - */ - function isFalse(source) { - return source === false; - } - - /** - * Checks if an object or objects are a Float32Array. - * - * @function isF32 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isF32, assert } from '@universalweb/acid'; - * assert(isF32(new Float32Array()), true); - */ - const isF32Call = isConstructorNameFactory('Float32Array'); - const isF32 = isTypeFactory(isF32Call); - - /** - * Checks if an object or objects are a Float64Array. - * - * @function isF64 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isF64 } from '@universalweb/acid'; - * isF64(new Float64Array()); - * // => true - */ - const isF64Call = isConstructorNameFactory('Float64Array'); - const isF64 = isTypeFactory(isF64Call); - - const { isInteger } = Number; - /** - * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. - * - * @function isFloat - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFloat } from '@universalweb/acid'; - * isFloat(1.01); - * // => true - */ - const isFloat = isInteger; - - /** - * Checks if an object or objects are a Int16Array. - * - * @function isI16 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isI16 } from '@universalweb/acid'; - * isI16(new Int16Array()); - * // => true - */ - const isI16Call = isConstructorNameFactory('Int16Array'); - const isI16 = isTypeFactory(isI16Call); - - /** - * Checks if an object or objects are a Int32Array. - * - * @function isI32 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isI32, assert } from '@universalweb/acid'; - * assert(isI32(new Int32Array()), true); - */ - const isI32Call = isConstructorNameFactory('Int32Array'); - const isI32 = isTypeFactory(isI32Call); - - /** - * Checks if an object or objects are a Int8Array. - * - * @function isI8 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isInt8 } from '@universalweb/acid'; - * isInt8(new Int8Array()); - * // => true - */ - const isI8Call = isConstructorNameFactory('Int8Array'); - const isI8 = isTypeFactory(isI8Call); - - /** - * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments. - * - * @function isIterable - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isIterable, assert } from '@universalweb/acid'; - * assert(isIterable([]), true); - * assert(isIterable(new Int8Array()), true); - * assert(isIterable('test'), false); - */ - function isIterable(source) { - return hasValue(source) && typeof source[Symbol.iterator] === 'function'; - } - - /** - * Checks if an object is a promise. - * - * @function isPromise - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isPromise } from '@universalweb/acid'; - * isPromise(new Promise(() => {})); - * // => true - */ - function isPromise(source) { - if (source) { - return source instanceof Promise; - } - return false; - } - - /** - * Checks if an object is a kind of async object such as async function, promise, or generator. - * - * @function isKindAsync - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isKindAsync, assert } from '@universalweb/acid'; - * assert(isKindAsync(async() => {}), true); - */ - function isKindAsync(source) { - if (source) { - return isPromise(source) || isAsync(source) || isGenerator(source); - } - return false; - } - - /** - * Checks if an object is the child of another. Typically used for classes. - * - * @function isParent - * @category type - * @param {*} sourceParent - Object to be checked as the child. - * @param {*} targetChild - Object to be checked as the parent. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isParent, construct, assert } from '@universalweb/acid'; - * class parentClass{} - * class otherClass{} - * const child1 = construct(parentClass); - * const child2 = construct(otherClass); - * assert(isParent(child1, parentClass), true); - * assert(isParent(child3, parentClass), false); - * assert(isParent(parentClass, child1), false); - * assert(isParent(child1, child3), false); - */ - function isParent(sourceParent, targetChild) { - if (!sourceParent || !targetChild || !targetChild.call) { - return false; - } - return sourceParent instanceof targetChild; - } - - /** - * Checks if an object is a primitive. - * - * @function isPrimitive - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isPrimitive, assert } from '@universalweb/acid'; - * assert(isPrimitive(1), true); - * assert(isPrimitive(() => {}), false); - */ - function isPrimitive(source) { - const type = typeof value; - return source === null || source === undefined || (type !== 'object' && type !== 'function'); - } - - /** - * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways. - * - * @function isRelated - * @category type - * @param {*} targetOne - Object to be checked. - * @param {*} targetTwo - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isRelated, construct, assert } from '@universalweb/acid'; - * class parentClass{} - * class otherClass{} - * const child1 = construct(parentClass); - * const child2 = construct(parentClass); - * const child3 = construct(otherClass); - * assert(isRelated(child1, child2), true); - * assert(isRelated(child1, parentClass), true); - * assert(isRelated(parentClass, child2), true); - * assert(isRelated(child1, child3), false); - */ - function isRelated(targetOne, targetTwo) { - if (noValue(targetOne) || noValue(targetTwo)) { - return false; - } - if (targetOne.call) { - return targetTwo instanceof targetOne; - } - if (targetTwo.call) { - return targetOne instanceof targetTwo; - } - return targetTwo.constructor === targetOne.constructor; - } - - const { isSafeInteger } = Number; - /** - * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. - * - * @function isSafeInt - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isSafeInt } from '@universalweb/acid'; - * isSafeInt(1.01); - * // => true - */ - const isSafeInt = isSafeInteger; - - function isSameType(source, other) { - const sourceType = getType(source); - const otherType = getType(other); - if (sourceType === otherType) { - if (sourceType.name === otherType.name) { - return true; - } - } - return false; - } - - /** - * Check if a value equals true using strict comparison. - * - * @function isTrue - * @category Utility - * @type {Function} - * @param {Boolean} source - Item to check. - * @returns {Boolean} - Returns true if the item is true. - * - * @example - * import { isTrue, assert } from '@universalweb/acid'; - * assert(isTrue(1), false); - * assert(isTrue(true), true); - * assert(isTrue(false), false); - */ - function isTrue(source) { - return source === true; - } - - /** - * Checks if an object or objects are a Uint16Array. - * - * @function isU16 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU16 } from '@universalweb/acid'; - * isU16(new Uint16Array()); - * // => true - */ - const isU16Call = isConstructorNameFactory('Uint16Array'); - const isU16 = isTypeFactory(isU16Call); - - /** - * Checks if an object or objects are a Uint32Array. - * - * @function isU32 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU32 } from '@universalweb/acid'; - * isU32(new Uint32Array()); - * // => true - */ - const isU32Call = isConstructorNameFactory('Uint32Array'); - const isU32 = isTypeFactory(isU32Call); - - /** - * Checks if an object or objects are a Uint8Array. - * - * @function isU8 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU8 } from '@universalweb/acid'; - * isU8(new Uint8Array()); - * // => true - */ - const isU8Call = isConstructorNameFactory('Uint8Array'); - const isU8 = isTypeFactory(isU8Call); - - /** - * Checks if an object or objects are a Uint8ClampedArray. - * - * @function isU8C - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU8C } from '@universalweb/acid'; - * isU8C(new Uint8ClampedArray()); - * // => true - */ - const isU8CCall = isConstructorNameFactory('Uint8ClampedArray'); - const isU8C = isTypeFactory(isU8CCall); - - /** - * Checks if an object or objects are a WeakMap. - * - * @function isWeakMap - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isWeakMap } from '@universalweb/acid'; - * assert(isWeakMap(new WeakMap()), true); - */ - const isWeakMapCall = isConstructorNameFactory('WeakMap'); - const isWeakMap = isTypeFactory(isWeakMapCall); - - const isDeno = typeof globalThis.Deno !== 'undefined'; - - const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node; - - /** - * Check if a value is isTruthy which is anything but false, null, 0, "", undefined, and NaN. - * - * @function isTruthy - * @category type - * @type {Function} - * @param {*} source - Item to be isTruthy checked. - * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy. - * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false. - * - * @example - * import { isTruthy, assert } from '@universalweb/acid'; - * assert(isTruthy(1), true); - * assert(isTruthy(0), false); - */ - function isTruthy(source, returnIfTrue = true) { - return Boolean(source) && returnIfTrue; - } - - /** - * Check if a value is isFalsy which are false, null, 0, "", undefined, and NaN. - * - * @function isFalsy - * @category type - * @type {Function} - * @param {*} source - Item to be isFalsy checked. - * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy. - * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false. - * - * @example - * import { isFalsy, assert } from '@universalweb/acid'; - * assert(isFalsy(0), true); - * assert(isFalsy(1), false); - */ - function isFalsy(source, returnIfTrue = true) { - return Boolean(source) === false && returnIfTrue; - } - - /** - * If source has a value then assign it to an object or call a function. - * - * @function ifValue - * @category utility - * @param {*} source - The source object to be hasValue checked. - * @param {Function|Object} target - The target which is either a function or object. - * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target). - * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function. - * @returns {source|undefined} The source object if it passes the hasValue check. - * - * @example - * import { ifValue, assert } from '@universalweb/acid'; - * assert(ifValue(1, {}, 'a'), {a:1}); - */ - function ifValue(source, target, optional, args) { - if (hasValue(source)) { - if (isFunction(target)) { - if (optional) { - return apply(target, optional, args); - } - return target(...args); - } else if (isPlainObject(target)) { - target[optional] = source; - return target; - } - } - } - - /** - * Performs a deep comparison between two objects & determines if they're different using strict comparison. - * - * @function notEqual - * @type {Function} - * @category utility - * @param {*} source - Source object. - * @param {*} target - Object to be compared. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { notEqual, assert } from '@universalweb/acid'; - * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true); - */ - function notEqual(source, target) { - return isFalse(isEqual(source, target)); - } - - const jsonNative = JSON; - /** - * Parses JSON string with safety check for undefined. - * - * @function jsonParse - * @category utility - * @type {Function} - * @param {String} source - String to be parsed. - * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned. - * @returns {Object|undefined} - Returns the parsed object. - * - * @example - * import { jsonParse, assert } from '@universalweb/acid'; - * assert(jsonParse('{a:1}'), {a:1}); - */ - function jsonParse(source, reviver) { - if (source) { - return jsonNative.parse(source, reviver); - } - } - /** - * Stringify an object into a JSON string. - * - * @function stringify - * @category utility - * @type {Function} - * @param {Object} object - Object to Stringify. - * @returns {String} - Returns the object as a valid JSON string. - * - * @example - * import { stringify, assert } from '@universalweb/acid'; - * assert(stringify({a:1}), '{a:1}'); - */ - const stringify = jsonNative.stringify; - - function createAssertError(source, expected, localOptions) { - const options = globalThis.options || localOptions; - let errorTitle; - if (isFunction(options)) { - errorTitle = `${options.name} : ${options.constructor.name}`; - } else if (options) { - errorTitle = `${options.title || options.method.name} -> ${options.file}`; - } - return new Error( - `Test Failed: ${errorTitle} + "use strict"; + + /** + * Chunks an array according to a user defined number. + * + * @function chunk + * @category Array + * @type {Function} + * @param {Array} array - Array to be chunked. + * @param {Number} size - Number which determines the size of each chunk. + * @returns {Array} - A chunked version of the source array. + * + * @example + * import { chunk, assert } from '@universalweb/acid'; + * assert(chunk([1,2,3], 1), [[1],[2],[3]]); + */ + function chunk(array, size = 1) { + const chunked = []; + let index = 0; + array.forEach((item, key) => { + if (!(key % size)) { + chunked.push([]); + if (key) { + index++; + } + } + chunked[index].push(item); + }); + return chunked; + } + + /** + * Clears the values out of an array. + * + * @function clearArray + * @category Array + * @type {Function} + * @param {Array} source - Takes an array to be emptied. + * @returns {Array} - The originally given array. + * + * @example + * import { clearArray, assert } from '@universalweb/acid'; + * assert(clearArray([1,'B', 'Cat']), []); + */ + function clearArray(source) { + source.length = 0; + return source; + } + + /** + * Clone an array (uses .slice()) and assign the source arrays values to the new array. + * + * @function cloneArray + * @category Array + * @type {Function} + * @param {Array} source - The array to be quick cloned. + * @returns {Array} - The newly cloned array with assigned items. + * + * @example + * import { cloneArray, assert } from '@universalweb/acid'; + * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']); + */ + function cloneArray(source) { + return source.slice(); + } + + /** Checks if the value is undefined. + * + * @function isUndefined + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isUndefined, assert } from '@universalweb/acid'; + * assert(isUndefined(undefined), true); + */ + function isUndefined(source) { + return source === undefined; + } + + /** + * Checks if the value has length greater than 0. + * + * @function hasLength + * @category utility + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { hasLength, assert } from '@universalweb/acid'; + * assert(hasLength([1]), true); + */ + function hasLength(source) { + return Boolean(source.length); + } + + /** + * Checks if the value is null. + * + * @function isNull + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNull, assert } from '@universalweb/acid'; + * assert(isNull(null), true); + */ + function isNull(source) { + return source === null; + } + + /** + * Checks if the value is not null or undefined. + * + * @function hasValue + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { hasValue, assert } from '@universalweb/acid'; + * assert(hasValue(1), true); + */ + function hasValue(source) { + return !isUndefined(source) && !isNull(source); + } + + /** + * A simple function which returns the value it's given. + * + * @function returnValue + * @category utility + * @param {*} source - The source object. + * @returns {source} The source object. + */ + function returnValue(source) { + return source; + } + + /** + * Iterates through the given array. + * + * @function eachArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. + * @param {*} thisBind - Iteratee called with thisBind as this. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array|undefined} - The originally given array. + * + * @example + * import { eachArray, assert } from '@universalweb/acid'; + * const list = []; + * eachArray([1, 2, 3], (item, index) => { + * list[index] = item; + * }); + * assert(list, [1, 2, 3]); + */ + function eachArray(source, iteratee, thisBind, additionalArg) { + if (!source) { + return; + } + const arrayLength = source.length; + if (hasValue(thisBind)) { + for (let index = 0; index < arrayLength; index++) { + iteratee.call( + thisBind, + source[index], + index, + source, + arrayLength, + additionalArg, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + iteratee(source[index], index, source, arrayLength, additionalArg); + } + } + return source; + } + + /** + * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. + * + * @function compactMapArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array} - An array with mapped properties that are not null or undefined. + * + * @example + * import { compactMapArray, assert } from '@universalweb/acid'; + * assert(compactMapArray([null, 2, 3], (item) => { + * return item; + * }), [2, 3]); + */ + function compactMapArray( + source, + iteratee = returnValue, + results = [], + thisCall, + additionalArg, + ) { + if (hasValue(thisCall)) { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + const returned = iteratee.call( + thisCall, + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArg, + ); + if (hasValue(returned)) { + results.push(returned); + } + }); + } else { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + const returned = iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + thisCall, + additionalArg, + ); + if (hasValue(returned)) { + results.push(returned); + } + }); + } + return results; + } + + /** + * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order. + * + * @function eachAsyncArray + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. + * @param {*} thisCall - Iteratee called with thisCall as this. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array|undefined} - Returns source the originally given array. + * + * @example + * import { eachAsyncArray, assert } from '@universalweb/acid'; + * const tempList = []; + * await eachAsyncArray([1, 2, 3], async (item) => { + * tempList.push(item); + * }); + * assert(tempList, [1, 2, 3]); + */ + async function eachAsyncArray(source, iteratee, thisCall, additionalArg) { + if (!source) { + return; + } + const arrayLength = source.length; + if (hasValue(thisCall)) { + for (let index = 0; index < arrayLength; index++) { + await iteratee.call( + thisCall, + source[index], + index, + source, + arrayLength, + additionalArg, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + await iteratee( + source[index], + index, + source, + arrayLength, + additionalArg, + ); + } + } + return source; + } + + /** + * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. + * + * @function compactMapAsyncArray + * @type {Function} + * @category array + * @async + * @param {Array} source - Array to be compacted. + * @param {Function} iteratee - Iteratee to be performed on array. + * @returns {Array} - Array values after being put through an iterator. + * + * @example + * import { compactMapAsync, assert } from '@universalweb/acid'; + * assert(await compactMapAsync([1, 2, 3, null], async (item) => { + * return item; + * }), [1, 2, 3]); + */ + async function compactMapAsyncArray(source, iteratee = returnValue) { + const results = []; + await eachAsyncArray(source, async (item, index, arrayLength) => { + const result = await iteratee(item, index, results, arrayLength); + if (hasValue(result)) { + results.push(result); + } + }); + return results; + } + + /** + * Checks if a number is negative & returns true or false. + * + * @function isNegative + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNegative, assert } from '@universalweb/acid'; + * assert(isNegative(-1), true); + */ + const { sign: sign$1 } = Math; + function isNegative(source) { + return sign$1(source) === -1; + } + + function rangeUp(start, end, step, sourceArray) { + let position = start; + while (position < end) { + sourceArray.push(position); + position += step; + } + return sourceArray; + } + function rangeDown(start, end, step, sourceArray) { + let position = start; + while (position > end) { + sourceArray.push(position); + position -= step; + } + return sourceArray; + } + /** + * Create a numbered list of integers. + * + * @function range + * @category array + * @type {Function} + * @param {Number} start - Value which determines the start of the range. + * @param {Number} end - Value which determines the end of the range. + * @param {Number} step - Value used to step between integers. + * @returns {Array} - An array of integers. + * + * @example + * import { range, assert } from '@universalweb/acid'; + * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]); + */ + function range(start, end, step = 1, sourceArray = []) { + if (isNegative(step)) { + return sourceArray; + } + if (start < end) { + return rangeUp(start, end, step, sourceArray); + } else { + return rangeDown(start, end, step, sourceArray); + } + } + + /** + * Checks if the value is an array. This references Array.isArray. + * + * @function isArray + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArray, assert } from '@universalweb/acid'; + * assert(isArray([]), true); + * assert(isArray(2), false); + */ + const isArray = Array.isArray; + /** + * Checks if the value is not an array. This references Array.isArray. + * + * @function isNotArray + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNotArray, assert } from '@universalweb/acid'; + * assert(isNotArray([]), false); + * assert(isNotArray(2), true); + */ + function isNotArray(source) { + return !isArray(source); + } + + /** + * A function which acts like the "new" operator and can pass arguments. This is a safe version of the original which will error if given undefined + * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects. + * + * @function construct + * @category class + * @param {Function} target - The target function or class. + * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array. + * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target. + * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList. + * + * @example + * import { construct, assert } from '@universalweb/acid'; + * class test { + * constructor(a) { + * return 1; + * } + * } + * const newClass = construct(test, [1]); + * assert(test, 1); + */ + const reflectConstruct = Reflect.construct; + function construct(target, argumentsList = [], newTarget) { + const args = isArray(argumentsList) ? argumentsList : [argumentsList]; + if (newTarget) { + return reflectConstruct(target, args, newTarget); + } + return reflectConstruct(target, args); + } + + /** + * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned. + * + * @function ensureArray + * @category array + * @type {Function} + * @param {*} source - Object to be checked. + * @returns {Array} - Returns an array. + * + * @example + * import { isArray, ensureArray, assert } from '@universalweb/acid'; + * assert(isArray(ensureArray('test')), ['test']); + */ + function ensureArray(source) { + return (isArray(source) && source) || (hasValue(source) && [source]) || []; + } + + /** + * Flattens an array to a single level. + * + * @function flattenDeep + * @type {Function} + * @category array + * @param {Array} source - Array to flatten. + * @returns {Array} - Returns a completely flattened array. + * + * @example + * import { flattenDeep, assert } from '@universalweb/acid'; + * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]); + */ + function flattenDeep(source) { + return source.flat(Infinity); + } + + function forEach(source, callback) { + source.forEach(callback); + return source; + } + + /** + * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences. + * + * @function difference + * @category array + * @type {Function} + * @param {...Array} sources - List of arrays to be compared. + * @returns {Array|undefined} - An array which contains the differences between the source and compare array. + * + * @example + * import { difference, assert } from '@universalweb/acid'; + * assert(difference([1, 2, 3], [1, 2]), [3]); + */ + function difference(...sources) { + const differencesMap = construct(Map); + const differences = []; + eachArray(sources, (currentArray, parentIndex) => { + eachArray(currentArray, (child, childIndex) => { + let childRoot = differencesMap.get(child); + if (!childRoot) { + childRoot = { + count: 1, + parentIndex, + child, + }; + differencesMap.set(child, childRoot); + } else if (childRoot.parentIndex === parentIndex) { + return; + } else { + childRoot.count++; + } + }); + }); + forEach(differencesMap, (item) => { + if (item.count === 1 && item.parentIndex === 0) { + differences.push(item.child); + } + }); + return differences; + } + + /** + * Removes all items from an array after a specified index. + * + * @function drop + * @category array + * @type {Function} + * @param {Array} array - Source array. + * @param {Number} amount - Amount of items to drop from the array. + * @param {Number} [upTo = array.length] - Index to stop at. + * @returns {Array} - An array with all values removed after a user defined index. + * + * @example + * import { drop, assert } from '@universalweb/acid'; + * assert(drop([1, 2, 3]), [2, 3]); + * assert(drop([1, 2, 3], 2), [3]); + */ + function drop(array, amount = 1, upTo = array.length) { + return array.splice(amount, upTo); + } + + /** + * Removes all items from an array before a specified index. + * + * @function dropRight + * @type {Function} + * @category array + * @param {Array} array - Source array. + * @param {Number} amount - Amount of items to drop from the array. + * @param {Number} [upTo = array.length] - Index to stop at. + * @returns {Array} - An array with all values removed before a user defined index. + * + * @example + * import { dropRight, assert } from '@universalweb/acid'; + * assert(dropRight([1, 2, 3]), [1, 2]); + * assert(dropRight([1, 2, 3], 2), [1]); + */ + const dropRight = (array, amount = 1, upTo = array.length) => { + return drop(array, 0, upTo - amount); + }; + + /** + * Iterates through the given array in reverse. + * + * @function eachRight + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array|undefined} - The originally given array. + * + * @example + * import { eachRight, assert } from '@universalweb/acid'; + * const tempList = []; + * eachRight([1, 2, 3], (item) => { + * tempList.push(item); + * }); + * assert(tempList, [3, 2, 1]); + */ + function eachRight(source, iteratee, additionalArgument) { + if (!source) { + return; + } + const arrayLength = source.length; + for (let index = arrayLength - 1; index >= 0; index--) { + iteratee(source[index], index, source, arrayLength, additionalArgument); + } + return source; + } + + /** + * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order. + * + * @function eachRightAsync + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @returns {Object|undefined} - The originally given array. + * + * @example + * import { eachRightAsync, assert } from '@universalweb/acid'; + * const tempList = []; + * await eachRightAsync([1, 2, 3], async (item) => { + * tempList.push(item); + * }); + * assert(tempList, [3, 2, 1]); + */ + async function eachRightAsync(source, iteratee) { + if (!source) { + return; + } + const arrayLength = source.length; + for (let index = arrayLength - 1; index >= 0; index--) { + await iteratee(source[index], index, source, arrayLength); + } + return source; + } + + /** + * Iterates through the given array while the iteratee returns true else the loop exits & returns false. + * + * @function everyArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. + * + * @example + * import { everyArray, assert } from '@universalweb/acid'; + * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), false); + * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), true); + */ + function everyArray(source, iteratee, additionalArgument) { + if (!source) { + return; + } + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if ( + iteratee( + source[index], + index, + source, + sourceLength, + additionalArgument, + ) === false + ) { + return false; + } + } + return true; + } + + /** + * Iterates through the given array while the iteratee returns true else the loop exits & returns false. + * + * @function everyAsyncArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. + * + * @example + * import { everyAsyncArray, assert } from '@universalweb/acid'; + * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), false); + * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), true); + */ + async function everyAsyncArray(source, iteratee, additionalArgument) { + if (!source) { + return; + } + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if ( + (await iteratee( + source[index], + index, + source, + sourceLength, + additionalArgument, + )) === false + ) { + return false; + } + } + return true; + } + + /** + * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. + * + * @function filterArray + * @category array + * @type {Function} + * @category array + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array with properties that passed the test. + * + * @example + * import { filterArray, assert } from '@universalweb/acid'; + * assert(filterArray([false, true, true], (item) => { + * return item; + * }), [true, true]); + */ + function filterArray(source, iteratee, results = [], additionalArgument) { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + if ( + iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArgument, + ) === true + ) { + results.push(item); + } + }); + return results; + } + + /** + * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. + * + * @function filterAsyncArray + * @category array + * @type {Function} + * @category array + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array with properties that passed the test. + * + * @example + * import { filterAsyncArray, assert } from '@universalweb/acid'; + * assert(filterAsyncArray([false, true, true], (item) => { + * return item; + * }), [true, true]); + */ + async function filterAsyncArray( + source, + iteratee, + results = [], + additionalArgument, + ) { + await eachAsyncArray( + source, + async (item, index, arrayOriginal, arrayLength) => { + if ( + (await iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArgument, + )) === true + ) { + results.push(item); + } + }, + ); + return results; + } + + /** + * Takes the first or multiple items from an array. + * + * @function first + * @type {Function} + * @category array + * @param {Array} array - Array to extract from. + * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array. + * @returns {Array} - Returns an array. + * + * @example + * import { first, assert } from '@universalweb/acid'; + * assert(first([1, 2, 3]), 1); + */ + function first(array, upTo) { + return upTo ? array.slice(0, upTo) : array[0]; + } + + /** + * Flattens an array up to the provided level. + * + * @function flatten + * @type {Function} + * @category array + * @param {Array} source - Array to flatten. + * @param {Number} [level = 1] - Number which determines how deep the array nest can be. + * @returns {Array|undefined} - Returns an array. + * + * @example + * import { flatten, assert } from '@universalweb/acid'; + * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]); + */ + function flatten(source, level = 1) { + if (!source) { + return; + } + let sourceArray = source; + for (let i = 0; i < level; i++) { + sourceArray = sourceArray.reduce((previousValue, currentValue) => { + return previousValue.concat(ensureArray(currentValue)); + }, []); + } + return sourceArray; + } + + /** + * Takes all but the last item in the array. + * + * @function initial + * @category array + * @type {Function} + * @param {Array} array - Array to have items extracted from. + * @returns {Array} - Returns a completely flattened array. + * + * @example + * import { initial, assert } from '@universalweb/acid'; + * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]); + */ + function initial(array) { + return array.slice(0, array.length - 1); + } + + // Add intersectionBy & intersectionWith + /** + * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory)) + * of the array and the input array(s). + * + * @function intersection + * @param {Array} array - Array to compare other arrays to. + * @param {...Array} arrays - A variable number of arrays. + * @category array + * @returns {Array} - The new array of unique values shared by all of the arrays. + * + * @example + * import { intersection, assert } from '@universalweb/acid'; + * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]); + */ + function intersection(array, ...arrays) { + return compactMapArray(array, (item) => { + const shouldReturn = everyArray(arrays, (otherItem) => { + return otherItem.includes(item); + }); + if (shouldReturn) { + return item; + } + }); + } + + /** + * Invoke each function in the given array. + * + * @function invokeArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} additionalArg - An object to be given each time to the iteratee. + * @param {*} thisCall - Iteratee called with thisCall as this. + * @returns {Array|undefined} - The originally given array. + * + * @example + * import { invokeArray, assert } from '@universalweb/acid'; + * function test(arg){ + * return [this, arg]; + * } + * const results = invokeArray([test], 1, test); + * assert(results, [test, 1]); + */ + function invokeArray(source, additionalArg, thisCall) { + if (!source) { + return; + } + const arrayLength = source.length; + if (hasValue(thisCall)) { + for (let index = 0; index < arrayLength; index++) { + source[index].call(thisCall, additionalArg); + } + } else { + for (let index = 0; index < arrayLength; index++) { + source[index](additionalArg); + } + } + return source; + } + + const regexToPath = /\.|\[/; + const regexCloseBracket = /]/g; + const emptyString = ""; + /** + * Breaks up string into object chain list. + * + * @function toPath + * @type {Function} + * @category utility + * @param {String} source - String to be broken up. + * @returns {Array} - Array used to go through object chain. + * + * @example + * import { toPath, assert } from '@universalweb/acid'; + * assert(toPath('post.like[2]'), ['post', 'like', '2']); + */ + function toPath(source) { + return source.replace(regexCloseBracket, emptyString).split(regexToPath); + } + + /** + * Returns property on an object. + * + * @function get + * @category utility + * @type {Function} + * @param {String} propertyString - String used to retrieve properties. + * @param {Object} target - Object which has a property retrieved from it. + * @returns {Object} - Returns property from the given object. + * + * @example + * import { get, assert } from '@universalweb/acid'; + * const objectTarget = { + * post: { + * like: ['a','b','c'] + * } + * }; + * assert(get('post.like[2]', objectTarget), 'c'); + */ + function get(propertyString, target) { + if (!target) { + return false; + } + let link = target; + const pathArray = isArray(propertyString) + ? propertyString + : toPath(propertyString); + everyArray(pathArray, (item) => { + link = link[item]; + return hasValue(link); + }); + return link; + } + + /** + * Get object's keys. + * + * @function keys + * @category object + * @param {*} source - The source object to pull keys from. + * @returns {Array} - Array of keys. + * + * @example + * keys({a: 1, b: 2}); + * // => ['a', 'b'] + */ + const objectKeys = Object.keys; + function keys(source) { + if (source) { + return objectKeys(source); + } + } + + const hasOwn = Object.hasOwn; + /** + * Checks to see if an object has all of the given property names. + * + * @function hasKeys + * @category object + * @type {Function} + * @param {Object} source - Source object to check for keys. + * @param {...String} properties - List of strings to check. + * @returns {Boolean|undefined} - Returns true or false. + * + * @example + * import { hasKeys, assert } from '@universalweb/acid'; + * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true); + */ + function hasKeys(source, ...properties) { + if (!source) { + return; + } + return everyArray(properties, (item) => { + const pathArray = toPath(item); + if (pathArray.length === 1) { + return hasOwn(source, item); + } else { + const lastPath = pathArray.pop(); + const initialPathObject = get(pathArray, source); + if (initialPathObject) { + return hasOwn(initialPathObject, lastPath); + } + return false; + } + }); + } + /** + * Checks to see if an object has any of the given property names. + * + * @function hasAnyKeys + * @category object + * @type {Function} + * @param {Object} source - Source object to check for keys. + * @param {Array} properties - List of strings to check. + * @returns {Boolean|undefined} - Returns true or false. + * + * @example + * import { hasAnyKeys, assert } from '@universalweb/acid'; + * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true); + * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false); + */ + function hasAnyKeys(source, ...properties) { + if (!source) { + return; + } + return Boolean( + properties.find((item) => { + const pathArray = toPath(item); + if (pathArray.length === 1) { + return hasOwn(source, item); + } else { + const lastPath = pathArray.pop(); + const initialPathObject = get(pathArray, source); + if (initialPathObject) { + return hasOwn(initialPathObject, lastPath); + } + return false; + } + }), + ); + } + + /** + * Checks to see if the constructor is that of a native object. + * + * @function isConstructor + * @category type + * @param {Object} target - The object to be checked. + * @param {Object} source - The source constructor object. + * @returns {Object} - Returns the target object. + * + * @example + * import { isConstructor, assert } from '@universalweb/acid'; + * assert(isConstructor(2, Number), true); + */ + function isConstructor(target, source) { + return target?.constructor === source || false; + } + function isConstructorFactory(source) { + return (target) => { + return isConstructor(target, source); + }; + } + function constructorName(source) { + return source?.constructor?.name; + } + function isConstructorNameFactory(source) { + return (target) => { + return constructorName(target) === source || false; + }; + } + + function isTypeFactory(method) { + return function (primarySource, ...otherSources) { + if (otherSources) { + return method(primarySource) && everyArray(otherSources, method); + } + return method(primarySource); + }; + } + + /** + * Checks if an object or objects are a Buffer. + * + * @function isBuffer + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isBuffer, assert } from '@universalweb/acid'; + * assert(isBuffer(Buffer.from('test')), true); + */ + const isBufferCall = isConstructorNameFactory("Buffer"); + const isBuffer = isTypeFactory(isBufferCall); + + /** + * Checks if the value is a plain object. + * + * @function isPlainObject + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isPlainObject } from '@universalweb/acid'; + * isPlainObject({}); + * // => true + */ + const isPlainObject = (source) => { + if (hasValue(source)) { + return source.constructor.toString().trim().slice(9, 16) === "Object("; + } + return false; + }; + + /** + * Performs a deep comparison between two objects & determines if the value is the same using strict comparison. + * + * @function isEqual + * @type {Function} + * @category utility + * @param {*} source - Source object. + * @param {*} target - Object to be compared. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEqual, assert } from '@universalweb/acid'; + * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true); + */ + // Add map & buffer Support - Review required for performance and support for more types + const isEqual = (source, target) => { + if (source === target) { + return true; + } else if (isBuffer(source)) { + return source.equals(target); + } else if (source.toString() === target.toString()) { + if (isPlainObject(source)) { + const sourceProperties = keys(source); + if (hasKeys(target, sourceProperties)) { + return everyArray(sourceProperties, (key) => { + return isEqual(source[key], target[key]); + }); + } + } else if (isArray(source)) { + if (source.length === target.length) { + return everyArray(source, (item, index) => { + return isEqual(item, target[index]); + }); + } + } + } + return false; + }; + + /** + * Performs a shallow strict comparison between two objects. + * + * @function isMatchArray + * @type {Function} + * @category array + * @param {Array} source - Source object. + * @param {Array} compareArray - Object to compare to source. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isMatchArray, assert } from '@universalweb/acid'; + * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true); + */ + function isMatchArray(source, compareArray) { + if (source.length === compareArray.length) { + return everyArray(source, (item, index) => { + return isEqual(compareArray[index], item); + }); + } + return false; + } + + const mathNativeMax = Math.max; + /** + * Plucks the largest value from an array. + * + * @function largest + * @type {Function} + * @category array + * @param {Array} array - Array from which largest number is taken. + * @returns {Number} - The largest number. + * + * @example + * import { largest, assert } from '@universalweb/acid'; + * assert(largest([1,2,3]), 3); + */ + function largest(array) { + return mathNativeMax(...array); + } + + /** + * Extracts item(s) from an array starting from the last item in the array. + * + * @function last + * @type {Function} + * @category array + * @param {Array} array - Array to have items extracted from. + * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array. + * @returns {Array} - Items from the array. + * + * @example + * import { last, assert } from '@universalweb/acid'; + * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]); + */ + function last(array, indexFrom) { + const arrayLength = array.length; + return indexFrom + ? array.slice(arrayLength - indexFrom, arrayLength) + : array[arrayLength - 1]; + } + + /** + * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. + * + * @function mapArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array} - An array of the same calling array's type. + * + * @example + * import { mapArray, assert } from '@universalweb/acid'; + * assert(mapArray([1, 2, 3], (item) => { + * return item * 2; + * }), [2, 4, 6]); + */ + function mapArray(source, iteratee, results = [], thisCall, additionalArg) { + if (hasValue(thisCall)) { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + results[index] = iteratee.call( + thisCall, + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArg, + ); + }); + } else { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + results[index] = iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArg, + ); + }); + } + return results; + } + + /** + * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee. + * + * @function concurrentEachArray + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {*} thisBind - Object to use as the "this" within the function. + * @returns {Promise|Array|undefined} - An array of the same calling array's type. + * + * @example + * import { concurrentEachArray, has, assert } from '@universalweb/acid'; + * const results = await concurrentEachArray([1, 2, 3], async (item) => { + * return item * 2; + * }); + * assert(has(results, [2, 4, 6]), true); + */ + async function concurrentEachArray(source, iteratee, thisBind) { + if (!source) { + return; + } + const results = []; + const arrayLength = source.length; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + results[index] = iteratee.call( + thisBind, + source[index], + index, + results, + arrayLength, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + results[index] = iteratee(source[index], index, results, arrayLength); + } + } + return Promise.all(results); + } + + /** + * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray. + * + * @function mapAsyncArray + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @returns {Array} - An array of the same calling array's type. + * + * @example + * import { mapAsyncArray, assert } from '@universalweb/acid'; + * assert(await mapAsyncArray([1, 2, 3], async (item) => { + * return item * 2; + * }), [2, 4, 6]); + */ + async function mapAsyncArray(source, iteratee) { + const results = []; + await eachAsyncArray(source, async (item, index, arrayLength) => { + results[index] = await iteratee(item, index, results, arrayLength); + }); + return results; + } + + /** + * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse. + * + * @function mapRightArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array of the same calling array's type. + * + * @example + * import { mapRightArray, assert } from '@universalweb/acid'; + * assert(mapRightArray([1, 2, 3], (item) => { + * return item * 2; + * }), [6, 4, 2]); + */ + function mapRightArray(source, iteratee, results = [], additionalArgument) { + let trueIndex = 0; + const arrayLength = source.length; + for (let index = arrayLength - 1; index >= 0; index--) { + results[trueIndex] = iteratee( + source[index], + index, + source, + arrayLength, + additionalArgument, + ); + trueIndex++; + } + return results; + } + + /** + * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee. + * + * @function mapWhile + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array with properties that passed the test. + * + * @example + * import { mapWhile, assert } from '@universalweb/acid'; + * assert(mapWhile([1, 2, 0], (item) => { + * return Boolean(item); + * }), [1, 2]); + */ + function mapWhile(source, iteratee, results = [], additionalArgument) { + const arrayLength = source.length; + for (let index = 0; index < arrayLength; index++) { + const item = source[index]; + const returned = iteratee( + item, + index, + results, + source, + arrayLength, + additionalArgument, + ); + if (returned === false) { + break; + } + results[index] = item; + } + return results; + } + + /** + * Subtracts the subtrahend (second argument) from the minuend (first argument). + * + * @function subtract + * @category math + * @type {Function} + * @param {Number} minuend - The minuend. + * @param {Number} subtrahend - The subtrahend. + * @returns {Number} - Returns the difference. + * + * @example + * import { subtract, assert } from '@universalweb/acid'; + * assert(subtract(3, 1), 2); + */ + function subtract(minuend, subtrahend) { + return minuend - subtrahend; + } + + /** + * Sorts an array of numbers in ascending order. Smallest to largest. + * + * @function sortNumberAscending + * @category array + * @param {Array} numberList - Array of numbers. + * @returns {Array} - The array this method was called on. + * + * @example + * import { sortNumberAscending, assert } from '@universalweb/acid'; + * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]); + */ + function sortNumberAscending(numberList) { + return numberList.sort(subtract); + } + + /** + * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. + * + * @function partition + * @type {Function} + * @category array + * @param {Array} array - Takes an array to split. + * @param {Function} predicate - Function run on each item in the array. + * @returns {Array} - One array split into two arrays. + * + * @example + * import { partition, assert } from '@universalweb/acid'; + * const result = partition([ + * {user: 'barney', age: 36, active: false}, + * {user: 'fred', age: 40, active: true}, + * {user: 'pebbles', age: 1, active: false} + * ], (item) => { return item.active; }); + * assert(result, [{"user":"fred","age":40,"active":true}], + * [{"user":"barney","age":36,"active":false}, + * {"user":"pebbles","age":1,"active":false}]); + */ + function partition(array, predicate) { + const rejected = []; + return [ + compactMapArray(array, (item, index) => { + if (predicate(item, index)) { + return item; + } + rejected.push(item); + }), + rejected, + ]; + } + + /** + * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function. + * + * @function subtractReverse + * @category math + * @type {Function} + * @param {Number} subtrahend - The subtrahend. + * @param {Number} minuend - The minuend. + * @returns {Number} - Returns the difference. + * + * @example + * import { subtractReverse, assert } from '@universalweb/acid'; + * assert(subtractReverse(1, 3), 2); + */ + function subtractReverse(subtrahend, minuend) { + return minuend - subtrahend; + } + + /** + * Sorts an array of numbers in descending order. Largest to smallest. + * + * @function sortNumberDescening + * @category array + * @param {Array} numberList - Array of numbers. + * @returns {Array} - The array this method was called on. + * + * @example + * import { sortNumberDescening, assert } from '@universalweb/acid'; + * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]); + */ + function sortNumberDescening(numberList) { + return numberList.sort(subtractReverse); + } + + /** + * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation. + * + * @function remove + * @category array + * @param {Array} array - Array to be mutated. + * @param {String|Array} removeThese - Items to remove from the array. + * @returns {Array} - The array this method was called on. + * + * @example + * remove([1, 2, 3, 3, 4, 3, 5], 1); + * // => [2, 3, 3, 4, 3, 5] + * @example + * remove([3, 3, 4, 5], 3, 4); + * // => [5] + */ + function remove(array, removeThese) { + let arrayLength = array.length; + for (let index = 0; index < arrayLength; index++) { + const item = array[index]; + if (removeThese.includes(item)) { + array.splice(index, 1); + index--; + arrayLength--; + } + } + return array; + } + /** + * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation. + * + * @function removeBy + * @category array + * @param {Array} source - Array to be mutated. + * @param {Function} iteratee - Function used to check object. Return true to remove the value. + * @returns {Array} - The array this method was called on. + * + * @example + * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);}); + * // => [2, 4] + */ + function removeBy(source, iteratee) { + let arrayLength = source.length; + for (let index = 0; index < arrayLength; index++) { + const item = source[index]; + if (iteratee(item, index)) { + source.splice(index, 1); + index--; + arrayLength--; + } + } + return source; + } + + /** + * Extracts all items in array except the first and last item. + * + * @function rest + * @type {Function} + * @category array + * @param {Array} array - Array to be sliced. + * @returns {Array} - Returns the aggregated array. + * + * @example + * rest([1, 2, 3, 4, 5]); + * // => [2, 3, 4, 5] + */ + function rest(array) { + return array.slice(1, array.length); + } + + /** + * Get the item at the supplied index starting at the end of the array. + * + * @function right + * @type {Function} + * @category array + * @param {Array} source - Array to be sliced. + * @param {Number} amount - Amount from the right. + * @returns {*} - Returns the object at the evaluated position. + * + * @example + * right([1, 2, 3, 4, 5] , 1); + * // => 4 + */ + function right(source, amount) { + return source[source.length - 1 - amount]; + } + + const { floor, random: random$1 } = Math; + /** + * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption.. + * + * @function randomInt + * @category number + * @type {Function} + * @param {Number} max - The highest possible value for the random number. + * @param {Number} [min = 0] - Establishes lowest possible value for the random number. + * @returns {Number} - Returns random integer between the max and min range. + * + * @example + * import { randomInt, assert } from '@universalweb/acid'; + * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;}); + */ + function randomInt(max, min = 0) { + return floor(random$1() * (max - min)) + min; + } + + /** + * Checks if two numbers are the same. + * + * @function isNumberEqual + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @param {Number} target - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumberEqual, assert } from '@universalweb/acid'; + * assert(isNumberEqual(0, 0), true); + */ + function isNumberEqual(source, target) { + return source === target; + } + + const arrayFrom = Array.from; + /** + * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check. + * + * @function toArray + * @category array + * @param {*} arrayLike - Array like object. + * @param {Function} mapFn - Function to map over the array. + * @param {*} thisArg - MapFn's "this". + * @returns {Array|undefined} - New array. + * + * @example + * import { toArray, assert } from '@universalweb/acid'; + * assert(toArray(new Map([[1, 2]])), [[1, 2]]); + */ + function toArray(arrayLike, mapFn, thisArg) { + if (hasValue(arrayLike)) { + return arrayFrom(arrayLike, mapFn, thisArg); + } + } + + /** + * Shuffle an array and return a new array. + * + * @function shuffle + * @category array + * @param {Array} target - Target Array to be shuffled. + * @param {Number} amount - The amount of times to shuffle the array. + * @returns {Array} - An array with the shuffled results. + * + * @example + * import { shuffle, assert } from '@universalweb/acid'; + * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]); + */ + function shuffle(target, amount = target.length) { + if (target.length <= 1) { + return toArray(target); + } + const shuffleArray = toArray(target); + let count = 0; + let index; + let value; + while (count < amount) { + index = randomInt(shuffleArray.length - 1, 0); + value = shuffleArray[count]; + shuffleArray[count] = shuffleArray[index]; + shuffleArray[index] = value; + count++; + } + return shuffleArray; + } + + /** + * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned. + * + * @function sample + * @category array + * @param {Array} source - The array to pull sample(s) from. + * @param {Number} amount - The amount of samples to take. + * @returns {Array} - An array of randomly pulled samples. + * + * @example + * sample([1, 2, 3, 4] , 2); + * // => [1, 3] + */ + function sample(source, amount) { + if (!source) { + return false; + } + const arrayLength = source.length; + if (arrayLength === amount || amount > arrayLength) { + return shuffle(source); + } + if (amount === 1) { + return [source[randomInt(arrayLength - 1, 0)]]; + } + const sampleArray = []; + const used = {}; + let count = 0; + let index; + while (count < amount) { + index = randomInt(source.length - 1, 0); + if (!used[index]) { + sampleArray.push(source[index]); + used[index] = true; + count++; + } + } + return sampleArray; + } + + const mathNativeMin = Math.min; + /** + * Plucks the smallest value from an array. + * + * @function smallest + * @category array + * @type {Function} + * @param {Array} array - Array from which smallest number is taken. + * @returns {Number} - The smallest number. + * + * @example + * smallest([1,2,3]); + * // => 1 + */ + function smallest(array) { + return mathNativeMin(...array); + } + + /** + * What index should the number be inserted at to keep a sorted array still sorted. + * + * @function getNumberInsertIndex + * @category array + * @type {Function} + * @param {Array} source - Array to be checked. + * @param {Number} target - Number to check where to be inserted. + * @returns {Number} - The index at which to insert. + * + * @example + * import { getNumberInsertIndex, assert } from '@universalweb/acid'; + * assert(getNumberInsertIndex([30, 39, 50], 40), 1); + */ + function getNumberInsertIndex(source, target) { + let insertIndex = 0; + everyArray(source, (item, index) => { + insertIndex = index; + if (target >= item) { + insertIndex = index + 1; + return true; + } else { + return false; + } + }); + return insertIndex; + } + + /** + * Returns a shallow copy of the array up to an amount. + * + * @function take + * @category array + * @type {Function} + * @param {Array} source - The source array to take from. + * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction. + * @returns {Array} - The aggregated array. + * + * @example + * import { take, assert } from '@universalweb/acid'; + * assert(take([1,2,3], 2), [1, 2]); + */ + function take(source, endIndex = 1) { + return source.slice(0, endIndex); + } + + /** + * Returns a shallow copy of the array up to an amount starting from the right. + * + * @function takeRight + * @category array + * @type {Function} + * @param {Array} source - The source array to take right from. + * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction. + * @returns {Array} - The aggregated array. + * + * @example + * import { takeRight, assert } from '@universalweb/acid'; + * assert(takeRight([1,2,3], 2), [2, 3]); + */ + function takeRight(source, indexRight = 1) { + const arrayLength = source.length; + return source.slice(arrayLength - indexRight, arrayLength); + } + + function onlyUnique(value, index, array) { + return array.indexOf(value) === index; + } + function sortUnique(item, index, array) { + return item !== array[index - 1]; + } + /** + * Filters the array down to unique elements. + * + * @function unique + * @category array + * @type {Function} + * @param {Array} source - The array to be filtered. + * @param {Boolean} isSorted - Flag which means the array is already sorted. + * @returns {Array} - The filtered array. + * + * @example + * unique([1, 2, 2, 4]); + * // => [1, 2, 4] + */ + function unique(source, isSorted) { + if (isSorted) { + return source.filter(sortUnique); + } + return source.filter(onlyUnique); + } + + /** + * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays. + * + * @function union + * @category array + * @type {Function} + * @param {...Array} arrays - The arrays to be evaluated. + * @returns {Array} - The aggregated array. + * + * @example + * union([1,2,4], [1,2,3]); + * // => [1, 2, 4, 3] + */ + function union(...arrays) { + return unique(flattenDeep(arrays)); + } + + /** + * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned. + * If and when the iteratee yields false the loop stops & false is returned. + * + * @function untilFalseArray + * @category array + * @type {Function} + * @param {Array} source - The array to iterate over. + * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. + * @returns {Array} - Returns true if all returns are true or false if one value returns false. + * + * @example + * import { untilFalseArray, assert } from '@universalweb/acid'; + * assert(untilFalseArray([true, true, false], (item) => { + * return item; + * }), false); + * assert(untilFalseArray([true, true, true], (item) => { + * return item; + * }), true); + */ + function untilFalseArray(source, iteratee) { + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if (iteratee(source[index], index) === false) { + return false; + } + } + return true; + } + + /** + * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned. + * If and when the iteratee yields true the loop stops & false is returned. + * + * @function untilTrueArray + * @category array + * @type {Function} + * @param {Array} source - The array to iterate over. + * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. + * @returns {Array} - Returns true if all returns are false or false if one value returns true. + * + * @example + * import { untilTrueArray, assert } from '@universalweb/acid'; + * assert(untilTrueArray([true], (item) => { + * return item; + * }), false); + * assert(untilTrueArray([true, true, true], (item) => { + * return item; + * }), true); + */ + function untilTrueArray(source, iteratee) { + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if (iteratee(source[index], index) === true) { + return false; + } + } + return true; + } + + /** + * Iterates through the calling object and creates a new object based on the calling object's type with the results, + * (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * Re-checks the length each loop. + * + * @function whileCompactMap + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The originally given array. + * + * @example + * import { whileCompactMap, assert } from '@universalweb/acid'; + * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => { + * return item; + * }), [1, 2, 3, false]); + */ + function whileCompactMap(source, iteratee, results = [], additionalArgument) { + let index = 0; + while (index < source.length) { + const result = results.push( + iteratee( + source[index], + index, + source, + source.length, + additionalArgument, + ), + ); + index++; + if (hasValue(result)) { + results.push(result); + } + } + return source; + } + + /** + * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over. + * + * @function whileEachArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The originally given array. + * + * @example + * import { whileEachArray, assert } from '@universalweb/acid'; + * const list = []; + * whileEachArray([1, 2, 3], (item, index) => { + * list[index] = item; + * }); + * assert(list, [1, 2, 3]); + */ + function whileEachArray(source, iteratee, additionalArgument) { + let index = 0; + while (index < source.length) { + iteratee(source[index], index, source, source.length, additionalArgument); + index++; + } + return source; + } + + /** + * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. + * Re-checks the length each loop. + * + * @function whileMapArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The originally given array. + * + * @example + * import { whileMapArray, assert } from '@universalweb/acid'; + * assert(whileMapArray([1, 2, 3], (item, index, source) => { + * if (index === 0) { + * source.push(4); + * } + * return item; + * }), [1, 2, 3, 4]); + */ + function whileMapArray(source, iteratee, results = [], additionalArgument) { + let index = 0; + while (index < source.length) { + results.push( + iteratee( + source[index], + index, + source, + source.length, + additionalArgument, + ), + ); + index++; + } + return source; + } + + /** + * Returns a copy of the array with all instances of the values removed. + * + * @function without + * @type {Function} + * @category array + * @param {Array} target - The target array to be filtered. + * @param {Array} sources - Items to be removed. + * @returns {Array} - The target array filtered. + * + * @example + * import { without, assert } from '@universalweb/acid'; + * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]); + */ + function without(target, sources) { + if (!sources) { + return target; + } + const sourcesSet = construct(Set, sources); + return target.filter((item) => { + return !sourcesSet.has(item); + }); + } + + /** + * Creates an array that is the symmetric difference of the provided arrays. + * + * @function xor + * @category array + * @type {Function} + * @param {...Array} sources - The array(s) to be filtered. + * @returns {Array|undefined} - The filtered array. + * + * @example + * xor([2, 1], [2, 3, 5], [6]); + * // => [1, 3, 5, 6] + */ + function xor(...sources) { + const xorMap = construct(Map); + const xored = []; + const sourcesLength = sources.length; + if (sourcesLength === 2) { + return difference(sources[0], sources[1]); + } + eachArray(sources, (currentArray, parentIndex) => { + eachArray(currentArray, (child, childIndex) => { + let childRoot = xorMap.get(child); + if (!childRoot) { + childRoot = { + count: 1, + parentIndex, + child, + }; + xorMap.set(child, childRoot); + } else if (childRoot.parentIndex === parentIndex) { + return; + } else { + childRoot.count++; + } + }); + }); + forEach(xorMap, (item) => { + if (item.count === 1) { + xored.push(item.child); + } + }); + return xored; + } + + /** + * Merges together the values of each of the arrays with the values at the corresponding position. + * + * @function zip + * @type {Function} + * @category array + * @param {Array} arrays - The arrays to process. + * @returns {Array} - Returns the new array of regrouped elements. + * + * @example + * zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + function zip(...arrays) { + return arrays[0].map((item, index) => { + return arrays.map((array) => { + return array[index]; + }); + }); + } + /** + * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration. + * + * @function unZip + * @type {Function} + * @category array + * @param {Array} source - The array of grouped elements to process. + * @returns {Array} - Returns the new array of regrouped elements. + * + * @example + * unZip([['a', 1, true], ['b', 2, false]]); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unZip(source) { + return source[0].map((item, index) => { + return source.map((arraySet) => { + return arraySet[index]; + }); + }); + } + + /** + * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer. + * + * @function ensureBuffer + * @category buffer + * @type {Function} + * @param {*} source - Object to be checked. + * @returns {Array} - Returns an array. + * + * @example + * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid'; + * assert(isBuffer(ensureBuffer('test')), true); + */ + function ensureBuffer(source) { + return ( + (isBuffer(source) && source) || + (hasValue(source) && Buffer.from(source)) || + Buffer.alloc(0) + ); + } + + /** + * Clears the values out of a buffer. + * + * @function clearBuffer + * @category buffer + * @type {Function} + * @param {Array} source - Takes an array to be emptied. + * @returns {Array} - The originally given array. + * + * @example + * import { clearBuffer, assert } from '@universalweb/acid'; + * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([])); + */ + function clearBuffer(source) { + source.fill(0); + return source; + } + + /** + * Checks if an object or objects are a plain object. + * + * @function isFunction + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFunction } from '@universalweb/acid'; + * isFunction(() => {}); + * // => true + */ + const isFunction = (source) => { + return hasValue(source) ? source instanceof Function : false; + }; + + /** + * Checks if the value is a number. + * + * @function isNumber + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumber, assert } from '@universalweb/acid'; + * assert(isNumber(1), true); + */ + const isNumberCall = isConstructorNameFactory("Number"); + const isNumber = isTypeFactory(isNumberCall); + /** + * Checks if the value is not a number. + * + * @function isNotNumber + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNotNumber, assert } from '@universalweb/acid'; + * assert(isNotNumber(1), false); + */ + function isNotNumber(source) { + return !isNumber(source); + } + + /** + * Checks if the value is a string. + * + * @function isString + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isString, assert } from '@universalweb/acid'; + * assert(isString('hello'), true); + * assert(isString(1), false); + */ + const isString = isConstructorFactory(String); + /** + * Checks if the value is not a string. + * + * @function isNotString + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNotString, assert } from '@universalweb/acid'; + * assert(isNotString(1), true); + * assert(isNotString('hello'), false); + */ + function isNotString(source) { + return !isString(source); + } + + const objectAssign = Object.assign; + function assignToObject(target, source) { + if (isPlainObject(source)) { + objectAssign(target, source); + } else if (isFunction(source)) { + const key = source.name; + if (key) { + target[key] = source; + } else { + objectAssign(target, source); + } + } else if (isString(source) || isNumber(source)) { + target[source] = source; + } + return target; + } + /** + * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module. + * + * @function assign + * @category object + * @param {Object} target - The target object. + * @param {...Object} sources - The source object(s). + * @returns {Object} - Returns the target object. + * + * @example + * import { assign, assert } from '@universalweb/acid'; + * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5}); + */ + function assign(target, ...sources) { + const sourceLength = sources.length; + for (let index = 0; index < sourceLength; index++) { + assignToObject(target, sources[index]); + } + return target; + } + + function assignToClass(target, source) { + if (isPlainObject(source)) { + objectAssign(target.prototype, source); + } else if (isFunction(source)) { + const key = source.name; + if (key) { + target.prototype[key] = source; + } + } else if (isConstructor(source)) { + const key = source.constructor?.name; + if (key) { + target.prototype[key] = source; + } + } else if (isString(source) || isNumber(source)) { + target.prototype[source] = source; + } + return target; + } + /** + * The function adds a new method to a class. + * @param {Class} target - The target parameter refers to the Class or constructor function to which you want + * to add a new method. + * @param {Function|Object|String|Number} sources - What you want to add to the class. + * @returns {Class} - Returns the Class provided in the target parameter. + * + * @example + * import { extendClass, assert } from '@universalweb/acid'; + * class Test {} + * function a(){return 1;} + * extendClass(Test, a) + * assert((new Test()).a(), 1); + */ + function extendClass(target, ...sources) { + const sourceLength = sources.length; + for (let index = 0; index < sourceLength; index++) { + assignToClass(target, sources[index]); + } + return target; + } + + /** + * Creates an object composed of keys generated from the results of running each element of collection through iteratee. + * + * @function countBy + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {Function} iteratee - The iteratee to transform keys. + * @returns {Object} - Returns the composed aggregate object. + * + * @example + * import { countBy, assert } from '@universalweb/acid'; + * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2}); + */ + function countBy(collection, iteratee) { + const object = {}; + let result; + eachArray(collection, (item) => { + result = iteratee(item); + if (!object[result]) { + object[result] = 0; + } + object[result]++; + }); + return object; + } + + /** + * Count the amount of times a key is present in a collection. + * + * @function countKey + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {Function} propertyName - The name of the key. + * @returns {Number} - The count. + * + * @example + * import { countKey, assert } from '@universalweb/acid'; + * assert(countKey([{a:1}, {a:3}], 'a'), 2); + */ + function countKey(collection, propertyName) { + let count = 0; + eachArray(collection, (item) => { + if (item[propertyName]) { + count++; + } + }); + return count; + } + + /** + * Count the amount of times a key is not present in a collection. + * + * @function countWithoutKey + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {String} propertyName - The name of the key. + * @returns {Number} - The count. + * + * @example + * import { countWithoutKey, assert } from '@universalweb/acid'; + * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2); + */ + function countWithoutKey(collection, propertyName) { + let count = 0; + eachArray(collection, (item) => { + if (!item[propertyName]) { + count++; + } + }); + return count; + } + + function findIndexCache(element, index, array, indexMatch, propertyName) { + if (element[propertyName] === indexMatch) { + return true; + } + } + + /** + * Finds an object in a collection by the given id and property name and returns the array index of the object. + * + * @function findIndex + * @type {Function} + * @category collection + * @param {Array} collection - Collection to be checked for an item. + * @param {Number|string} id - The value to look for. + * @param {String} [propertyName = 'id'] - The name of the property to compare. + * @returns {Number} - The index of the object. + * + * @example + * findIndex([{id: 1}, {id: 2}], 1); + * // => 0 + */ + function findIndex(collection, id, propertyName = "id") { + const result = collection.findIndex((element, index) => { + return findIndexCache(element, index, collection, id, propertyName); + }); + return result === -1 ? false : result; + } + + /** + * Finds an object in a collection by the given id and property name. + * + * @function findItem + * @type {Function} + * @category collection + * @param {Array} collection - Collection to be checked for an item. + * @param {Number|string} id - The value to look for. + * @param {String} [propertyName = 'id'] - The name of the property to compare. + * @returns {Object} - The found object. + * + * @example + * findItem([{id: 1}, {id: 2}], 1); + * // => {id: 1} + */ + function findItem(collection, id, propertyName = "id") { + const result = collection.find((element, index) => { + return findIndexCache(element, index, collection, id, propertyName); + }); + return result === -1 ? false : result; + } + + function sortCollectionDescendingFilter( + previous, + next, + propertyName, + ifMatch, + ) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + if (!nextKey) { + return -1; + } else if (!previousKey) { + return 1; + } else if (previousKey < nextKey) { + return 1; + } else if (previousKey > nextKey) { + return -1; + } + return 0; + } + /** + * Sorts an array in place using a key in descending order. + * + * @function sortCollectionDescending + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array and or a clone of the array sorted. + * + * @example + * import { sortCollectionDescending, assert } from '@universalweb/acid'; + * const result = [{id: 1}, {id: 0}]; + * const collect = [{id: 0}, {id: 1}]; + * const prop = 'id'; + * assert(sortCollectionDescending(collect, prop), result); + */ + function sortCollectionDescending(collection, propertyName = "id", ifMatch) { + return collection.sort((previous, next) => { + return sortCollectionDescendingFilter( + previous, + next, + propertyName, + ifMatch, + ); + }); + } + + /** + * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array. + * + * @function getLowest + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @returns {Object} - The newest object in the collection. + * + * @example + * import { getLowest, assert } from '@universalweb/acid'; + * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1}); + */ + function getLowest(collection, propertyName) { + return sortCollectionDescending(collection, propertyName, false)[0]; + } + + function sortCollectionAscendingFilter( + previous, + next, + propertyName, + ifMatch, + ) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + if (!nextKey) { + return 1; + } else if (!previousKey) { + return -1; + } else if (previousKey < nextKey) { + return -1; + } else if (previousKey > nextKey) { + return 1; + } + return 0; + } + /** + * Sorts an array in place using a key in ascending order. + * + * @function sortCollectionAscending + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array and or a clone of the array sorted. + * + * @example + * import { sortCollectionAscending, assert } from '@universalweb/acid'; + * const result = [{id: 0}, {id: 1}]; + * const collect = [{id: 1}, {id: 0}]; + * const prop = 'id'; + * assert(sortCollectionAscending(collect, prop), result); + */ + function sortCollectionAscending(collection, propertyName = "id", ifMatch) { + return collection.sort((previous, next) => { + return sortCollectionAscendingFilter( + previous, + next, + propertyName, + ifMatch, + ); + }); + } + + /** + * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array. + * + * @function getHighest + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @returns {Object} - The newest object in the collection. + * + * @example + * import { getHighest, assert } from '@universalweb/acid'; + * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0}); + */ + function getHighest(collection, propertyName = "id") { + return sortCollectionAscending(collection, propertyName)[0]; + } + + /** + * Creates an object composed of keys generated from the results of running each element of collection thru iteratee. + * The order of grouped values is determined by the order they occur in collection. + * The corresponding value of each key is an array of elements responsible for generating the key. + * + * @function groupBy + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {Function} iteratee - The iteratee to transform keys. + * @returns {Object} - Returns the composed aggregate object. + * + * @example + * groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + */ + function groupBy(collection, iteratee) { + const sortedObject = {}; + eachArray(collection, (item) => { + const results = iteratee(item); + if (!sortedObject[results]) { + sortedObject[results] = []; + } + sortedObject[results].push(item); + }); + return sortedObject; + } + + /** + * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique. + * + * @function indexBy + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {String} propertyName - The property name to index by. + * @returns {Object} - Returns the composed aggregate object. + * + * @example + * import { indexBy, assert } from '@universalweb/acid'; + * const result = { "0": {name: 'test', id: 0}, "1": {name: 'test2', id: 1}}; + * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id'); + * assert(indexed, result); + */ + function indexBy(collection, propertyName = "id") { + const sortedObject = {}; + eachArray(collection, (item) => { + sortedObject[item[propertyName]] = item; + }); + return sortedObject; + } + + /** + * Invokes a function on the provided property name in each object in the collection. + * + * @function invokeCollection + * @category collection + * @type {Function} + * @param {Array} collection - Collection from which method will be taken. + * @param {String} property - Value used to pluck method from object. + * @param {*} value - Value to be passed to callable property. + * @returns {Array} - Returns the results of the invoked method. + * + * @example + * import { invokeCollection, assert } from '@universalweb/acid'; + * const results = invokeCollection([{ + * test(item, index) { return [item, index];} + * }], 'test', ['EXAMPLE']); + * assert(results, [['EXAMPLE', 0]]); + */ + function invokeCollection(collection, property, value, thisBind) { + if (thisBind) { + return mapArray(collection, (item, index) => { + return item[property].call(thisBind, value); + }); + } + return mapArray(collection, (item, index) => { + return item[property](value); + }); + } + + /** + * Asynchronously awaits & invokes a function on the provided property name in each object in the collection. + * + * @function invokeCollectionAsync + * @category collection + * @type {Function} + * @async + * @param {Array} collection - Collection from which method will be taken. + * @param {String} property - Value used to pluck method from object. + * @param {*} value - Value to be passed to callable property. + * @returns {Array} - Returns the results of the invoked method. + * + * @example + * import { invokeCollectionAsync, assert } from '@universalweb/acid'; + * const results = await invokeCollectionAsync([{ + * async test(item, index) { return [item, index];} + * }], 'test', ['EXAMPLE']); + * assert(results, [['EXAMPLE', 0]]); + */ + function invokeCollectionAsync(collection, property, value, thisBind) { + if (thisBind) { + return mapAsyncArray(collection, (item) => { + return item[property].call(thisBind, value); + }); + } + return mapAsyncArray(collection, async (item) => { + return item[property](value); + }); + } + + /** + * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array. + * + * @function pluckObject + * @category object + * @type {Function} + * @param {Object} source - Array used to determine what sources to be plucked. + * @param {String|Array} targets - Property name. + * @returns {Array|undefined} - An array of plucked sources. + * + * @example + * import { pluckObject, assert } from '@universalweb/acid'; + * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]); + */ + function pluckObject(source, targets) { + if (!source) { + return; + } else if (isString(targets)) { + return source[targets]; + } + return mapArray(targets, (item) => { + return source[item]; + }); + } + + /** + * Returns an array of the plucked values from the collection. + * + * @function pluck + * @category collection + * @type {Function} + * @param {Array} collection - Array used to determine what value to be plucked. + * @param {(String|Number|Array.)} targets - Property name. + * @returns {Array} - An array of plucked values. + * + * @example + * import { pluck, assert } from '@universalweb/acid'; + * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]); + * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]); + */ + function pluck(collection, targets) { + return mapArray(collection, (item) => { + return pluckObject(item, targets); + }); + } + + function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + return previousKey.localeCompare(nextKey); + } + /** + * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array. + * + * @function sortCollectionAlphabetically + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - Name of property to compare. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array. + * + * @example + * import { sortCollectionAlphabetically, assert } from '@universalweb/acid'; + * const result = [{"letter":"a"},{"letter":"c", g: 0},{"letter":"c", g: 2}, {letter:'f'}]; + * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c", g: 2}, {letter:'c', g: 0}]; + * const prop = 'letter'; + * function ifMatchSort(c, n) { + * if (c.g < n.g) { + * return -1; + * } + * if (c.g > n.g) { + * return 1; + * } + * } + * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result); + */ + function sortCollectionAlphabetically( + collection, + propertyName = "id", + ifMatch, + ) { + return collection.sort((previous, next) => { + return sortObjectsAlphabetically(previous, next, propertyName, ifMatch); + }); + } + + function sortObjectsAlphabeticallyReverse( + previous, + next, + propertyName, + ifMatch, + ) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + return nextKey.localeCompare(previousKey); + } + /** + * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array. + * + * @function sortCollectionAlphabeticallyReverse + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - Name of property to compare. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array. + * + * @example + * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid'; + * const result = [{letter:'f'},{"letter":"c"}, {"letter":"a"}]; + * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c"}]; + * const prop = 'letter'; + * assert(sortCollectionAlphabeticallyReverse(collect, prop), result); + */ + function sortCollectionAlphabeticallyReverse( + collection, + propertyName = "id", + ifMatch, + ) { + return collection.sort((previous, next) => { + return sortObjectsAlphabeticallyReverse( + previous, + next, + propertyName, + ifMatch, + ); + }); + } + + /** + * Return the file extension. + * + * @function getFileExtension + * @category file + * @param {*} source - Object to be checked. + * @returns {String|undefined} - Returns the extension. + * + * @example + * import { getFileExtension, assert } from '@universalweb/acid'; + * assert(getFileExtension('test.js'),'js'); + */ + function getFileExtension(source) { + if (source) { + return source.substring(source.lastIndexOf(".") + 1); + } + } + + /** + * Return the file extension. + * + * @function getFilename + * @category file + * @param {*} source - Object to be checked. + * @returns {String|undefined} - Returns the extension. + * + * @example + * import { getFilename, assert } from '@universalweb/acid'; + * assert(getFilename('./universalweb/test.js'),'test.js'); + */ + function getFilename(source) { + if (source) { + return source.substring(source.lastIndexOf("/") + 1); + } + } + + function regexTestFactory(regexType) { + return (item) => { + return hasValue(item) ? regexType.test(item) : false; + }; + } + + /** + * Checks if the string has a .css extension. + * + * @function isFileCSS + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileCSS, assert } from '@universalweb/acid'; + * assert(isFileCSS('test.css'), true); + */ + const isFileCSS = regexTestFactory(/\.css$/); + + /** + * Checks if the string has a .html extension. + * + * @function isFileHTML + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileHTML, assert } from '@universalweb/acid'; + * assert(isFileHTML('test.html'), true); + */ + const isFileHTML = regexTestFactory(/\.html$/); + + /** + * Checks if the string has a .js extension. + * + * @function isFileJS + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileJS, assert } from '@universalweb/acid'; + * assert(isFileJS('test.js'), true); + */ + const isFileJS = regexTestFactory(/\.js$/); + + /** + * Checks if the string has a .json extension. + * + * @function isFileJSON + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileJSON, assert } from '@universalweb/acid'; + * assert(isFileJSON('test.json'), true); + */ + const isFileJSON = regexTestFactory(/\.json$/); + + /** + * Creates a function that executes callable, only after being called n times. + * + * @function after + * @category function + * @type {Function} + * @param {Number} amount - The number of calls until method is invoked. + * @param {Function} callable - The function to be called. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * import { after, assert } from '@universalweb/acid'; + * const onlyAfter = after(1, (item) => { return item;}); + * assert(onlyAfter(1), undefined); + * assert(onlyAfter(2), 2); + */ + function after(amount, callable) { + let point = amount; + let value; + const onlyAfter = (...args) => { + if (point !== null) { + point--; + } + if (point <= 0) { + value = callable(...args); + point = null; + } + return value; + }; + return onlyAfter; + } + + /** + * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments. + * + * @function ary + * @category function + * @type {Function} + * @param {Function} callable - The function to cap arguments for. + * @param {Number} amount - The arity cap. + * @returns {Object} - Returns the new capped function. + * + * @example + * import { ary, assert } from '@universalweb/acid'; + * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]); + */ + function ary(callable, amount) { + return (...args) => { + return callable(...args.splice(0, amount)); + }; + } + + /** + * Creates a function that executes callable, only before n times. + * + * @function before + * @category function + * @type {Function} + * @param {Number} amount - The number of calls before n. + * @param {Function} callable - The function to be called. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * import { before, assert } from '@universalweb/acid'; + * const onlyBefore = before(3, () => { return 1;}); + * assert(onlyBefore(1), 1); + */ + function before(amount, callable) { + let point = amount; + let value; + const onlyBefore = (...args) => { + if (point !== null) { + point--; + } + if (point >= 1) { + value = callable(...args); + } else { + point = null; + } + return value; + }; + return onlyBefore; + } + + /** + * Asynchronously iterates through the given object. + * + * @function eachAsyncObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg. + * @param {*} thisCall - Iteratee called with thisCall as this. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Object|Function|undefined} - Returns source. + * + * @example + * import { eachAsyncObject, assert } from '@universalweb/acid'; + * const tempList = []; + * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => { + * tempList[key] = item; + * }); + * assert(tempList, {a: 1, b: 2, c: 3}); + */ + const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => { + if (!source) { + return; + } + const objectKeys = keys(source); + if (hasValue(thisCall)) { + await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { + return iteratee.call( + thisCall, + source[key], + key, + source, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } else { + await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { + return iteratee( + source[key], + key, + source, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } + return source; + }; + + /** + * Iterates through the given object. + * + * @function eachObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Object|Function|undefined} - Returns the calling object. + * + * @example + * import { eachObject, assert } from '@universalweb/acid'; + * assert(eachObject({a: 1, b: 2, c: 3}, (item) => { + * console.log(item); + * }), {a: 1, b: 2, c: 3}); + */ + function eachObject(source, iteratee, thisCall, additionalArg) { + if (!source) { + return; + } + const objectKeys = keys(source); + if (hasValue(thisCall)) { + eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { + iteratee.call( + thisCall, + source[key], + key, + source, + propertyCount, + objectKeysArray, + additionalArg, + ); + }); + } else { + eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { + iteratee( + source[key], + key, + source, + propertyCount, + objectKeysArray, + additionalArg, + ); + }); + } + return source; + } + + async function forEachAsync(source, callback) { + const values = []; + const properties = []; + let valuesLength = 0; + source.forEach((item, key) => { + values[valuesLength] = item; + properties[valuesLength] = item; + valuesLength++; + }); + for (let index = 0; index < valuesLength; index++) { + await callback(values[index], properties[index]); + } + return source; + } + + /** + * Checks if an object(s) is a Set. + * + * @function isSet + * @category type + * @param {...*} sources - Objects to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isSet, assert } from '@universalweb/acid'; + * assert(isSet(new Set()), true); + */ + const isSetCall = isConstructorNameFactory("Set"); + const isSet = isTypeFactory(isSetCall); + + function forOf(source, iteratee) { + if (isSet(source)) { + for (const value of source) { + iteratee(value, source); + } + return source; + } + for (const [key, value] of source) { + iteratee(value, key, source); + } + return source; + } + + /** + * Checks if an object or objects are a Int16Array. + * + * @function isGenerator + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isGenerator } from '@universalweb/acid'; + * isGenerator(function* (){}); + * // => true + */ + const isGeneratorCall = isConstructorNameFactory("GeneratorFunction"); + const isGenerator = isTypeFactory(isGeneratorCall); + + async function forOfAsync(source, iteratee, generatorArgs) { + if (isSet(source)) { + for (const value of source) { + await iteratee(value, source); + } + return source; + } + if (isGenerator(source)) { + for await (const item of source(...generatorArgs)) { + await iteratee(item, source); + } + } + for (const [key, value] of source) { + await iteratee(value, key, source); + } + return source; + } + + /** + * Checks if an object is an async function. + * + * @function isAsync + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isAsync, assert } from '@universalweb/acid'; + * assert(isAsync(async() => {}), true); + */ + const isAsyncCall = isConstructorNameFactory("AsyncFunction"); + const isAsync = isTypeFactory(isAsyncCall); + + function generateLoop( + arrayLoop, + arrayLoopAsync, + objectLoop, + objectLoopAsync, + forOfLoop, + forOfLoopAsync, + ) { + return (source, iteratee, argument1, argument2, argument3) => { + let returned; + const isIterateeAsync = isAsync(iteratee); + if (!hasValue(source) || !iteratee) { + return; + } else if (isArray(source)) { + returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; + } else if (isPlainObject(source) || isFunction(source)) { + returned = isIterateeAsync ? objectLoopAsync : objectLoop; + } else if (forOfLoop) { + returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; + } else if (isGenerator(source)) { + returned = forOfLoopAsync; + } else { + returned = isIterateeAsync ? objectLoopAsync : objectLoop; + } + return returned(source, iteratee, argument1, argument2, argument3); + }; + } + + /** + * Iterates through the given object. + * + * @function each + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array | object | Function} - The originally given object. + * + * @example + * import { each, assert } from '@universalweb/acid'; + * const list = {}; + * each({a: 1, b: 2, c: 3}, (item, key) => { + * list[key] = item; + * }); + * assert(list, {a: 1, b: 2, c: 3}); + */ + const each = generateLoop( + eachArray, + eachAsyncArray, + eachObject, + eachAsyncObject, + forOf, + forOfAsync, + ); + + class Chain { + constructor(methods) { + this.addChainMethod(methods); + } + addChainMethod(methods) { + const thisChain = this; + each(methods, (method, methodName) => { + thisChain[methodName] = function (...args) { + this.value = method.call(thisChain, thisChain.value, ...args); + return thisChain; + }; + }); + } + setValue(value) { + this.value = value; + return this; + } + done() { + const value = this.value; + this.value = null; + return value; + } + value = null; + } + /** + * Creates a chainable set of functions. + * + * @function chain + * @category function + * @type {Function} + * @param {Array|Object} config - The object to take methods from. + * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining. + * + * @example + * import { chain, assert } from '@universalweb/acid'; + * const chained = chain({ + * a(value, c) { + * return value + c; + * } + * }).setValue(2).a(1).done(); + * assert(chained, 3); + */ + function chain(config) { + return construct(Chain, [config]); + } + + /** + * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient. + * + * @function curry + * @category function + * @type {Function} + * @param {Function} callable - The function to curry. + * @param {Number} arity - The arity of method. + * @returns {*} - Returns the new curried function. + * + * @example + * import { curry, assert } from '@universalweb/acid'; + * const result = curry((a, b, c) => { + * return [a, b, c]; + * })(1)(2)(3); + * assert(result, [1, 2, 3]); + */ + function curry(callable, arity = callable.length) { + const curries = []; + const curried = (...curryArgs) => { + curries.push(...curryArgs); + if (curries.length === arity) { + const result = callable(...curries); + clearArray(curries); + return result; + } + return curried; + }; + return curried; + } + + /** + * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order. + * + * @function curryRight + * @type {Function} + * @param {Function} callable - The function to curry. + * @param {Number} arity - The arity of method. + * @returns {*} - Returns the new curried function. + * + * @example + * import { curryRight, assert } from '@universalweb/acid'; + * const result = curryRight((a, b, c) => { + * return [a, b, c]; + * })(1)(2)(3); + * assert(result, [3, 2, 1]); + */ + function curryRight(callable, arity = callable.length) { + const curries = []; + const curried = (...curryArgs) => { + curries.unshift(...curryArgs); + if (curries.length === arity) { + const result = callable(...curries); + clearArray(curries); + return result; + } + return curried; + }; + return curried; + } + + /** + * This method returns undefined. + * + * @function noop + * @category function + * @type {Function} + * @returns {undefined} - Returns undefined. + * + * @example + * import { noop, assert } from '@universalweb/acid'; + * assert(noop(), undefined); + */ + function noop() { + return; + } + + /** + * Iterates based on the amount given invoking the iteratee with the current index as an argument. + * + * @function times + * @category utility + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @returns {undefined} - Nothing. + * + * @example + * import { times } from '@universalweb/acid'; + * times(3, (item) => { + * console.log(item); + * }); + * // 0 + * // 1 + * // 2 + * // => undefined + */ + function times(amount, iteratee) { + for (let index = 0; index < amount; index++) { + iteratee(index); + } + } + /** + * Iterates based on the amount given and maps the results returned by the iteratee each time to an array. + * + * @function timesMap + * @category utility + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @param {Array} [results = []] - Array that will have iteratee return pushed to. + * @returns {Array} - An array with iteratee's returned values. + * + * @example + * import { timesMap } from '@universalweb/acid'; + * timesMap(3, (item) => { + * return item; + * }); + * // => [0, 1, 2] + */ + function timesMap(amount, iteratee, results = []) { + for (let index = 0; index < amount; index++) { + results[index] = iteratee(amount); + } + return results; + } + + class Timers { + list = construct(Map); + construct() {} + /** + * Remove a timer that was created using the timer function. + * + * @param {Number} id - The id of the timer to remove. + * @returns {undefined} - Returns nothing. + * + * @example + * import { timer, assert } from '@universalweb/acid'; + * timer(() => {}, 100); + * // => 0 + */ + remove(id) { + clearTimeout(id); + this.list.delete(id); + } + has(id) { + return this.list.has(id); + } + get(id) { + return this.list.get(id); + } + /** + * Create a timer and add it to the list of timers. + * + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setTimeoutId ID. + * + * @example + * import { timers, assert } from '@universalweb/acid'; + * timers.set(() => {}, 100); + * // => 0 + */ + set(callable, time) { + const currentThis = this; + const id = setTimeout(() => { + callable(); + currentThis.remove(id); + }, time); + this.list.set(id, true); + return id; + } + /** + * Clear all active timers. + * + * @returns {undefined} - Returns undefined. + * + * @example + * import { timers, assert } from '@universalweb/acid'; + * timers.clear(); + * // => undefined + */ + clear() { + const currentThis = this; + currentThis.list.forEach((id) => { + currentThis.remove(id); + }); + } + } + const timers = construct(Timers); + /** + * Timer wrapper. + * + * @function timer + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setTimeoutId ID. + * + * @example + * import { timer, assert } from '@universalweb/acid'; + * timer(() => {}, 100); + * // => 0 + */ + function timer(callable, time) { + return timers.set(callable, time); + } + /** + * Clear all active timers. + * + * @function clearTimers + * @category function + * @returns {undefined} - Returns undefined. + * + * @example + * import { clearTimers, assert } from '@universalweb/acid'; + * clearTimers(); + * // => undefined + */ + function clearTimers() { + const id = setTimeout(noop, 0); + times(id, (index) => { + timers.remove(index); + }); + } + + const applyNative = Reflect.apply; + /** + * Calls a target function with an optional "this" and optional arguments as specified. Same as Reflect.apply but with a function check. + * + * @function apply + * @category function + * @param {Function} target - The target function to call. + * @param {*} thisArgument - Array like object. + * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called. + * @returns {*} - The result of calling the given target function with the specified this value and arguments. + * + * @example + * import { apply, assert } from '@universalweb/acid'; + * assert(apply(function (a) {return a;}, undefined, [2]), 2); + */ + function apply(target, thisArgument, argumentsList) { + if (isFunction(target)) { + return applyNative(target, thisArgument, argumentsList); + } + } + + /** + * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer. + * + * @function debounce + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Function} - The debounced function. + * + * @example + * import { debounce, promise, assert } from '@universalweb/acid'; + * const promised = promise((a) => { + * const debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0); + * }); + * assert(await promised(), 'debounced'); + */ + function debounce(callable, time) { + function debounced(...args) { + if (debounced.id !== false) { + timers.remove(debounced.id); + } + debounced.id = timer(() => { + debounced.callable(...args); + debounced.id = false; + }, time); + } + debounced.id = false; + debounced.callable = callable.bind(debounced); + debounced.clear = () => { + if (debounced.id !== false) { + timers.remove(debounced.id); + debounced.id = false; + } + }; + return debounced; + } + + /** + * Checks if the given method is a function. If it is then it invokes it with the given arguments. + * + * @function ifInvoke + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked if possible. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args - Arguments to pass to the function. + * @returns {*} - Returns the method invoked or undefined. + * + * @example + * import { ifInvoke, assert } from '@universalweb/acid'; + * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]); + */ + function ifInvoke(callable, thisBind, ...args) { + if (isFunction(callable)) { + if (thisBind) { + return callable.call(thisBind, ...args); + } + return callable(...args); + } + } + + /** + * Creates a function that negates the result of the predicate callable. + * + * @function negate + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @returns {*} - Returns the given methods result. + * + * @example + * negate(() => { return false;})(); + * // => true + */ + function negate(callable) { + return (...args) => { + return !callable(...args); + }; + } + + /** + * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned. + * + * @function nthArg + * @category function + * @type {Function} + * @param {Number} [index = 0] - The index of the argument to return. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * nthArg(1)('a', 'b'); + * // => 'b' + */ + function nthArg(index = 0) { + return (...args) => { + return args[index]; + }; + } + + /** + * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function. + * + * @function once + * @category function + * @type {Function} + * @param {Function} callable - The function to be called. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * const onceOnly = once((item) => { return item;}); + * onceOnly(5); + * onceOnly(3); + * // => 5 + */ + const once = (callable) => { + let value; + const onlyOnce = (...args) => { + if (!hasValue(value)) { + value = callable(...args); + } + return value; + }; + return onlyOnce; + }; + + /** + * Returns the constructor of an object. + * + * @function getType + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { getType, assert } from '@universalweb/acid'; + * assert(getType(1), true); + */ + function getType(source) { + return source?.constructor; + } + + /** + * Returns a new empty object of the same type. + * + * @function cloneType + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { cloneType, assert } from '@universalweb/acid'; + * assert(cloneType([1]), []); + */ + function cloneType(source, args = []) { + const sourceType = getType(source); + if (sourceType === Function) { + if (sourceType.name === "function") { + return function () {}; + } + } + return construct(sourceType, args); + } + + /** + * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object. + * + * @function forOfCompactMap + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => { + * return item; + * }); + * // => {b: 2, c: 3} + */ + function forOfMap(source, iteratee = returnValue, resultsObject) { + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = iteratee(value, results, source); + methodPushBound(result); + } + return results; + } + const methodSet = isFunction(results.set); + for (const [key, value] of source) { + const result = iteratee(value, key, results, source); + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + return results; + } + + /** + * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function forOfCompactMapAsync + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * import { forOfCompactMapAsync, assert } from '@universalweb/acid'; + * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => { + * return item; + * }), {b: 2, c: 3}); + */ + async function forOfMapAsync( + source, + iteratee = returnValue, + resultsObject, + generatorArgs, + ) { + if (isGenerator(source)) { + const resultsGenerator = []; + for await (const item of source(...generatorArgs)) { + resultsGenerator.push(await iteratee(item, resultsGenerator, source)); + } + return resultsGenerator; + } + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = await iteratee(value, results, source); + methodPushBound(result); + } + return results; + } + const methodSet = isFunction(results.set); + for await (const [key, value] of source) { + const result = await iteratee(value, key, results, source); + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + return results; + } + + /** + * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. + * + * @function mapObjectAsync + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function|undefined} - An object of the same calling object's type. + * + * @example + * import { mapAsyncObject, assert } from '@universalweb/acid'; + * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, b: undefined, c: 3}); + */ + async function mapAsyncObject(source, iteratee, results = {}) { + if (!source) { + return; + } + await eachAsyncObject( + source, + async (item, key, thisObject, propertyCount, objectKeys) => { + results[key] = await iteratee( + item, + key, + results, + thisObject, + propertyCount, + objectKeys, + ); + }, + ); + return results; + } + + /** + * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. + * + * @function mapObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Object|Function|undefined} - An object of the same calling object's type. + * + * @example + * import { mapObject, assert } from '@universalweb/acid'; + * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, b: undefined, c: 3}); + */ + function mapObject(source, iteratee, results = {}, thisCall, additionalArg) { + if (!source) { + return; + } + if (hasValue(thisCall)) { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + results[key] = iteratee.call( + thisCall, + item, + key, + results, + original, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } else { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + results[key] = iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } + return results; + } + + /** + * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object. + * + * @function map + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {Object | Function} [results = {}] - Object that will be used to assign results. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array | object | Function} - A new object of the same calling object's type. + * + * @example + * import { map, assert } from '@universalweb/acid'; + * assert(map({a: 1, b: 2, c: 3}, (item) => { + * return item * 2; + * }), {a: 2, b: 4, c: 6}); + */ + const map = generateLoop( + mapArray, + mapAsyncArray, + mapObject, + mapAsyncObject, + forOfMap, + forOfMapAsync, + ); + + /** + * Creates a function that invokes iteratee with the arguments it receives and returns their results. + * + * @function over + * @category function + * @type {Function} + * @param {(Array.|Object.)} iteratees - The list of functions to loop through. + * @returns {Function} - Returns the new over wrapped function. + * + * @example + * import { overEvery, assert } from '@universalweb/acid'; + * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]); + */ + function over(iteratees) { + return (...args) => { + return map(iteratees, (item) => { + return item(...args); + }); + }; + } + + /** + * Iterates through the given object while the iteratee returns true. + * + * @function everyAsyncObject + * @category object + * @type {Function} + * @param {Object} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { everyAsyncObject, assert } from '@universalweb/acid'; + * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => { + * return item; + * }); + * assert(result, true); + */ + async function everyAsyncObject(source, iteratee) { + if (!source) { + return; + } + const objectKeys = keys(source); + return everyAsyncArray( + objectKeys, + (key, index, original, propertyCount) => { + return iteratee(source[key], key, source, propertyCount, original); + }, + ); + } + + /** + * Iterates through the given object while the iteratee returns true. + * + * @function everyObject + * @category object + * @type {Function} + * @param {Object} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { everyObject, assert } from '@universalweb/acid'; + * const result = everyObject({a: true, b: true, c: true}, (item) => { + * return item; + * }); + * assert(result, true); + */ + function everyObject(source, iteratee) { + if (!source) { + return; + } + const objectKeys = keys(source); + return everyArray(objectKeys, (key, index, original, propertyCount) => { + return iteratee(source[key], key, source, propertyCount, original); + }); + } + + /** + * Iterates (for of) through the given object while the iteratee returns true using a for of loop. + * + * @function forOfEvery + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { every, assert } from '@universalweb/acid'; + * assert(forOfEvery({a: false, b: true, c: true}, (item) => { + * return item; + * }), false); + */ + function forOfEvery(source, iteratee = returnValue) { + if (isArray(source) || isSet(source)) { + for (const value of source) { + const result = iteratee(value, source); + if (result === false) { + return false; + } + } + } else { + for (const [key, value] of source) { + const result = iteratee(value, key, source); + if (result === false) { + return false; + } + } + } + return true; + } + + /** + * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop. + * + * @function forOfEveryAsync + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { every, assert } from '@universalweb/acid'; + * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => { + * return item; + * }), false); + */ + async function forOfEveryAsync( + source, + iteratee = returnValue, + generatorArgs, + ) { + if (isGenerator(source)) { + for await (const item of source(...generatorArgs)) { + const result = await iteratee(item, source); + if (result === false) { + return false; + } + } + } else if (isArray(source) || isSet(source)) { + for (const value of source) { + const result = await iteratee(value, source); + if (result === false) { + return false; + } + } + } else { + for (const [key, value] of source) { + const result = await iteratee(value, key, source); + if (result === false) { + return false; + } + } + } + return true; + } + + /** + * Iterates through the given object while the iteratee returns true. + * + * @function every + * @category utility + * @type {Function} + * @param {Object | Array | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { every, assert } from '@universalweb/acid'; + * assert(every({a: false, b: true, c: true}, (item) => { + * return item; + * }), false); + */ + const every = generateLoop( + everyArray, + everyAsyncArray, + everyObject, + everyAsyncObject, + forOfEvery, + forOfEveryAsync, + ); + + /** + * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives. + * + * @function overEvery + * @category function + * @type {Function} + * @param {(Array.|Object.)} predicates - The list of functions to loop through. + * @returns {Function} - Returns the new overEvery wrapped function. + * + * @example + * import { overEvery, assert } from '@universalweb/acid'; + * assert(overEvery([Boolean, isFinite])('1'), true); + */ + function overEvery(predicates) { + return (arg) => { + return every(predicates, (predicate) => { + return predicate(arg); + }); + }; + } + + /** + * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on. + * + * @function reArg + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Array} indexes - The arranged argument indexes. + * @returns {Function} - Returns the new function. + * + * @example + * reArg((a, b, c) => { + * return [a, b, c]; + * }, [1,2,0])(1,2,3); + * // => [2, 3, 1] + */ + function reArg(callable, indexes) { + return (...args) => { + return callable( + ...indexes.map((item) => { + return args[item]; + }), + ); + }; + } + + /** + * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer. + * + * @function throttle + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Function|undefined} - The throttled function. + * + * @example + * const throttled = throttle(() => { console.log('throttle'); }, 0)(); + * throttled(); + * // 'throttle' + */ + function throttle(callable, time) { + function throttled(...args) { + if (throttled.id) { + throttled.shouldThrottle = true; + return; + } + throttled.callable(...args); + throttled.id = timer(() => { + if (throttled.shouldThrottle) { + throttled.callable(...args); + } + throttled.id = false; + }, time); + } + throttled.id = false; + throttled.callable = callable.bind(throttled); + throttled.clear = () => { + timers.remove(throttled.id); + throttled.id = false; + }; + return throttled; + } + + /** + * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function. + * + * @function wrap + * @category function + * @type {Function} + * @param {*} value - The value to wrap. + * @param {Function} wrapper - The wrapper function. + * @returns {Function} - The new function. + * + * @example + * wrap('Lucy', (firstName, lastName) => { + * return `My name is ${firstName} ${lastName}.`; + * })('Diamonds'); + * // => 'My name is Lucy Diamonds.' + */ + function wrap(value, wrapper) { + return (...arg) => { + return wrapper(value, ...arg); + }; + } + + const functionPrototype = Function.prototype; + /** + * Caches a prototype method. + * + * @function cacheNativeMethod + * @category utility + * @type {Function} + * @param {Function} method - Prototype method. + * @returns {Function} - Cached method. + * + * @example + * import { cacheNativeMethod, assert } from '@universalweb/acid'; + * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1); + */ + function cacheNativeMethod(method) { + return functionPrototype.call.bind(method); + } + + /** + * Returns an array of all properties (enumerable or not) found directly upon a given object. + * + * @function getPropNames + * @category object + * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned. + * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object. + * + * @example + * import { getPropNames, assert } from '@universalweb/acid'; + * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']); + */ + const getPropNames = Object.getOwnPropertyNames; + /** + * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object. + * + * @function getPropDesc + * @category object + * @param {Object} target - The target object. + * @param {String} property - The name of the property whose description is to be retrieved. + * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise. + * + * @example + * getPropDesc({ bar: 42 }, 'bar'); + * // => { configurable: true, enumerable: true, value: 42, writable: true } + */ + const getPropDesc = Object.getOwnPropertyDescriptor; + /** + * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object. + * + * @function defProp + * @category object + * @param {Object} target - The object on which to define the property. + * @param {String} property - The name of the property whose description is to be retrieved. + * @param {Object} descriptor - The descriptor for the property being defined or modified. + * @returns {Object} - The object that was passed to the function. + * + * @example + * defProp({}, 'key', { + * enumerable: false, + * configurable: false, + * writable: false, + * value: 'static' + * }).key; + * // => 'static' + */ + const defProp = Object.defineProperty; + const hasProp = cacheNativeMethod(Object.hasOwnProperty); + + /** + * Determines whether two values are the same value. + * + * @function isSame + * @category object + * @param {*} source - Value to compare to. + * @param {*} target - A value to compare. + * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value. + * + * @example + * import { isSame, assert } from '@universalweb/acid'; + * assert(isSame('foo', 'foo'), true); + */ + const isSame = Object.is; + + /** + * Adds two numbers. + * + * @function add + * @category math + * @type {Function} + * @param {Number} augend - First number. + * @param {Number} addend - Second number which is being added to another (augend). + * @returns {Number} - Returns the sum of the arguments. + * + * @example + * import { add, assert } from '@universalweb/acid'; + * assert(add(1, 1), 2); + */ + function add(augend, addend) { + return augend + addend; + } + + /** + * Decrements a number. + * + * @function deduct + * @category math + * @type {Function} + * @param {Number} source - First number. + * @returns {Number} - Returns a decremented version of the number. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + * deduct(10); + * // => 9 + */ + function deduct(source) { + return source - 1; + } + + /** + * Divides two numbers. + * + * @function divide + * @category math + * @type {Function} + * @param {Number} source - First number. + * @param {Number} value - Second number. + * @returns {Number} - Returns the quotient of the arguments. + * + * @example + * import { divide, assert } from '@universalweb/acid'; + * assert(divide(10, 5), 2); + */ + function divide(source, value) { + return source / value; + } + + /** + * Increments a number. + * + * @function increment + * @category math + * @type {Function} + * @param {Number} source - First number. + * @returns {Number} - Returns an incremented version of the number. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + * increment(10); + * // => 11 + */ + function increment(source) { + return source + 1; + } + + /** + * Multiplies two numbers. + * + * @function multiply + * @category math + * @type {Function} + * @param {Number} source - First number. + * @param {Number} value - Second number. + * @returns {Number} - Returns the product of the arguments. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + */ + function multiply(source, value) { + return source * value; + } + + /** + * Calculate the progress from a given total and current amount. + * + * @function calcProgress + * @category utility + * @type {Function} + * @param {Number} total - The total amount. + * @param {Number} currentAmount - The current amount. + * @returns {Number} - The progress as a percentage. + * + * @example + * import { calcProgress, assert } from '@universalweb/acid'; + * assert(calcProgress(100, 1), 1); + */ + function calcProgress(total, currentAmount) { + if (total === 0) { + return false; + } + if (currentAmount === 0) { + return 0; + } + return (currentAmount / total) * 100; + } + + const { random } = Math; + /** + * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption.. + * + * @function randomFloat + * @category math + * @type {Function} + * @param {Number} max - Establishes highest possible value for the random number. + * @param {Number} [min = 0] - Establishes lowest possible value for the random number. + * @returns {Number} - Returns random integer between the max and min range. + * + * @example + * import { randomFloat, assert } from '@universalweb/acid'; + * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;}); + * // => 9.1 + */ + function randomFloat(max, min = 0) { + return random() * (max - min) + min; + } + + /** + * Extracts the remainder between two numbers. + * + * @function remainder + * @category math + * @type {Function} + * @param {Number} source - First number. + * @param {Number} value - Second number. + * @returns {Number} - Returns the remainder of the arguments. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + * remainder(10, 6); + * // => 4 + */ + function remainder(source, value) { + return source % value; + } + + /** + * Subtract all numbers in the array starting from left to right & return the difference. + * + * @function subtractAll + * @category math + * @type {Function} + * @param {Number[]} source - Array of numbers. + * @returns {Number} - Returns the final difference. + * + * @example + * import { subtractAll, assert } from '@universalweb/acid'; + * assert(subtractAll([10, 1, 2, 3]), 5); + */ + function subtractAll(source) { + return source.reduce((a, b) => { + return a - b; + }, 0); + } + + /** + * Sum all numbers in a given array. + * + * @function sumAll + * @category math + * @type {Function} + * @param {Number[]} source - Array of numbers. + * @returns {Number} - Returns a single number. + * + * @example + * import { sumAll, assert } from '@universalweb/acid'; + * assert(sumAll([10, 1, 2, 3]), 5); + */ + function sumAll(source) { + return source.reduce((a, b) => { + return a + b; + }, 0); + } + + /** + * Checks if a number is within a range. + * + * @function isNumberInRange + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @param {Number} start - Beginning of range. + * @param {Number} end - End of range. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumberInRange, assert } from '@universalweb/acid'; + * assert(isNumberInRange(1, 0, 2), true); + * assert(isNumberInRange(1, 2, 5), false); + */ + function isNumberInRange(source, start, end) { + return source > start && source < end; + } + + /** + * Checks if a number is within a range. + * + * @function isNumberNotInRange + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @param {Number} start - Beginning of range. + * @param {Number} end - End of range. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumberNotInRange, assert } from '@universalweb/acid'; + * assert(isNumberNotInRange(1, 0, 2), false); + * assert(isNumberNotInRange(1, 2, 5), true); + */ + function isNumberNotInRange(source, start, end) { + return source < start || source > end; + } + + /** + * Checks if a number is negative & returns true or false. + * + * @function isPositive + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isPositive, assert } from '@universalweb/acid'; + * assert(isPositive(1), true); + */ + const { sign } = Math; + function isPositive(source) { + return sign(source) === 1; + } + + /** + * Strictly checks if a number is zero. + * + * @function isZero + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isZero, assert } from '@universalweb/acid'; + * assert(isZero(0), true); + */ + function isZero(source) { + return source === 0; + } + + /** + * Checks if a number is odd & returns true or false. + * + * @function isOdd + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isOdd, assert } from '@universalweb/acid'; + * assert(isOdd(1), true); + */ + function isOdd(source) { + return (source & 1) === 1; + } + + /** + * Checks if a number is even & returns true or false. + * + * @function isEven + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEven, assert } from '@universalweb/acid'; + * assert(isEven(1), true); + */ + function isEven(source) { + return (source & 1) === 0; + } + + const objectEntries = Object.entries; + /** + * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error. + * + * @function getEntries + * @category object + * @param {Object} source - The source object. + * @returns {Array|undefined} - Returns the Object.entries of the source object. + * + * @example + * import { getEntries, assert } from '@universalweb/acid'; + * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]); + */ + function getEntries(source) { + if (hasValue(source)) { + return objectEntries(source); + } + } + + /** + * Extracts all keys from an object whose values are not null or undefined. + * + * @function compactKeys + * @category object + * @type {Function} + * @param {Object} object - Object from which keys are extracted. + * @returns {Array} - Returns an array of key values. + * + * @example + * import { compactKeys, assert } from '@universalweb/acid'; + * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']); + */ + function compactKeys(object) { + const compactedKeys = []; + eachObject(object, (item, key) => { + if (hasValue(item)) { + compactedKeys.push(key); + } + }); + return compactedKeys; + } + + /** + * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function compactMapAsyncObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with mapped properties that are not null or undefined. + * + * @example + * import { compactMapAsyncObject, assert } from '@universalweb/acid'; + * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, c: 3}); + */ + async function compactMapAsyncObject( + source, + iteratee = returnValue, + results = {}, + ) { + await eachAsyncObject( + source, + async (item, key, original, propertyCount, objectKeys) => { + const result = await iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + ); + if (hasValue(result)) { + results[key] = result; + } + }, + ); + return results; + } + + /** + * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function compactMapObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with mapped properties that are not null or undefined. + * + * @example + * import { compactMapObject, assert } from '@universalweb/acid'; + * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, c: 3}); + */ + function compactMapObject(source, iteratee = returnValue, results = {}) { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + const result = iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + ); + if (hasValue(result)) { + results[key] = result; + } + }); + return results; + } + + /** + * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. + * + * @function filterObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with properties that passed the test. + * + * @example + * filterObject({a: false, b: true, c: true}, (item) => { + * return item; + * }); + * // => {b: true, c: true} + */ + function filterObject(source, iteratee, results = {}) { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + if ( + iteratee(item, key, results, original, propertyCount, objectKeys) === + true + ) { + results[key] = item; + } + }); + return results; + } + + /** + * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. + * + * @function filterAsyncObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with properties that passed the test. + * + * @example + * filterAsyncObject({a: false, b: true, c: true}, (item) => { + * return item; + * }); + * // => {b: true, c: true} + */ + async function filterAsyncObject(source, iteratee, results = {}) { + await eachAsyncObject( + source, + async (item, key, original, propertyCount, objectKeys) => { + if ( + (await iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + )) === true + ) { + results[key] = item; + } + }, + ); + return results; + } + + /** + * Creates an inverted version of a given object by switching it's keys and values. + * + * @function invert + * @type {Function} + * @category object + * @param {Object} source - Object to be inverted. + * @param {Array} [target = {}] - Empty object to be populated with inverted values from source. + * @returns {Object|undefined} - Returns object with keys and values switched. + * + * @example + * import { invert, assert } from '@universalweb/acid'; + * assert(invert({a:1}), {1:'a'}); + */ + function invert(source, target = {}) { + if (!source) { + return; + } + eachObject(source, (item, key) => { + target[item] = key; + }); + return target; + } + + /** + * Performs a shallow strict comparison between two objects. + * + * @function isMatchObject + * @type {Function} + * @category object + * @param {Object} source - Source object. + * @param {Object} target - Object to compare to source. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { assert, isMatchObject } from '@universalweb/acid'; + * assert(isMatchObject({a: 1}, {a: 1}), true); + */ + const isMatchObject = (source, target) => { + if (source === target) { + return true; + } + const sourceKeys = keys(source); + const targetKeys = keys(target); + if (sourceKeys.length === targetKeys.length) { + return everyArray(sourceKeys, (key) => { + return source[key] === target[key]; + }); + } + return false; + }; + + /** + * Returns a regex safe special characters escaped version of a string. + * + * @function regexSafe + * @category regex + * @type {Function} + * @param {Object} source - String to make safe. + * @returns {Object} - Returns a regex safe version of the string. + * + * @example + * import { regexSafe, assert } from '@universalweb/acid'; + * assert(regexSafe(/.+/), '\/\.\+\/'); + */ + const escapeRegexRegex = /[()[\]{}*+?^$|#.,/\\\s-]/g; + function escapeRegex(source) { + return source.replace(escapeRegexRegex, "\\$&"); + } + + /** + * Convert array of strings to regex. + * + * @function arrayToRegex + * @category regex + * @type {Function} + * @param {Object} source - Array of strings. + * @returns {Object} - Returns a regex safe version of the string. + * + * @example + * import { arrayToRegex, assert } from '@universalweb/acid'; + * assert(String(arrayToRegex(['a','b'])), String(/a|b/)); + */ + function arrayToRegex(source, makeSafe) { + if (makeSafe) { + return arrayToRegex(mapArray(source, escapeRegex)); + } + return RegExp(source.join("|")); + } + + /** + * Checks if the value is a RegExp. + * + * @function isRegex + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isRegex, assert } from '@universalweb/acid'; + * assert(isRegex(/test/), true); + */ + const isRegexCall = isConstructorNameFactory("RegExp"); + const isRegex = isTypeFactory(isRegexCall); + + /** + * Returns a clone of the given object without the given properties. + * + * @function omit + * @category object + * @type {Function} + * @param {Object} source - Object from which keys are extracted. + * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object. + * @returns {Object|undefined} - A new object with the removed. + * + * @example + * import { omit, assert } from '@universalweb/acid'; + * assert(omit({a:1, b:2}, ['a']), {b:2}); + * assert(omit({a:1, b:2}, 'a'), {b:2}); + * assert(omit({1:'test', b:2}, 1), {b:2}); + */ + function omit(source, blacklist) { + if (!source) { + return {}; + } + if (isArray(blacklist)) { + const blacklistRegex = arrayToRegex(blacklist); + return filterObject(source, (item, key) => { + return !blacklistRegex.test(key); + }); + } + if (isRegex(blacklist)) { + return filterObject(source, (item, key) => { + return !blacklist.test(key); + }); + } + if (isString(blacklist)) { + return filterObject(source, (item, key) => { + return key !== blacklist; + }); + } + if (isNumber(blacklist)) { + const numberToString = blacklist.toString(); + return filterObject(source, (item, key) => { + return key !== numberToString; + }); + } + if (isFunction(blacklist)) { + return filterObject(source, (item, key) => { + return !blacklist(item, key); + }); + } + return objectAssign({}, source); + } + + /** + * Returns a clone of the source object with the plucked properties. + * + * @function pick + * @type {Function} + * @category object + * @param {Object} source - Object to be cloned. + * @param {Array} whitelist - Array of property names used to determine what values to pluck. + * @param {Object} [target = {}] - Object to be populated with plucked values. + * @returns {Object|undefined} - A new object with plucked properties. + * + * @example + * import { pick, assert } from '@universalweb/acid'; + * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2}); + */ + const pick = (source, whitelist, target = {}) => { + if (!source) { + return; + } + eachArray(whitelist, (item) => { + target[item] = source[item]; + }); + return target; + }; + + /** + * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object. + * + * @function objectSize + * @category object + * @param {Object} source - The source object. + * @returns {Number|undefined} - The amount of keys. + * + * @example + * import { objectSize, assert } from '@universalweb/acid'; + * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3); + */ + function objectSize(source) { + if (!source) { + return; + } + if (isPlainObject(source)) { + return keys(source).length; + } + const objectLengthProperty = source.length; + if (hasValue(objectLengthProperty)) { + return objectLengthProperty; + } + const objectSizeProperty = source.size; + if (hasValue(objectLengthProperty)) { + return objectSizeProperty; + } + return keys(source).length; + } + + /** + * Creates an object from two arrays, one of property identifiers and one of corresponding values. + * + * @function zipObject + * @type {Function} + * @category object + * @param {Array} properties - The property identifiers. + * @param {Array} values - The property values. + * @returns {Object} - Returns the new object. + * + * @example + * zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + const zipObject = (properties, values) => { + const source = {}; + eachArray(properties, (item, key) => { + source[item] = values[key]; + }); + return source; + }; + /** + * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. + * + * @function unZipObject + * @type {Function} + * @category object + * @param {Object} object - The object to process. + * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array. + * + * @example + * unZipObject({ 'a': 1, 'b': 2 }); + * // => [['a', 'b'], [1, 2]] + */ + const unZipObject = (object) => { + const objectKeys = []; + const objectValues = []; + eachObject(object, (item, key) => { + objectKeys.push(key); + objectValues.push(item); + }); + return [objectKeys, objectValues]; + }; + + const normalizeCase$4 = /[ _-]+/g; + /** + * Converts a string into Camel case format. + * + * @function camelCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into Camel case. + * @returns {String} - Converted string in Camel case. + * + * @example + * import { camelCase, assert } from '@universalweb/acid'; + * assert(camelCase('camel case'), 'camelCase'); + */ + function camelCase(source) { + let result = ""; + source + .replace(normalizeCase$4, " ") + .trim() + .split(" ") + .forEach((item, index) => { + if (index === 0) { + result += item.toLowerCase(); + } else { + result += item[0].toUpperCase() + item.slice(1).toLowerCase(); + } + }); + return result; + } + + const normalizeCase$3 = /[ _-]+/g; + const space$1 = /[ ]+/g; + /** + * Converts a string into single space sepperated words in Kebab case. + * + * @function kebabCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into Kebab case. + * @returns {String} - Converted string in Kebab case. + * + * @example + * import { kebabCase, assert } from '@universalweb/acid'; + * assert(kebabCase('kebab case'), 'kebab-case'); + */ + function kebabCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase$3, " ") + .trim() + .toLowerCase() + .replace(space$1, "-"); + } + + const normalizeCase$2 = /[ _-]+/g; + const space = /[ ]+/g; + /** + * Converts a string into single space sepperated words in snake case. + * + * @function snakeCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into snake case. + * @returns {String} - Converted string in Snake case. + * + * @example + * import { snakeCase, assert } from '@universalweb/acid'; + * assert(snakeCase('snake case'), 'snake_case'); + */ + function snakeCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase$2, " ") + .trim() + .toLowerCase() + .replace(space, "_"); + } + + const normalizeCase$1 = /[ _-]+/g; + /** + * Converts a string into single space sepperated words in uppercase. + * + * @function upperCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into upper case. + * @returns {String} - Converted string in upper case. + * + * @example + * import { upperCase, assert } from '@universalweb/acid'; + * assert(upperCase('upper-case'), 'UPPER CASE'); + * assert(upperCase('upper_case'), 'UPPER CASE'); + */ + function upperCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase$1, " ") + .trim() + .toUpperCase(); + } + + const normalizeCase = /[ _-]+/g; + /** + * Converts a string into single space sepperated words in lowerCase. + * + * @function lowerCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into upper case. + * @returns {String} - Converted string in upper case. + * + * @example + * import { lowerCase, assert } from '@universalweb/acid'; + * assert(lowerCase('lower-CASE'), 'lower case'); + */ + function lowerCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase, " ") + .trim() + .toLowerCase(); + } + + /** + * Inserts text into a string at a given position. + * + * @function insertInRange + * @category string + * @type {Function} + * @param {String} string - String to insert the text into. + * @param {Number} index - Point of insertion. + * @param {String} text - The string to be inserted. + * @returns {String} - The string with the text inserted at the given point. + * + * @example + * import { insertInRange, assert } from '@universalweb/acid'; + * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.'); + */ + function insertInRange(string, index, text) { + return string.slice(0, index) + text + string.slice(index, string.length); + } + /** + * Plucks a letter using the index starting from the right. + * + * @function rightString + * @category string + * @type {Function} + * @param {String} string - String to extract the letter from. + * @param {Number} [index=1] - The starting position. + * @returns {String} - A letter at the given index. + * + * @example + * import { rightString, assert } from '@universalweb/acid'; + * assert(rightString('rightString'), 'g'); + * assert(rightString('rightString', 2), 'n'); + */ + function rightString(string, index = 1) { + return string[string.length - index]; + } + /** + * Splits up a string into chunks. + * + * @function chunkString + * @category string + * @type {Function} + * @param {String} string - String to chunked. + * @param {Number} [size] - The max string length per chunk. + * @returns {Array} - An array with strings that are <= size parameter. + * + * @example + * import { chunkString, assert } from '@universalweb/acid'; + * assert(chunkString('chunk', 2), ['ch', 'un', 'k']); + */ + function chunkString(string, size) { + return string.match(new RegExp(`(.|[\r\n]){1,${size}}`, "g")); + } + /** + * Truncates everything before the index starting from the right. + * + * @function initialString + * @category string + * @type {Function} + * @param {String} string - String to extract the initial letters from. + * @param {Number} [index=1] - Starting point from the right. + * @returns {String} - A string with the characters before the index starting from the right. + * + * @example + * import { initialString, assert } from '@universalweb/acid'; + * assert(initialString('initialString', 2), 'initialStri'); + */ + function initialString(string, index = 1) { + return string.slice(0, index * -1); + } + /** + * Truncates everything after a index. + * + * @function restString + * @category string + * @type {Function} + * @param {String} string - String to extract the rest of the letters from. + * @param {Number} [index=1] - Starting point. + * @returns {String} - A string without the characters up-to to the index. + * + * @example + * import { restString, assert } from '@universalweb/acid'; + * assert(restString('restString', 2), 'stString'); + */ + function restString(string, index = 1) { + return string.substring(index); + } + + /** + * Replaces all occurrences of strings in an array with a value. + * + * @function replaceList + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @param {Array} words - Strings to replace. + * @param {String} value - The match replacement. + * @returns {String} - The string with the replacement. + * + * @example + * import { replaceList, assert } from '@universalweb/acid'; + * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.'); + */ + function replaceList(string, words, value) { + return string.replace(new RegExp(`\\b${words.join("|")}\\b`, "gi"), value); + } + + const rawURLDecodeRegex = /%(?![\da-f]{2})/gi; + const andRegex = /&/g; + const lessThanRegex = //g; + const doubleQuoteRegex = /"/g; + /** + * Raw URL decoder. + * + * @function rawURLDecode + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @returns {String} - Converted string into the decoded URI Component . + * + * @example + * import { rawURLDecode, assert } from '@universalweb/acid'; + * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.'); + */ + function rawURLDecode(string) { + return decodeURIComponent( + string.replace(rawURLDecodeRegex, () => { + return "%25"; + }), + ); + } + /** + * Replaced sensitive characters with their matching html entity. + * + * @function htmlEntities + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @returns {String} - Replaced string. + * + * @example + * import { htmlEntities, assert } from '@universalweb/acid'; + * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`); + */ + function htmlEntities(string) { + return string + .replace(andRegex, "&") + .replace(lessThanRegex, "<") + .replace(moreThanRegex, ">") + .replace(doubleQuoteRegex, """); + } + /** + * Executes rawURLDecode followd by htmlEntities methods on a string. + * + * @function sanitize + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @returns {String} - Replaced string. + * + * @example + * import { sanitize, assert } from '@universalweb/acid'; + * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`); + */ + function sanitize(string) { + return htmlEntities(rawURLDecode(string)); + } + + const tokenizeRegEx = /\S+/g; + const wordsRegEx = /\w+/g; + /** + * Break string by non-white space characters matches. + * + * @function tokenize + * @type {Function} + * @category string + * @param {String} string - String to be broken up. + * @returns {Array} - Array of words without white space characters. + * + * @example + * import { tokenize, assert } from '@universalweb/acid'; + * assert(tokenize('I am Lucy!'), ["I", "am", "Acid!"]); + */ + function tokenize(string) { + return string.match(tokenizeRegEx) || []; + } + /** + * Break string into word matches. + * + * @function words + * @type {Function} + * @param {String} string - String to be broken up. + * @returns {Array} - Array of words with word characters only. + * + * @example + * import { words, assert } from '@universalweb/acid'; + * assert(words('I am Acid!'), ["I", "am", "Acid"]); + */ + function words(string) { + return string.match(wordsRegEx) || []; + } + + const truncateDown = (string, maxLength, stringLength) => { + const breakAll = string.split(""); + const breakAllLength = breakAll.length; + let item; + let index = stringLength - maxLength; + for (; index < breakAllLength && index >= 0; index--) { + item = breakAll[index]; + if (item === " ") { + break; + } + } + return string.slice(0, index).trim(); + }; + const truncateUp = (string, maxLength, stringLength) => { + const breakAll = string.split(""); + const breakAllLength = breakAll.length; + let item; + let index = maxLength; + for (; index < breakAllLength && index > 0; index++) { + item = breakAll[index]; + if (item === " ") { + break; + } + } + return string.substring(index, stringLength).trim(); + }; + /** + * Truncates the string, accounting for word placement and character count. + * + * @function truncate + * @type {Function} + * @category string + * @param {String} string - String to be truncated. + * @param {Number} maxLength - The desired max length of the string. + * @returns {String} - The mutated string. + * + * @example + * import { truncate, assert } from '@universalweb/acid'; + * assert(truncate('Where is Lucy?', 2), 'Where is'); + */ + function truncate(string, maxLength) { + const stringLength = string.length; + return stringLength > maxLength + ? truncateDown(string, maxLength, stringLength) + : string; + } + /** + * Truncates the string, accounting for word placement and character count from the right. + * + * @function truncateRight + * @type {Function} + * @category string + * @param {String} string - String to be truncated. + * @param {Number} maxLength - The desired max length of the string. + * @returns {String} - The mutated string. + * + * @example + * import { truncateRight, assert } from '@universalweb/acid'; + * assert(truncateRight('Where is Lucy?', 6), 'Lucy?'); + */ + function truncateRight(string, maxLength) { + const stringLength = string.length; + return stringLength > maxLength + ? truncateUp(string, maxLength, stringLength) + : string; + } + + const getWords = /\w+/g; + /** + * Returns the first letter capitalized. + * + * @function upperFirstLetter + * @type {Function} + * @category string + * @param {String} string - String to extract first letter from. + * @returns {String} - An upper case letter. + * + * @example + * import { upperFirstLetter, assert } from '@universalweb/acid'; + * assert(upperFirstLetter('upper'), 'U'); + */ + function upperFirstLetter(string) { + return string[0].toUpperCase(); + } + /** + * Capitalizes the first letter. + * + * @function upperFirst + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with first letter capitalized. + * + * @example + * import { upperFirst, assert } from '@universalweb/acid'; + * assert(upperFirstLetter('upper'), 'U'); + * upperFirst('upper'); + * // => 'Upper' + */ + function upperFirst(string) { + return upperFirstLetter(string) + restString(string); + } + /** + * Capitalize first letter and lower case the rest. + * + * @function upperFirstOnly + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with first letter capitalized. + * + * @example + * import { upperFirstOnly, assert } from '@universalweb/acid'; + * assert(upperFirstOnly('upper'), 'Upper'); + */ + function upperFirstOnly(string) { + return upperFirstLetter(string) + restString(string).toLowerCase(); + } + /** + * Capitalize all first letters. + * + * @function upperFirstAll + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with all first letters capitalized. + * + * @example + * import { upperFirstAll, assert } from '@universalweb/acid'; + * assert(upperFirstAll('uPPer'), 'UPPer'); + */ + function upperFirstAll(string) { + return string.replace(getWords, (match) => { + return upperFirst(match); + }); + } + /** + * Capitalize all first letters and lower case the rest. + * + * @function upperFirstOnlyAll + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with all first letters capitalized. + * + * @example + * import { upperFirstOnlyAll, assert } from '@universalweb/acid'; + * assert(upperFirstOnlyAll('this is'), 'This Is'); + */ + function upperFirstOnlyAll(string) { + return string.replace(getWords, (match) => { + return upperFirstOnly(match); + }); + } + + /** + * Returns the constructor name of an object. + * + * @function getTypeName + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { getTypeName, assert } from '@universalweb/acid'; + * assert(getTypeName(1), true); + */ + function getTypeName(source) { + return getType(source)?.name; + } + + /** + * Checks if the value is an Arguments object. + * + * @function isArguments + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArguments, assert } from '@universalweb/acid'; + * assert(isArguments((function() { return arguments;})()), true); + * assert(isArguments([]), false); + */ + const objectArguments = "[object Arguments]"; + function isArguments(source) { + return hasValue(source) ? source.toString() === objectArguments : false; + } + + /** + * Checks if an object or objects are a Map. + * + * @function isMap + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isMap } from '@universalweb/acid'; + * isMap(new Map()); + * // => true + */ + const isMapCall = isConstructorNameFactory("Map"); + const isMap = isTypeFactory(isMapCall); + + /** + * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer. + * + * @function isTypedArray + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isTypedArray, assert } from '@universalweb/acid'; + * assert(isTypedArray([]), false); + * assert(isTypedArray(new Int8Array()), true); + */ + const typedArrayRegex = /Array/; + const arrayConstructorName = "Array"; + function isTypedArray(source) { + if (source) { + const constructorName = getTypeName(source); + if ( + typedArrayRegex.test(constructorName) && + constructorName !== arrayConstructorName + ) { + return true; + } + } + return false; + } + + /** + * Checks if an object is null or undefined. + * + * @function noValue + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { noValue, assert } from '@universalweb/acid'; + * assert(noValue(null), true); + * assert(noValue(undefined), true); + * assert(noValue(1), false); + * assert(noValue(0), false); + */ + function noValue(source) { + return !hasValue(source); + } + + /** + * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property. + * + * @function isArrayLike + * @category type + * @param {*} source - Object to be checked. + * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArrayLike, assert } from '@universalweb/acid'; + * assert(isArrayLike([]), true); + * assert(isArrayLike(2), false); + */ + function isArrayLike(source, strictFlag) { + if (noValue(source) || isFunction(source)) { + return false; + } + if (isArray(source) || isTypedArray(source)) { + return true; + } + const sourceLength = source.length; + if (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) { + return false; + } + if (strictFlag) { + const indexes = keys(source); + if (indexes) { + return every(indexes, (value, index) => { + return index >= 0 && isNumber(index); + }); + } + return false; + } + return true; + } + + /** + * Checks if an object or objects are a BigInt. + * + * @function isBigInt + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isBigInt, assert } from '@universalweb/acid'; + * assert(isBigInt(BigInt(123)), true); + */ + const isBigIntCall = isConstructorNameFactory("BigInt"); + const isBigInt = isTypeFactory(isBigIntCall); + + /** + * Checks if the value is a Boolean. + * + * @function isBoolean + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isBoolean } from '@universalweb/acid'; + * isBoolean(true); + * // => true + */ + const isBooleanCall = isConstructorNameFactory("Boolean"); + const isBoolean = isTypeFactory(isBooleanCall); + + /** + * Checks if an object or objects are a ArrayBuffer. + * + * @function isArrayBuffer + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArrayBuffer, assert } from '@universalweb/acid'; + * assert(isArrayBuffer(new ArrayBuffer()), true); + */ + const isArrayBufferCall = isConstructorNameFactory("ArrayBuffer"); + const isArrayBuffer = isTypeFactory(isArrayBufferCall); + + /** + * Checks if an object is the child of another. Typically used for classes. + * + * @function isChild + * @category type + * @param {*} sourceChild - Object to be checked as the child. + * @param {*} targetParent - Object to be checked as the parent. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isChild, construct, assert } from '@universalweb/acid'; + * class Grandparent{} + * class Parent extends Grandparent{} + * class Child extends Parent{} + * const child = construct(Child); + * assert(isChild(Child, Grandparent), true); + * assert(isChild(Child, Parent), false); + * assert(isChild(Parent, Grandparent), false); + * assert(isChild(child1, child3), false); + */ + function isChild(sourceChild, targetParent) { + if (!sourceChild || !targetParent) { + return false; + } + return sourceChild instanceof targetParent; + } + + /** + * Checks if an object or objects are a structured-cloneable type. + * + * @function isCloneable + * @category type + * @param {...*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isCloneable, assert } from '@universalweb/acid'; + * assert(isCloneable(function (){}), false); + */ + const constructorNames = RegExp( + "Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError", + ); + function isCloneable(source) { + if (hasValue(source)) { + const constructorName = source?.constructor?.name; + return constructorNames.test(constructorName); + } + return false; + } + + /** + * Checks if the value is a Date. + * + * @function isDate + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isDate, assert } from '@universalweb/acid'; + * assert(isDate(new Date()), true); + */ + const isDateCall = isConstructorNameFactory("Date"); + const isDate = isTypeFactory(isDateCall); + + /** + * Checks if the value is empty. + * + * @function isEmpty + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEmpty, assert } from '@universalweb/acid'; + * assert(isEmpty([]), true); + */ + function isEmpty(source) { + if (isString(source) || isArray(source)) { + return !hasLength(source); + } else if (isPlainObject(source)) { + return !objectSize(source); + } + return !hasValue(source); + } + + /** + * Check if a value equals false using strict comparison. + * + * @function isFalse + * @category Utility + * @type {Function} + * @param {Boolean} source - Item to compare. + * @returns {Boolean} - Returns true if the item equals false. + * + * @example + * import { isFalse, assert } from '@universalweb/acid'; + * assert(isFalse(1), false); + * assert(isFalse(true), false); + * assert(isFalse(false), true); + */ + function isFalse(source) { + return source === false; + } + + /** + * Checks if an object or objects are a Float32Array. + * + * @function isF32 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isF32, assert } from '@universalweb/acid'; + * assert(isF32(new Float32Array()), true); + */ + const isF32Call = isConstructorNameFactory("Float32Array"); + const isF32 = isTypeFactory(isF32Call); + + /** + * Checks if an object or objects are a Float64Array. + * + * @function isF64 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isF64 } from '@universalweb/acid'; + * isF64(new Float64Array()); + * // => true + */ + const isF64Call = isConstructorNameFactory("Float64Array"); + const isF64 = isTypeFactory(isF64Call); + + const { isInteger } = Number; + /** + * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. + * + * @function isFloat + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFloat } from '@universalweb/acid'; + * isFloat(1.01); + * // => true + */ + const isFloat = isInteger; + + /** + * Checks if an object or objects are a Int16Array. + * + * @function isI16 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isI16 } from '@universalweb/acid'; + * isI16(new Int16Array()); + * // => true + */ + const isI16Call = isConstructorNameFactory("Int16Array"); + const isI16 = isTypeFactory(isI16Call); + + /** + * Checks if an object or objects are a Int32Array. + * + * @function isI32 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isI32, assert } from '@universalweb/acid'; + * assert(isI32(new Int32Array()), true); + */ + const isI32Call = isConstructorNameFactory("Int32Array"); + const isI32 = isTypeFactory(isI32Call); + + /** + * Checks if an object or objects are a Int8Array. + * + * @function isI8 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isInt8 } from '@universalweb/acid'; + * isInt8(new Int8Array()); + * // => true + */ + const isI8Call = isConstructorNameFactory("Int8Array"); + const isI8 = isTypeFactory(isI8Call); + + /** + * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments. + * + * @function isIterable + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isIterable, assert } from '@universalweb/acid'; + * assert(isIterable([]), true); + * assert(isIterable(new Int8Array()), true); + * assert(isIterable('test'), false); + */ + function isIterable(source) { + return hasValue(source) && typeof source[Symbol.iterator] === "function"; + } + + /** + * Checks if an object is a promise. + * + * @function isPromise + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isPromise } from '@universalweb/acid'; + * isPromise(new Promise(() => {})); + * // => true + */ + function isPromise(source) { + if (source) { + return source instanceof Promise; + } + return false; + } + + /** + * Checks if an object is a kind of async object such as async function, promise, or generator. + * + * @function isKindAsync + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isKindAsync, assert } from '@universalweb/acid'; + * assert(isKindAsync(async() => {}), true); + */ + function isKindAsync(source) { + if (source) { + return isPromise(source) || isAsync(source) || isGenerator(source); + } + return false; + } + + /** + * Checks if an object is the child of another. Typically used for classes. + * + * @function isParent + * @category type + * @param {*} sourceParent - Object to be checked as the child. + * @param {*} targetChild - Object to be checked as the parent. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isParent, construct, assert } from '@universalweb/acid'; + * class parentClass{} + * class otherClass{} + * const child1 = construct(parentClass); + * const child2 = construct(otherClass); + * assert(isParent(child1, parentClass), true); + * assert(isParent(child3, parentClass), false); + * assert(isParent(parentClass, child1), false); + * assert(isParent(child1, child3), false); + */ + function isParent(sourceParent, targetChild) { + if (!sourceParent || !targetChild || !targetChild.call) { + return false; + } + return sourceParent instanceof targetChild; + } + + /** + * Checks if an object is a primitive. + * + * @function isPrimitive + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isPrimitive, assert } from '@universalweb/acid'; + * assert(isPrimitive(1), true); + * assert(isPrimitive(() => {}), false); + */ + function isPrimitive(source) { + const type = typeof value; + return ( + source === null || + source === undefined || + (type !== "object" && type !== "function") + ); + } + + /** + * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways. + * + * @function isRelated + * @category type + * @param {*} targetOne - Object to be checked. + * @param {*} targetTwo - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isRelated, construct, assert } from '@universalweb/acid'; + * class parentClass{} + * class otherClass{} + * const child1 = construct(parentClass); + * const child2 = construct(parentClass); + * const child3 = construct(otherClass); + * assert(isRelated(child1, child2), true); + * assert(isRelated(child1, parentClass), true); + * assert(isRelated(parentClass, child2), true); + * assert(isRelated(child1, child3), false); + */ + function isRelated(targetOne, targetTwo) { + if (noValue(targetOne) || noValue(targetTwo)) { + return false; + } + if (targetOne.call) { + return targetTwo instanceof targetOne; + } + if (targetTwo.call) { + return targetOne instanceof targetTwo; + } + return targetTwo.constructor === targetOne.constructor; + } + + const { isSafeInteger } = Number; + /** + * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. + * + * @function isSafeInt + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isSafeInt } from '@universalweb/acid'; + * isSafeInt(1.01); + * // => true + */ + const isSafeInt = isSafeInteger; + + function isSameType(source, other) { + const sourceType = getType(source); + const otherType = getType(other); + if (sourceType === otherType) { + if (sourceType.name === otherType.name) { + return true; + } + } + return false; + } + + /** + * Check if a value equals true using strict comparison. + * + * @function isTrue + * @category Utility + * @type {Function} + * @param {Boolean} source - Item to check. + * @returns {Boolean} - Returns true if the item is true. + * + * @example + * import { isTrue, assert } from '@universalweb/acid'; + * assert(isTrue(1), false); + * assert(isTrue(true), true); + * assert(isTrue(false), false); + */ + function isTrue(source) { + return source === true; + } + + /** + * Checks if an object or objects are a Uint16Array. + * + * @function isU16 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU16 } from '@universalweb/acid'; + * isU16(new Uint16Array()); + * // => true + */ + const isU16Call = isConstructorNameFactory("Uint16Array"); + const isU16 = isTypeFactory(isU16Call); + + /** + * Checks if an object or objects are a Uint32Array. + * + * @function isU32 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU32 } from '@universalweb/acid'; + * isU32(new Uint32Array()); + * // => true + */ + const isU32Call = isConstructorNameFactory("Uint32Array"); + const isU32 = isTypeFactory(isU32Call); + + /** + * Checks if an object or objects are a Uint8Array. + * + * @function isU8 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU8 } from '@universalweb/acid'; + * isU8(new Uint8Array()); + * // => true + */ + const isU8Call = isConstructorNameFactory("Uint8Array"); + const isU8 = isTypeFactory(isU8Call); + + /** + * Checks if an object or objects are a Uint8ClampedArray. + * + * @function isU8C + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU8C } from '@universalweb/acid'; + * isU8C(new Uint8ClampedArray()); + * // => true + */ + const isU8CCall = isConstructorNameFactory("Uint8ClampedArray"); + const isU8C = isTypeFactory(isU8CCall); + + /** + * Checks if an object or objects are a WeakMap. + * + * @function isWeakMap + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isWeakMap } from '@universalweb/acid'; + * assert(isWeakMap(new WeakMap()), true); + */ + const isWeakMapCall = isConstructorNameFactory("WeakMap"); + const isWeakMap = isTypeFactory(isWeakMapCall); + + const isDeno = typeof globalThis.Deno !== "undefined"; + + const isNodejs = + typeof globalThis.process !== "undefined" && + process.versions && + process.versions.node; + + /** + * Check if a value is isTruthy which is anything but false, null, 0, "", undefined, and NaN. + * + * @function isTruthy + * @category type + * @type {Function} + * @param {*} source - Item to be isTruthy checked. + * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy. + * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false. + * + * @example + * import { isTruthy, assert } from '@universalweb/acid'; + * assert(isTruthy(1), true); + * assert(isTruthy(0), false); + */ + function isTruthy(source, returnIfTrue = true) { + return Boolean(source) && returnIfTrue; + } + + /** + * Check if a value is isFalsy which are false, null, 0, "", undefined, and NaN. + * + * @function isFalsy + * @category type + * @type {Function} + * @param {*} source - Item to be isFalsy checked. + * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy. + * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false. + * + * @example + * import { isFalsy, assert } from '@universalweb/acid'; + * assert(isFalsy(0), true); + * assert(isFalsy(1), false); + */ + function isFalsy(source, returnIfTrue = true) { + return Boolean(source) === false && returnIfTrue; + } + + /** + * If source has a value then assign it to an object or call a function. + * + * @function ifValue + * @category utility + * @param {*} source - The source object to be hasValue checked. + * @param {Function|Object} target - The target which is either a function or object. + * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target). + * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function. + * @returns {source|undefined} The source object if it passes the hasValue check. + * + * @example + * import { ifValue, assert } from '@universalweb/acid'; + * assert(ifValue(1, {}, 'a'), {a:1}); + */ + function ifValue(source, target, optional, args) { + if (hasValue(source)) { + if (isFunction(target)) { + if (optional) { + return apply(target, optional, args); + } + return target(...args); + } else if (isPlainObject(target)) { + target[optional] = source; + return target; + } + } + } + + /** + * Performs a deep comparison between two objects & determines if they're different using strict comparison. + * + * @function notEqual + * @type {Function} + * @category utility + * @param {*} source - Source object. + * @param {*} target - Object to be compared. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { notEqual, assert } from '@universalweb/acid'; + * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true); + */ + function notEqual(source, target) { + return isFalse(isEqual(source, target)); + } + + const jsonNative = JSON; + /** + * Parses JSON string with safety check for undefined. + * + * @function jsonParse + * @category utility + * @type {Function} + * @param {String} source - String to be parsed. + * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned. + * @returns {Object|undefined} - Returns the parsed object. + * + * @example + * import { jsonParse, assert } from '@universalweb/acid'; + * assert(jsonParse('{a:1}'), {a:1}); + */ + function jsonParse(source, reviver) { + if (source) { + return jsonNative.parse(source, reviver); + } + } + /** + * Stringify an object into a JSON string. + * + * @function stringify + * @category utility + * @type {Function} + * @param {Object} object - Object to Stringify. + * @returns {String} - Returns the object as a valid JSON string. + * + * @example + * import { stringify, assert } from '@universalweb/acid'; + * assert(stringify({a:1}), '{a:1}'); + */ + const stringify = jsonNative.stringify; + + function createAssertError(source, expected, localOptions) { + const options = globalThis.options || localOptions; + let errorTitle; + if (isFunction(options)) { + errorTitle = `${options.name} : ${options.constructor.name}`; + } else if (options) { + errorTitle = `${options.title || options.method.name} -> ${options.file}`; + } + return new Error( + `Test Failed: ${errorTitle} Result: ${stringify(source)} Expected: ${stringify(expected)}`, - options - ); - } - async function assertAsync(sourceArg, expected, options) { - const source = await sourceArg; - const expectedFunction = isFunction(expected) && (await expected(source, options)) === false; - if (expectedFunction || notEqual(source, expected)) { - return createAssertError(source, expected, options); - } - return true; - } - /** - * Check if source value matches the expected value. - * - * @function assert - * @category utility - * @type {Function} - * @param {*} source - The source object to compare to. - * @param {*} expected - The expected result that's compared to the source. - * @param {*} options - Additional options for the Error instance & unit test information. - * @returns {Object} - Returns a deep clone of an object. - * - * @example - * import { assert } from '@universalweb/acid'; - * if (!assert(1,1)) { - * new Error('Assert Method Failed'); - * } - */ - function assert(source, expected, options) { - if (isKindAsync(source) || isKindAsync(expected)) { - return assertAsync(source, expected, options); - } - const expectedFunction = isFunction(expected) && expected(source, options) === false; - if (expectedFunction || notEqual(source, expected)) { - return createAssertError(source, expected, options); - } - return true; - } - - /** - * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to. - * - * @function bindAll - * @category utility - * @type {Function} - * @param {Object|Function|Array} collection - The functions to bind. - * @param {*} bindThis - Object to be bound to functions. - * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to. - * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided. - * - * @example - * import { assert, bindAll } from '@universalweb/acid'; - * const bounded = bindAll([function () { return this;}], 'Bounded'); - * assert(bounded[0](), 'Bounded'); - */ - function bindAll(collection, bindThis, targetAssign) { - const results = map(collection, (item) => { - return isFunction(item) ? item.bind(bindThis) : item; - }); - return targetAssign ? assign(targetAssign, results) : results; - } - - /** - * Clears the values out of an array, buffer, and objects like Map that have a clear method. - * - * @function clear - * @category utility - * @type {Function} - * @param {Array} source - Takes an array to be emptied. - * @returns {Array} - The originally given array. - * - * @example - * import { clear, assert } from '@universalweb/acid'; - * assert(clear(Buffer.from([1,'B', 'Cat'])), []); - */ - function clear(source) { - if (source) { - if (isBuffer(source)) { - return clearBuffer(source); - } else if (isArray(source)) { - return clearArray(source); - } else if (source.clear) { - source.clear(); - } else if (source.length) { - source.length = 0; - } - } - return source; - } - - /** - * Creates a structured clone of an object which is a "structured-cloneable type". - * - * @function clone - * @category utility - * @type {Function} - * @param {Object} source - Any structured-cloneable type object. - * @returns {Object} - Returns a deep clone of an object. - * - * @example - * import { clone, assert } from '@universalweb/acid'; - * assert(clone({a:{b:[2]}}), {a:{b:[2]}}); - */ - const structuredCloneSafe = globalThis.structuredClone; - function clone(source) { - return structuredCloneSafe(source); - } - - /** - * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next. - * - * @function concurrent - * @type {Function} - * @category Utility - * @async - * @param {Array} source - Array of async functions that will be looped through. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. - * @returns {Object} - The originally given array. - * - * @example - * import { concurrent, assert } from '@universalweb/acid'; - * const list = []; - * await concurrent([async (item) => { - * return item; - * }, async (item) => { - * return item; - * }], null, 1); - * assert(list, [1, 1]); - */ - async function concurrent(source, thisBind, ...args) { - const arrayLength = source.length; - const results = []; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = source[index].call(thisBind, ...args, index, results, callable); - } - } else { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = source[index](...args, index, results, callable); - } - } - return Promise.all(results); - } - - /** - * Creates an array with all isFalsy values removed. The values false, null, 0, "", undefined, and NaN are isFalsy. - * - * @function compact - * @category Utility - * @type {Function} - * @param {Array|Object} source - Array or Object to be compacted. - * @returns {Array|Object} - A new object or array containing the filtered values. - * - * @example - * import { compact, assert } from '@universalweb/acid'; - * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']); - */ - function compact(source) { - if (isPlainObject(source)) { - const sourceKeys = keys(source); - const sourceKeysLength = sourceKeys.length; - const targetObject = {}; - for (let i = 0; i < sourceKeysLength; i++) { - const keyName = sourceKeys[i]; - const item = source[keyName]; - const isisTruthy = isTruthy(item); - if (isisTruthy) { - targetObject[keyName] = item; - } - } - return targetObject; - } - return source.filter((item) => { - return isTruthy(item); - }); - } - - /** - * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function forOfCompactMapAsync - * @category utility - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * import { assert,forOfCompactMapAsync } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = await forOfCompactMapAsync(source, async (item) => { - * return item; - * }); - * assert(temp, {b: 2, c: 3}); - */ - async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) { - if (isGenerator(source)) { - const resultsGenerator = []; - for await (const item of source(...generatorArgs)) { - const result = await iteratee(item, resultsGenerator, source); - if (hasValue(result)) { - resultsGenerator.push(result); - } - } - return resultsGenerator; - } - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = await iteratee(value, results, source); - if (hasValue(result)) { - methodPushBound(result); - } - } - return results; - } - const methodSet = isFunction(results.set); - for await (const [key, value] of source) { - const result = await iteratee(value, key, results, source); - if (hasValue(result)) { - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - } - return results; - } - - /** - * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function forOfCompactMap - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * import { assert,forOfCompactMap } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = forOfCompactMap(source, (item) => { - * return item; - * }); - * assert(temp, {b: 2, c: 3}); - */ - function forOfCompactMap(source, iteratee = returnValue, resultsObject) { - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = iteratee(value, results, source); - if (hasValue(result)) { - methodPushBound(result); - } - } - return results; - } - const methodSet = isFunction(results.set); - for (const [key, value] of source) { - const result = iteratee(value, key, results, source); - if (hasValue(result)) { - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - } - return results; - } - - /** - * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function compactMap - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {Object | Function} [results = {}] - Object that will be used to assign results. - * @returns {Array | object | Function} - A new object of the same calling object's type. - * - * @example - * import { compactMap, assert } from '@universalweb/acid'; - * assert(compactMap({a: null, b: 2, c: 3}, (item) => { - * return item; - * }), {b: 2, c: 3}); - */ - const compactMap = generateLoop( - compactMapArray, - compactMapAsyncArray, - compactMapObject, - compactMapAsyncObject, - forOfCompactMap, - forOfCompactMapAsync - ); - - function everyArg(...methods) { - if (isAsync(methods[0])) { - return async function (...args) { - return every(methods, async (method) => { - return every(args, async (item) => { - return method(item); - }); - }); - }; - } - return function (...args) { - return every(methods, (method) => { - return every(args, (item) => { - return method(item); - }); - }); - }; - } - - /** - * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. - * - * @function forOfFilter - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. - * - * @example - * import { assert, forOfFilter } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = forOfFilter(source, (item) => { - * return Boolean(item); - * }); - * assert(temp, {b: 2, c: 3}); - */ - function forOfFilter(source, iteratee = returnValue, resultsObject) { - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = iteratee(value, results, source); - if (result === true) { - methodPushBound(value); - } - } - } else { - const methodSet = isFunction(results.set); - for (const [key, value] of source) { - const result = iteratee(value, key, results, source); - if (result === true) { - if (methodSet) { - results.set(key, value); - } else { - results[key] = value; - } - } - } - } - return results; - } - - /** - * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. - * - * @function forOfFilterAsync - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. - * - * @example - * import { assert, forOfFilterAsync } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = forOfFilterAsync(source, (item) => { - * return Boolean(item); - * }); - * assert(temp, {b: 2, c: 3}); - */ - async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) { - if (isGenerator(source)) { - const resultsGenerator = []; - for await (const item of source(...generatorArgs)) { - if ((await iteratee(item, resultsGenerator, source)) === true) { - resultsGenerator.push(item); - } - } - return resultsGenerator; - } - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = await iteratee(value, results, source); - if (result === true) { - methodPushBound(value); - } - } - } else { - const methodSet = isFunction(results.set); - for await (const [key, value] of source) { - const result = await iteratee(value, key, results, source); - if (result === true) { - if (methodSet) { - results.set(key, value); - } else { - results[key] = value; - } - } - } - } - return results; - } - - /** - * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. - * - * @function filter - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {Object | Function} [results = {}] - Object that will be used to assign results. - * @returns {Array | object | Function} - A new object of the same calling object's type. - * - * @example - * import { filter, assert } from '@universalweb/acid'; - * assert(filter({a: false, b: true, c: true}, (item) => { - * return item; - * }), {b: true, c: true}); - */ - const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync); - - function returnFlow$1(callable) { - return (...methods) => { - return (arg) => { - let value = arg; - callable(methods, (item) => { - value = item(value); - }); - return value; - }; - }; - } - /** - * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. - * - * @function flow - * @category utility - * @type {Function} - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flow(increment, increment, deduct)(0); - * // => 1 - */ - const flow = returnFlow$1(eachArray); - /** - * This method is like flow except that it creates a function that invokes the given functions from right to left. - * - * @function flowRight - * @category utility - * @type {Function} - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flowRight(increment, increment, deduct)(0); - * // => 1 - */ - const flowRight = returnFlow$1(eachRight); - - function returnFlow(callable) { - return (...methods) => { - return async (arg) => { - let value = arg; - await callable(methods, async (item) => { - value = await item(value); - }); - return value; - }; - }; - } - /** - * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. - * - * @function flowAsync - * @category utility - * @type {Function} - * @async - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); - * // => 2 - */ - const flowAsync = returnFlow(eachAsyncArray); - /** - * This method is like flow except that it creates a function that invokes the given functions from right to left. - * - * @function flowAsyncRight - * @category utility - * @type {Function} - * @async - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); - * // => 2 - */ - const flowAsyncRight = returnFlow(eachRightAsync); - - function forMap(source, callback) { - const cloned = cloneType(source); - const method = cloned.push || cloned.add; - if (method && isFunction(method)) { - const methodBound = method.bind(cloned); - source.forEach((item) => { - const result = callback(item, cloned); - methodBound(result); - }); - } else if (isFunction(cloned.set)) { - source.forEach((item, key) => { - const result = callback(item, key, cloned); - cloned.set(key, result); - }); - } else { - source.forEach((item, key) => { - const result = callback(item, key, cloned); - cloned[key] = result; - }); - } - return cloned; - } - - /** - * Takes all but the last item in the array. - * - * @function arraysToObject - * @type {Function} - * @category utility - * @param {Array} source - Array to have items extracted from. - * @param {Array} properties - Array to have items extracted from. - * @returns {Array} - Returns a completely flattened array. - * - * @example - * import { arraysToObject, assert } from '@universalweb/acid'; - * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3}); - */ - function arraysToObject(source, properties) { - const sortedObject = {}; - eachArray(source, (item, key) => { - sortedObject[properties[key]] = item; - }); - return sortedObject; - } - - /** - * Checks if an object contains something. For basic searches. - * - * @function has - * @category utility - * @param {Array|String|Object} source - Object to be checked. - * @param {String|Array|Function|RegExp} search - Object that is being searched for. - * @param {Number} position - Index at which to start searching. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { has, assert } from '@universalweb/acid'; - * assert(has('Hello World', 'Hello'), true); - * assert(has(['Hello', 'World'], 'hello'), true); - */ - function has(source, search, position) { - if (noValue(source) || noValue(search)) { - return false; - } - if (source === search) { - return true; - } - if (isString(source)) { - if (isString(search)) { - return source.includes(search, position); - } - if (isRegex(search)) { - return search.test(source); - } - if (isFunction(search)) { - return search(source); - } - if (isArray(search)) { - return everyArray(search, (item) => { - return has(source, item); - }); - } - return every(search, (item) => { - return has(source, item); - }); - } - if (isArray(source)) { - if (isRegex(search)) { - return everyArray(source, (item) => { - return item.test(search); - }); - } - if (isFunction(search)) { - return everyArray(source, search); - } - if (isArray(search)) { - return everyArray(search, (item) => { - return has(source, item); - }); - } - return source.includes(search, position); - } - if (isPlainObject(source)) { - if (isRegex(search)) { - return everyObject(source, (item) => { - return item.test(search); - }); - } - if (isFunction(search)) { - return everyObject(source, search); - } - if (isPlainObject(search)) { - return everyObject(source, (item, key) => { - return item === search[key]; - }); - } - return everyObject(source, (item) => { - return has(item, search); - }); - } - return false; - } - - /** - * Checks if the string has a '.'. - * - * @function hasDot - * @category utility - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { hasDot, assert } from '@universalweb/acid'; - * assert(hasDot('test.js'), true); - */ - const hasDot = regexTestFactory(/\./); - - /** - * Checks if a property on an object has a value. If not, it will assign a value. - * - * @function ifNotAssign - * @category utility - * @type {Function} - * @param {Object} rootObject - The object to check. - * @param {String} property - The property name which is to be checked. - * @param {*} equalThis - The reassignment value for the property being checked. - * @returns {Object} - Returns the provided rootObject. - * - * @example - * import { ifNotAssign, assert } from '@universalweb/acid'; - * assert(ifNotAssign({}, 'a', 1), {a:1}); - */ - const ifNotAssign = (rootObject, property, equalThis) => { - if (property && !hasValue(rootObject[property])) { - rootObject[property] = equalThis; - } - return rootObject; - }; - - class Intervals { - list = construct(Map); - construct() {} - /** - * Remove a setInterval that was created using the intervals function. - * - * @param {Number} id - The id of the setInterval to remove. - * @returns {undefined} - Returns nothing. - * - * @example - * timer(() => {}, 100); - * // => 0 - */ - remove(id) { - clearInterval(id); - this.list.delete(id); - } - has(id) { - return this.list.has(id); - } - get(id) { - return this.list.get(id); - } - /** - * Create a setInterval & add it to the list of interval timers. - * - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setTimeoutId ID. - * - * @example - * timers.set(() => {}, 100); - * // => 0 - */ - set(callable, time) { - const id = setInterval(() => { - callable(); - }, time); - this.list.set(id, true); - return id; - } - /** - * Clear all active setIntervals. - * - * @returns {undefined} - Returns undefined. - * - * @example - * intervals.clear(); - * // => undefined - */ - clear() { - const currentThis = this; - currentThis.list.forEach((id) => { - currentThis.remove(id); - }); - } - } - const intervals = construct(Intervals); - /** - * Create an interval timer. - * - * @function interval - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setInterval ID. - * - * @example - * interval(() => {}, 100); - * // => 0 - */ - function interval(callable, time) { - return intervals.set(callable, time); - } - /** - * Clear all active interval timers. - * - * @function clearIntervals - * @category function - * @returns {undefined} - Returns undefined. - * - * @example - * clearIntervals(); - * // => undefined - */ - function clearIntervals() { - const id = setTimeout(noop, 0); - times(id, (index) => { - intervals.remove(index); - }); - } - - function merge(target, ...sources) { - each(sources, (currentSource) => { - each(currentSource, (sourceItem, sourceKey) => { - if (target[sourceKey]) { - if (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) { - return merge(target[sourceKey], sourceItem); - } - } - target[sourceKey] = sourceItem; - }); - }); - return target; - } - - /** - * Returns the model with the given name. - * - * @function Model - * @type {Class} - * @category utility - * @param {String} modelName - The name of the model to return. - * @param {*} modelSource - The value of the model to return. - * @returns {Model} - The model with the given name. - * - * @example - * import { Model, model, assert } from '@universalweb/acid'; - * const test = new Model('test', {a: 1}); - * assert(model('test'), {a: 1}); - */ - class Model { - static models = new Map(); - constructor(modelName, modelSource) { - if (hasValue(modelSource)) { - assign(this, modelSource); - this.modelName = modelName; - Model.models.set(modelName, modelSource); - } else { - assign(this, modelName); - } - } - delete(modelName) { - Model.models.delete(modelName || this.modelName); - } - set(modelName) { - if (modelName) { - this.modelName = modelName; - } - Model.models.set(modelName || this.modelName, this); - } - has(modelName) { - return Model.models.has(modelName || this.modelName); - } - get(modelName) { - return Model.models.get(modelName || this.modelName); - } - } - /** - * Set & Get a model. - * - * @function model - * @type {Function} - * @category utility - * @param {String} modelName - Name of the model. - * @param {Object} modelSource - The model object. - * @returns {Model} - Returns the associated model. - * - * @example - * import { model, assert } from '@universalweb/acid'; - * model('test', {a: 1}); - * assert(model('test'), {a: 1}); - */ - function model(modelName, modelSource) { - if (hasValue(modelSource)) { - return construct(Model, [modelName, modelSource]); - } - return get(modelName, Model.models); - } - - /** - * Takes the first two arguments given and returns them inside a new array. - * - * @function pair - * @category utility - * @param {*} argument1 - The source object. - * @param {*} argument2 - The source object. - * @returns {Array} The array which holds the pair. - * - * @example - * import { pair, assert } from '@universalweb/acid'; - * assert(air(1, 2), [1, 2]); - */ - function pair(argument1, argument2) { - return [argument1, argument2]; - } - - /** - * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee. - * - * @function concurrentStatus - * @category utility - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The array from Promise.allSettled. - * - * @example - * import { concurrentStatus, assert } from '@universalweb/acid'; - * const tempList = []; - * await concurrentStatus([1, 2], async (item) => { - * return item; - * }); - * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]); - */ - function concurrentStatus(source, iteratee, additionalArgument) { - const arrayLength = source.length; - const queue = []; - for (let index = 0; index < arrayLength; index++) { - queue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument); - } - return Promise.allSettled(queue); - } - - /** - * A wrapper around the promise constructor. - * - * @function promise - * @type {Function} - * @category utility - * @param {Function} callback - Function to be called back. - * @returns {Promise} - A constructor with a callback function.). - * - * @example - * promise((a) => {}); - * // => Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined} - */ - function promise(callback) { - return new Promise(callback); - } - - /** - * Using a deep comparison it checks if properties of two objects using an array are equal. - * - * @function propertyMatch - * @type {Function} - * @category utility - * @param {Object} source - The source object to compare. - * @param {Object} compared - Object to be compared to source. - * @param {Array} properties - List of properties to compare defaults to keys(source). - * @returns {Array} - Returns an array of properties. - * - * @example - * import { propertyMatch, assert } from '@universalweb/acid'; - * assert(propertyMatch({ - * a: 1, - * b: 2 - * }, { - * a: 1, - * b: 2 - * }, ['a', 'b']), true); - */ - const propertyMatch = (source, compared, properties = keys(source)) => { - return everyArray(properties, (property) => { - return isEqual(source[property], compared[property]); - }); - }; - - function setKey(source, key, value) { - if (key && isPlainObject(source)) { - source[key] = value; - } else if (isNumber(key) && isArray(source)) { - source[key] = value; - } else if (source.set) { - source.set(key, value); - } else if (source.push) { - source.push(value); - } else if (source.add) { - source.add(value); - } else { - source[key] = value; - } - return source; - } - - function setValue(source, value, key) { - if (isNumber(key) && isArray(source)) { - source[key] = value; - } else if (source.push) { - source.push(value); - } else if (source.add) { - source.add(value); - } else { - source[key] = value; - } - return source; - } - - class Store { - source; - constructor(source = {}) { - this.source = source; - if (source === null || typeof source !== 'object') { - return source; - } - eachObject(source, (property) => { - source[property] = new Store(source[property]); - }); - this.data = new Proxy(source, { - get(proxySource, property) { - console.log(proxySource, property, proxySource[property]); - return proxySource[property]; - }, - set(proxySource, property, value) { - console.log(proxySource, property, proxySource[property]); - proxySource[property] = new Store(value); - return true; - } - }); - } - } - - /** - * This method returns a new empty array. - * - * @function stubArray - * @category utility - * @type {Function} - * @returns {Array} - Returns the new empty array. - * - * @example - * import { stubArray, assert } from '@universalweb/acid'; - * assert(stubArray(), []); - */ - function stubArray() { - return []; - } - - /** - * This method returns false. - * - * @function stubFalse - * @category utility - * @type {Function} - * @returns {Boolean} - Returns false. - * - * @example - * import { stubFalse, assert } from '@universalweb/acid'; - * assert(stubFalse(), false); - */ - function stubFalse() { - return false; - } - - /** - * This method returns a new empty object. - * - * @function stubObject - * @category utility - * @type {Function} - * @returns {Object} - Returns the new empty object. - * - * @example - * import { stubObject, assert } from '@universalweb/acid'; - * assert(stubObject(), {}); - */ - const stubObject = () => { - return {}; - }; - - /** - * This method returns a new empty string. - * - * @function stubString - * @category utility - * @type {Function} - * @returns {String} - Returns the new empty string. - * - * @example - * import { stubString, assert } from '@universalweb/acid'; - * assert(stubString(), ''); - */ - const stubString = () => { - return ''; - }; - - /** - * This method returns true. - * - * @function stubTrue - * @category utility - * @type {Function} - * @returns {Boolean} - Returns true. - * - * @example - * import { stubTrue, assert } from '@universalweb/acid'; - * assert(stubTrue(), true); - */ - const stubTrue = () => { - return true; - }; - - /** - * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument. - * - * @async - * @function timesAsync - * @category utility - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @returns {undefined} - Nothing. - * - * @example - * import { timesAsync } from '@universalweb/acid'; - * await timesAsync(3, async (item) => { - * console.log(item); - * }); - * // 0 - * // 1 - * // 2 - * // => undefined - */ - async function timesAsync(amount, iteratee) { - for (let index = 0; index < amount; index++) { - await iteratee(amount); - } - } - /** - * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array. - * - * @async - * @function timesMapAsync - * @category array - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @param {Array} [results = []] - Array that will have iteratee return pushed to. - * @returns {Array} - An array with iteratee's returned values. - * - * @example - * import { timesMapAsync } from '@universalweb/acid'; - * await timesMapAsync(3, (item) => { - * return item; - * }); - * // => [0, 1, 2] - */ - async function timesMapAsync(amount, iteratee, results = []) { - for (let index = 0; index < amount; index++) { - results[index] = await iteratee(amount); - } - return results; - } - - /** - * Performs a toggle between 2 values using a deep or strict comparison. - * - * @function toggle - * @type {Function} - * @category utility - * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments. - * @param {(string|number|Object|Array)} on - The first object to be compared to. - * @param {(string|number|Object|Array)} off - The second object to be compared to. - * @returns {(string|number|Object|Array)} - The opposing value to the current. - * - * @example - * import { toggle } from '@universalweb/acid'; - * let toggleMe = true; - * toggleMe = toggle(toggleMe, true, false); - * // => false - */ - function toggle(value, on = true, off = false) { - return isEqual(on, value) ? off : on; - } - - /** - * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available. - * - * @class UniqID - * @type {Class} - * @category utility - * @returns {UniqID} - Returns a new instance of UniqID. - * - * @example - * import { UniqID, construct, assert } from '@universalweb/acid'; - * const gen = construct(UniqID); - * assert(gen.get(), 0); - * assert(gen.get(), 1); - * gen.free(0); - * assert(gen.get(), 0); - */ - class UniqID { - totalActive = 0; - freed = []; - totalFree = 0; - /** - * Generates a new ID or recycle one that is no longer used. - * - * @function get - * @class UniqID - * @category utility - * @type {Function} - * @returns {Number} - Returns a unique id. - * - * @example - * import { UniqID, construct, assert } from '@universalweb/acid'; - * const gen = construct(UniqID); - * assert(gen.get(), 0); - */ - get() { - let result = this.freed.shift(); - if (hasValue(result)) { - this.totalFree--; - } else { - result = this.totalActive; - this.totalActive++; - } - return result; - } - /** - * Frees an UID so that it may be recycled for later use. - * - * @function free - * @class UniqID - * @category utility - * @type {Function} - * @param {Number} id - Number to be freed. - * @returns {undefined} - Nothing is returned. - * - * @example - * import { UniqID, construct, assert } from '@universalweb/acid'; - * const gen = construct(UniqID); - * assert(gen.get(), 0); - * gen.free(0); - * assert(gen.get(), 0); - */ - free(id) { - this.freed.push(id); - this.totalFree++; - const isActive = this.totalActive > 0; - const shouldReset = this.totalActive === this.totalFree; - if (isActive && shouldReset) { - this.reset(); - } - } - reset() { - this.totalActive = 0; - this.freed.length = 0; - this.totalFree = 0; - } - } - /** - * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available. - * - * @function uniqID - * @category utility - * - * @example - * import { uniqID, assert } from '@universalweb/acid'; - * assert(uniqID.get(), 0); - * assert(uniqID.get(), 1); - * uniqID.free(0); - * assert(uniqID.get(), 0); - */ - const uniqID = construct(UniqID); - - /** - * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. - * - * @function VirtualStorage - * @category utility - * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. - * @returns {*} - Returns a new VirtualStorage Object. - * - * @example - * import { VirtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = new VirtualStorage(); - * // => New VirtualStorage Object - */ - class VirtualStorage { - constructor(initialObject = new Map()) { - this.items = initialObject; - } - /** - * Get an item from a virtual storage object. - * - * @param {String} key - The key used to store the data. - * @returns {undefined} - Returns undefined. - * - * @example - * import { VirtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = virtualStorage(); - * myVirtualStorage.setItem('key', 'value'); - * myVirtualStorage.getItem('key'); - * // => 'value' - */ - getItem(key) { - if (this.isMap) { - return this.items.get(key); - } else { - return this.items[key]; - } - } - get(...args) { - return this.getItem(...args); - } - hasItem(key) { - if (this.isMap) { - return this.items.has(key); - } else { - return hasValue(this.items[key]); - } - } - has(...args) { - return this.hasItem(...args); - } - /** - * Save an item to a virtual storage object. - * - * @param {String} key - The key used to store the data. - * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify. - * @returns {undefined} - Returns undefined. - * - * @example - * import { VirtualStorage, assert } from '@universalweb/acid'; - * const vStorage = new VirtualStorage(); - * vStorage.setItem('title', 'value'); - * assert(vStorage.getItem('title'), 'value'); - */ - setItem(key, value) { - if (this.isMap) { - this.items.set(key, value); - } else { - this.items[key] = value; - } - return this; - } - set(...args) { - return this.setItem(...args); - } - /** - * Clears all data from the virtual storage object by replacing with a new object. - * - * @returns {undefined} - Returns undefined. - * - * @example - * import { virtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = virtualStorage(); - * myVirtualStorage.setItem('key', 'value'); - * myVirtualStorage.clear(); - * myVirtualStorage.getItem('key'); - * // => undefined - */ - clear() { - if (this.isMap) { - this.items.clear(); - } else { - this.items = cloneType(this.items); - } - return this; - } - /** - * Remove an item from a virtual storage object. - * - * @param {String} key - The key used to remove data. - * @returns {undefined} - Returns undefined. - * - * @example - * import { virtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = virtualStorage(); - * myVirtualStorage.setItem('key', 'value'); - * myVirtualStorage.removeItem('key'); - * myVirtualStorage.getItem('key'); - * // => undefined - */ - removeItem(key) { - if (this.isMap) { - this.items.delete(key); - } else { - this.items[key] = null; - } - return this; - } - remove(...args) { - return this.removeItem(...args); - } - } - /** - * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. - * - * @function virtualStorage - * @category browser - * @type {Function} - * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. - * @returns {*} - Returns a new VirtualStorage Object. - * - * @example - * import { virtualStorage, assert } from '@universalweb/acid'; - * const vStorage = virtualStorage(); - * vStorage.setItem('title', 'value'); - * assert(vStorage.getItem('title'), 'value'); - */ - function virtualStorage(initialObject) { - return new VirtualStorage(initialObject); - } - - /** - * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object. - * - * @function inAsync - * @type {Function} - * @category Utility - * @async - * @param {Array} source - Array of async functions that will be looped through. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. - * @returns {Object} - The originally given array. - * - * @example - * import { inAsync, assert } from '@universalweb/acid'; - * const list = []; - * await inAsync([async (firstArgument, item, index) => { - * list.push(index + firstArgument.a); - * }, async (firstArgument, item, index) => { - * list.push(index); - * }], {a:1}); - * assert(list, [1, 1]); - */ - async function inAsync(source, thisBind, ...args) { - const arrayLength = source.length; - const results = []; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = await source[index].call(thisBind, ...args, index, callable); - } - } else { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = await source[index](...args, index, callable); - } - } - return results; - } - - /** - * Invoke an array of functions. - * - * @function inSync - * @category Utility - * @type {Function} - * @param {Array} source - Array of functions that will be looped through. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function. - * @returns {undefined} - Returns undefined. - * - * @example - * inSync([() => {console.log(1);}, () => {console.log(2);}]); - * // 1 - * // 2 - * // => undefined - */ - function inSync(source, thisBind, ...args) { - const arrayLength = source.length; - const results = []; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = callable.call(thisBind, ...args, index, callable); - } - } else { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = callable(...args, index, callable); - } - } - return results; - } - - async function copyToPath(sourceFolder, destinationFolder, file) { - const sourcePath = path.join(sourceFolder, file); - const destinationPath = path.join(destinationFolder, file); - await promises.copyFile(sourcePath, destinationPath); - } - async function copyFolder(sourceFolder, destinationFolder) { - const files = await promises.readdir(sourceFolder); - await eachAsyncArray(files, async (file) => { - const sourcePath = path.join(sourceFolder, file); - const filestats = await promises.stat(sourcePath); - if (filestats.isDirectory()) { - const folderDestination = path.join(destinationFolder, file.replace(sourceFolder, '')); - await promises.mkdir(folderDestination, { - recursive: true - }); - await copyFolder(sourcePath, folderDestination); - } else { - await copyToPath(sourceFolder, destinationFolder, file); - } - }); - return true; - } - - function currentFile(importMeta) { - if (globalThis.__filename) { - return __filename; - } - return node_url.fileURLToPath(importMeta.url); - } - function currentPath(importMeta) { - if (globalThis.__dirname) { - return __dirname; - } - return path$1.dirname(node_url.fileURLToPath(importMeta.url)); - } - - exports.Chain = Chain; - exports.Intervals = Intervals; - exports.Model = Model; - exports.Store = Store; - exports.Timers = Timers; - exports.UniqID = UniqID; - exports.VirtualStorage = VirtualStorage; - exports.add = add; - exports.after = after; - exports.apply = apply; - exports.arrayToRegex = arrayToRegex; - exports.arraysToObject = arraysToObject; - exports.ary = ary; - exports.assert = assert; - exports.assertAsync = assertAsync; - exports.assign = assign; - exports.assignToClass = assignToClass; - exports.assignToObject = assignToObject; - exports.before = before; - exports.bindAll = bindAll; - exports.cacheNativeMethod = cacheNativeMethod; - exports.calcProgress = calcProgress; - exports.camelCase = camelCase; - exports.chain = chain; - exports.chunk = chunk; - exports.chunkString = chunkString; - exports.clear = clear; - exports.clearArray = clearArray; - exports.clearBuffer = clearBuffer; - exports.clearIntervals = clearIntervals; - exports.clearTimers = clearTimers; - exports.clone = clone; - exports.cloneArray = cloneArray; - exports.cloneType = cloneType; - exports.compact = compact; - exports.compactKeys = compactKeys; - exports.compactMap = compactMap; - exports.compactMapArray = compactMapArray; - exports.compactMapAsyncArray = compactMapAsyncArray; - exports.compactMapAsyncObject = compactMapAsyncObject; - exports.compactMapObject = compactMapObject; - exports.concurrent = concurrent; - exports.concurrentEachArray = concurrentEachArray; - exports.concurrentStatus = concurrentStatus; - exports.construct = construct; - exports.constructorName = constructorName; - exports.copyFolder = copyFolder; - exports.countBy = countBy; - exports.countKey = countKey; - exports.countWithoutKey = countWithoutKey; - exports.currentFile = currentFile; - exports.currentPath = currentPath; - exports.curry = curry; - exports.curryRight = curryRight; - exports.debounce = debounce; - exports.deduct = deduct; - exports.defProp = defProp; - exports.difference = difference; - exports.divide = divide; - exports.drop = drop; - exports.dropRight = dropRight; - exports.each = each; - exports.eachArray = eachArray; - exports.eachAsyncArray = eachAsyncArray; - exports.eachAsyncObject = eachAsyncObject; - exports.eachObject = eachObject; - exports.eachRight = eachRight; - exports.eachRightAsync = eachRightAsync; - exports.ensureArray = ensureArray; - exports.ensureBuffer = ensureBuffer; - exports.equalsZero = isZero; - exports.escapeRegex = escapeRegex; - exports.escapeRegexRegex = escapeRegexRegex; - exports.every = every; - exports.everyArg = everyArg; - exports.everyArray = everyArray; - exports.everyAsyncArray = everyAsyncArray; - exports.everyAsyncObject = everyAsyncObject; - exports.everyObject = everyObject; - exports.extendClass = extendClass; - exports.filter = filter; - exports.filterArray = filterArray; - exports.filterAsyncArray = filterAsyncArray; - exports.filterAsyncObject = filterAsyncObject; - exports.filterObject = filterObject; - exports.findIndex = findIndex; - exports.findIndexCache = findIndexCache; - exports.findItem = findItem; - exports.first = first; - exports.flatten = flatten; - exports.flattenDeep = flattenDeep; - exports.flow = flow; - exports.flowAsync = flowAsync; - exports.flowAsyncRight = flowAsyncRight; - exports.flowRight = flowRight; - exports.forEach = forEach; - exports.forEachAsync = forEachAsync; - exports.forMap = forMap; - exports.forOf = forOf; - exports.forOfAsync = forOfAsync; - exports.forOfCompactMap = forOfCompactMap; - exports.forOfCompactMapAsync = forOfCompactMapAsync; - exports.forOfEvery = forOfEvery; - exports.forOfEveryAsync = forOfEveryAsync; - exports.forOfFilter = forOfFilter; - exports.forOfFilterAsync = forOfFilterAsync; - exports.forOfMap = forOfMap; - exports.forOfMapAsync = forOfMapAsync; - exports.generateLoop = generateLoop; - exports.get = get; - exports.getEntries = getEntries; - exports.getFileExtension = getFileExtension; - exports.getFilename = getFilename; - exports.getHighest = getHighest; - exports.getLowest = getLowest; - exports.getNumberInsertIndex = getNumberInsertIndex; - exports.getPropDesc = getPropDesc; - exports.getPropNames = getPropNames; - exports.getType = getType; - exports.getTypeName = getTypeName; - exports.groupBy = groupBy; - exports.has = has; - exports.hasAnyKeys = hasAnyKeys; - exports.hasDot = hasDot; - exports.hasKeys = hasKeys; - exports.hasLength = hasLength; - exports.hasProp = hasProp; - exports.hasValue = hasValue; - exports.htmlEntities = htmlEntities; - exports.ifInvoke = ifInvoke; - exports.ifNotAssign = ifNotAssign; - exports.ifValue = ifValue; - exports.inAsync = inAsync; - exports.inSync = inSync; - exports.increment = increment; - exports.indexBy = indexBy; - exports.initial = initial; - exports.initialString = initialString; - exports.insertInRange = insertInRange; - exports.intersection = intersection; - exports.interval = interval; - exports.intervals = intervals; - exports.invert = invert; - exports.invokeArray = invokeArray; - exports.invokeCollection = invokeCollection; - exports.invokeCollectionAsync = invokeCollectionAsync; - exports.isArguments = isArguments; - exports.isArray = isArray; - exports.isArrayBuffer = isArrayBuffer; - exports.isArrayBufferCall = isArrayBufferCall; - exports.isArrayLike = isArrayLike; - exports.isAsync = isAsync; - exports.isAsyncCall = isAsyncCall; - exports.isBigInt = isBigInt; - exports.isBigIntCall = isBigIntCall; - exports.isBoolean = isBoolean; - exports.isBooleanCall = isBooleanCall; - exports.isBuffer = isBuffer; - exports.isBufferCall = isBufferCall; - exports.isChild = isChild; - exports.isCloneable = isCloneable; - exports.isConstructor = isConstructor; - exports.isConstructorFactory = isConstructorFactory; - exports.isConstructorNameFactory = isConstructorNameFactory; - exports.isDate = isDate; - exports.isDateCall = isDateCall; - exports.isDeno = isDeno; - exports.isEmpty = isEmpty; - exports.isEqual = isEqual; - exports.isF32 = isF32; - exports.isF32Call = isF32Call; - exports.isF64 = isF64; - exports.isF64Call = isF64Call; - exports.isFalse = isFalse; - exports.isFalsy = isFalsy; - exports.isFileCSS = isFileCSS; - exports.isFileHTML = isFileHTML; - exports.isFileJS = isFileJS; - exports.isFileJSON = isFileJSON; - exports.isFloat = isFloat; - exports.isFunction = isFunction; - exports.isGenerator = isGenerator; - exports.isGeneratorCall = isGeneratorCall; - exports.isI16 = isI16; - exports.isI16Call = isI16Call; - exports.isI32 = isI32; - exports.isI32Call = isI32Call; - exports.isI8 = isI8; - exports.isI8Call = isI8Call; - exports.isIterable = isIterable; - exports.isKindAsync = isKindAsync; - exports.isMap = isMap; - exports.isMapCall = isMapCall; - exports.isMatchArray = isMatchArray; - exports.isMatchObject = isMatchObject; - exports.isNegative = isNegative; - exports.isNodejs = isNodejs; - exports.isNotArray = isNotArray; - exports.isNotNumber = isNotNumber; - exports.isNotString = isNotString; - exports.isNull = isNull; - exports.isNumber = isNumber; - exports.isNumberCall = isNumberCall; - exports.isNumberEqual = isNumberEqual; - exports.isNumberInRange = isNumberInRange; - exports.isNumberNotInRange = isNumberNotInRange; - exports.isParent = isParent; - exports.isPlainObject = isPlainObject; - exports.isPositive = isPositive; - exports.isPrimitive = isPrimitive; - exports.isPromise = isPromise; - exports.isRegex = isRegex; - exports.isRegexCall = isRegexCall; - exports.isRelated = isRelated; - exports.isSafeInt = isSafeInt; - exports.isSame = isSame; - exports.isSameType = isSameType; - exports.isSet = isSet; - exports.isSetCall = isSetCall; - exports.isString = isString; - exports.isTrue = isTrue; - exports.isTruthy = isTruthy; - exports.isTypeFactory = isTypeFactory; - exports.isTypedArray = isTypedArray; - exports.isU16 = isU16; - exports.isU16Call = isU16Call; - exports.isU32 = isU32; - exports.isU32Call = isU32Call; - exports.isU8 = isU8; - exports.isU8C = isU8C; - exports.isU8CCall = isU8CCall; - exports.isU8Call = isU8Call; - exports.isUndefined = isUndefined; - exports.isWeakMap = isWeakMap; - exports.isWeakMapCall = isWeakMapCall; - exports.isZero = isZero; - exports.jsonParse = jsonParse; - exports.kebabCase = kebabCase; - exports.keys = keys; - exports.largest = largest; - exports.last = last; - exports.lowerCase = lowerCase; - exports.map = map; - exports.mapArray = mapArray; - exports.mapAsyncArray = mapAsyncArray; - exports.mapAsyncObject = mapAsyncObject; - exports.mapObject = mapObject; - exports.mapRightArray = mapRightArray; - exports.mapWhile = mapWhile; - exports.merge = merge; - exports.model = model; - exports.multiply = multiply; - exports.negate = negate; - exports.noValue = noValue; - exports.noop = noop; - exports.notEqual = notEqual; - exports.nthArg = nthArg; - exports.objectAssign = objectAssign; - exports.objectEntries = objectEntries; - exports.objectSize = objectSize; - exports.omit = omit; - exports.once = once; - exports.onlyUnique = onlyUnique; - exports.over = over; - exports.overEvery = overEvery; - exports.pair = pair; - exports.partition = partition; - exports.pick = pick; - exports.pluck = pluck; - exports.pluckObject = pluckObject; - exports.promise = promise; - exports.propertyMatch = propertyMatch; - exports.randomFloat = randomFloat; - exports.randomInt = randomInt; - exports.range = range; - exports.rangeDown = rangeDown; - exports.rangeUp = rangeUp; - exports.rawURLDecode = rawURLDecode; - exports.reArg = reArg; - exports.regexTestFactory = regexTestFactory; - exports.remainder = remainder; - exports.remove = remove; - exports.removeBy = removeBy; - exports.replaceList = replaceList; - exports.rest = rest; - exports.restString = restString; - exports.returnValue = returnValue; - exports.right = right; - exports.rightString = rightString; - exports.sample = sample; - exports.sanitize = sanitize; - exports.setKey = setKey; - exports.setValue = setValue; - exports.shuffle = shuffle; - exports.smallest = smallest; - exports.snakeCase = snakeCase; - exports.sortCollectionAlphabetically = sortCollectionAlphabetically; - exports.sortCollectionAlphabeticallyReverse = sortCollectionAlphabeticallyReverse; - exports.sortCollectionAscending = sortCollectionAscending; - exports.sortCollectionAscendingFilter = sortCollectionAscendingFilter; - exports.sortCollectionDescending = sortCollectionDescending; - exports.sortCollectionDescendingFilter = sortCollectionDescendingFilter; - exports.sortNumberAscending = sortNumberAscending; - exports.sortNumberDescening = sortNumberDescening; - exports.sortObjectsAlphabetically = sortObjectsAlphabetically; - exports.sortObjectsAlphabeticallyReverse = sortObjectsAlphabeticallyReverse; - exports.sortUnique = sortUnique; - exports.stringify = stringify; - exports.stubArray = stubArray; - exports.stubFalse = stubFalse; - exports.stubObject = stubObject; - exports.stubString = stubString; - exports.stubTrue = stubTrue; - exports.subtract = subtract; - exports.subtractAll = subtractAll; - exports.subtractReverse = subtractReverse; - exports.sumAll = sumAll; - exports.take = take; - exports.takeRight = takeRight; - exports.throttle = throttle; - exports.timer = timer; - exports.timers = timers; - exports.times = times; - exports.timesAsync = timesAsync; - exports.timesMap = timesMap; - exports.timesMapAsync = timesMapAsync; - exports.toArray = toArray; - exports.toPath = toPath; - exports.toggle = toggle; - exports.tokenize = tokenize; - exports.truncate = truncate; - exports.truncateRight = truncateRight; - exports.unZip = unZip; - exports.unZipObject = unZipObject; - exports.union = union; - exports.uniqID = uniqID; - exports.unique = unique; - exports.untilFalseArray = untilFalseArray; - exports.untilTrueArray = untilTrueArray; - exports.upperCase = upperCase; - exports.upperFirst = upperFirst; - exports.upperFirstAll = upperFirstAll; - exports.upperFirstLetter = upperFirstLetter; - exports.upperFirstOnly = upperFirstOnly; - exports.upperFirstOnlyAll = upperFirstOnlyAll; - exports.virtualStorage = virtualStorage; - exports.whileCompactMap = whileCompactMap; - exports.whileEachArray = whileEachArray; - exports.whileMapArray = whileMapArray; - exports.without = without; - exports.words = words; - exports.wrap = wrap; - exports.xor = xor; - exports.zip = zip; - exports.zipObject = zipObject; + options, + ); + } + async function assertAsync(sourceArg, expected, options) { + const source = await sourceArg; + const expectedFunction = + isFunction(expected) && (await expected(source, options)) === false; + if (expectedFunction || notEqual(source, expected)) { + return createAssertError(source, expected, options); + } + return true; + } + /** + * Check if source value matches the expected value. + * + * @function assert + * @category utility + * @type {Function} + * @param {*} source - The source object to compare to. + * @param {*} expected - The expected result that's compared to the source. + * @param {*} options - Additional options for the Error instance & unit test information. + * @returns {Object} - Returns a deep clone of an object. + * + * @example + * import { assert } from '@universalweb/acid'; + * if (!assert(1,1)) { + * new Error('Assert Method Failed'); + * } + */ + function assert(source, expected, options) { + if (isKindAsync(source) || isKindAsync(expected)) { + return assertAsync(source, expected, options); + } + const expectedFunction = + isFunction(expected) && expected(source, options) === false; + if (expectedFunction || notEqual(source, expected)) { + return createAssertError(source, expected, options); + } + return true; + } + + /** + * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to. + * + * @function bindAll + * @category utility + * @type {Function} + * @param {Object|Function|Array} collection - The functions to bind. + * @param {*} bindThis - Object to be bound to functions. + * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to. + * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided. + * + * @example + * import { assert, bindAll } from '@universalweb/acid'; + * const bounded = bindAll([function () { return this;}], 'Bounded'); + * assert(bounded[0](), 'Bounded'); + */ + function bindAll(collection, bindThis, targetAssign) { + const results = map(collection, (item) => { + return isFunction(item) ? item.bind(bindThis) : item; + }); + return targetAssign ? assign(targetAssign, results) : results; + } + + /** + * Clears the values out of an array, buffer, and objects like Map that have a clear method. + * + * @function clear + * @category utility + * @type {Function} + * @param {Array} source - Takes an array to be emptied. + * @returns {Array} - The originally given array. + * + * @example + * import { clear, assert } from '@universalweb/acid'; + * assert(clear(Buffer.from([1,'B', 'Cat'])), []); + */ + function clear(source) { + if (source) { + if (isBuffer(source)) { + return clearBuffer(source); + } else if (isArray(source)) { + return clearArray(source); + } else if (source.clear) { + source.clear(); + } else if (source.length) { + source.length = 0; + } + } + return source; + } + + /** + * Creates a structured clone of an object which is a "structured-cloneable type". + * + * @function clone + * @category utility + * @type {Function} + * @param {Object} source - Any structured-cloneable type object. + * @returns {Object} - Returns a deep clone of an object. + * + * @example + * import { clone, assert } from '@universalweb/acid'; + * assert(clone({a:{b:[2]}}), {a:{b:[2]}}); + */ + const structuredCloneSafe = globalThis.structuredClone; + function clone(source) { + return structuredCloneSafe(source); + } + + /** + * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next. + * + * @function concurrent + * @type {Function} + * @category Utility + * @async + * @param {Array} source - Array of async functions that will be looped through. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. + * @returns {Object} - The originally given array. + * + * @example + * import { concurrent, assert } from '@universalweb/acid'; + * const list = []; + * await concurrent([async (item) => { + * return item; + * }, async (item) => { + * return item; + * }], null, 1); + * assert(list, [1, 1]); + */ + async function concurrent(source, thisBind, ...args) { + const arrayLength = source.length; + const results = []; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = source[index].call( + thisBind, + ...args, + index, + results, + callable, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = source[index](...args, index, results, callable); + } + } + return Promise.all(results); + } + + /** + * Creates an array with all isFalsy values removed. The values false, null, 0, "", undefined, and NaN are isFalsy. + * + * @function compact + * @category Utility + * @type {Function} + * @param {Array|Object} source - Array or Object to be compacted. + * @returns {Array|Object} - A new object or array containing the filtered values. + * + * @example + * import { compact, assert } from '@universalweb/acid'; + * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']); + */ + function compact(source) { + if (isPlainObject(source)) { + const sourceKeys = keys(source); + const sourceKeysLength = sourceKeys.length; + const targetObject = {}; + for (let i = 0; i < sourceKeysLength; i++) { + const keyName = sourceKeys[i]; + const item = source[keyName]; + const isisTruthy = isTruthy(item); + if (isisTruthy) { + targetObject[keyName] = item; + } + } + return targetObject; + } + return source.filter((item) => { + return isTruthy(item); + }); + } + + /** + * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function forOfCompactMapAsync + * @category utility + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * import { assert,forOfCompactMapAsync } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = await forOfCompactMapAsync(source, async (item) => { + * return item; + * }); + * assert(temp, {b: 2, c: 3}); + */ + async function forOfCompactMapAsync( + source, + iteratee = returnValue, + resultsObject, + generatorArgs, + ) { + if (isGenerator(source)) { + const resultsGenerator = []; + for await (const item of source(...generatorArgs)) { + const result = await iteratee(item, resultsGenerator, source); + if (hasValue(result)) { + resultsGenerator.push(result); + } + } + return resultsGenerator; + } + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = await iteratee(value, results, source); + if (hasValue(result)) { + methodPushBound(result); + } + } + return results; + } + const methodSet = isFunction(results.set); + for await (const [key, value] of source) { + const result = await iteratee(value, key, results, source); + if (hasValue(result)) { + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + } + return results; + } + + /** + * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function forOfCompactMap + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * import { assert,forOfCompactMap } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = forOfCompactMap(source, (item) => { + * return item; + * }); + * assert(temp, {b: 2, c: 3}); + */ + function forOfCompactMap(source, iteratee = returnValue, resultsObject) { + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = iteratee(value, results, source); + if (hasValue(result)) { + methodPushBound(result); + } + } + return results; + } + const methodSet = isFunction(results.set); + for (const [key, value] of source) { + const result = iteratee(value, key, results, source); + if (hasValue(result)) { + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + } + return results; + } + + /** + * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function compactMap + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {Object | Function} [results = {}] - Object that will be used to assign results. + * @returns {Array | object | Function} - A new object of the same calling object's type. + * + * @example + * import { compactMap, assert } from '@universalweb/acid'; + * assert(compactMap({a: null, b: 2, c: 3}, (item) => { + * return item; + * }), {b: 2, c: 3}); + */ + const compactMap = generateLoop( + compactMapArray, + compactMapAsyncArray, + compactMapObject, + compactMapAsyncObject, + forOfCompactMap, + forOfCompactMapAsync, + ); + + function everyArg(...methods) { + if (isAsync(methods[0])) { + return async function (...args) { + return every(methods, async (method) => { + return every(args, async (item) => { + return method(item); + }); + }); + }; + } + return function (...args) { + return every(methods, (method) => { + return every(args, (item) => { + return method(item); + }); + }); + }; + } + + /** + * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. + * + * @function forOfFilter + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. + * + * @example + * import { assert, forOfFilter } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = forOfFilter(source, (item) => { + * return Boolean(item); + * }); + * assert(temp, {b: 2, c: 3}); + */ + function forOfFilter(source, iteratee = returnValue, resultsObject) { + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = iteratee(value, results, source); + if (result === true) { + methodPushBound(value); + } + } + } else { + const methodSet = isFunction(results.set); + for (const [key, value] of source) { + const result = iteratee(value, key, results, source); + if (result === true) { + if (methodSet) { + results.set(key, value); + } else { + results[key] = value; + } + } + } + } + return results; + } + + /** + * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. + * + * @function forOfFilterAsync + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. + * + * @example + * import { assert, forOfFilterAsync } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = forOfFilterAsync(source, (item) => { + * return Boolean(item); + * }); + * assert(temp, {b: 2, c: 3}); + */ + async function forOfFilterAsync( + source, + iteratee = returnValue, + resultsObject, + generatorArgs, + ) { + if (isGenerator(source)) { + const resultsGenerator = []; + for await (const item of source(...generatorArgs)) { + if ((await iteratee(item, resultsGenerator, source)) === true) { + resultsGenerator.push(item); + } + } + return resultsGenerator; + } + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = await iteratee(value, results, source); + if (result === true) { + methodPushBound(value); + } + } + } else { + const methodSet = isFunction(results.set); + for await (const [key, value] of source) { + const result = await iteratee(value, key, results, source); + if (result === true) { + if (methodSet) { + results.set(key, value); + } else { + results[key] = value; + } + } + } + } + return results; + } + + /** + * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. + * + * @function filter + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {Object | Function} [results = {}] - Object that will be used to assign results. + * @returns {Array | object | Function} - A new object of the same calling object's type. + * + * @example + * import { filter, assert } from '@universalweb/acid'; + * assert(filter({a: false, b: true, c: true}, (item) => { + * return item; + * }), {b: true, c: true}); + */ + const filter = generateLoop( + filterArray, + filterAsyncArray, + filterObject, + filterAsyncObject, + forOfFilter, + forOfFilterAsync, + ); + + function returnFlow$1(callable) { + return (...methods) => { + return (arg) => { + let value = arg; + callable(methods, (item) => { + value = item(value); + }); + return value; + }; + }; + } + /** + * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. + * + * @function flow + * @category utility + * @type {Function} + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flow(increment, increment, deduct)(0); + * // => 1 + */ + const flow = returnFlow$1(eachArray); + /** + * This method is like flow except that it creates a function that invokes the given functions from right to left. + * + * @function flowRight + * @category utility + * @type {Function} + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flowRight(increment, increment, deduct)(0); + * // => 1 + */ + const flowRight = returnFlow$1(eachRight); + + function returnFlow(callable) { + return (...methods) => { + return async (arg) => { + let value = arg; + await callable(methods, async (item) => { + value = await item(value); + }); + return value; + }; + }; + } + /** + * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. + * + * @function flowAsync + * @category utility + * @type {Function} + * @async + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); + * // => 2 + */ + const flowAsync = returnFlow(eachAsyncArray); + /** + * This method is like flow except that it creates a function that invokes the given functions from right to left. + * + * @function flowAsyncRight + * @category utility + * @type {Function} + * @async + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); + * // => 2 + */ + const flowAsyncRight = returnFlow(eachRightAsync); + + function forMap(source, callback) { + const cloned = cloneType(source); + const method = cloned.push || cloned.add; + if (method && isFunction(method)) { + const methodBound = method.bind(cloned); + source.forEach((item) => { + const result = callback(item, cloned); + methodBound(result); + }); + } else if (isFunction(cloned.set)) { + source.forEach((item, key) => { + const result = callback(item, key, cloned); + cloned.set(key, result); + }); + } else { + source.forEach((item, key) => { + const result = callback(item, key, cloned); + cloned[key] = result; + }); + } + return cloned; + } + + /** + * Takes all but the last item in the array. + * + * @function arraysToObject + * @type {Function} + * @category utility + * @param {Array} source - Array to have items extracted from. + * @param {Array} properties - Array to have items extracted from. + * @returns {Array} - Returns a completely flattened array. + * + * @example + * import { arraysToObject, assert } from '@universalweb/acid'; + * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3}); + */ + function arraysToObject(source, properties) { + const sortedObject = {}; + eachArray(source, (item, key) => { + sortedObject[properties[key]] = item; + }); + return sortedObject; + } + + /** + * Checks if an object contains something. For basic searches. + * + * @function has + * @category utility + * @param {Array|String|Object} source - Object to be checked. + * @param {String|Array|Function|RegExp} search - Object that is being searched for. + * @param {Number} position - Index at which to start searching. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { has, assert } from '@universalweb/acid'; + * assert(has('Hello World', 'Hello'), true); + * assert(has(['Hello', 'World'], 'hello'), true); + */ + function has(source, search, position) { + if (noValue(source) || noValue(search)) { + return false; + } + if (source === search) { + return true; + } + if (isString(source)) { + if (isString(search)) { + return source.includes(search, position); + } + if (isRegex(search)) { + return search.test(source); + } + if (isFunction(search)) { + return search(source); + } + if (isArray(search)) { + return everyArray(search, (item) => { + return has(source, item); + }); + } + return every(search, (item) => { + return has(source, item); + }); + } + if (isArray(source)) { + if (isRegex(search)) { + return everyArray(source, (item) => { + return item.test(search); + }); + } + if (isFunction(search)) { + return everyArray(source, search); + } + if (isArray(search)) { + return everyArray(search, (item) => { + return has(source, item); + }); + } + return source.includes(search, position); + } + if (isPlainObject(source)) { + if (isRegex(search)) { + return everyObject(source, (item) => { + return item.test(search); + }); + } + if (isFunction(search)) { + return everyObject(source, search); + } + if (isPlainObject(search)) { + return everyObject(source, (item, key) => { + return item === search[key]; + }); + } + return everyObject(source, (item) => { + return has(item, search); + }); + } + return false; + } + + /** + * Checks if the string has a '.'. + * + * @function hasDot + * @category utility + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { hasDot, assert } from '@universalweb/acid'; + * assert(hasDot('test.js'), true); + */ + const hasDot = regexTestFactory(/\./); + + /** + * Checks if a property on an object has a value. If not, it will assign a value. + * + * @function ifNotAssign + * @category utility + * @type {Function} + * @param {Object} rootObject - The object to check. + * @param {String} property - The property name which is to be checked. + * @param {*} equalThis - The reassignment value for the property being checked. + * @returns {Object} - Returns the provided rootObject. + * + * @example + * import { ifNotAssign, assert } from '@universalweb/acid'; + * assert(ifNotAssign({}, 'a', 1), {a:1}); + */ + const ifNotAssign = (rootObject, property, equalThis) => { + if (property && !hasValue(rootObject[property])) { + rootObject[property] = equalThis; + } + return rootObject; + }; + + class Intervals { + list = construct(Map); + construct() {} + /** + * Remove a setInterval that was created using the intervals function. + * + * @param {Number} id - The id of the setInterval to remove. + * @returns {undefined} - Returns nothing. + * + * @example + * timer(() => {}, 100); + * // => 0 + */ + remove(id) { + clearInterval(id); + this.list.delete(id); + } + has(id) { + return this.list.has(id); + } + get(id) { + return this.list.get(id); + } + /** + * Create a setInterval & add it to the list of interval timers. + * + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setTimeoutId ID. + * + * @example + * timers.set(() => {}, 100); + * // => 0 + */ + set(callable, time) { + const id = setInterval(() => { + callable(); + }, time); + this.list.set(id, true); + return id; + } + /** + * Clear all active setIntervals. + * + * @returns {undefined} - Returns undefined. + * + * @example + * intervals.clear(); + * // => undefined + */ + clear() { + const currentThis = this; + currentThis.list.forEach((id) => { + currentThis.remove(id); + }); + } + } + const intervals = construct(Intervals); + /** + * Create an interval timer. + * + * @function interval + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setInterval ID. + * + * @example + * interval(() => {}, 100); + * // => 0 + */ + function interval(callable, time) { + return intervals.set(callable, time); + } + /** + * Clear all active interval timers. + * + * @function clearIntervals + * @category function + * @returns {undefined} - Returns undefined. + * + * @example + * clearIntervals(); + * // => undefined + */ + function clearIntervals() { + const id = setTimeout(noop, 0); + times(id, (index) => { + intervals.remove(index); + }); + } + + function merge(target, ...sources) { + each(sources, (currentSource) => { + each(currentSource, (sourceItem, sourceKey) => { + if (target[sourceKey]) { + if ( + isPlainObject(sourceItem) || + isArray(sourceItem) || + sourceItem.forEach + ) { + return merge(target[sourceKey], sourceItem); + } + } + target[sourceKey] = sourceItem; + }); + }); + return target; + } + + /** + * Returns the model with the given name. + * + * @function Model + * @type {Class} + * @category utility + * @param {String} modelName - The name of the model to return. + * @param {*} modelSource - The value of the model to return. + * @returns {Model} - The model with the given name. + * + * @example + * import { Model, model, assert } from '@universalweb/acid'; + * const test = new Model('test', {a: 1}); + * assert(model('test'), {a: 1}); + */ + class Model { + static models = new Map(); + constructor(modelName, modelSource) { + if (hasValue(modelSource)) { + assign(this, modelSource); + this.modelName = modelName; + Model.models.set(modelName, modelSource); + } else { + assign(this, modelName); + } + } + delete(modelName) { + Model.models.delete(modelName || this.modelName); + } + set(modelName) { + if (modelName) { + this.modelName = modelName; + } + Model.models.set(modelName || this.modelName, this); + } + has(modelName) { + return Model.models.has(modelName || this.modelName); + } + get(modelName) { + return Model.models.get(modelName || this.modelName); + } + } + /** + * Set & Get a model. + * + * @function model + * @type {Function} + * @category utility + * @param {String} modelName - Name of the model. + * @param {Object} modelSource - The model object. + * @returns {Model} - Returns the associated model. + * + * @example + * import { model, assert } from '@universalweb/acid'; + * model('test', {a: 1}); + * assert(model('test'), {a: 1}); + */ + function model(modelName, modelSource) { + if (hasValue(modelSource)) { + return construct(Model, [modelName, modelSource]); + } + return get(modelName, Model.models); + } + + /** + * Takes the first two arguments given and returns them inside a new array. + * + * @function pair + * @category utility + * @param {*} argument1 - The source object. + * @param {*} argument2 - The source object. + * @returns {Array} The array which holds the pair. + * + * @example + * import { pair, assert } from '@universalweb/acid'; + * assert(air(1, 2), [1, 2]); + */ + function pair(argument1, argument2) { + return [argument1, argument2]; + } + + /** + * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee. + * + * @function concurrentStatus + * @category utility + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The array from Promise.allSettled. + * + * @example + * import { concurrentStatus, assert } from '@universalweb/acid'; + * const tempList = []; + * await concurrentStatus([1, 2], async (item) => { + * return item; + * }); + * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]); + */ + function concurrentStatus(source, iteratee, additionalArgument) { + const arrayLength = source.length; + const queue = []; + for (let index = 0; index < arrayLength; index++) { + queue[index] = iteratee( + source[index], + index, + source, + arrayLength, + additionalArgument, + ); + } + return Promise.allSettled(queue); + } + + /** + * A wrapper around the promise constructor. + * + * @function promise + * @type {Function} + * @category utility + * @param {Function} callback - Function to be called back. + * @returns {Promise} - A constructor with a callback function.). + * + * @example + * promise((a) => {}); + * // => Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined} + */ + function promise(callback) { + return new Promise(callback); + } + + /** + * Using a deep comparison it checks if properties of two objects using an array are equal. + * + * @function propertyMatch + * @type {Function} + * @category utility + * @param {Object} source - The source object to compare. + * @param {Object} compared - Object to be compared to source. + * @param {Array} properties - List of properties to compare defaults to keys(source). + * @returns {Array} - Returns an array of properties. + * + * @example + * import { propertyMatch, assert } from '@universalweb/acid'; + * assert(propertyMatch({ + * a: 1, + * b: 2 + * }, { + * a: 1, + * b: 2 + * }, ['a', 'b']), true); + */ + const propertyMatch = (source, compared, properties = keys(source)) => { + return everyArray(properties, (property) => { + return isEqual(source[property], compared[property]); + }); + }; + + function setKey(source, key, value) { + if (key && isPlainObject(source)) { + source[key] = value; + } else if (isNumber(key) && isArray(source)) { + source[key] = value; + } else if (source.set) { + source.set(key, value); + } else if (source.push) { + source.push(value); + } else if (source.add) { + source.add(value); + } else { + source[key] = value; + } + return source; + } + + function setValue(source, value, key) { + if (isNumber(key) && isArray(source)) { + source[key] = value; + } else if (source.push) { + source.push(value); + } else if (source.add) { + source.add(value); + } else { + source[key] = value; + } + return source; + } + + class Store { + source; + constructor(source = {}) { + this.source = source; + if (source === null || typeof source !== "object") { + return source; + } + eachObject(source, (property) => { + source[property] = new Store(source[property]); + }); + this.data = new Proxy(source, { + get(proxySource, property) { + console.log(proxySource, property, proxySource[property]); + return proxySource[property]; + }, + set(proxySource, property, value) { + console.log(proxySource, property, proxySource[property]); + proxySource[property] = new Store(value); + return true; + }, + }); + } + } + + /** + * This method returns a new empty array. + * + * @function stubArray + * @category utility + * @type {Function} + * @returns {Array} - Returns the new empty array. + * + * @example + * import { stubArray, assert } from '@universalweb/acid'; + * assert(stubArray(), []); + */ + function stubArray() { + return []; + } + + /** + * This method returns false. + * + * @function stubFalse + * @category utility + * @type {Function} + * @returns {Boolean} - Returns false. + * + * @example + * import { stubFalse, assert } from '@universalweb/acid'; + * assert(stubFalse(), false); + */ + function stubFalse() { + return false; + } + + /** + * This method returns a new empty object. + * + * @function stubObject + * @category utility + * @type {Function} + * @returns {Object} - Returns the new empty object. + * + * @example + * import { stubObject, assert } from '@universalweb/acid'; + * assert(stubObject(), {}); + */ + const stubObject = () => { + return {}; + }; + + /** + * This method returns a new empty string. + * + * @function stubString + * @category utility + * @type {Function} + * @returns {String} - Returns the new empty string. + * + * @example + * import { stubString, assert } from '@universalweb/acid'; + * assert(stubString(), ''); + */ + const stubString = () => { + return ""; + }; + + /** + * This method returns true. + * + * @function stubTrue + * @category utility + * @type {Function} + * @returns {Boolean} - Returns true. + * + * @example + * import { stubTrue, assert } from '@universalweb/acid'; + * assert(stubTrue(), true); + */ + const stubTrue = () => { + return true; + }; + + /** + * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument. + * + * @async + * @function timesAsync + * @category utility + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @returns {undefined} - Nothing. + * + * @example + * import { timesAsync } from '@universalweb/acid'; + * await timesAsync(3, async (item) => { + * console.log(item); + * }); + * // 0 + * // 1 + * // 2 + * // => undefined + */ + async function timesAsync(amount, iteratee) { + for (let index = 0; index < amount; index++) { + await iteratee(amount); + } + } + /** + * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array. + * + * @async + * @function timesMapAsync + * @category array + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @param {Array} [results = []] - Array that will have iteratee return pushed to. + * @returns {Array} - An array with iteratee's returned values. + * + * @example + * import { timesMapAsync } from '@universalweb/acid'; + * await timesMapAsync(3, (item) => { + * return item; + * }); + * // => [0, 1, 2] + */ + async function timesMapAsync(amount, iteratee, results = []) { + for (let index = 0; index < amount; index++) { + results[index] = await iteratee(amount); + } + return results; + } + + /** + * Performs a toggle between 2 values using a deep or strict comparison. + * + * @function toggle + * @type {Function} + * @category utility + * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments. + * @param {(string|number|Object|Array)} on - The first object to be compared to. + * @param {(string|number|Object|Array)} off - The second object to be compared to. + * @returns {(string|number|Object|Array)} - The opposing value to the current. + * + * @example + * import { toggle } from '@universalweb/acid'; + * let toggleMe = true; + * toggleMe = toggle(toggleMe, true, false); + * // => false + */ + function toggle(value, on = true, off = false) { + return isEqual(on, value) ? off : on; + } + + /** + * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available. + * + * @class UniqID + * @type {Class} + * @category utility + * @returns {UniqID} - Returns a new instance of UniqID. + * + * @example + * import { UniqID, construct, assert } from '@universalweb/acid'; + * const gen = construct(UniqID); + * assert(gen.get(), 0); + * assert(gen.get(), 1); + * gen.free(0); + * assert(gen.get(), 0); + */ + class UniqID { + totalActive = 0; + freed = []; + totalFree = 0; + /** + * Generates a new ID or recycle one that is no longer used. + * + * @function get + * @class UniqID + * @category utility + * @type {Function} + * @returns {Number} - Returns a unique id. + * + * @example + * import { UniqID, construct, assert } from '@universalweb/acid'; + * const gen = construct(UniqID); + * assert(gen.get(), 0); + */ + get() { + let result = this.freed.shift(); + if (hasValue(result)) { + this.totalFree--; + } else { + result = this.totalActive; + this.totalActive++; + } + return result; + } + /** + * Frees an UID so that it may be recycled for later use. + * + * @function free + * @class UniqID + * @category utility + * @type {Function} + * @param {Number} id - Number to be freed. + * @returns {undefined} - Nothing is returned. + * + * @example + * import { UniqID, construct, assert } from '@universalweb/acid'; + * const gen = construct(UniqID); + * assert(gen.get(), 0); + * gen.free(0); + * assert(gen.get(), 0); + */ + free(id) { + this.freed.push(id); + this.totalFree++; + const isActive = this.totalActive > 0; + const shouldReset = this.totalActive === this.totalFree; + if (isActive && shouldReset) { + this.reset(); + } + } + reset() { + this.totalActive = 0; + this.freed.length = 0; + this.totalFree = 0; + } + } + /** + * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available. + * + * @function uniqID + * @category utility + * + * @example + * import { uniqID, assert } from '@universalweb/acid'; + * assert(uniqID.get(), 0); + * assert(uniqID.get(), 1); + * uniqID.free(0); + * assert(uniqID.get(), 0); + */ + const uniqID = construct(UniqID); + + /** + * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. + * + * @function VirtualStorage + * @category utility + * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. + * @returns {*} - Returns a new VirtualStorage Object. + * + * @example + * import { VirtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = new VirtualStorage(); + * // => New VirtualStorage Object + */ + class VirtualStorage { + constructor(initialObject = new Map()) { + this.items = initialObject; + } + /** + * Get an item from a virtual storage object. + * + * @param {String} key - The key used to store the data. + * @returns {undefined} - Returns undefined. + * + * @example + * import { VirtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = virtualStorage(); + * myVirtualStorage.setItem('key', 'value'); + * myVirtualStorage.getItem('key'); + * // => 'value' + */ + getItem(key) { + if (this.isMap) { + return this.items.get(key); + } else { + return this.items[key]; + } + } + get(...args) { + return this.getItem(...args); + } + hasItem(key) { + if (this.isMap) { + return this.items.has(key); + } else { + return hasValue(this.items[key]); + } + } + has(...args) { + return this.hasItem(...args); + } + /** + * Save an item to a virtual storage object. + * + * @param {String} key - The key used to store the data. + * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify. + * @returns {undefined} - Returns undefined. + * + * @example + * import { VirtualStorage, assert } from '@universalweb/acid'; + * const vStorage = new VirtualStorage(); + * vStorage.setItem('title', 'value'); + * assert(vStorage.getItem('title'), 'value'); + */ + setItem(key, value) { + if (this.isMap) { + this.items.set(key, value); + } else { + this.items[key] = value; + } + return this; + } + set(...args) { + return this.setItem(...args); + } + /** + * Clears all data from the virtual storage object by replacing with a new object. + * + * @returns {undefined} - Returns undefined. + * + * @example + * import { virtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = virtualStorage(); + * myVirtualStorage.setItem('key', 'value'); + * myVirtualStorage.clear(); + * myVirtualStorage.getItem('key'); + * // => undefined + */ + clear() { + if (this.isMap) { + this.items.clear(); + } else { + this.items = cloneType(this.items); + } + return this; + } + /** + * Remove an item from a virtual storage object. + * + * @param {String} key - The key used to remove data. + * @returns {undefined} - Returns undefined. + * + * @example + * import { virtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = virtualStorage(); + * myVirtualStorage.setItem('key', 'value'); + * myVirtualStorage.removeItem('key'); + * myVirtualStorage.getItem('key'); + * // => undefined + */ + removeItem(key) { + if (this.isMap) { + this.items.delete(key); + } else { + this.items[key] = null; + } + return this; + } + remove(...args) { + return this.removeItem(...args); + } + } + /** + * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. + * + * @function virtualStorage + * @category browser + * @type {Function} + * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. + * @returns {*} - Returns a new VirtualStorage Object. + * + * @example + * import { virtualStorage, assert } from '@universalweb/acid'; + * const vStorage = virtualStorage(); + * vStorage.setItem('title', 'value'); + * assert(vStorage.getItem('title'), 'value'); + */ + function virtualStorage(initialObject) { + return new VirtualStorage(initialObject); + } + + /** + * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object. + * + * @function inAsync + * @type {Function} + * @category Utility + * @async + * @param {Array} source - Array of async functions that will be looped through. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. + * @returns {Object} - The originally given array. + * + * @example + * import { inAsync, assert } from '@universalweb/acid'; + * const list = []; + * await inAsync([async (firstArgument, item, index) => { + * list.push(index + firstArgument.a); + * }, async (firstArgument, item, index) => { + * list.push(index); + * }], {a:1}); + * assert(list, [1, 1]); + */ + async function inAsync(source, thisBind, ...args) { + const arrayLength = source.length; + const results = []; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = await source[index].call( + thisBind, + ...args, + index, + callable, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = await source[index](...args, index, callable); + } + } + return results; + } + + /** + * Invoke an array of functions. + * + * @function inSync + * @category Utility + * @type {Function} + * @param {Array} source - Array of functions that will be looped through. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function. + * @returns {undefined} - Returns undefined. + * + * @example + * inSync([() => {console.log(1);}, () => {console.log(2);}]); + * // 1 + * // 2 + * // => undefined + */ + function inSync(source, thisBind, ...args) { + const arrayLength = source.length; + const results = []; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = callable.call(thisBind, ...args, index, callable); + } + } else { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = callable(...args, index, callable); + } + } + return results; + } + + async function copyToPath(sourceFolder, destinationFolder, file) { + const sourcePath = path.join(sourceFolder, file); + const destinationPath = path.join(destinationFolder, file); + await promises.copyFile(sourcePath, destinationPath); + } + async function copyFolder(sourceFolder, destinationFolder) { + const files = await promises.readdir(sourceFolder); + await eachAsyncArray(files, async (file) => { + const sourcePath = path.join(sourceFolder, file); + const filestats = await promises.stat(sourcePath); + if (filestats.isDirectory()) { + const folderDestination = path.join( + destinationFolder, + file.replace(sourceFolder, ""), + ); + await promises.mkdir(folderDestination, { + recursive: true, + }); + await copyFolder(sourcePath, folderDestination); + } else { + await copyToPath(sourceFolder, destinationFolder, file); + } + }); + return true; + } + + function currentFile(importMeta) { + if (globalThis.__filename) { + return __filename; + } + return node_url.fileURLToPath(importMeta.url); + } + function currentPath(importMeta) { + if (globalThis.__dirname) { + return __dirname; + } + return path$1.dirname(node_url.fileURLToPath(importMeta.url)); + } + + exports.Chain = Chain; + exports.Intervals = Intervals; + exports.Model = Model; + exports.Store = Store; + exports.Timers = Timers; + exports.UniqID = UniqID; + exports.VirtualStorage = VirtualStorage; + exports.add = add; + exports.after = after; + exports.apply = apply; + exports.arrayToRegex = arrayToRegex; + exports.arraysToObject = arraysToObject; + exports.ary = ary; + exports.assert = assert; + exports.assertAsync = assertAsync; + exports.assign = assign; + exports.assignToClass = assignToClass; + exports.assignToObject = assignToObject; + exports.before = before; + exports.bindAll = bindAll; + exports.cacheNativeMethod = cacheNativeMethod; + exports.calcProgress = calcProgress; + exports.camelCase = camelCase; + exports.chain = chain; + exports.chunk = chunk; + exports.chunkString = chunkString; + exports.clear = clear; + exports.clearArray = clearArray; + exports.clearBuffer = clearBuffer; + exports.clearIntervals = clearIntervals; + exports.clearTimers = clearTimers; + exports.clone = clone; + exports.cloneArray = cloneArray; + exports.cloneType = cloneType; + exports.compact = compact; + exports.compactKeys = compactKeys; + exports.compactMap = compactMap; + exports.compactMapArray = compactMapArray; + exports.compactMapAsyncArray = compactMapAsyncArray; + exports.compactMapAsyncObject = compactMapAsyncObject; + exports.compactMapObject = compactMapObject; + exports.concurrent = concurrent; + exports.concurrentEachArray = concurrentEachArray; + exports.concurrentStatus = concurrentStatus; + exports.construct = construct; + exports.constructorName = constructorName; + exports.copyFolder = copyFolder; + exports.countBy = countBy; + exports.countKey = countKey; + exports.countWithoutKey = countWithoutKey; + exports.currentFile = currentFile; + exports.currentPath = currentPath; + exports.curry = curry; + exports.curryRight = curryRight; + exports.debounce = debounce; + exports.deduct = deduct; + exports.defProp = defProp; + exports.difference = difference; + exports.divide = divide; + exports.drop = drop; + exports.dropRight = dropRight; + exports.each = each; + exports.eachArray = eachArray; + exports.eachAsyncArray = eachAsyncArray; + exports.eachAsyncObject = eachAsyncObject; + exports.eachObject = eachObject; + exports.eachRight = eachRight; + exports.eachRightAsync = eachRightAsync; + exports.ensureArray = ensureArray; + exports.ensureBuffer = ensureBuffer; + exports.equalsZero = isZero; + exports.escapeRegex = escapeRegex; + exports.escapeRegexRegex = escapeRegexRegex; + exports.every = every; + exports.everyArg = everyArg; + exports.everyArray = everyArray; + exports.everyAsyncArray = everyAsyncArray; + exports.everyAsyncObject = everyAsyncObject; + exports.everyObject = everyObject; + exports.extendClass = extendClass; + exports.filter = filter; + exports.filterArray = filterArray; + exports.filterAsyncArray = filterAsyncArray; + exports.filterAsyncObject = filterAsyncObject; + exports.filterObject = filterObject; + exports.findIndex = findIndex; + exports.findIndexCache = findIndexCache; + exports.findItem = findItem; + exports.first = first; + exports.flatten = flatten; + exports.flattenDeep = flattenDeep; + exports.flow = flow; + exports.flowAsync = flowAsync; + exports.flowAsyncRight = flowAsyncRight; + exports.flowRight = flowRight; + exports.forEach = forEach; + exports.forEachAsync = forEachAsync; + exports.forMap = forMap; + exports.forOf = forOf; + exports.forOfAsync = forOfAsync; + exports.forOfCompactMap = forOfCompactMap; + exports.forOfCompactMapAsync = forOfCompactMapAsync; + exports.forOfEvery = forOfEvery; + exports.forOfEveryAsync = forOfEveryAsync; + exports.forOfFilter = forOfFilter; + exports.forOfFilterAsync = forOfFilterAsync; + exports.forOfMap = forOfMap; + exports.forOfMapAsync = forOfMapAsync; + exports.generateLoop = generateLoop; + exports.get = get; + exports.getEntries = getEntries; + exports.getFileExtension = getFileExtension; + exports.getFilename = getFilename; + exports.getHighest = getHighest; + exports.getLowest = getLowest; + exports.getNumberInsertIndex = getNumberInsertIndex; + exports.getPropDesc = getPropDesc; + exports.getPropNames = getPropNames; + exports.getType = getType; + exports.getTypeName = getTypeName; + exports.groupBy = groupBy; + exports.has = has; + exports.hasAnyKeys = hasAnyKeys; + exports.hasDot = hasDot; + exports.hasKeys = hasKeys; + exports.hasLength = hasLength; + exports.hasProp = hasProp; + exports.hasValue = hasValue; + exports.htmlEntities = htmlEntities; + exports.ifInvoke = ifInvoke; + exports.ifNotAssign = ifNotAssign; + exports.ifValue = ifValue; + exports.inAsync = inAsync; + exports.inSync = inSync; + exports.increment = increment; + exports.indexBy = indexBy; + exports.initial = initial; + exports.initialString = initialString; + exports.insertInRange = insertInRange; + exports.intersection = intersection; + exports.interval = interval; + exports.intervals = intervals; + exports.invert = invert; + exports.invokeArray = invokeArray; + exports.invokeCollection = invokeCollection; + exports.invokeCollectionAsync = invokeCollectionAsync; + exports.isArguments = isArguments; + exports.isArray = isArray; + exports.isArrayBuffer = isArrayBuffer; + exports.isArrayBufferCall = isArrayBufferCall; + exports.isArrayLike = isArrayLike; + exports.isAsync = isAsync; + exports.isAsyncCall = isAsyncCall; + exports.isBigInt = isBigInt; + exports.isBigIntCall = isBigIntCall; + exports.isBoolean = isBoolean; + exports.isBooleanCall = isBooleanCall; + exports.isBuffer = isBuffer; + exports.isBufferCall = isBufferCall; + exports.isChild = isChild; + exports.isCloneable = isCloneable; + exports.isConstructor = isConstructor; + exports.isConstructorFactory = isConstructorFactory; + exports.isConstructorNameFactory = isConstructorNameFactory; + exports.isDate = isDate; + exports.isDateCall = isDateCall; + exports.isDeno = isDeno; + exports.isEmpty = isEmpty; + exports.isEqual = isEqual; + exports.isEven = isEven; + exports.isF32 = isF32; + exports.isF32Call = isF32Call; + exports.isF64 = isF64; + exports.isF64Call = isF64Call; + exports.isFalse = isFalse; + exports.isFalsy = isFalsy; + exports.isFileCSS = isFileCSS; + exports.isFileHTML = isFileHTML; + exports.isFileJS = isFileJS; + exports.isFileJSON = isFileJSON; + exports.isFloat = isFloat; + exports.isFunction = isFunction; + exports.isGenerator = isGenerator; + exports.isGeneratorCall = isGeneratorCall; + exports.isI16 = isI16; + exports.isI16Call = isI16Call; + exports.isI32 = isI32; + exports.isI32Call = isI32Call; + exports.isI8 = isI8; + exports.isI8Call = isI8Call; + exports.isIterable = isIterable; + exports.isKindAsync = isKindAsync; + exports.isMap = isMap; + exports.isMapCall = isMapCall; + exports.isMatchArray = isMatchArray; + exports.isMatchObject = isMatchObject; + exports.isNegative = isNegative; + exports.isNodejs = isNodejs; + exports.isNotArray = isNotArray; + exports.isNotNumber = isNotNumber; + exports.isNotString = isNotString; + exports.isNull = isNull; + exports.isNumber = isNumber; + exports.isNumberCall = isNumberCall; + exports.isNumberEqual = isNumberEqual; + exports.isNumberInRange = isNumberInRange; + exports.isNumberNotInRange = isNumberNotInRange; + exports.isOdd = isOdd; + exports.isParent = isParent; + exports.isPlainObject = isPlainObject; + exports.isPositive = isPositive; + exports.isPrimitive = isPrimitive; + exports.isPromise = isPromise; + exports.isRegex = isRegex; + exports.isRegexCall = isRegexCall; + exports.isRelated = isRelated; + exports.isSafeInt = isSafeInt; + exports.isSame = isSame; + exports.isSameType = isSameType; + exports.isSet = isSet; + exports.isSetCall = isSetCall; + exports.isString = isString; + exports.isTrue = isTrue; + exports.isTruthy = isTruthy; + exports.isTypeFactory = isTypeFactory; + exports.isTypedArray = isTypedArray; + exports.isU16 = isU16; + exports.isU16Call = isU16Call; + exports.isU32 = isU32; + exports.isU32Call = isU32Call; + exports.isU8 = isU8; + exports.isU8C = isU8C; + exports.isU8CCall = isU8CCall; + exports.isU8Call = isU8Call; + exports.isUndefined = isUndefined; + exports.isWeakMap = isWeakMap; + exports.isWeakMapCall = isWeakMapCall; + exports.isZero = isZero; + exports.jsonParse = jsonParse; + exports.kebabCase = kebabCase; + exports.keys = keys; + exports.largest = largest; + exports.last = last; + exports.lowerCase = lowerCase; + exports.map = map; + exports.mapArray = mapArray; + exports.mapAsyncArray = mapAsyncArray; + exports.mapAsyncObject = mapAsyncObject; + exports.mapObject = mapObject; + exports.mapRightArray = mapRightArray; + exports.mapWhile = mapWhile; + exports.merge = merge; + exports.model = model; + exports.multiply = multiply; + exports.negate = negate; + exports.noValue = noValue; + exports.noop = noop; + exports.notEqual = notEqual; + exports.nthArg = nthArg; + exports.objectAssign = objectAssign; + exports.objectEntries = objectEntries; + exports.objectSize = objectSize; + exports.omit = omit; + exports.once = once; + exports.onlyUnique = onlyUnique; + exports.over = over; + exports.overEvery = overEvery; + exports.pair = pair; + exports.partition = partition; + exports.pick = pick; + exports.pluck = pluck; + exports.pluckObject = pluckObject; + exports.promise = promise; + exports.propertyMatch = propertyMatch; + exports.randomFloat = randomFloat; + exports.randomInt = randomInt; + exports.range = range; + exports.rangeDown = rangeDown; + exports.rangeUp = rangeUp; + exports.rawURLDecode = rawURLDecode; + exports.reArg = reArg; + exports.regexTestFactory = regexTestFactory; + exports.remainder = remainder; + exports.remove = remove; + exports.removeBy = removeBy; + exports.replaceList = replaceList; + exports.rest = rest; + exports.restString = restString; + exports.returnValue = returnValue; + exports.right = right; + exports.rightString = rightString; + exports.sample = sample; + exports.sanitize = sanitize; + exports.setKey = setKey; + exports.setValue = setValue; + exports.shuffle = shuffle; + exports.smallest = smallest; + exports.snakeCase = snakeCase; + exports.sortCollectionAlphabetically = sortCollectionAlphabetically; + exports.sortCollectionAlphabeticallyReverse = + sortCollectionAlphabeticallyReverse; + exports.sortCollectionAscending = sortCollectionAscending; + exports.sortCollectionAscendingFilter = sortCollectionAscendingFilter; + exports.sortCollectionDescending = sortCollectionDescending; + exports.sortCollectionDescendingFilter = sortCollectionDescendingFilter; + exports.sortNumberAscending = sortNumberAscending; + exports.sortNumberDescening = sortNumberDescening; + exports.sortObjectsAlphabetically = sortObjectsAlphabetically; + exports.sortObjectsAlphabeticallyReverse = sortObjectsAlphabeticallyReverse; + exports.sortUnique = sortUnique; + exports.stringify = stringify; + exports.stubArray = stubArray; + exports.stubFalse = stubFalse; + exports.stubObject = stubObject; + exports.stubString = stubString; + exports.stubTrue = stubTrue; + exports.subtract = subtract; + exports.subtractAll = subtractAll; + exports.subtractReverse = subtractReverse; + exports.sumAll = sumAll; + exports.take = take; + exports.takeRight = takeRight; + exports.throttle = throttle; + exports.timer = timer; + exports.timers = timers; + exports.times = times; + exports.timesAsync = timesAsync; + exports.timesMap = timesMap; + exports.timesMapAsync = timesMapAsync; + exports.toArray = toArray; + exports.toPath = toPath; + exports.toggle = toggle; + exports.tokenize = tokenize; + exports.truncate = truncate; + exports.truncateRight = truncateRight; + exports.unZip = unZip; + exports.unZipObject = unZipObject; + exports.union = union; + exports.uniqID = uniqID; + exports.unique = unique; + exports.untilFalseArray = untilFalseArray; + exports.untilTrueArray = untilTrueArray; + exports.upperCase = upperCase; + exports.upperFirst = upperFirst; + exports.upperFirstAll = upperFirstAll; + exports.upperFirstLetter = upperFirstLetter; + exports.upperFirstOnly = upperFirstOnly; + exports.upperFirstOnlyAll = upperFirstOnlyAll; + exports.virtualStorage = virtualStorage; + exports.whileCompactMap = whileCompactMap; + exports.whileEachArray = whileEachArray; + exports.whileMapArray = whileMapArray; + exports.without = without; + exports.words = words; + exports.wrap = wrap; + exports.xor = xor; + exports.zip = zip; + exports.zipObject = zipObject; }); //# sourceMappingURL=index.bundle.js.map diff --git a/build/index.bundle.js.map b/build/index.bundle.js.map index 51c3217..d5575dc 100644 --- a/build/index.bundle.js.map +++ b/build/index.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"index.bundle.js","sources":["../source/arrays/chunk.js","../source/arrays/clear.js","../source/arrays/clone.js","../source/types/isUndefined.js","../source/utilities/hasLength.js","../source/types/isNull.js","../source/types/hasValue.js","../source/utilities/returnValue.js","../source/arrays/each.js","../source/arrays/compactMap.js","../source/arrays/eachAsync.js","../source/arrays/compactMapAsync.js","../source/numbers/isNegative.js","../source/arrays/range.js","../source/types/isArray.js","../source/classes/construct.js","../source/arrays/ensure.js","../source/arrays/flattenDeep.js","../source/utilities/forEach.js","../source/arrays/difference.js","../source/arrays/drop.js","../source/arrays/dropRight.js","../source/arrays/eachRight.js","../source/arrays/eachRightAsync.js","../source/arrays/every.js","../source/arrays/everyAsync.js","../source/arrays/filter.js","../source/arrays/filterAsync.js","../source/arrays/first.js","../source/arrays/flatten.js","../source/arrays/initial.js","../source/arrays/intersect.js","../source/arrays/invoke.js","../source/utilities/toPath.js","../source/utilities/get.js","../source/objects/keys.js","../source/objects/hasKeys.js","../source/types/isConstructor.js","../source/types/isTypeFactory.js","../source/types/isBuffer.js","../source/types/isPlainObject.js","../source/utilities/isEqual.js","../source/arrays/isMatch.js","../source/arrays/largest.js","../source/arrays/last.js","../source/arrays/map.js","../source/arrays/concurrentEach.js","../source/arrays/mapAsync.js","../source/arrays/mapRight.js","../source/arrays/mapWhile.js","../source/math/subtract.js","../source/arrays/sortNumberAscending.js","../source/arrays/partition.js","../source/math/subtractReverse.js","../source/arrays/sortNumberDescening.js","../source/arrays/remove.js","../source/arrays/rest.js","../source/arrays/right.js","../source/math/randomInt.js","../source/numbers/isNumberEqual.js","../source/internal/array.js","../source/arrays/shuffle.js","../source/arrays/sample.js","../source/arrays/smallest.js","../source/arrays/getNumberInsertIndex.js","../source/arrays/take.js","../source/arrays/takeRight.js","../source/arrays/unique.js","../source/arrays/union.js","../source/arrays/untilFalse.js","../source/arrays/untilTrue.js","../source/arrays/whileCompactMap.js","../source/arrays/whileEach.js","../source/arrays/whileMap.js","../source/arrays/without.js","../source/arrays/xor.js","../source/arrays/zip.js","../source/buffers/ensure.js","../source/buffers/clear.js","../source/types/isFunction.js","../source/types/isNumber.js","../source/types/isString.js","../source/objects/assign.js","../source/classes/extendClass.js","../source/collection/countBy.js","../source/collection/countKey.js","../source/collection/countWithoutKey.js","../source/collection/findIndexCache.js","../source/collection/findIndex.js","../source/collection/findItem.js","../source/collection/sortCollectionDescending.js","../source/collection/getLowest.js","../source/collection/sortCollectionAscending.js","../source/collection/getHighest.js","../source/collection/groupBy.js","../source/collection/indexBy.js","../source/collection/invoke.js","../source/collection/invokeAsync.js","../source/objects/pluckObject.js","../source/collection/pluck.js","../source/collection/sortCollectionAlphabetically.js","../source/collection/sortCollectionAlphabeticallyReverse.js","../source/files/getExtension.js","../source/files/getFilename.js","../source/internal/regexTestFactory.js","../source/files/isFileCSS.js","../source/files/isFileHTML.js","../source/files/isFileJS.js","../source/files/isFileJSON.js","../source/functions/after.js","../source/functions/ary.js","../source/functions/before.js","../source/objects/eachAsync.js","../source/objects/each.js","../source/utilities/forEachAsync.js","../source/types/isSet.js","../source/utilities/forOf.js","../source/types/isGenerator.js","../source/utilities/forOfAsync.js","../source/types/isAsync.js","../source/utilities/generateLoop.js","../source/utilities/each.js","../source/functions/chain.js","../source/functions/curry.js","../source/functions/curryRight.js","../source/utilities/noop.js","../source/utilities/times.js","../source/utilities/timer.js","../source/internal/apply.js","../source/functions/debounce.js","../source/functions/ifInvoke.js","../source/functions/negate.js","../source/functions/nthArg.js","../source/functions/once.js","../source/types/getType.js","../source/types/cloneType.js","../source/utilities/forOfMap.js","../source/utilities/forOfMapAsync.js","../source/objects/mapAsync.js","../source/objects/map.js","../source/utilities/map.js","../source/functions/over.js","../source/objects/everyAsync.js","../source/objects/every.js","../source/utilities/forOfEvery.js","../source/utilities/forOfEveryAsync.js","../source/utilities/every.js","../source/functions/overEvery.js","../source/functions/rearged.js","../source/functions/throttle.js","../source/functions/wrap.js","../source/utilities/cacheNativeMethod.js","../source/internal/object.js","../source/internal/isSame.js","../source/math/add.js","../source/math/deduct.js","../source/math/divide.js","../source/math/increment.js","../source/math/multiple.js","../source/math/progress.js","../source/math/randomFloat.js","../source/math/remainder.js","../source/math/subtractAll.js","../source/math/sumAll.js","../source/numbers/isNumberInRange.js","../source/numbers/isNumberNotInRange.js","../source/numbers/isPositive.js","../source/numbers/isZero.js","../source/objects/getEntries.js","../source/objects/compactKeys.js","../source/objects/compactMapAsync.js","../source/objects/compactMap.js","../source/objects/filter.js","../source/objects/filterAsync.js","../source/objects/invert.js","../source/objects/isMatch.js","../source/regexps/escapeRegex.js","../source/regexps/arrayToRegex.js","../source/types/isRegex.js","../source/objects/omit.js","../source/objects/pick.js","../source/objects/size.js","../source/objects/zip.js","../source/strings/camelCase.js","../source/strings/kebabCase.js","../source/strings/snakeCase.js","../source/strings/upperCase.js","../source/strings/lowerCase.js","../source/strings/range.js","../source/strings/replace.js","../source/strings/sanitize.js","../source/strings/tokenize.js","../source/strings/truncate.js","../source/strings/typography.js","../source/types/getTypeName.js","../source/types/isArguments.js","../source/types/isMap.js","../source/types/isTypedArray.js","../source/types/noValue.js","../source/types/isArrayLike.js","../source/types/isBigInt.js","../source/types/isBoolean.js","../source/types/isArrayBuffer.js","../source/types/isChild.js","../source/types/isCloneable.js","../source/types/isDate.js","../source/types/isEmpty.js","../source/types/isFalse.js","../source/types/isF32.js","../source/types/isF64.js","../source/types/isFloat.js","../source/types/isI16.js","../source/types/isI32.js","../source/types/isI8.js","../source/types/isIterable.js","../source/types/isPromise.js","../source/types/isKindAsync.js","../source/types/isParent.js","../source/types/isPrimitive.js","../source/types/isRelated.js","../source/types/isSafeInt.js","../source/types/isSameType.js","../source/types/isTrue.js","../source/types/isU16.js","../source/types/isU32.js","../source/types/isU8.js","../source/types/isU8C.js","../source/types/isWeakMap.js","../source/types/isDeno.js","../source/types/isNode.js","../source/types/isTruthy.js","../source/types/isFalsy.js","../source/utilities/ifValue.js","../source/utilities/notEqual.js","../source/utilities/json.js","../source/utilities/assert.js","../source/utilities/bindAll.js","../source/utilities/clear.js","../source/utilities/clone.js","../source/utilities/concurrent.js","../source/utilities/compact.js","../source/utilities/forOfCompactMapAsync.js","../source/utilities/forOfCompactMap.js","../source/utilities/compactMap.js","../source/utilities/everyArg.js","../source/utilities/forOfFilter.js","../source/utilities/forOfFilterAsync.js","../source/utilities/filter.js","../source/utilities/flow.js","../source/utilities/flowAsync.js","../source/utilities/forMap.js","../source/utilities/arraysToObject.js","../source/utilities/has.js","../source/utilities/hasDot.js","../source/utilities/ifNotAssign.js","../source/utilities/interval.js","../source/utilities/merge.js","../source/utilities/model.js","../source/utilities/pair.js","../source/utilities/concurrentStatus.js","../source/utilities/promise.js","../source/utilities/propertyMatch.js","../source/utilities/setKey.js","../source/utilities/setValue.js","../source/utilities/store.js","../source/utilities/stubArray.js","../source/utilities/stubFalse.js","../source/utilities/stubObject.js","../source/utilities/stubString.js","../source/utilities/stubTrue.js","../source/utilities/timesAsync.js","../source/utilities/toggle.js","../source/utilities/uid.js","../source/utilities/virtualStorage.js","../source/utilities/inAsync.js","../source/utilities/inSync.js","../source/filesystem/copyFolder.js","../source/filesystem/directory.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0;index < arrayLength;index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [key, value] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst zipedObject = {};\n\teachArray(properties, (item, key) => {\n\t\tzipedObject[item] = values[key];\n\t});\n\treturn zipedObject;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst unZippedKeys = [];\n\tconst values = [];\n\teachObject(object, (item, key) => {\n\t\tunZippedKeys.push(key);\n\t\tvalues.push(item);\n\t});\n\treturn [unZippedKeys, values];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(compactMapArray, compactMapAsyncArray,\n\tcompactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0;index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn (isEqual(on, value)) ? off : on;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import {\n\tcopyFile,\n\tmkdir,\n\treaddir,\n\tstat\n} from 'node:fs/promises';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport path from 'node:path';\nasync function copyToPath(sourceFolder, destinationFolder, file) {\n\tconst sourcePath = path.join(sourceFolder, file);\n\tconst destinationPath = path.join(destinationFolder, file);\n\tawait copyFile(sourcePath, destinationPath);\n}\nexport async function copyFolder(sourceFolder, destinationFolder) {\n\tconst files = await readdir(sourceFolder);\n\tawait eachAsyncArray(files, async (file) => {\n\t\tconst sourcePath = path.join(sourceFolder, file);\n\t\tconst filestats = await stat(sourcePath);\n\t\tif (filestats.isDirectory()) {\n\t\t\tconst folderDestination = path.join(destinationFolder, file.replace(sourceFolder, ''));\n\t\t\tawait mkdir(folderDestination, {\n\t\t\t\trecursive: true\n\t\t\t});\n\t\t\tawait copyFolder(sourcePath, folderDestination);\n\t\t} else {\n\t\t\tawait copyToPath(sourceFolder, destinationFolder, file);\n\t\t}\n\t});\n\treturn true;\n}\n\n","import { fileURLToPath } from 'node:url';\nimport path from 'path';\nexport function currentFile(importMeta) {\n\tif (globalThis.__filename) {\n\t\treturn __filename;\n\t}\n\treturn fileURLToPath(importMeta.url);\n}\nexport function currentPath(importMeta) {\n\tif (globalThis.__dirname) {\n\t\treturn __dirname;\n\t}\n\treturn path.dirname(fileURLToPath(importMeta.url));\n}\n"],"names":["sign","random","normalizeCase","space","returnFlow","copyFile","readdir","stat","mkdir","fileURLToPath","path"],"mappings":";;;;;;CAAA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,KAAK,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,EAAE;CACvC,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;CACpB,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;CACf,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK;CAC9B,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC,EAAE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eAAe;AACjC,OAAC,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,cAAc;;CC/C9D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACY,OAAC,MAAM,GAAG,MAAM,CAAC;;CCd7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE;CACpC,CAAC,OAAO,MAAM,GAAG,MAAM,CAAC;CACxB;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,MAAM,CAAC,MAAM,EAAE;CAC/B,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;CACnB;;CCjBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE;CACtC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;CACvB;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,SAAS,CAAC,MAAM,EAAE;CAClC,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;CACnB;;CCjBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE;CACxC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;CACvB;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE;CACnD,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE;CAClB,EAAE,OAAO,KAAK,CAAC;CACf,EAAE;CACF,CAAC,IAAI,aAAa,KAAK,CAAC,EAAE;CAC1B,EAA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CAAC,CAAC;CACpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"index.bundle.js","sources":["../source/arrays/chunk.js","../source/arrays/clear.js","../source/arrays/clone.js","../source/types/isUndefined.js","../source/utilities/hasLength.js","../source/types/isNull.js","../source/types/hasValue.js","../source/utilities/returnValue.js","../source/arrays/each.js","../source/arrays/compactMap.js","../source/arrays/eachAsync.js","../source/arrays/compactMapAsync.js","../source/numbers/isNegative.js","../source/arrays/range.js","../source/types/isArray.js","../source/classes/construct.js","../source/arrays/ensure.js","../source/arrays/flattenDeep.js","../source/utilities/forEach.js","../source/arrays/difference.js","../source/arrays/drop.js","../source/arrays/dropRight.js","../source/arrays/eachRight.js","../source/arrays/eachRightAsync.js","../source/arrays/every.js","../source/arrays/everyAsync.js","../source/arrays/filter.js","../source/arrays/filterAsync.js","../source/arrays/first.js","../source/arrays/flatten.js","../source/arrays/initial.js","../source/arrays/intersect.js","../source/arrays/invoke.js","../source/utilities/toPath.js","../source/utilities/get.js","../source/objects/keys.js","../source/objects/hasKeys.js","../source/types/isConstructor.js","../source/types/isTypeFactory.js","../source/types/isBuffer.js","../source/types/isPlainObject.js","../source/utilities/isEqual.js","../source/arrays/isMatch.js","../source/arrays/largest.js","../source/arrays/last.js","../source/arrays/map.js","../source/arrays/concurrentEach.js","../source/arrays/mapAsync.js","../source/arrays/mapRight.js","../source/arrays/mapWhile.js","../source/math/subtract.js","../source/arrays/sortNumberAscending.js","../source/arrays/partition.js","../source/math/subtractReverse.js","../source/arrays/sortNumberDescening.js","../source/arrays/remove.js","../source/arrays/rest.js","../source/arrays/right.js","../source/math/randomInt.js","../source/numbers/isNumberEqual.js","../source/internal/array.js","../source/arrays/shuffle.js","../source/arrays/sample.js","../source/arrays/smallest.js","../source/arrays/getNumberInsertIndex.js","../source/arrays/take.js","../source/arrays/takeRight.js","../source/arrays/unique.js","../source/arrays/union.js","../source/arrays/untilFalse.js","../source/arrays/untilTrue.js","../source/arrays/whileCompactMap.js","../source/arrays/whileEach.js","../source/arrays/whileMap.js","../source/arrays/without.js","../source/arrays/xor.js","../source/arrays/zip.js","../source/buffers/ensure.js","../source/buffers/clear.js","../source/types/isFunction.js","../source/types/isNumber.js","../source/types/isString.js","../source/objects/assign.js","../source/classes/extendClass.js","../source/collection/countBy.js","../source/collection/countKey.js","../source/collection/countWithoutKey.js","../source/collection/findIndexCache.js","../source/collection/findIndex.js","../source/collection/findItem.js","../source/collection/sortCollectionDescending.js","../source/collection/getLowest.js","../source/collection/sortCollectionAscending.js","../source/collection/getHighest.js","../source/collection/groupBy.js","../source/collection/indexBy.js","../source/collection/invoke.js","../source/collection/invokeAsync.js","../source/objects/pluckObject.js","../source/collection/pluck.js","../source/collection/sortCollectionAlphabetically.js","../source/collection/sortCollectionAlphabeticallyReverse.js","../source/files/getExtension.js","../source/files/getFilename.js","../source/internal/regexTestFactory.js","../source/files/isFileCSS.js","../source/files/isFileHTML.js","../source/files/isFileJS.js","../source/files/isFileJSON.js","../source/functions/after.js","../source/functions/ary.js","../source/functions/before.js","../source/objects/eachAsync.js","../source/objects/each.js","../source/utilities/forEachAsync.js","../source/types/isSet.js","../source/utilities/forOf.js","../source/types/isGenerator.js","../source/utilities/forOfAsync.js","../source/types/isAsync.js","../source/utilities/generateLoop.js","../source/utilities/each.js","../source/functions/chain.js","../source/functions/curry.js","../source/functions/curryRight.js","../source/utilities/noop.js","../source/utilities/times.js","../source/utilities/timer.js","../source/internal/apply.js","../source/functions/debounce.js","../source/functions/ifInvoke.js","../source/functions/negate.js","../source/functions/nthArg.js","../source/functions/once.js","../source/types/getType.js","../source/types/cloneType.js","../source/utilities/forOfMap.js","../source/utilities/forOfMapAsync.js","../source/objects/mapAsync.js","../source/objects/map.js","../source/utilities/map.js","../source/functions/over.js","../source/objects/everyAsync.js","../source/objects/every.js","../source/utilities/forOfEvery.js","../source/utilities/forOfEveryAsync.js","../source/utilities/every.js","../source/functions/overEvery.js","../source/functions/rearged.js","../source/functions/throttle.js","../source/functions/wrap.js","../source/utilities/cacheNativeMethod.js","../source/internal/object.js","../source/internal/isSame.js","../source/math/add.js","../source/math/deduct.js","../source/math/divide.js","../source/math/increment.js","../source/math/multiple.js","../source/math/progress.js","../source/math/randomFloat.js","../source/math/remainder.js","../source/math/subtractAll.js","../source/math/sumAll.js","../source/numbers/isNumberInRange.js","../source/numbers/isNumberNotInRange.js","../source/numbers/isPositive.js","../source/numbers/isZero.js","../source/numbers/isOdd.js","../source/numbers/isEven.js","../source/objects/getEntries.js","../source/objects/compactKeys.js","../source/objects/compactMapAsync.js","../source/objects/compactMap.js","../source/objects/filter.js","../source/objects/filterAsync.js","../source/objects/invert.js","../source/objects/isMatch.js","../source/regexps/escapeRegex.js","../source/regexps/arrayToRegex.js","../source/types/isRegex.js","../source/objects/omit.js","../source/objects/pick.js","../source/objects/size.js","../source/objects/zip.js","../source/strings/camelCase.js","../source/strings/kebabCase.js","../source/strings/snakeCase.js","../source/strings/upperCase.js","../source/strings/lowerCase.js","../source/strings/range.js","../source/strings/replace.js","../source/strings/sanitize.js","../source/strings/tokenize.js","../source/strings/truncate.js","../source/strings/typography.js","../source/types/getTypeName.js","../source/types/isArguments.js","../source/types/isMap.js","../source/types/isTypedArray.js","../source/types/noValue.js","../source/types/isArrayLike.js","../source/types/isBigInt.js","../source/types/isBoolean.js","../source/types/isArrayBuffer.js","../source/types/isChild.js","../source/types/isCloneable.js","../source/types/isDate.js","../source/types/isEmpty.js","../source/types/isFalse.js","../source/types/isF32.js","../source/types/isF64.js","../source/types/isFloat.js","../source/types/isI16.js","../source/types/isI32.js","../source/types/isI8.js","../source/types/isIterable.js","../source/types/isPromise.js","../source/types/isKindAsync.js","../source/types/isParent.js","../source/types/isPrimitive.js","../source/types/isRelated.js","../source/types/isSafeInt.js","../source/types/isSameType.js","../source/types/isTrue.js","../source/types/isU16.js","../source/types/isU32.js","../source/types/isU8.js","../source/types/isU8C.js","../source/types/isWeakMap.js","../source/types/isDeno.js","../source/types/isNode.js","../source/types/isTruthy.js","../source/types/isFalsy.js","../source/utilities/ifValue.js","../source/utilities/notEqual.js","../source/utilities/json.js","../source/utilities/assert.js","../source/utilities/bindAll.js","../source/utilities/clear.js","../source/utilities/clone.js","../source/utilities/concurrent.js","../source/utilities/compact.js","../source/utilities/forOfCompactMapAsync.js","../source/utilities/forOfCompactMap.js","../source/utilities/compactMap.js","../source/utilities/everyArg.js","../source/utilities/forOfFilter.js","../source/utilities/forOfFilterAsync.js","../source/utilities/filter.js","../source/utilities/flow.js","../source/utilities/flowAsync.js","../source/utilities/forMap.js","../source/utilities/arraysToObject.js","../source/utilities/has.js","../source/utilities/hasDot.js","../source/utilities/ifNotAssign.js","../source/utilities/interval.js","../source/utilities/merge.js","../source/utilities/model.js","../source/utilities/pair.js","../source/utilities/concurrentStatus.js","../source/utilities/promise.js","../source/utilities/propertyMatch.js","../source/utilities/setKey.js","../source/utilities/setValue.js","../source/utilities/store.js","../source/utilities/stubArray.js","../source/utilities/stubFalse.js","../source/utilities/stubObject.js","../source/utilities/stubString.js","../source/utilities/stubTrue.js","../source/utilities/timesAsync.js","../source/utilities/toggle.js","../source/utilities/uid.js","../source/utilities/virtualStorage.js","../source/utilities/inAsync.js","../source/utilities/inSync.js","../source/filesystem/copyFolder.js","../source/filesystem/directory.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = isArray(propertyString) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [\n\t\tkey,\n\t\tvalue\n\t] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = isIterateeAsync ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = isIterateeAsync ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","/**\n * Checks if a number is odd & returns true or false.\n *\n * @function isOdd\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isOdd, assert } from '@universalweb/acid';\n * assert(isOdd(1), true);\n */\nexport function isOdd(source) {\n\treturn (source & 1) === 1;\n}\n","/**\n * Checks if a number is even & returns true or false.\n *\n * @function isEven\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEven, assert } from '@universalweb/acid';\n * assert(isEven(1), true);\n */\nexport function isEven(source) {\n\treturn (source & 1) === 0;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst source = {};\n\teachArray(properties, (item, key) => {\n\t\tsource[item] = values[key];\n\t});\n\treturn source;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst objectKeys = [];\n\tconst objectValues = [];\n\teachObject(object, (item, key) => {\n\t\tobjectKeys.push(key);\n\t\tobjectValues.push(item);\n\t});\n\treturn [\n\t\tobjectKeys,\n\t\tobjectValues,\n\t];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(\n\tcompactMapArray,\n\tcompactMapAsyncArray,\n\tcompactMapObject,\n\tcompactMapAsyncObject,\n\tforOfCompactMap,\n\tforOfCompactMapAsync\n);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn ((isEqual(on, value)) ? off : on);\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import {\n\tcopyFile,\n\tmkdir,\n\treaddir,\n\tstat\n} from 'node:fs/promises';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport path from 'node:path';\nasync function copyToPath(sourceFolder, destinationFolder, file) {\n\tconst sourcePath = path.join(sourceFolder, file);\n\tconst destinationPath = path.join(destinationFolder, file);\n\tawait copyFile(sourcePath, destinationPath);\n}\nexport async function copyFolder(sourceFolder, destinationFolder) {\n\tconst files = await readdir(sourceFolder);\n\tawait eachAsyncArray(files, async (file) => {\n\t\tconst sourcePath = path.join(sourceFolder, file);\n\t\tconst filestats = await stat(sourcePath);\n\t\tif (filestats.isDirectory()) {\n\t\t\tconst folderDestination = path.join(destinationFolder, file.replace(sourceFolder, ''));\n\t\t\tawait mkdir(folderDestination, {\n\t\t\t\trecursive: true\n\t\t\t});\n\t\t\tawait copyFolder(sourcePath, folderDestination);\n\t\t} else {\n\t\t\tawait copyToPath(sourceFolder, destinationFolder, file);\n\t\t}\n\t});\n\treturn true;\n}\n\n","import { fileURLToPath } from 'node:url';\nimport path from 'path';\nexport function currentFile(importMeta) {\n\tif (globalThis.__filename) {\n\t\treturn __filename;\n\t}\n\treturn fileURLToPath(importMeta.url);\n}\nexport function currentPath(importMeta) {\n\tif (globalThis.__dirname) {\n\t\treturn __dirname;\n\t}\n\treturn path.dirname(fileURLToPath(importMeta.url));\n}\n"],"names":["sign","random","normalizeCase","space","returnFlow","copyFile","readdir","stat","mkdir","fileURLToPath","path"],"mappings":";;;;;;CAAA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,KAAK,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,EAAE;CACvC,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;CACpB,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;CACf,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,GAAG,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ACA;CACA;AACY,OAAC,WAAW,GAAG,MAAM,CAAC,yBAAyB;CAC3D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACY,OAAC,OAAO,GAAG,MAAM,CAAC,eAAe;AACjC,OAAC,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,cAAc;;CC/C9D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACY,OAAC,MAAM,GAAG,MAAM,CAAC;;CCd7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE;CACpC,CAAC,OAAO,MAAM,GAAG,MAAM,CAAC;CACxB;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,MAAM,CAAC,MAAM,EAAE;CAC/B,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;CACnB;;CCjBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE;CACtC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;CACvB;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,SAAS,CAAC,MAAM,EAAE;CAClC,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;CACnB;;CCjBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE;CACxC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;CACvB;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;C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CjBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE;CACpD,CAAC,OAAO,MAAM,GAAG,KAAK,IAAI,MAAM,GAAG,GAAG,CAAC;CACvC;;CClBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,kBAAkB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE;CACvD,CAAC,OAAO,MAAM,GAAG,KAAK,IAAI,MAAM,GAAG,GAAG,CAAC;CACvC;;CClBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;CACf,SAAS,UAAU,CAAC,MAAM,EAAE;CACnC,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;CAC3B;;CChBA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,MAAM,CAAC,MAAM,EAAE;CAC/B,CAAC,OAAO,MAAM,KAAK,CAAC,CAAC;CACrB;;CCfA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,KAAK,CAAC,MAAM,EAAE;CAC9B,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;CAC3B;;CCfA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,SAAS,MAAM,CAAC,MAAM,EAAE;CAC/B,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;CAC3B;;ACdY,OAAC,aAAa,GAAG,MAAM,CAAC,QAAQ;CAC5C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACO,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C,CAAC;CACnD,GAAG,MAAM;CACT,GAAG,MAAM,UAAU,CAAC,YAAY,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC;CAC3D,GAAG;CACH,EAAE,CAAC,CAAC;CACJ,CAAC,OAAO,IAAI,CAAC;CACb;;CC3BO,SAAS,WAAW,CAAC,UAAU,EAAE;CACxC,CAAC,IAAI,UAAU,CAAC,UAAU,EAAE;CAC5B,EAAE,OAAO,UAAU,CAAC;CACpB,EAAE;CACF,CAAC,OAAOC,sBAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;CACtC,CAAC;CACM,SAAS,WAAW,CAAC,UAAU,EAAE;CACxC,CAAC,IAAI,UAAU,CAAC,SAAS,EAAE;CAC3B,EAAE,OAAO,SAAS,CAAC;CACnB,EAAE;CACF,CAAC,OAAOC,MAAI,CAAC,OAAO,CAACD,sBAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;CACpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/build/index.js b/build/index.js index 185e186..2106920 100644 --- a/build/index.js +++ b/build/index.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:fs/promises"),require("node:path"),require("node:url"),require("path")):"function"==typeof define&&define.amd?define(["exports","node:fs/promises","node:path","node:url","path"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={},t.promises,t.path,t.node_url,t.path$1)}(this,(function(t,n,e,r,o){"use strict";function i(t){return t.length=0,t}function c(t){return void 0===t}function s(t){return Boolean(t.length)}function u(t){return null===t}function a(t){return!c(t)&&!u(t)}function f(t){return t}function l(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const u=n.call(r,t,i,e,c,s,o);a(u)&&e.push(u)})):l(t,((t,i,c,s)=>{const u=n(t,i,e,c,s,r,o);a(u)&&e.push(u)})),e}async function p(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const i=await n(t,r,e,o);a(i)&&e.push(i)})),e}const{sign:d}=Math;function y(t){return-1===d(t)}function m(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const b=Array.isArray;const w=Reflect.construct;function v(t,n=[],e){const r=b(n)?n:[n];return e?w(t,r,e):w(t,r)}function C(t){return b(t)&&t||a(t)&&[t]||[]}function O(t){return t.flat(1/0)}function I(t,n){return t.forEach(n),t}function j(...t){const n=v(Map),e=[];return l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function F(t,n=1,e=t.length){return t.splice(n,e)}function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function E(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function R(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function T(t,n,e=[],r){return await p(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const N=/\.|\[/,B=/]/g,P="";function U(t){return t.replace(B,P).split(N)}function k(t,n){if(!n)return!1;let e=n;return R(b(t)?t:U(t),(t=>(e=e[t],a(e)))),e}const $=Object.keys;function D(t){if(t)return $(t)}const L=Object.hasOwn;function q(t,...n){if(t)return R(n,(n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}}))}function _(t,n){return t?.constructor===n||!1}function V(t){return n=>_(n,t)}function Z(t){return t?.constructor?.name}function K(t){return n=>Z(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&R(e,t):t(n)}}const W=K("Buffer"),G=z(W),J=t=>!!a(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(G(t))return t.equals(n);if(t.toString()===n.toString())if(J(t)){const e=D(t);if(q(n,e))return R(e,(e=>H(t[e],n[e])))}else if(b(t)&&t.length===n.length)return R(t,((t,e)=>H(t,n[e])));return!1};const Q=Math.max;function X(t,n,e=[],r,o){return a(r)?l(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):l(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function Y(t,n){const e=[];return await p(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function tt(t,n){return t-n}function nt(t,n){return n-t}const{floor:et,random:rt}=Math;function ot(t,n=0){return et(rt()*(t-n))+n}const it=Array.from;function ct(t,n,e){if(a(t))return it(t,n,e)}function st(t,n=t.length){if(t.length<=1)return ct(t);const e=ct(t);let r,o,i=0;for(;i!!a(t)&&t instanceof Function,gt=K("Number"),dt=z(gt);const yt=V(String);const mt=Object.assign;function At(t,n){if(J(n))mt(t,n);else if(pt(n)){const e=n.name;e?t[e]=n:mt(t,n)}else(yt(n)||dt(n))&&(t[n]=n);return t}function bt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function Ot(t,n="id",e){return t.sort(((t,r)=>Ct(t,r,n,e)))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function jt(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))}function Ft(t,n){if(t)return yt(n)?t[n]:X(n,(n=>t[n]))}function Mt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Et(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Rt(t){return n=>!!a(n)&&t.test(n)}const St=Rt(/\.css$/),xt=Rt(/\.html$/),Tt=Rt(/\.js$/),Nt=Rt(/\.json$/);const Bt=async(t,n,e,r)=>{if(!t)return;const o=D(t);return a(e)?await p(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await p(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Pt(t,n,e,r){if(!t)return;const o=D(t);return a(e)?l(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):l(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Ut=K("Set"),kt=z(Ut);function $t(t,n){if(kt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Dt=K("GeneratorFunction"),Lt=z(Dt);async function qt(t,n,e){if(kt(t)){for(const e of t)await n(e,t);return t}if(Lt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const _t=K("AsyncFunction"),Vt=z(_t);function Zt(t,n,e,r,o,i){return(c,s,u,f,l)=>{let h;const p=Vt(s);if(a(c)&&s)return h=b(c)?p?n:t:J(c)||pt(c)?p?r:e:o?p?i:o:Lt(c)?i:p?r:e,h(c,s,u,f,l)}}const Kt=Zt(l,p,Pt,Bt,$t,qt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Kt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Gt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=v(Jt);function Qt(t,n){return Ht.set(t,n)}const Xt=Reflect.apply;function Yt(t,n,e){if(pt(t))return Xt(t,n,e)}function tn(t){return t?.constructor}function nn(t,n=[]){const e=tn(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function en(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function rn(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function on(t,n,e={}){if(t)return await Bt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function cn(t,n,e={},r,o){if(t)return a(r)?Pt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Pt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const sn=Zt(X,Y,cn,on,en,rn);async function un(t,n){if(!t)return;return S(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function an(t,n){if(!t)return;return R(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function fn(t,n=f){if(b(t)||kt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function ln(t,n=f,e){if(Lt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(b(t)||kt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const hn=Zt(R,S,an,un,fn,ln);const pn=Function.prototype;function gn(t){return pn.call.bind(t)}const dn=Object.getOwnPropertyNames,yn=Object.getOwnPropertyDescriptor,mn=Object.defineProperty,An=gn(Object.hasOwnProperty),bn=Object.is;const{random:wn}=Math;const{sign:vn}=Math;function Cn(t){return 0===t}const On=Object.entries;async function In(t,n=f,e={}){return await Bt(t,(async(t,r,o,i,c)=>{const s=await n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function jn(t,n=f,e={}){return Pt(t,((t,r,o,i,c)=>{const s=n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function Fn(t,n,e={}){return Pt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function Mn(t,n,e={}){return await Bt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const En=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Rn(t){return t.replace(En,"\\$&")}function Sn(t,n){return n?Sn(X(t,Rn)):RegExp(t.join("|"))}const xn=K("RegExp"),Tn=z(xn);function Nn(t){if(!t)return;if(J(t))return D(t).length;const n=t.length;if(a(n))return n;const e=t.size;return a(n)?e:D(t).length}const Bn=/[ _-]+/g;const Pn=/[ _-]+/g,Un=/[ ]+/g;const kn=/[ _-]+/g,$n=/[ ]+/g;const Dn=/[ _-]+/g;const Ln=/[ _-]+/g;function qn(t,n=1){return t.substring(n)}const _n=/%(?![\da-f]{2})/gi,Vn=/&/g,Zn=//g,zn=/"/g;function Wn(t){return decodeURIComponent(t.replace(_n,(()=>"%25")))}function Gn(t){return t.replace(Vn,"&").replace(Zn,"<").replace(Kn,">").replace(zn,""")}const Jn=/\S+/g,Hn=/\w+/g;const Qn=/\w+/g;function Xn(t){return t[0].toUpperCase()}function Yn(t){return Xn(t)+qn(t)}function te(t){return Xn(t)+qn(t).toLowerCase()}function ne(t){return tn(t)?.name}const ee=K("Map"),re=z(ee),oe=/Array/,ie="Array";function ce(t){if(t){const n=ne(t);if(oe.test(n)&&n!==ie)return!0}return!1}function se(t){return!a(t)}const ue=K("BigInt"),ae=z(ue),fe=K("Boolean"),le=z(fe),he=K("ArrayBuffer"),pe=z(he);const ge=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const de=K("Date"),ye=z(de);function me(t){return!1===t}const Ae=K("Float32Array"),be=z(Ae),we=K("Float64Array"),ve=z(we),{isInteger:Ce}=Number,Oe=Ce,Ie=K("Int16Array"),je=z(Ie),Fe=K("Int32Array"),Me=z(Fe),Ee=K("Int8Array"),Re=z(Ee);function Se(t){return!!t&&t instanceof Promise}function xe(t){return!!t&&(Se(t)||Vt(t)||Lt(t))}const{isSafeInteger:Te}=Number,Ne=Te;const Be=K("Uint16Array"),Pe=z(Be),Ue=K("Uint32Array"),ke=z(Ue),$e=K("Uint8Array"),De=z($e),Le=K("Uint8ClampedArray"),qe=z(Le),_e=K("WeakMap"),Ve=z(_e),Ze=void 0!==globalThis.Deno,Ke=void 0!==globalThis.process&&process.versions&&process.versions.node;function ze(t,n=!0){return Boolean(t)&&n}function We(t,n){return me(H(t,n))}const Ge=JSON;const Je=Ge.stringify;function He(t,n,e){const r=globalThis.options||e;let o;return pt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Je(t)}\n\t\tExpected: ${Je(n)}`,r)}async function Qe(t,n,e){const r=await t;return!(pt(n)&&!1===await n(r,e))&&!We(r,n)||He(r,n,e)}const Xe=globalThis.structuredClone;async function Ye(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);a(r)&&e.push(r)}return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const i=await n(e,o,t);a(i)&&r(i)}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);a(c)&&(i?o.set(e,c):o[e]=c)}return o}function tr(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const i=n(e,r,t);a(i)&&o(i)}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);a(c)&&(o?r.set(e,c):r[e]=c)}return r}const nr=Zt(h,g,jn,In,tr,Ye);function er(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=pt(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function rr(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=pt(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const or=Zt(x,T,Fn,Mn,er,rr);function ir(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const cr=ir(l),sr=ir(M);function ur(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ar=ur(p),fr=ur(E);const lr=Rt(/\./);class hr{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=v(hr);class gr{static models=new Map;constructor(t,n){a(n)?(bt(this,n),this.modelName=t,gr.models.set(t,n)):bt(this,t)}delete(t){gr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),gr.models.set(t||this.modelName,this)}has(t){return gr.models.has(t||this.modelName)}get(t){return gr.models.get(t||this.modelName)}}class dr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Pt(t,(n=>{t[n]=new dr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new dr(e),!0)})}}class yr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return a(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const mr=v(yr);class Ar{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):a(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=nn(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=zt,t.Intervals=hr,t.Model=gr,t.Store=dr,t.Timers=Jt,t.UniqID=yr,t.VirtualStorage=Ar,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Yt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return l(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return xe(t)||xe(n)?Qe(t,n,e):!(pt(n)&&!1===n(t,e))&&!We(t,n)||He(t,n,e)},t.assertAsync=Qe,t.assign=bt,t.assignToClass=wt,t.assignToObject=At,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=sn(t,(t=>pt(t)?t.bind(n):t));return e?bt(e,r):r},t.cacheNativeMethod=gn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Bn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return v(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(G(t))return ht(t);if(b(t))return i(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=i,t.clearBuffer=ht,t.clearIntervals=function(){Gt(setTimeout(Wt,0),(t=>{pr.remove(t)}))},t.clearTimers=function(){Gt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Xe(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=nn,t.compact=function(t){if(J(t)){const n=D(t),e=n.length,r={};for(let o=0;oze(t)))},t.compactKeys=function(t){const n=[];return Pt(t,((t,e)=>{a(t)&&n.push(e)})),n},t.compactMap=nr,t.compactMapArray=h,t.compactMapAsyncArray=g,t.compactMapAsyncObject=In,t.compactMapObject=jn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{const c=e.join(r,i);if((await n.stat(c)).isDirectory()){const s=e.join(o,i.replace(r,""));await n.mkdir(s,{recursive:!0}),await t(c,s)}else await async function(t,r,o){const i=e.join(t,o),c=e.join(r,o);await n.copyFile(i,c)}(r,o,i)})),!0},t.countBy=function(t,n){const e={};let r;return l(t,(t=>{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return l(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return l(t,(t=>{t[n]||e++})),e},t.currentFile=function(t){return globalThis.__filename?__filename:r.fileURLToPath(t.url)},t.currentPath=function(t){return globalThis.__dirname?__dirname:o.dirname(r.fileURLToPath(t.url))},t.curry=function(t,n=t.length){const e=[],r=(...o)=>{if(e.push(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.curryRight=function(t,n=t.length){const e=[],r=(...o)=>{if(e.unshift(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Qt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=mn,t.difference=j,t.divide=function(t,n){return t/n},t.drop=F,t.dropRight=(t,n=1,e=t.length)=>F(t,0,e-n),t.each=Kt,t.eachArray=l,t.eachAsyncArray=p,t.eachAsyncObject=Bt,t.eachObject=Pt,t.eachRight=M,t.eachRightAsync=E,t.ensureArray=C,t.ensureBuffer=function(t){return G(t)&&t||a(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=Cn,t.escapeRegex=Rn,t.escapeRegexRegex=En,t.every=hn,t.everyArg=function(...t){return Vt(t[0])?async function(...n){return hn(t,(async t=>hn(n,(async n=>t(n)))))}:function(...n){return hn(t,(t=>hn(n,(n=>t(n)))))}},t.everyArray=R,t.everyAsyncArray=S,t.everyAsyncObject=un,t.everyObject=an,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rvt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=vt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>vt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(C(n))),[]);return e},t.flattenDeep=O,t.flow=cr,t.flowAsync=ar,t.flowAsyncRight=fr,t.flowRight=sr,t.forEach=I,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else pt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=$t,t.forOfAsync=qt,t.forOfCompactMap=tr,t.forOfCompactMapAsync=Ye,t.forOfEvery=fn,t.forOfEveryAsync=ln,t.forOfFilter=er,t.forOfFilterAsync=rr,t.forOfMap=en,t.forOfMapAsync=rn,t.generateLoop=Zt,t.get=k,t.getEntries=function(t){if(a(t))return On(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return jt(t,n)[0]},t.getLowest=function(t,n){return Ot(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return R(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=yn,t.getPropNames=dn,t.getType=tn,t.getTypeName=ne,t.groupBy=function(t,n){const e={};return l(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!se(n)&&!se(e)&&(n===e||(yt(n)?yt(e)?n.includes(e,r):Tn(e)?e.test(n):pt(e)?e(n):b(e)?R(e,(e=>t(n,e))):hn(e,(e=>t(n,e))):b(n)?Tn(e)?R(n,(t=>t.test(e))):pt(e)?R(n,e):b(e)?R(e,(e=>t(n,e))):n.includes(e,r):!!J(n)&&(Tn(e)?an(n,(t=>t.test(e))):pt(e)?an(n,e):J(e)?an(n,((t,n)=>t===e[n])):an(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}})))},t.hasDot=lr,t.hasKeys=q,t.hasLength=s,t.hasProp=An,t.hasValue=a,t.htmlEntities=Gn,t.ifInvoke=function(t,n,...e){if(pt(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!a(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(a(t)){if(pt(n))return e?Yt(n,e,r):n(...r);if(J(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return h(t,(t=>{if(R(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return pr.set(t,n)},t.intervals=pr,t.invert=function(t,n={}){if(t)return Pt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(a(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return Y(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!a(t)&&"[object Arguments]"===t.toString()},t.isArray=b,t.isArrayBuffer=pe,t.isArrayBufferCall=he,t.isArrayLike=function(t,n){if(se(t)||pt(t))return!1;if(b(t)||ce(t))return!0;const e=t.length;if(!se(e)||!dt(e)||e<0)return!1;if(n){const n=D(t);return!!n&&hn(n,((t,n)=>n>=0&&dt(n)))}return!0},t.isAsync=Vt,t.isAsyncCall=_t,t.isBigInt=ae,t.isBigIntCall=ue,t.isBoolean=le,t.isBooleanCall=fe,t.isBuffer=G,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(a(t)){const n=t?.constructor?.name;return ge.test(n)}return!1},t.isConstructor=_,t.isConstructorFactory=V,t.isConstructorNameFactory=K,t.isDate=ye,t.isDateCall=de,t.isDeno=Ze,t.isEmpty=function(t){return yt(t)||b(t)?!s(t):J(t)?!Nn(t):!a(t)},t.isEqual=H,t.isF32=be,t.isF32Call=Ae,t.isF64=ve,t.isF64Call=we,t.isFalse=me,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=xt,t.isFileJS=Tt,t.isFileJSON=Nt,t.isFloat=Oe,t.isFunction=pt,t.isGenerator=Lt,t.isGeneratorCall=Dt,t.isI16=je,t.isI16Call=Ie,t.isI32=Me,t.isI32Call=Fe,t.isI8=Re,t.isI8Call=Ee,t.isIterable=function(t){return a(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=xe,t.isMap=re,t.isMapCall=ee,t.isMatchArray=function(t,n){return t.length===n.length&&R(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=D(t),r=D(n);return e.length===r.length&&R(e,(e=>t[e]===n[e]))},t.isNegative=y,t.isNodejs=Ke,t.isNotArray=function(t){return!b(t)},t.isNotNumber=function(t){return!dt(t)},t.isNotString=function(t){return!yt(t)},t.isNull=u,t.isNumber=dt,t.isNumberCall=gt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=J,t.isPositive=function(t){return 1===vn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Se,t.isRegex=Tn,t.isRegexCall=xn,t.isRelated=function(t,n){return!se(t)&&!se(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Ne,t.isSame=bn,t.isSameType=function(t,n){const e=tn(t),r=tn(n);return e===r&&e.name===r.name},t.isSet=kt,t.isSetCall=Ut,t.isString=yt,t.isTrue=function(t){return!0===t},t.isTruthy=ze,t.isTypeFactory=z,t.isTypedArray=ce,t.isU16=Pe,t.isU16Call=Be,t.isU32=ke,t.isU32Call=Ue,t.isU8=De,t.isU8C=qe,t.isU8CCall=Le,t.isU8Call=$e,t.isUndefined=c,t.isWeakMap=Ve,t.isWeakMapCall=_e,t.isZero=Cn,t.jsonParse=function(t,n){if(t)return Ge.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase().replace(Un,"-")},t.keys=D,t.largest=function(t){return Q(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Ln," ").trim().toLowerCase()},t.map=sn,t.mapArray=X,t.mapAsyncArray=Y,t.mapAsyncObject=on,t.mapObject=cn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{Kt(e,((e,r)=>{if(n[r]&&(J(e)||b(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return a(n)?v(gr,[t,n]):k(t,gr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=se,t.noop=Wt,t.notEqual=We,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=mt,t.objectEntries=On,t.objectSize=Nn,t.omit=function(t,n){if(!t)return{};if(b(n)){const e=Sn(n);return Fn(t,((t,n)=>!e.test(n)))}if(Tn(n))return Fn(t,((t,e)=>!n.test(e)));if(yt(n))return Fn(t,((t,e)=>e!==n));if(dt(n)){const e=n.toString();return Fn(t,((t,n)=>n!==e))}return pt(n)?Fn(t,((t,e)=>!n(t,e))):mt({},t)},t.once=t=>{let n;return(...e)=>(a(n)||(n=t(...e)),n)},t.onlyUnique=at,t.over=function(t){return(...n)=>sn(t,(t=>t(...n)))},t.overEvery=function(t){return n=>hn(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[h(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return l(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return X(t,(t=>Ft(t,n)))},t.pluckObject=Ft,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=D(t))=>R(e,(e=>H(t[e],n[e]))),t.randomFloat=function(t,n=0){return wn()*(t-n)+n},t.randomInt=ot,t.range=function(t,n,e=1,r=[]){return y(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Rt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return st(t);if(1===n)return[t[ot(e-1,0)]];const r=[],o={};let i,c=0;for(;cMt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Et(t,r,n,e)))},t.sortCollectionAscending=jt,t.sortCollectionAscendingFilter=It,t.sortCollectionDescending=Ot,t.sortCollectionDescendingFilter=Ct,t.sortNumberAscending=function(t){return t.sort(tt)},t.sortNumberDescening=function(t){return t.sort(nt)},t.sortObjectsAlphabetically=Mt,t.sortObjectsAlphabeticallyReverse=Et,t.sortUnique=ft,t.stringify=Je,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=tt,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=nt,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Qt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Qt,t.timers=Ht,t.times=Gt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Pt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return lt(O(t))},t.uniqID=mr,t.unique=lt,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rYn(t)))},t.upperFirstLetter=Xn,t.upperFirstOnly=te,t.upperFirstOnlyAll=function(t){return t.replace(Qn,(t=>te(t)))},t.virtualStorage=function(t){return new Ar(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Hn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=v(Map),e=[];return 2===t.length?j(t[0],t[1]):(l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return l(t,((t,r)=>{e[t]=n[r]})),e}})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:fs/promises"),require("node:path"),require("node:url"),require("path")):"function"==typeof define&&define.amd?define(["exports","node:fs/promises","node:path","node:url","path"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={},t.promises,t.path,t.node_url,t.path$1)}(this,(function(t,n,e,r,o){"use strict";function i(t){return t.length=0,t}function c(t){return void 0===t}function s(t){return Boolean(t.length)}function u(t){return null===t}function a(t){return!c(t)&&!u(t)}function f(t){return t}function l(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const u=n.call(r,t,i,e,c,s,o);a(u)&&e.push(u)})):l(t,((t,i,c,s)=>{const u=n(t,i,e,c,s,r,o);a(u)&&e.push(u)})),e}async function p(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const i=await n(t,r,e,o);a(i)&&e.push(i)})),e}const{sign:d}=Math;function y(t){return-1===d(t)}function m(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const b=Array.isArray;const w=Reflect.construct;function v(t,n=[],e){const r=b(n)?n:[n];return e?w(t,r,e):w(t,r)}function C(t){return b(t)&&t||a(t)&&[t]||[]}function O(t){return t.flat(1/0)}function I(t,n){return t.forEach(n),t}function j(...t){const n=v(Map),e=[];return l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function F(t,n=1,e=t.length){return t.splice(n,e)}function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function E(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function R(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function T(t,n,e=[],r){return await p(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const N=/\.|\[/,B=/]/g,P="";function U(t){return t.replace(B,P).split(N)}function k(t,n){if(!n)return!1;let e=n;return R(b(t)?t:U(t),(t=>(e=e[t],a(e)))),e}const $=Object.keys;function D(t){if(t)return $(t)}const L=Object.hasOwn;function q(t,...n){if(t)return R(n,(n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}}))}function _(t,n){return t?.constructor===n||!1}function V(t){return n=>_(n,t)}function Z(t){return t?.constructor?.name}function K(t){return n=>Z(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&R(e,t):t(n)}}const W=K("Buffer"),G=z(W),J=t=>!!a(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(G(t))return t.equals(n);if(t.toString()===n.toString())if(J(t)){const e=D(t);if(q(n,e))return R(e,(e=>H(t[e],n[e])))}else if(b(t)&&t.length===n.length)return R(t,((t,e)=>H(t,n[e])));return!1};const Q=Math.max;function X(t,n,e=[],r,o){return a(r)?l(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):l(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function Y(t,n){const e=[];return await p(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function tt(t,n){return t-n}function nt(t,n){return n-t}const{floor:et,random:rt}=Math;function ot(t,n=0){return et(rt()*(t-n))+n}const it=Array.from;function ct(t,n,e){if(a(t))return it(t,n,e)}function st(t,n=t.length){if(t.length<=1)return ct(t);const e=ct(t);let r,o,i=0;for(;i!!a(t)&&t instanceof Function,gt=K("Number"),dt=z(gt);const yt=V(String);const mt=Object.assign;function At(t,n){if(J(n))mt(t,n);else if(pt(n)){const e=n.name;e?t[e]=n:mt(t,n)}else(yt(n)||dt(n))&&(t[n]=n);return t}function bt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function Ot(t,n="id",e){return t.sort(((t,r)=>Ct(t,r,n,e)))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function jt(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))}function Ft(t,n){if(t)return yt(n)?t[n]:X(n,(n=>t[n]))}function Mt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Et(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Rt(t){return n=>!!a(n)&&t.test(n)}const St=Rt(/\.css$/),xt=Rt(/\.html$/),Tt=Rt(/\.js$/),Nt=Rt(/\.json$/);const Bt=async(t,n,e,r)=>{if(!t)return;const o=D(t);return a(e)?await p(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await p(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Pt(t,n,e,r){if(!t)return;const o=D(t);return a(e)?l(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):l(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Ut=K("Set"),kt=z(Ut);function $t(t,n){if(kt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Dt=K("GeneratorFunction"),Lt=z(Dt);async function qt(t,n,e){if(kt(t)){for(const e of t)await n(e,t);return t}if(Lt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const _t=K("AsyncFunction"),Vt=z(_t);function Zt(t,n,e,r,o,i){return(c,s,u,f,l)=>{let h;const p=Vt(s);if(a(c)&&s)return h=b(c)?p?n:t:J(c)||pt(c)?p?r:e:o?p?i:o:Lt(c)?i:p?r:e,h(c,s,u,f,l)}}const Kt=Zt(l,p,Pt,Bt,$t,qt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Kt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Gt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=v(Jt);function Qt(t,n){return Ht.set(t,n)}const Xt=Reflect.apply;function Yt(t,n,e){if(pt(t))return Xt(t,n,e)}function tn(t){return t?.constructor}function nn(t,n=[]){const e=tn(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function en(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function rn(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function on(t,n,e={}){if(t)return await Bt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function cn(t,n,e={},r,o){if(t)return a(r)?Pt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Pt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const sn=Zt(X,Y,cn,on,en,rn);async function un(t,n){if(!t)return;return S(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function an(t,n){if(!t)return;return R(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function fn(t,n=f){if(b(t)||kt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function ln(t,n=f,e){if(Lt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(b(t)||kt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const hn=Zt(R,S,an,un,fn,ln);const pn=Function.prototype;function gn(t){return pn.call.bind(t)}const dn=Object.getOwnPropertyNames,yn=Object.getOwnPropertyDescriptor,mn=Object.defineProperty,An=gn(Object.hasOwnProperty),bn=Object.is;const{random:wn}=Math;const{sign:vn}=Math;function Cn(t){return 0===t}const On=Object.entries;async function In(t,n=f,e={}){return await Bt(t,(async(t,r,o,i,c)=>{const s=await n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function jn(t,n=f,e={}){return Pt(t,((t,r,o,i,c)=>{const s=n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function Fn(t,n,e={}){return Pt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function Mn(t,n,e={}){return await Bt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const En=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Rn(t){return t.replace(En,"\\$&")}function Sn(t,n){return n?Sn(X(t,Rn)):RegExp(t.join("|"))}const xn=K("RegExp"),Tn=z(xn);function Nn(t){if(!t)return;if(J(t))return D(t).length;const n=t.length;if(a(n))return n;const e=t.size;return a(n)?e:D(t).length}const Bn=/[ _-]+/g;const Pn=/[ _-]+/g,Un=/[ ]+/g;const kn=/[ _-]+/g,$n=/[ ]+/g;const Dn=/[ _-]+/g;const Ln=/[ _-]+/g;function qn(t,n=1){return t.substring(n)}const _n=/%(?![\da-f]{2})/gi,Vn=/&/g,Zn=//g,zn=/"/g;function Wn(t){return decodeURIComponent(t.replace(_n,(()=>"%25")))}function Gn(t){return t.replace(Vn,"&").replace(Zn,"<").replace(Kn,">").replace(zn,""")}const Jn=/\S+/g,Hn=/\w+/g;const Qn=/\w+/g;function Xn(t){return t[0].toUpperCase()}function Yn(t){return Xn(t)+qn(t)}function te(t){return Xn(t)+qn(t).toLowerCase()}function ne(t){return tn(t)?.name}const ee=K("Map"),re=z(ee),oe=/Array/,ie="Array";function ce(t){if(t){const n=ne(t);if(oe.test(n)&&n!==ie)return!0}return!1}function se(t){return!a(t)}const ue=K("BigInt"),ae=z(ue),fe=K("Boolean"),le=z(fe),he=K("ArrayBuffer"),pe=z(he);const ge=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const de=K("Date"),ye=z(de);function me(t){return!1===t}const Ae=K("Float32Array"),be=z(Ae),we=K("Float64Array"),ve=z(we),{isInteger:Ce}=Number,Oe=Ce,Ie=K("Int16Array"),je=z(Ie),Fe=K("Int32Array"),Me=z(Fe),Ee=K("Int8Array"),Re=z(Ee);function Se(t){return!!t&&t instanceof Promise}function xe(t){return!!t&&(Se(t)||Vt(t)||Lt(t))}const{isSafeInteger:Te}=Number,Ne=Te;const Be=K("Uint16Array"),Pe=z(Be),Ue=K("Uint32Array"),ke=z(Ue),$e=K("Uint8Array"),De=z($e),Le=K("Uint8ClampedArray"),qe=z(Le),_e=K("WeakMap"),Ve=z(_e),Ze=void 0!==globalThis.Deno,Ke=void 0!==globalThis.process&&process.versions&&process.versions.node;function ze(t,n=!0){return Boolean(t)&&n}function We(t,n){return me(H(t,n))}const Ge=JSON;const Je=Ge.stringify;function He(t,n,e){const r=globalThis.options||e;let o;return pt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Je(t)}\n\t\tExpected: ${Je(n)}`,r)}async function Qe(t,n,e){const r=await t;return!(pt(n)&&!1===await n(r,e))&&!We(r,n)||He(r,n,e)}const Xe=globalThis.structuredClone;async function Ye(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);a(r)&&e.push(r)}return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const i=await n(e,o,t);a(i)&&r(i)}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);a(c)&&(i?o.set(e,c):o[e]=c)}return o}function tr(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const i=n(e,r,t);a(i)&&o(i)}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);a(c)&&(o?r.set(e,c):r[e]=c)}return r}const nr=Zt(h,g,jn,In,tr,Ye);function er(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=pt(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function rr(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=pt(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const or=Zt(x,T,Fn,Mn,er,rr);function ir(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const cr=ir(l),sr=ir(M);function ur(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ar=ur(p),fr=ur(E);const lr=Rt(/\./);class hr{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=v(hr);class gr{static models=new Map;constructor(t,n){a(n)?(bt(this,n),this.modelName=t,gr.models.set(t,n)):bt(this,t)}delete(t){gr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),gr.models.set(t||this.modelName,this)}has(t){return gr.models.has(t||this.modelName)}get(t){return gr.models.get(t||this.modelName)}}class dr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Pt(t,(n=>{t[n]=new dr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new dr(e),!0)})}}class yr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return a(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const mr=v(yr);class Ar{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):a(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=nn(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=zt,t.Intervals=hr,t.Model=gr,t.Store=dr,t.Timers=Jt,t.UniqID=yr,t.VirtualStorage=Ar,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Yt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return l(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return xe(t)||xe(n)?Qe(t,n,e):!(pt(n)&&!1===n(t,e))&&!We(t,n)||He(t,n,e)},t.assertAsync=Qe,t.assign=bt,t.assignToClass=wt,t.assignToObject=At,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=sn(t,(t=>pt(t)?t.bind(n):t));return e?bt(e,r):r},t.cacheNativeMethod=gn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Bn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return v(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(G(t))return ht(t);if(b(t))return i(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=i,t.clearBuffer=ht,t.clearIntervals=function(){Gt(setTimeout(Wt,0),(t=>{pr.remove(t)}))},t.clearTimers=function(){Gt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Xe(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=nn,t.compact=function(t){if(J(t)){const n=D(t),e=n.length,r={};for(let o=0;oze(t)))},t.compactKeys=function(t){const n=[];return Pt(t,((t,e)=>{a(t)&&n.push(e)})),n},t.compactMap=nr,t.compactMapArray=h,t.compactMapAsyncArray=g,t.compactMapAsyncObject=In,t.compactMapObject=jn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{const c=e.join(r,i);if((await n.stat(c)).isDirectory()){const s=e.join(o,i.replace(r,""));await n.mkdir(s,{recursive:!0}),await t(c,s)}else await async function(t,r,o){const i=e.join(t,o),c=e.join(r,o);await n.copyFile(i,c)}(r,o,i)})),!0},t.countBy=function(t,n){const e={};let r;return l(t,(t=>{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return l(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return l(t,(t=>{t[n]||e++})),e},t.currentFile=function(t){return globalThis.__filename?__filename:r.fileURLToPath(t.url)},t.currentPath=function(t){return globalThis.__dirname?__dirname:o.dirname(r.fileURLToPath(t.url))},t.curry=function(t,n=t.length){const e=[],r=(...o)=>{if(e.push(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.curryRight=function(t,n=t.length){const e=[],r=(...o)=>{if(e.unshift(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Qt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=mn,t.difference=j,t.divide=function(t,n){return t/n},t.drop=F,t.dropRight=(t,n=1,e=t.length)=>F(t,0,e-n),t.each=Kt,t.eachArray=l,t.eachAsyncArray=p,t.eachAsyncObject=Bt,t.eachObject=Pt,t.eachRight=M,t.eachRightAsync=E,t.ensureArray=C,t.ensureBuffer=function(t){return G(t)&&t||a(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=Cn,t.escapeRegex=Rn,t.escapeRegexRegex=En,t.every=hn,t.everyArg=function(...t){return Vt(t[0])?async function(...n){return hn(t,(async t=>hn(n,(async n=>t(n)))))}:function(...n){return hn(t,(t=>hn(n,(n=>t(n)))))}},t.everyArray=R,t.everyAsyncArray=S,t.everyAsyncObject=un,t.everyObject=an,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rvt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=vt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>vt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(C(n))),[]);return e},t.flattenDeep=O,t.flow=cr,t.flowAsync=ar,t.flowAsyncRight=fr,t.flowRight=sr,t.forEach=I,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else pt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=$t,t.forOfAsync=qt,t.forOfCompactMap=tr,t.forOfCompactMapAsync=Ye,t.forOfEvery=fn,t.forOfEveryAsync=ln,t.forOfFilter=er,t.forOfFilterAsync=rr,t.forOfMap=en,t.forOfMapAsync=rn,t.generateLoop=Zt,t.get=k,t.getEntries=function(t){if(a(t))return On(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return jt(t,n)[0]},t.getLowest=function(t,n){return Ot(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return R(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=yn,t.getPropNames=dn,t.getType=tn,t.getTypeName=ne,t.groupBy=function(t,n){const e={};return l(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!se(n)&&!se(e)&&(n===e||(yt(n)?yt(e)?n.includes(e,r):Tn(e)?e.test(n):pt(e)?e(n):b(e)?R(e,(e=>t(n,e))):hn(e,(e=>t(n,e))):b(n)?Tn(e)?R(n,(t=>t.test(e))):pt(e)?R(n,e):b(e)?R(e,(e=>t(n,e))):n.includes(e,r):!!J(n)&&(Tn(e)?an(n,(t=>t.test(e))):pt(e)?an(n,e):J(e)?an(n,((t,n)=>t===e[n])):an(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}})))},t.hasDot=lr,t.hasKeys=q,t.hasLength=s,t.hasProp=An,t.hasValue=a,t.htmlEntities=Gn,t.ifInvoke=function(t,n,...e){if(pt(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!a(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(a(t)){if(pt(n))return e?Yt(n,e,r):n(...r);if(J(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return h(t,(t=>{if(R(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return pr.set(t,n)},t.intervals=pr,t.invert=function(t,n={}){if(t)return Pt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(a(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return Y(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!a(t)&&"[object Arguments]"===t.toString()},t.isArray=b,t.isArrayBuffer=pe,t.isArrayBufferCall=he,t.isArrayLike=function(t,n){if(se(t)||pt(t))return!1;if(b(t)||ce(t))return!0;const e=t.length;if(!se(e)||!dt(e)||e<0)return!1;if(n){const n=D(t);return!!n&&hn(n,((t,n)=>n>=0&&dt(n)))}return!0},t.isAsync=Vt,t.isAsyncCall=_t,t.isBigInt=ae,t.isBigIntCall=ue,t.isBoolean=le,t.isBooleanCall=fe,t.isBuffer=G,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(a(t)){const n=t?.constructor?.name;return ge.test(n)}return!1},t.isConstructor=_,t.isConstructorFactory=V,t.isConstructorNameFactory=K,t.isDate=ye,t.isDateCall=de,t.isDeno=Ze,t.isEmpty=function(t){return yt(t)||b(t)?!s(t):J(t)?!Nn(t):!a(t)},t.isEqual=H,t.isEven=function(t){return!(1&t)},t.isF32=be,t.isF32Call=Ae,t.isF64=ve,t.isF64Call=we,t.isFalse=me,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=xt,t.isFileJS=Tt,t.isFileJSON=Nt,t.isFloat=Oe,t.isFunction=pt,t.isGenerator=Lt,t.isGeneratorCall=Dt,t.isI16=je,t.isI16Call=Ie,t.isI32=Me,t.isI32Call=Fe,t.isI8=Re,t.isI8Call=Ee,t.isIterable=function(t){return a(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=xe,t.isMap=re,t.isMapCall=ee,t.isMatchArray=function(t,n){return t.length===n.length&&R(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=D(t),r=D(n);return e.length===r.length&&R(e,(e=>t[e]===n[e]))},t.isNegative=y,t.isNodejs=Ke,t.isNotArray=function(t){return!b(t)},t.isNotNumber=function(t){return!dt(t)},t.isNotString=function(t){return!yt(t)},t.isNull=u,t.isNumber=dt,t.isNumberCall=gt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=J,t.isPositive=function(t){return 1===vn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Se,t.isRegex=Tn,t.isRegexCall=xn,t.isRelated=function(t,n){return!se(t)&&!se(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Ne,t.isSame=bn,t.isSameType=function(t,n){const e=tn(t),r=tn(n);return e===r&&e.name===r.name},t.isSet=kt,t.isSetCall=Ut,t.isString=yt,t.isTrue=function(t){return!0===t},t.isTruthy=ze,t.isTypeFactory=z,t.isTypedArray=ce,t.isU16=Pe,t.isU16Call=Be,t.isU32=ke,t.isU32Call=Ue,t.isU8=De,t.isU8C=qe,t.isU8CCall=Le,t.isU8Call=$e,t.isUndefined=c,t.isWeakMap=Ve,t.isWeakMapCall=_e,t.isZero=Cn,t.jsonParse=function(t,n){if(t)return Ge.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase().replace(Un,"-")},t.keys=D,t.largest=function(t){return Q(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Ln," ").trim().toLowerCase()},t.map=sn,t.mapArray=X,t.mapAsyncArray=Y,t.mapAsyncObject=on,t.mapObject=cn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{Kt(e,((e,r)=>{if(n[r]&&(J(e)||b(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return a(n)?v(gr,[t,n]):k(t,gr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=se,t.noop=Wt,t.notEqual=We,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=mt,t.objectEntries=On,t.objectSize=Nn,t.omit=function(t,n){if(!t)return{};if(b(n)){const e=Sn(n);return Fn(t,((t,n)=>!e.test(n)))}if(Tn(n))return Fn(t,((t,e)=>!n.test(e)));if(yt(n))return Fn(t,((t,e)=>e!==n));if(dt(n)){const e=n.toString();return Fn(t,((t,n)=>n!==e))}return pt(n)?Fn(t,((t,e)=>!n(t,e))):mt({},t)},t.once=t=>{let n;return(...e)=>(a(n)||(n=t(...e)),n)},t.onlyUnique=at,t.over=function(t){return(...n)=>sn(t,(t=>t(...n)))},t.overEvery=function(t){return n=>hn(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[h(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return l(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return X(t,(t=>Ft(t,n)))},t.pluckObject=Ft,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=D(t))=>R(e,(e=>H(t[e],n[e]))),t.randomFloat=function(t,n=0){return wn()*(t-n)+n},t.randomInt=ot,t.range=function(t,n,e=1,r=[]){return y(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Rt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return st(t);if(1===n)return[t[ot(e-1,0)]];const r=[],o={};let i,c=0;for(;cMt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Et(t,r,n,e)))},t.sortCollectionAscending=jt,t.sortCollectionAscendingFilter=It,t.sortCollectionDescending=Ot,t.sortCollectionDescendingFilter=Ct,t.sortNumberAscending=function(t){return t.sort(tt)},t.sortNumberDescening=function(t){return t.sort(nt)},t.sortObjectsAlphabetically=Mt,t.sortObjectsAlphabeticallyReverse=Et,t.sortUnique=ft,t.stringify=Je,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=tt,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=nt,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Qt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Qt,t.timers=Ht,t.times=Gt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Pt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return lt(O(t))},t.uniqID=mr,t.unique=lt,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rYn(t)))},t.upperFirstLetter=Xn,t.upperFirstOnly=te,t.upperFirstOnlyAll=function(t){return t.replace(Qn,(t=>te(t)))},t.virtualStorage=function(t){return new Ar(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Hn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=v(Map),e=[];return 2===t.length?j(t[0],t[1]):(l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return l(t,((t,r)=>{e[t]=n[r]})),e}})); //# sourceMappingURL=index.js.map diff --git a/build/index.js.map b/build/index.js.map index aa52762..8fdb51d 100644 --- a/build/index.js.map +++ b/build/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../source/arrays/clear.js","../source/types/isUndefined.js","../source/utilities/hasLength.js","../source/types/isNull.js","../source/types/hasValue.js","../source/utilities/returnValue.js","../source/arrays/each.js","../source/arrays/compactMap.js","../source/arrays/eachAsync.js","../source/arrays/compactMapAsync.js","../source/numbers/isNegative.js","../source/arrays/range.js","../source/types/isArray.js","../source/classes/construct.js","../source/arrays/ensure.js","../source/arrays/flattenDeep.js","../source/utilities/forEach.js","../source/arrays/difference.js","../source/arrays/drop.js","../source/arrays/eachRight.js","../source/arrays/eachRightAsync.js","../source/arrays/every.js","../source/arrays/everyAsync.js","../source/arrays/filter.js","../source/arrays/filterAsync.js","../source/utilities/toPath.js","../source/utilities/get.js","../source/objects/keys.js","../source/objects/hasKeys.js","../source/types/isConstructor.js","../source/types/isTypeFactory.js","../source/types/isBuffer.js","../source/types/isPlainObject.js","../source/utilities/isEqual.js","../source/arrays/largest.js","../source/arrays/map.js","../source/arrays/mapAsync.js","../source/math/subtract.js","../source/math/subtractReverse.js","../source/math/randomInt.js","../source/internal/array.js","../source/arrays/shuffle.js","../source/arrays/smallest.js","../source/arrays/unique.js","../source/buffers/clear.js","../source/types/isFunction.js","../source/types/isNumber.js","../source/types/isString.js","../source/objects/assign.js","../source/classes/extendClass.js","../source/collection/findIndexCache.js","../source/collection/sortCollectionDescending.js","../source/collection/sortCollectionAscending.js","../source/objects/pluckObject.js","../source/collection/sortCollectionAlphabetically.js","../source/collection/sortCollectionAlphabeticallyReverse.js","../source/internal/regexTestFactory.js","../source/files/isFileCSS.js","../source/files/isFileHTML.js","../source/files/isFileJS.js","../source/files/isFileJSON.js","../source/objects/eachAsync.js","../source/objects/each.js","../source/types/isSet.js","../source/utilities/forOf.js","../source/types/isGenerator.js","../source/utilities/forOfAsync.js","../source/types/isAsync.js","../source/utilities/generateLoop.js","../source/utilities/each.js","../source/functions/chain.js","../source/utilities/noop.js","../source/utilities/times.js","../source/utilities/timer.js","../source/internal/apply.js","../source/types/getType.js","../source/types/cloneType.js","../source/utilities/forOfMap.js","../source/utilities/forOfMapAsync.js","../source/objects/mapAsync.js","../source/objects/map.js","../source/utilities/map.js","../source/objects/everyAsync.js","../source/objects/every.js","../source/utilities/forOfEvery.js","../source/utilities/forOfEveryAsync.js","../source/utilities/every.js","../source/utilities/cacheNativeMethod.js","../source/internal/object.js","../source/internal/isSame.js","../source/math/randomFloat.js","../source/numbers/isPositive.js","../source/numbers/isZero.js","../source/objects/getEntries.js","../source/objects/compactMapAsync.js","../source/objects/compactMap.js","../source/objects/filter.js","../source/objects/filterAsync.js","../source/objects/isMatch.js","../source/regexps/escapeRegex.js","../source/regexps/arrayToRegex.js","../source/types/isRegex.js","../source/objects/size.js","../source/objects/zip.js","../source/strings/camelCase.js","../source/strings/kebabCase.js","../source/strings/snakeCase.js","../source/strings/upperCase.js","../source/strings/lowerCase.js","../source/strings/range.js","../source/strings/sanitize.js","../source/strings/tokenize.js","../source/strings/typography.js","../source/types/getTypeName.js","../source/types/isMap.js","../source/types/isTypedArray.js","../source/types/noValue.js","../source/types/isBigInt.js","../source/types/isBoolean.js","../source/types/isArrayBuffer.js","../source/types/isCloneable.js","../source/types/isDate.js","../source/types/isFalse.js","../source/types/isF32.js","../source/types/isF64.js","../source/types/isFloat.js","../source/types/isI16.js","../source/types/isI32.js","../source/types/isI8.js","../source/types/isPromise.js","../source/types/isKindAsync.js","../source/types/isSafeInt.js","../source/types/isU16.js","../source/types/isU32.js","../source/types/isU8.js","../source/types/isU8C.js","../source/types/isWeakMap.js","../source/types/isDeno.js","../source/types/isNode.js","../source/types/isTruthy.js","../source/utilities/notEqual.js","../source/utilities/json.js","../source/utilities/assert.js","../source/utilities/clone.js","../source/utilities/forOfCompactMapAsync.js","../source/utilities/forOfCompactMap.js","../source/utilities/compactMap.js","../source/utilities/forOfFilter.js","../source/utilities/forOfFilterAsync.js","../source/utilities/filter.js","../source/utilities/flow.js","../source/utilities/flowAsync.js","../source/utilities/hasDot.js","../source/utilities/interval.js","../source/utilities/model.js","../source/utilities/store.js","../source/utilities/uid.js","../source/utilities/virtualStorage.js","../source/math/add.js","../source/functions/after.js","../source/utilities/arraysToObject.js","../source/functions/ary.js","../source/functions/before.js","../source/utilities/bindAll.js","../source/math/progress.js","../source/arrays/chunk.js","../source/utilities/clear.js","../source/arrays/clone.js","../source/utilities/compact.js","../source/objects/compactKeys.js","../source/utilities/concurrent.js","../source/arrays/concurrentEach.js","../source/utilities/concurrentStatus.js","../source/filesystem/copyFolder.js","../source/collection/countBy.js","../source/collection/countKey.js","../source/collection/countWithoutKey.js","../source/filesystem/directory.js","../source/functions/curry.js","../source/functions/curryRight.js","../source/functions/debounce.js","../source/math/deduct.js","../source/math/divide.js","../source/arrays/dropRight.js","../source/buffers/ensure.js","../source/utilities/everyArg.js","../source/collection/findIndex.js","../source/collection/findItem.js","../source/arrays/first.js","../source/arrays/flatten.js","../source/utilities/forEachAsync.js","../source/utilities/forMap.js","../source/files/getExtension.js","../source/files/getFilename.js","../source/collection/getHighest.js","../source/collection/getLowest.js","../source/arrays/getNumberInsertIndex.js","../source/collection/groupBy.js","../source/utilities/has.js","../source/functions/ifInvoke.js","../source/utilities/ifNotAssign.js","../source/utilities/ifValue.js","../source/utilities/inAsync.js","../source/utilities/inSync.js","../source/math/increment.js","../source/collection/indexBy.js","../source/arrays/initial.js","../source/arrays/intersect.js","../source/objects/invert.js","../source/arrays/invoke.js","../source/collection/invoke.js","../source/collection/invokeAsync.js","../source/types/isArguments.js","../source/types/isArrayLike.js","../source/types/isChild.js","../source/types/isEmpty.js","../source/types/isFalsy.js","../source/types/isIterable.js","../source/arrays/isMatch.js","../source/numbers/isNumberEqual.js","../source/numbers/isNumberInRange.js","../source/numbers/isNumberNotInRange.js","../source/types/isParent.js","../source/types/isPrimitive.js","../source/types/isRelated.js","../source/types/isSameType.js","../source/types/isTrue.js","../source/arrays/last.js","../source/arrays/mapRight.js","../source/arrays/mapWhile.js","../source/utilities/merge.js","../source/math/multiple.js","../source/functions/negate.js","../source/functions/nthArg.js","../source/objects/omit.js","../source/functions/once.js","../source/functions/over.js","../source/functions/overEvery.js","../source/utilities/pair.js","../source/arrays/partition.js","../source/objects/pick.js","../source/collection/pluck.js","../source/utilities/promise.js","../source/utilities/propertyMatch.js","../source/functions/rearged.js","../source/math/remainder.js","../source/arrays/remove.js","../source/strings/replace.js","../source/arrays/rest.js","../source/arrays/right.js","../source/arrays/sample.js","../source/utilities/setKey.js","../source/utilities/setValue.js","../source/arrays/sortNumberAscending.js","../source/arrays/sortNumberDescening.js","../source/utilities/stubArray.js","../source/utilities/stubFalse.js","../source/utilities/stubObject.js","../source/utilities/stubString.js","../source/utilities/stubTrue.js","../source/math/subtractAll.js","../source/math/sumAll.js","../source/arrays/take.js","../source/arrays/takeRight.js","../source/functions/throttle.js","../source/utilities/timesAsync.js","../source/utilities/toggle.js","../source/strings/truncate.js","../source/arrays/zip.js","../source/arrays/union.js","../source/arrays/untilFalse.js","../source/arrays/untilTrue.js","../source/arrays/whileCompactMap.js","../source/arrays/whileEach.js","../source/arrays/whileMap.js","../source/arrays/without.js","../source/functions/wrap.js","../source/arrays/xor.js"],"sourcesContent":["/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [key, value] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst zipedObject = {};\n\teachArray(properties, (item, key) => {\n\t\tzipedObject[item] = values[key];\n\t});\n\treturn zipedObject;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst unZippedKeys = [];\n\tconst values = [];\n\teachObject(object, (item, key) => {\n\t\tunZippedKeys.push(key);\n\t\tvalues.push(item);\n\t});\n\treturn [unZippedKeys, values];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(compactMapArray, compactMapAsyncArray,\n\tcompactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0;index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","import {\n\tcopyFile,\n\tmkdir,\n\treaddir,\n\tstat\n} from 'node:fs/promises';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport path from 'node:path';\nasync function copyToPath(sourceFolder, destinationFolder, file) {\n\tconst sourcePath = path.join(sourceFolder, file);\n\tconst destinationPath = path.join(destinationFolder, file);\n\tawait copyFile(sourcePath, destinationPath);\n}\nexport async function copyFolder(sourceFolder, destinationFolder) {\n\tconst files = await readdir(sourceFolder);\n\tawait eachAsyncArray(files, async (file) => {\n\t\tconst sourcePath = path.join(sourceFolder, file);\n\t\tconst filestats = await stat(sourcePath);\n\t\tif (filestats.isDirectory()) {\n\t\t\tconst folderDestination = path.join(destinationFolder, file.replace(sourceFolder, ''));\n\t\t\tawait mkdir(folderDestination, {\n\t\t\t\trecursive: true\n\t\t\t});\n\t\t\tawait copyFolder(sourcePath, folderDestination);\n\t\t} else {\n\t\t\tawait copyToPath(sourceFolder, destinationFolder, file);\n\t\t}\n\t});\n\treturn true;\n}\n\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { fileURLToPath } from 'node:url';\nimport path from 'path';\nexport function currentFile(importMeta) {\n\tif (globalThis.__filename) {\n\t\treturn __filename;\n\t}\n\treturn fileURLToPath(importMeta.url);\n}\nexport function currentPath(importMeta) {\n\tif (globalThis.__dirname) {\n\t\treturn __dirname;\n\t}\n\treturn path.dirname(fileURLToPath(importMeta.url));\n}\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0;index < arrayLength;index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn (isEqual(on, value)) ? off : on;\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n"],"names":["clearArray","source","length","isUndefined","undefined","hasLength","Boolean","isNull","hasValue","returnValue","eachArray","iteratee","thisBind","additionalArg","arrayLength","index","call","compactMapArray","results","thisCall","item","arrayOriginal","returned","push","async","eachAsyncArray","compactMapAsyncArray","result","sign","Math","isNegative","rangeUp","start","end","step","sourceArray","position","rangeDown","isArray","Array","reflectConstruct","Reflect","construct","target","argumentsList","newTarget","args","ensureArray","flattenDeep","flat","Infinity","forEach","callback","difference","sources","differencesMap","Map","differences","currentArray","parentIndex","child","childIndex","childRoot","get","count","set","drop","array","amount","upTo","splice","eachRight","additionalArgument","eachRightAsync","everyArray","sourceLength","everyAsyncArray","filterArray","filterAsyncArray","regexToPath","regexCloseBracket","emptyString","toPath","replace","split","propertyString","link","objectKeys","Object","keys","hasOwn","hasKeys","properties","pathArray","lastPath","pop","initialPathObject","isConstructor","constructor","isConstructorFactory","constructorName","name","isConstructorNameFactory","isTypeFactory","method","primarySource","otherSources","isBufferCall","isBuffer","isPlainObject","toString","trim","slice","isEqual","equals","sourceProperties","key","mathNativeMax","max","mapArray","mapAsyncArray","subtract","minuend","subtrahend","subtractReverse","floor","random","randomInt","min","arrayFrom","from","toArray","arrayLike","mapFn","thisArg","shuffle","shuffleArray","value","mathNativeMin","onlyUnique","indexOf","sortUnique","unique","isSorted","filter","clearBuffer","fill","isFunction","Function","isNumberCall","isNumber","isString","String","objectAssign","assign","assignToObject","assignToClass","prototype","findIndexCache","element","indexMatch","propertyName","sortCollectionDescendingFilter","previous","next","ifMatch","previousKey","nextKey","sortCollectionDescending","collection","sort","sortCollectionAscendingFilter","sortCollectionAscending","pluckObject","targets","sortObjectsAlphabetically","localeCompare","sortObjectsAlphabeticallyReverse","regexTestFactory","regexType","test","isFileCSS","isFileHTML","isFileJS","isFileJSON","eachAsyncObject","propertyCount","eachObject","objectKeysArray","isSetCall","isSet","forOf","isGeneratorCall","isGenerator","forOfAsync","generatorArgs","isAsyncCall","isAsync","generateLoop","arrayLoop","arrayLoopAsync","objectLoop","objectLoopAsync","forOfLoop","forOfLoopAsync","argument1","argument2","argument3","isIterateeAsync","each","Chain","methods","this","addChainMethod","thisChain","methodName","setValue","done","noop","times","Timers","list","remove","id","clearTimeout","delete","has","callable","time","currentThis","setTimeout","clear","timers","timer","applyNative","apply","thisArgument","getType","cloneType","sourceType","forOfMap","resultsObject","methodPush","add","methodPushBound","bind","methodSet","forOfMapAsync","resultsGenerator","mapAsyncObject","thisObject","mapObject","original","map","everyAsyncObject","everyObject","forOfEvery","forOfEveryAsync","every","functionPrototype","cacheNativeMethod","getPropNames","getOwnPropertyNames","getPropDesc","getOwnPropertyDescriptor","defProp","defineProperty","hasProp","hasOwnProperty","isSame","is","isZero","objectEntries","entries","compactMapAsyncObject","compactMapObject","filterObject","filterAsyncObject","escapeRegexRegex","escapeRegex","arrayToRegex","makeSafe","RegExp","join","isRegexCall","isRegex","objectSize","objectLengthProperty","objectSizeProperty","size","normalizeCase","space","restString","string","substring","rawURLDecodeRegex","andRegex","lessThanRegex","moreThanRegex","doubleQuoteRegex","rawURLDecode","decodeURIComponent","htmlEntities","tokenizeRegEx","wordsRegEx","getWords","upperFirstLetter","toUpperCase","upperFirst","upperFirstOnly","toLowerCase","getTypeName","isMapCall","isMap","typedArrayRegex","arrayConstructorName","isTypedArray","noValue","isBigIntCall","isBigInt","isBooleanCall","isBoolean","isArrayBufferCall","isArrayBuffer","constructorNames","isDateCall","isDate","isFalse","isF32Call","isF32","isF64Call","isF64","isInteger","Number","isFloat","isI16Call","isI16","isI32Call","isI32","isI8Call","isI8","isPromise","Promise","isKindAsync","isSafeInteger","isSafeInt","isU16Call","isU16","isU32Call","isU32","isU8Call","isU8","isU8CCall","isU8C","isWeakMapCall","isWeakMap","isDeno","globalThis","Deno","isNodejs","process","versions","node","isTruthy","returnIfTrue","notEqual","jsonNative","JSON","stringify","createAssertError","expected","localOptions","options","errorTitle","title","file","Error","assertAsync","sourceArg","structuredCloneSafe","structuredClone","forOfCompactMapAsync","forOfCompactMap","compactMap","forOfFilter","forOfFilterAsync","returnFlow","arg","flow","flowRight","flowAsync","flowAsyncRight","hasDot","Intervals","clearInterval","setInterval","intervals","Model","static","modelName","modelSource","models","Store","property","data","Proxy","proxySource","console","log","UniqID","totalActive","freed","totalFree","shift","free","isActive","shouldReset","reset","uniqID","VirtualStorage","initialObject","items","getItem","hasItem","setItem","removeItem","augend","addend","point","sortedObject","bindThis","targetAssign","total","currentAmount","config","chunked","match","sourceKeys","sourceKeysLength","targetObject","i","keyName","object","compactedKeys","all","queue","allSettled","copyFolder","sourceFolder","destinationFolder","files","readdir","sourcePath","path","stat","isDirectory","folderDestination","mkdir","recursive","destinationPath","copyFile","copyToPath","importMeta","__filename","fileURLToPath","url","__dirname","dirname","arity","curries","curried","curryArgs","unshift","debounced","Buffer","alloc","findIndex","find","level","reduce","previousValue","currentValue","concat","values","valuesLength","cloned","methodBound","lastIndexOf","insertIndex","search","includes","rootObject","equalThis","optional","text","arrays","otherItem","strictFlag","indexes","sourceChild","targetParent","Symbol","iterator","compareArray","targetKeys","sourceParent","targetChild","type","targetOne","targetTwo","other","otherType","reviver","parse","indexFrom","trueIndex","merge","currentSource","sourceItem","sourceKey","blacklist","blacklistRegex","numberToString","iteratees","predicates","predicate","rejected","whitelist","compared","removeThese","words","sampleArray","used","numberList","a","b","endIndex","indexRight","throttled","shouldThrottle","on","off","maxLength","stringLength","breakAll","breakAllLength","truncateDown","truncateUp","arraySet","unZippedKeys","sourcesSet","Set","wrapper","xorMap","xored","zipedObject"],"mappings":"6ZAaO,SAASA,EAAWC,GAE1B,OADAA,EAAOC,OAAS,EACTD,CACR,CCLO,SAASE,EAAYF,GAC3B,YAAkBG,IAAXH,CACR,CCAO,SAASI,EAAUJ,GACzB,OAAOK,QAAQL,EAAOC,OACvB,CCFO,SAASK,EAAON,GACtB,OAAkB,OAAXA,CACR,CCDO,SAASO,EAASP,GACxB,OAAQE,EAAYF,KAAYM,EAAON,EACxC,CCRO,SAASQ,EAAYR,GAC3B,OAAOA,CACR,CCYO,SAASS,EAAUT,EAAQU,EAAUC,EAAUC,GACrD,IAAKZ,EACJ,OAED,MAAMa,EAAcb,EAAOC,OAC3B,GAAIM,EAASI,GACZ,IAAK,IAAIG,EAAQ,EAAGA,EAAQD,EAAaC,IACxCJ,EAASK,KAAKJ,EAAUX,EAAOc,GAAQA,EAAOd,EAAQa,EAAaD,QAGpE,IAAK,IAAIE,EAAQ,EAAGA,EAAQD,EAAaC,IACxCJ,EAASV,EAAOc,GAAQA,EAAOd,EAAQa,EAAaD,GAGtD,OAAOZ,CACR,CCfO,SAASgB,EAAgBhB,EAAQU,EAAWF,EAAaS,EAAU,GAAIC,EAAUN,GAgBvF,OAfIL,EAASW,GACZT,EAAUT,GAAQ,CAACmB,EAAML,EAAOM,EAAeP,KAC9C,MAAMQ,EAAWX,EAASK,KAAKG,EAAUC,EAAML,EAAOG,EAASG,EAAeP,EAAaD,GACvFL,EAASc,IACZJ,EAAQK,KAAKD,EACb,IAGFZ,EAAUT,GAAQ,CAACmB,EAAML,EAAOM,EAAeP,KAC9C,MAAMQ,EAAWX,EAASS,EAAML,EAAOG,EAASG,EAAeP,EAAaK,EAAUN,GAClFL,EAASc,IACZJ,EAAQK,KAAKD,EACb,IAGIJ,CACR,CCjBOM,eAAeC,EAAexB,EAAQU,EAAUQ,EAAUN,GAChE,IAAKZ,EACJ,OAED,MAA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nhB,KAAKH,EAAKwC,MAChB,IAEK8e,EACR,QTlCO,YAAgB3D,GACtB,OAAOA,EAAO,GAAGlP,KAAI,CAACzO,EAAML,IACpBge,EAAOlP,KAAK1L,GACXA,EAAMpD,MAGhB,crKHyB,CAAC6E,EAAYuY,KACrC,MAAMwE,EAAc,CAAA,EAIpB,OAHAjiB,EAAUkF,GAAY,CAACxE,EAAMgG,KAC5Bub,EAAYvhB,GAAQ+c,EAAO/W,EAAI,IAEzBub,CAAW"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../source/arrays/clear.js","../source/types/isUndefined.js","../source/utilities/hasLength.js","../source/types/isNull.js","../source/types/hasValue.js","../source/utilities/returnValue.js","../source/arrays/each.js","../source/arrays/compactMap.js","../source/arrays/eachAsync.js","../source/arrays/compactMapAsync.js","../source/numbers/isNegative.js","../source/arrays/range.js","../source/types/isArray.js","../source/classes/construct.js","../source/arrays/ensure.js","../source/arrays/flattenDeep.js","../source/utilities/forEach.js","../source/arrays/difference.js","../source/arrays/drop.js","../source/arrays/eachRight.js","../source/arrays/eachRightAsync.js","../source/arrays/every.js","../source/arrays/everyAsync.js","../source/arrays/filter.js","../source/arrays/filterAsync.js","../source/utilities/toPath.js","../source/utilities/get.js","../source/objects/keys.js","../source/objects/hasKeys.js","../source/types/isConstructor.js","../source/types/isTypeFactory.js","../source/types/isBuffer.js","../source/types/isPlainObject.js","../source/utilities/isEqual.js","../source/arrays/largest.js","../source/arrays/map.js","../source/arrays/mapAsync.js","../source/math/subtract.js","../source/math/subtractReverse.js","../source/math/randomInt.js","../source/internal/array.js","../source/arrays/shuffle.js","../source/arrays/smallest.js","../source/arrays/unique.js","../source/buffers/clear.js","../source/types/isFunction.js","../source/types/isNumber.js","../source/types/isString.js","../source/objects/assign.js","../source/classes/extendClass.js","../source/collection/findIndexCache.js","../source/collection/sortCollectionDescending.js","../source/collection/sortCollectionAscending.js","../source/objects/pluckObject.js","../source/collection/sortCollectionAlphabetically.js","../source/collection/sortCollectionAlphabeticallyReverse.js","../source/internal/regexTestFactory.js","../source/files/isFileCSS.js","../source/files/isFileHTML.js","../source/files/isFileJS.js","../source/files/isFileJSON.js","../source/objects/eachAsync.js","../source/objects/each.js","../source/types/isSet.js","../source/utilities/forOf.js","../source/types/isGenerator.js","../source/utilities/forOfAsync.js","../source/types/isAsync.js","../source/utilities/generateLoop.js","../source/utilities/each.js","../source/functions/chain.js","../source/utilities/noop.js","../source/utilities/times.js","../source/utilities/timer.js","../source/internal/apply.js","../source/types/getType.js","../source/types/cloneType.js","../source/utilities/forOfMap.js","../source/utilities/forOfMapAsync.js","../source/objects/mapAsync.js","../source/objects/map.js","../source/utilities/map.js","../source/objects/everyAsync.js","../source/objects/every.js","../source/utilities/forOfEvery.js","../source/utilities/forOfEveryAsync.js","../source/utilities/every.js","../source/utilities/cacheNativeMethod.js","../source/internal/object.js","../source/internal/isSame.js","../source/math/randomFloat.js","../source/numbers/isPositive.js","../source/numbers/isZero.js","../source/objects/getEntries.js","../source/objects/compactMapAsync.js","../source/objects/compactMap.js","../source/objects/filter.js","../source/objects/filterAsync.js","../source/objects/isMatch.js","../source/regexps/escapeRegex.js","../source/regexps/arrayToRegex.js","../source/types/isRegex.js","../source/objects/size.js","../source/objects/zip.js","../source/strings/camelCase.js","../source/strings/kebabCase.js","../source/strings/snakeCase.js","../source/strings/upperCase.js","../source/strings/lowerCase.js","../source/strings/range.js","../source/strings/sanitize.js","../source/strings/tokenize.js","../source/strings/typography.js","../source/types/getTypeName.js","../source/types/isMap.js","../source/types/isTypedArray.js","../source/types/noValue.js","../source/types/isBigInt.js","../source/types/isBoolean.js","../source/types/isArrayBuffer.js","../source/types/isCloneable.js","../source/types/isDate.js","../source/types/isFalse.js","../source/types/isF32.js","../source/types/isF64.js","../source/types/isFloat.js","../source/types/isI16.js","../source/types/isI32.js","../source/types/isI8.js","../source/types/isPromise.js","../source/types/isKindAsync.js","../source/types/isSafeInt.js","../source/types/isU16.js","../source/types/isU32.js","../source/types/isU8.js","../source/types/isU8C.js","../source/types/isWeakMap.js","../source/types/isDeno.js","../source/types/isNode.js","../source/types/isTruthy.js","../source/utilities/notEqual.js","../source/utilities/json.js","../source/utilities/assert.js","../source/utilities/clone.js","../source/utilities/forOfCompactMapAsync.js","../source/utilities/forOfCompactMap.js","../source/utilities/compactMap.js","../source/utilities/forOfFilter.js","../source/utilities/forOfFilterAsync.js","../source/utilities/filter.js","../source/utilities/flow.js","../source/utilities/flowAsync.js","../source/utilities/hasDot.js","../source/utilities/interval.js","../source/utilities/model.js","../source/utilities/store.js","../source/utilities/uid.js","../source/utilities/virtualStorage.js","../source/math/add.js","../source/functions/after.js","../source/utilities/arraysToObject.js","../source/functions/ary.js","../source/functions/before.js","../source/utilities/bindAll.js","../source/math/progress.js","../source/arrays/chunk.js","../source/utilities/clear.js","../source/arrays/clone.js","../source/utilities/compact.js","../source/objects/compactKeys.js","../source/utilities/concurrent.js","../source/arrays/concurrentEach.js","../source/utilities/concurrentStatus.js","../source/filesystem/copyFolder.js","../source/collection/countBy.js","../source/collection/countKey.js","../source/collection/countWithoutKey.js","../source/filesystem/directory.js","../source/functions/curry.js","../source/functions/curryRight.js","../source/functions/debounce.js","../source/math/deduct.js","../source/math/divide.js","../source/arrays/dropRight.js","../source/buffers/ensure.js","../source/utilities/everyArg.js","../source/collection/findIndex.js","../source/collection/findItem.js","../source/arrays/first.js","../source/arrays/flatten.js","../source/utilities/forEachAsync.js","../source/utilities/forMap.js","../source/files/getExtension.js","../source/files/getFilename.js","../source/collection/getHighest.js","../source/collection/getLowest.js","../source/arrays/getNumberInsertIndex.js","../source/collection/groupBy.js","../source/utilities/has.js","../source/functions/ifInvoke.js","../source/utilities/ifNotAssign.js","../source/utilities/ifValue.js","../source/utilities/inAsync.js","../source/utilities/inSync.js","../source/math/increment.js","../source/collection/indexBy.js","../source/arrays/initial.js","../source/arrays/intersect.js","../source/objects/invert.js","../source/arrays/invoke.js","../source/collection/invoke.js","../source/collection/invokeAsync.js","../source/types/isArguments.js","../source/types/isArrayLike.js","../source/types/isChild.js","../source/types/isEmpty.js","../source/numbers/isEven.js","../source/types/isFalsy.js","../source/types/isIterable.js","../source/arrays/isMatch.js","../source/numbers/isNumberEqual.js","../source/numbers/isNumberInRange.js","../source/numbers/isNumberNotInRange.js","../source/numbers/isOdd.js","../source/types/isParent.js","../source/types/isPrimitive.js","../source/types/isRelated.js","../source/types/isSameType.js","../source/types/isTrue.js","../source/arrays/last.js","../source/arrays/mapRight.js","../source/arrays/mapWhile.js","../source/utilities/merge.js","../source/math/multiple.js","../source/functions/negate.js","../source/functions/nthArg.js","../source/objects/omit.js","../source/functions/once.js","../source/functions/over.js","../source/functions/overEvery.js","../source/utilities/pair.js","../source/arrays/partition.js","../source/objects/pick.js","../source/collection/pluck.js","../source/utilities/promise.js","../source/utilities/propertyMatch.js","../source/functions/rearged.js","../source/math/remainder.js","../source/arrays/remove.js","../source/strings/replace.js","../source/arrays/rest.js","../source/arrays/right.js","../source/arrays/sample.js","../source/utilities/setKey.js","../source/utilities/setValue.js","../source/arrays/sortNumberAscending.js","../source/arrays/sortNumberDescening.js","../source/utilities/stubArray.js","../source/utilities/stubFalse.js","../source/utilities/stubObject.js","../source/utilities/stubString.js","../source/utilities/stubTrue.js","../source/math/subtractAll.js","../source/math/sumAll.js","../source/arrays/take.js","../source/arrays/takeRight.js","../source/functions/throttle.js","../source/utilities/timesAsync.js","../source/utilities/toggle.js","../source/strings/truncate.js","../source/arrays/zip.js","../source/arrays/union.js","../source/arrays/untilFalse.js","../source/arrays/untilTrue.js","../source/arrays/whileCompactMap.js","../source/arrays/whileEach.js","../source/arrays/whileMap.js","../source/arrays/without.js","../source/functions/wrap.js","../source/arrays/xor.js"],"sourcesContent":["/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = isArray(propertyString) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [\n\t\tkey,\n\t\tvalue\n\t] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = isIterateeAsync ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = isIterateeAsync ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst source = {};\n\teachArray(properties, (item, key) => {\n\t\tsource[item] = values[key];\n\t});\n\treturn source;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst objectKeys = [];\n\tconst objectValues = [];\n\teachObject(object, (item, key) => {\n\t\tobjectKeys.push(key);\n\t\tobjectValues.push(item);\n\t});\n\treturn [\n\t\tobjectKeys,\n\t\tobjectValues,\n\t];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(\n\tcompactMapArray,\n\tcompactMapAsyncArray,\n\tcompactMapObject,\n\tcompactMapAsyncObject,\n\tforOfCompactMap,\n\tforOfCompactMapAsync\n);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","import {\n\tcopyFile,\n\tmkdir,\n\treaddir,\n\tstat\n} from 'node:fs/promises';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport path from 'node:path';\nasync function copyToPath(sourceFolder, destinationFolder, file) {\n\tconst sourcePath = path.join(sourceFolder, file);\n\tconst destinationPath = path.join(destinationFolder, file);\n\tawait copyFile(sourcePath, destinationPath);\n}\nexport async function copyFolder(sourceFolder, destinationFolder) {\n\tconst files = await readdir(sourceFolder);\n\tawait eachAsyncArray(files, async (file) => {\n\t\tconst sourcePath = path.join(sourceFolder, file);\n\t\tconst filestats = await stat(sourcePath);\n\t\tif (filestats.isDirectory()) {\n\t\t\tconst folderDestination = path.join(destinationFolder, file.replace(sourceFolder, ''));\n\t\t\tawait mkdir(folderDestination, {\n\t\t\t\trecursive: true\n\t\t\t});\n\t\t\tawait copyFolder(sourcePath, folderDestination);\n\t\t} else {\n\t\t\tawait copyToPath(sourceFolder, destinationFolder, file);\n\t\t}\n\t});\n\treturn true;\n}\n\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { fileURLToPath } from 'node:url';\nimport path from 'path';\nexport function currentFile(importMeta) {\n\tif (globalThis.__filename) {\n\t\treturn __filename;\n\t}\n\treturn fileURLToPath(importMeta.url);\n}\nexport function currentPath(importMeta) {\n\tif (globalThis.__dirname) {\n\t\treturn __dirname;\n\t}\n\treturn path.dirname(fileURLToPath(importMeta.url));\n}\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Checks if a number is even & returns true or false.\n *\n * @function isEven\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEven, assert } from '@universalweb/acid';\n * assert(isEven(1), true);\n */\nexport function isEven(source) {\n\treturn (source & 1) === 0;\n}\n\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is odd & returns true or false.\n *\n * @function isOdd\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isOdd, assert } from '@universalweb/acid';\n * assert(isOdd(1), true);\n */\nexport function isOdd(source) {\n\treturn (source & 1) === 1;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn ((isEqual(on, value)) ? off : on);\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n"],"names":["clearArray","source","length","isUndefined","undefined","hasLength","Boolean","isNull","hasValue","returnValue","eachArray","iteratee","thisBind","additionalArg","arrayLength","index","call","compactMapArray","results","thisCall","item","arrayOriginal","returned","push","async","eachAsyncArray","compactMapAsyncArray","result","sign","Math","isNegative","rangeUp","start","end","step","sourceArray","position","rangeDown","isArray","Array","reflectConstruct","Reflect","construct","target","argumentsList","newTarget","args","ensureArray","flattenDeep","flat","Infinity","forEach","callback","difference","sources","differencesMap","Map","differences","currentArray","parentIndex","child","childIndex","childRoot","get","count","set","drop","array","amount","upTo","splice","eachRight","additionalArgument","eachRightAsync","everyArray","sourceLength","everyAsyncArray","filterArray","filterAsyncArray","regexToPath","regexCloseBracket","emptyString","toPath","replace","split","propertyString","link","objectKeys","Object","keys","hasOwn","hasKeys","properties","pathArray","lastPath","pop","initialPathObject","isConstructor","constructor","isConstructorFactory","constructorName","name","isConstructorNameFactory","isTypeFactory","method","primarySource","otherSources","isBufferCall","isBuffer","isPlainObject","toString","trim","slice","isEqual","equals","sourceProperties","key","mathNativeMax","max","mapArray","mapAsyncArray","subtract","minuend","subtrahend","subtractReverse","floor","random","randomInt","min","arrayFrom","from","toArray","arrayLike","mapFn","thisArg","shuffle","shuffleArray","value","mathNativeMin","onlyUnique","indexOf","sortUnique","unique","isSorted","filter","clearBuffer","fill","isFunction","Function","isNumberCall","isNumber","isString","String","objectAssign","assign","assignToObject","assignToClass","prototype","findIndexCache","element","indexMatch","propertyName","sortCollectionDescendingFilter","previous","next","ifMatch","previousKey","nextKey","sortCollectionDescending","collection","sort","sortCollectionAscendingFilter","sortCollectionAscending","pluckObject","targets","sortObjectsAlphabetically","localeCompare","sortObjectsAlphabeticallyReverse","regexTestFactory","regexType","test","isFileCSS","isFileHTML","isFileJS","isFileJSON","eachAsyncObject","propertyCount","eachObject","objectKeysArray","isSetCall","isSet","forOf","isGeneratorCall","isGenerator","forOfAsync","generatorArgs","isAsyncCall","isAsync","generateLoop","arrayLoop","arrayLoopAsync","objectLoop","objectLoopAsync","forOfLoop","forOfLoopAsync","argument1","argument2","argument3","isIterateeAsync","each","Chain","methods","this","addChainMethod","thisChain","methodName","setValue","done","noop","times","Timers","list","remove","id","clearTimeout","delete","has","callable","time","currentThis","setTimeout","clear","timers","timer","applyNative","apply","thisArgument","getType","cloneType","sourceType","forOfMap","resultsObject","methodPush","add","methodPushBound","bind","methodSet","forOfMapAsync","resultsGenerator","mapAsyncObject","thisObject","mapObject","original","map","everyAsyncObject","everyObject","forOfEvery","forOfEveryAsync","every","functionPrototype","cacheNativeMethod","getPropNames","getOwnPropertyNames","getPropDesc","getOwnPropertyDescriptor","defProp","defineProperty","hasProp","hasOwnProperty","isSame","is","isZero","objectEntries","entries","compactMapAsyncObject","compactMapObject","filterObject","filterAsyncObject","escapeRegexRegex","escapeRegex","arrayToRegex","makeSafe","RegExp","join","isRegexCall","isRegex","objectSize","objectLengthProperty","objectSizeProperty","size","normalizeCase","space","restString","string","substring","rawURLDecodeRegex","andRegex","lessThanRegex","moreThanRegex","doubleQuoteRegex","rawURLDecode","decodeURIComponent","htmlEntities","tokenizeRegEx","wordsRegEx","getWords","upperFirstLetter","toUpperCase","upperFirst","upperFirstOnly","toLowerCase","getTypeName","isMapCall","isMap","typedArrayRegex","arrayConstructorName","isTypedArray","noValue","isBigIntCall","isBigInt","isBooleanCall","isBoolean","isArrayBufferCall","isArrayBuffer","constructorNames","isDateCall","isDate","isFalse","isF32Call","isF32","isF64Call","isF64","isInteger","Number","isFloat","isI16Call","isI16","isI32Call","isI32","isI8Call","isI8","isPromise","Promise","isKindAsync","isSafeInteger","isSafeInt","isU16Call","isU16","isU32Call","isU32","isU8Call","isU8","isU8CCall","isU8C","isWeakMapCall","isWeakMap","isDeno","globalThis","Deno","isNodejs","process","versions","node","isTruthy","returnIfTrue","notEqual","jsonNative","JSON","stringify","createAssertError","expected","localOptions","options","errorTitle","title","file","Error","assertAsync","sourceArg","structuredCloneSafe","structuredClone","forOfCompactMapAsync","forOfCompactMap","compactMap","forOfFilter","forOfFilterAsync","returnFlow","arg","flow","flowRight","flowAsync","flowAsyncRight","hasDot","Intervals","clearInterval","setInterval","intervals","Model","static","modelName","modelSource","models","Store","property","data","Proxy","proxySource","console","log","UniqID","totalActive","freed","totalFree","shift","free","isActive","shouldReset","reset","uniqID","VirtualStorage","initialObject","items","getItem","hasItem","setItem","removeItem","augend","addend","point","sortedObject","bindThis","targetAssign","total","currentAmount","config","chunked","match","sourceKeys","sourceKeysLength","targetObject","i","keyName","object","compactedKeys","all","queue","allSettled","copyFolder","sourceFolder","destinationFolder","files","readdir","sourcePath","path","stat","isDirectory","folderDestination","mkdir","recursive","destinationPath","copyFile","copyToPath","importMeta","__filename","fileURLToPath","url","__dirname","dirname","arity","curries","curried","curryArgs","unshift","debounced","Buffer","alloc","findIndex","find","level","reduce","previousValue","currentValue","concat","values","valuesLength","cloned","methodBound","lastIndexOf","insertIndex","search","includes","rootObject","equalThis","optional","text","arrays","otherItem","strictFlag","indexes","sourceChild","targetParent","Symbol","iterator","compareArray","targetKeys","sourceParent","targetChild","type","targetOne","targetTwo","other","otherType","reviver","parse","indexFrom","trueIndex","merge","currentSource","sourceItem","sourceKey","blacklist","blacklistRegex","numberToString","iteratees","predicates","predicate","rejected","whitelist","compared","removeThese","words","sampleArray","used","numberList","a","b","endIndex","indexRight","throttled","shouldThrottle","on","off","maxLength","stringLength","breakAll","breakAllLength","truncateDown","truncateUp","arraySet","objectValues","sourcesSet","Set","wrapper","xorMap","xored"],"mappings":"6ZAaO,SAASA,EAAWC,GAE1B,OADAA,EAAOC,OAAS,EACTD,CACR,CCLO,SAASE,EAAYF,GAC3B,YAAkBG,IAAXH,CACR,CCAO,SAASI,EAAUJ,GACzB,OAAOK,QAAQL,EAAOC,OACvB,CCFO,SAASK,EAAON,GACtB,OAAkB,OAAXA,CACR,CCDO,SAASO,EAASP,GACxB,OAAQE,EAAYF,KAAYM,EAAON,EACxC,CCRO,SAASQ,EAAYR,GAC3B,OAAOA,CACR,CCYO,SAASS,EAAUT,EAAQU,EAAUC,EAAUC,GACrD,IAAKZ,EACJ,OAED,MAAMa,EAAcb,EAAOC,OAC3B,GAAIM,EAASI,GACZ,IAAK,IAAIG,EAAQ,EAAGA,EAAQD,EAAaC,IACxCJ,EAASK,KAAKJ,EAAUX,EAAOc,GAAQA,EAAOd,EAAQa,EAAaD,QAGpE,IAAK,IAAIE,EAAQ,EAAGA,EAAQD,EAAaC,IACxCJ,EAASV,EAAOc,GAAQA,EAAOd,EAAQa,EAAaD,GAGtD,OAAOZ,CACR,CCfO,SAASgB,EAAgBhB,EAAQU,EAAWF,EAAaS,EAAU,GAAIC,EAAUN,GAgBvF,OAfIL,EAASW,GACZT,EAAUT,GAAQ,CAACmB,EAAML,EAAOM,EAAeP,KAC9C,MAAMQ,EAAWX,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S/f,EAAUc,KACnBkf,EAAQ,GAEd,OAAsB,IADApf,EAAQpD,OAEtBmD,EAAWC,EAAQ,GAAIA,EAAQ,KAEvC5C,EAAU4C,GAAS,CAACI,EAAcC,KACjCjD,EAAUgD,GAAc,CAACE,EAAOC,KAC/B,IAAIC,EAAY2e,EAAO1e,IAAIH,GAC3B,GAAKE,EAOE,IAAIA,EAAUH,cAAgBA,EACpC,OAEAG,EAAUE,OACV,MAVAF,EAAY,CACXE,MAAO,EACPL,cACAC,SAED6e,EAAOxe,IAAIL,EAAOE,EAKlB,GACA,IAEHX,EAAQsf,GAASrhB,IACG,IAAfA,EAAK4C,OACR0e,EAAMnhB,KAAKH,EAAKwC,MAChB,IAEK8e,EACR,QTlCO,YAAgB3D,GACtB,OAAOA,EAAO,GAAGlP,KAAI,CAACzO,EAAML,IACpBge,EAAOlP,KAAK1L,GACXA,EAAMpD,MAGhB,cvKHyB,CAAC6E,EAAYuY,KACrC,MAAMle,EAAS,CAAA,EAIf,OAHAS,EAAUkF,GAAY,CAACxE,EAAMgG,KAC5BnH,EAAOmB,GAAQ+c,EAAO/W,EAAI,IAEpBnH,CAAM"} \ No newline at end of file diff --git a/build/module/basic.js b/build/module/basic.js index 2344234..181af9e 100644 --- a/build/module/basic.js +++ b/build/module/basic.js @@ -1,2 +1,2 @@ -function t(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function n(t){return t.length=0,t}function r(t){return t.slice()}function e(t){return void 0===t}function o(t){return Boolean(t.length)}function u(t){return null===t}function c(t){return!e(t)&&!u(t)}function i(t){return t}function s(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const f=n.call(e,t,u,r,i,s,o);c(f)&&r.push(f)})):s(t,((t,u,i,s)=>{const f=n(t,u,r,i,s,e,o);c(f)&&r.push(f)})),r}async function l(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const u=await n(t,e,r,o);c(u)&&r.push(u)})),r}const{sign:h}=Math;function g(t){return-1===h(t)}function p(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function m(t,n,r=1,e=[]){return g(r)?e:t{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function x(t,n=1,r=t.length){return t.splice(n,r)}const O=(t,n=1,r=t.length)=>x(t,0,r-n);function $(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function j(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function C(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function F(t,n,r=[],e){return await l(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function R(t,n){return n?t.slice(0,n):t[0]}function N(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat(A(n))),[]);return r}function T(t){return t.slice(0,t.length-1)}function P(t,...n){return f(t,(t=>{if(C(n,(n=>n.includes(t))))return t}))}function U(t,n,r){if(!t)return;const e=t.length;if(c(r))for(let o=0;o(r=r[t],c(r)))),r}const q=Object.keys;function V(t){if(t)return q(t)}const z=Object.hasOwn;function G(t,...n){if(t)return C(n,(n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}}))}function J(t,...n){if(t)return Boolean(n.find((n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}})))}function W(t,n){return t?.constructor===n||!1}function H(t){return n=>W(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...r){return r?t(n)&&C(r,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!c(t)&&"Object("===t.constructor.toString().trim().slice(9,16),rt=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const r=V(t);if(G(n,r))return C(r,(r=>rt(t[r],n[r])))}else if(w(t)&&t.length===n.length)return C(t,((t,r)=>rt(t,n[r])));return!1};function et(t,n){return t.length===n.length&&C(t,((t,r)=>rt(n[r],t)))}const ot=Math.max;function ut(t){return ot(...t)}function ct(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function it(t,n,r=[],e,o){return c(e)?s(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):s(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function st(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function lt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function at(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function dt(t,n){return n-t}function mt(t){return t.sort(dt)}function wt(t,n){let r=t.length;for(let e=0;er)return $t(t);if(1===n)return[t[Et(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Ft(t,n=1){return t.slice(0,n)}function Rt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Nt(t,n,r){return r.indexOf(t)===n}function Tt(t,n,r){return t!==r[n-1]}function Pt(t,n){return n?t.filter(Tt):t.filter(Nt)}function Ut(...t){return Pt(I(t))}function Lt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Vt(...t){const n=v(Map),r=[];return 2===t.length?M(t[0],t[1]):(s(t,((t,r)=>{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&r.push(t.child)})),r)}function zt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Gt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Jt(t){return tt(t)&&t||c(t)&&Buffer.from(t)||Buffer.alloc(0)}function Wt(t){return t.fill(0),t}const Ht=t=>!!c(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=H(String);function tn(t){return!Yt(t)}const nn=Object.assign;function rn(t,n){if(nt(n))nn(t,n);else if(Ht(n)){const r=n.name;r?t[r]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function en(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function sn(t,n){let r=0;return s(t,(t=>{t[n]&&r++})),r}function fn(t,n){let r=0;return s(t,(t=>{t[n]||r++})),r}function ln(t,n,r,e,o){if(t[o]===e)return!0}function an(t,n,r="id"){const e=t.findIndex(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function hn(t,n,r="id"){const e=t.find(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function gn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function pn(t,n="id",r){return t.sort(((t,e)=>gn(t,e,n,r)))}function dn(t,n){return pn(t,n,!1)[0]}function mn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function wn(t,n="id",r){return t.sort(((t,e)=>mn(t,e,n,r)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const r={};return s(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function vn(t,n="id"){const r={};return s(t,(t=>{r[t[n]]=t})),r}function An(t,n,r,e){return it(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function In(t,n,r,e){return ft(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function Mn(t,n){return it(t,(t=>En(t,n)))}function xn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function On(t,n="id",r){return t.sort(((t,e)=>xn(t,e,n,r)))}function $n(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function jn(t,n="id",r){return t.sort(((t,e)=>$n(t,e,n,r)))}function Cn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Sn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Bn(t){return n=>!!c(n)&&t.test(n)}const Fn=Bn(/\.css$/),Rn=Bn(/\.html$/),Nn=Bn(/\.js$/),Tn=Bn(/\.json$/);function Pn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Un(t,n){return(...r)=>t(...r.splice(0,n))}function Ln(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const _n=async(t,n,r,e)=>{if(!t)return;const o=V(t);return c(r)?await l(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await l(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Dn(t,n,r,e){if(!t)return;const o=V(t);return c(r)?s(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):s(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Zn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let h;const g=Hn(s);if(c(i)&&s)return h=w(i)?g?n:t:nt(i)||Ht(i)?g?e:r:o?g?u:o:Gn(i)?u:g?e:r,h(i,s,f,l,a)}}const Qn=Kn(s,l,Dn,_n,Vn,Jn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function tr(t,r=t.length){const e=[],o=(...u)=>{if(e.push(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function nr(t,r=t.length){const e=[],o=(...u)=>{if(e.unshift(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function rr(){}function er(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const cr=v(ur);function ir(t,n){return cr.set(t,n)}function sr(){er(setTimeout(rr,0),(t=>{cr.remove(t)}))}const fr=Reflect.apply;function lr(t,n,r){if(Ht(t))return fr(t,n,r)}function ar(t,n){function r(...t){!1!==r.id&&cr.remove(r.id),r.id=ir((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(cr.remove(r.id),r.id=!1)},r}function hr(t,n,...r){if(Ht(t))return n?t.call(n,...r):t(...r)}function gr(t){return(...n)=>!t(...n)}function pr(t=0){return(...n)=>n[t]}const dr=t=>{let n;return(...r)=>(c(n)||(n=t(...r)),n)};function mr(t){return t?.constructor}function wr(t,n=[]){const r=mr(t);return r===Function&&"function"===r.name?function(){}:v(r,n)}function yr(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=Ht(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function br(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=Ht(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function vr(t,n,r={}){if(t)return await _n(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function Ar(t,n,r={},e,o){if(t)return c(e)?Dn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Dn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Ir=Kn(it,ft,Ar,vr,yr,br);function Er(t){return(...n)=>Ir(t,(t=>t(...n)))}async function Mr(t,n){if(!t)return;return S(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function xr(t,n){if(!t)return;return C(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Or(t,n=i){if(w(t)||qn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function $r(t,n=i,r){if(Gn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(w(t)||qn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const jr=Kn(C,S,xr,Mr,Or,$r);function Cr(t){return n=>jr(t,(t=>t(n)))}function Sr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Br(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=ir((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{cr.remove(r.id),r.id=!1},r}function Fr(t,n){return(...r)=>n(t,...r)}const Rr=Function.prototype;function Nr(t){return Rr.call.bind(t)}const Tr=Object.getOwnPropertyNames,Pr=Object.getOwnPropertyDescriptor,Ur=Object.defineProperty,Lr=Nr(Object.hasOwnProperty),_r=Object.is;function Dr(t,n){return t+n}function Zr(t){return t-1}function kr(t,n){return t/n}function qr(t){return t+1}function Vr(t,n){return t*n}function zr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Gr}=Math;function Jr(t,n=0){return Gr()*(t-n)+n}function Wr(t,n){return t%n}function Hr(t){return t.reduce(((t,n)=>t-n),0)}function Kr(t){return t.reduce(((t,n)=>t+n),0)}function Qr(t,n,r){return t>n&&tr}const{sign:Yr}=Math;function te(t){return 1===Yr(t)}function ne(t){return 0===t}const re=Object.entries;function ee(t){if(c(t))return re(t)}function oe(t){const n=[];return Dn(t,((t,r)=>{c(t)&&n.push(r)})),n}async function ue(t,n=i,r={}){return await _n(t,(async(t,e,o,u,i)=>{const s=await n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function ce(t,n=i,r={}){return Dn(t,((t,e,o,u,i)=>{const s=n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function ie(t,n,r={}){return Dn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function se(t,n,r={}){return await _n(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function fe(t,n={}){if(t)return Dn(t,((t,r)=>{n[t]=r})),n}const le=(t,n)=>{if(t===n)return!0;const r=V(t),e=V(n);return r.length===e.length&&C(r,(r=>t[r]===n[r]))},ae=/[()[\]{}*+?^$|#.,/\\\s-]/g;function he(t){return t.replace(ae,"\\$&")}function ge(t,n){return n?ge(it(t,he)):RegExp(t.join("|"))}const pe=Q("RegExp"),de=X(pe);function me(t,n){if(!t)return{};if(w(n)){const r=ge(n);return ie(t,((t,n)=>!r.test(n)))}if(de(n))return ie(t,((t,r)=>!n.test(r)));if(Yt(n))return ie(t,((t,r)=>r!==n));if(Qt(n)){const r=n.toString();return ie(t,((t,n)=>n!==r))}return Ht(n)?ie(t,((t,r)=>!n(t,r))):nn({},t)}const we=(t,n,r={})=>{if(t)return s(n,(n=>{r[n]=t[n]})),r};function ye(t){if(!t)return;if(nt(t))return V(t).length;const n=t.length;if(c(n))return n;const r=t.size;return c(n)?r:V(t).length}const be=(t,n)=>{const r={};return s(t,((t,e)=>{r[t]=n[e]})),r},ve=t=>{const n=[],r=[];return Dn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Ae=/[ _-]+/g;function Ie(t){let n="";return t.replace(Ae," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Ee=/[ _-]+/g,Me=/[ ]+/g;function xe(t){return t.replace(/([A-Z]+)/g," $1").replace(Ee," ").trim().toLowerCase().replace(Me,"-")}const Oe=/[ _-]+/g,$e=/[ ]+/g;function je(t){return t.replace(/([A-Z]+)/g," $1").replace(Oe," ").trim().toLowerCase().replace($e,"_")}const Ce=/[ _-]+/g;function Se(t){return t.replace(/([A-Z]+)/g," $1").replace(Ce," ").trim().toUpperCase()}const Be=/[ _-]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Be," ").trim().toLowerCase()}function Re(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Ne(t,n=1){return t[t.length-n]}function Te(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Pe(t,n=1){return t.slice(0,-1*n)}function Ue(t,n=1){return t.substring(n)}function Le(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const _e=/%(?![\da-f]{2})/gi,De=/&/g,Ze=//g,qe=/"/g;function Ve(t){return decodeURIComponent(t.replace(_e,(()=>"%25")))}function ze(t){return t.replace(De,"&").replace(Ze,"<").replace(ke,">").replace(qe,""")}function Ge(t){return ze(Ve(t))}const Je=/\S+/g,We=/\w+/g;function He(t){return t.match(Je)||[]}function Ke(t){return t.match(We)||[]}function Qe(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function Xe(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const Ye=/\w+/g;function to(t){return t[0].toUpperCase()}function no(t){return to(t)+Ue(t)}function ro(t){return to(t)+Ue(t).toLowerCase()}function eo(t){return t.replace(Ye,(t=>no(t)))}function oo(t){return t.replace(Ye,(t=>ro(t)))}function uo(t){return mr(t)?.name}function co(t){return!!c(t)&&"[object Arguments]"===t.toString()}const io=Q("Map"),so=X(io),fo=/Array/,lo="Array";function ao(t){if(t){const n=uo(t);if(fo.test(n)&&n!==lo)return!0}return!1}function ho(t){return!c(t)}function go(t,n){if(ho(t)||Ht(t))return!1;if(w(t)||ao(t))return!0;const r=t.length;if(!ho(r)||!Qt(r)||r<0)return!1;if(n){const n=V(t);return!!n&&jr(n,((t,n)=>n>=0&&Qt(n)))}return!0}const po=Q("BigInt"),mo=X(po),wo=Q("Boolean"),yo=X(wo),bo=Q("ArrayBuffer"),vo=X(bo);function Ao(t,n){return!(!t||!n)&&t instanceof n}const Io=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function Eo(t){if(c(t)){const n=t?.constructor?.name;return Io.test(n)}return!1}const Mo=Q("Date"),xo=X(Mo);function Oo(t){return Yt(t)||w(t)?!o(t):nt(t)?!ye(t):!c(t)}function $o(t){return!1===t}const jo=Q("Float32Array"),Co=X(jo),So=Q("Float64Array"),Bo=X(So),{isInteger:Fo}=Number,Ro=Fo,No=Q("Int16Array"),To=X(No),Po=Q("Int32Array"),Uo=X(Po),Lo=Q("Int8Array"),_o=X(Lo);function Do(t){return c(t)&&"function"==typeof t[Symbol.iterator]}function Zo(t){return!!t&&t instanceof Promise}function ko(t){return!!t&&(Zo(t)||Hn(t)||Gn(t))}function qo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Vo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function zo(t,n){return!ho(t)&&!ho(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Go}=Number,Jo=Go;function Wo(t,n){const r=mr(t),e=mr(n);return r===e&&r.name===e.name}function Ho(t){return!0===t}const Ko=Q("Uint16Array"),Qo=X(Ko),Xo=Q("Uint32Array"),Yo=X(Xo),tu=Q("Uint8Array"),nu=X(tu),ru=Q("Uint8ClampedArray"),eu=X(ru),ou=Q("WeakMap"),uu=X(ou),cu=void 0!==globalThis.Deno,iu=void 0!==globalThis.process&&process.versions&&process.versions.node;function su(t,n=!0){return Boolean(t)&&n}function fu(t,n=!0){return!1===Boolean(t)&&n}function lu(t,n,r,e){if(c(t)){if(Ht(n))return r?lr(n,r,e):n(...e);if(nt(n))return n[r]=t,n}}function au(t,n){return $o(rt(t,n))}const hu=JSON;function gu(t,n){if(t)return hu.parse(t,n)}const pu=hu.stringify;function du(t,n,r){const e=globalThis.options||r;let o;return Ht(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${pu(t)}\n\t\tExpected: ${pu(n)}`,e)}async function mu(t,n,r){const e=await t;return!(Ht(n)&&!1===await n(e,r))&&!au(e,n)||du(e,n,r)}function wu(t,n,r){if(ko(t)||ko(n))return mu(t,n,r);return!(Ht(n)&&!1===n(t,r))&&!au(t,n)||du(t,n,r)}function yu(t,n,r){const e=Ir(t,(t=>Ht(t)?t.bind(n):t));return r?en(r,e):e}function bu(t){if(t){if(tt(t))return Wt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const vu=globalThis.structuredClone;function Au(t){return vu(t)}async function Iu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;usu(t)))}async function Mu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);c(e)&&r.push(e)}return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);c(u)&&e(u)}return o}const u=Ht(o.set);for await(const[r,e]of t){const i=await n(e,r,o,t);c(i)&&(u?o.set(r,i):o[r]=i)}return o}function xu(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);c(u)&&o(u)}return e}const o=Ht(e.set);for(const[r,u]of t){const i=n(u,r,e,t);c(i)&&(o?e.set(r,i):e[r]=i)}return e}const Ou=Kn(f,a,ce,ue,xu,Mu);function $u(...t){return Hn(t[0])?async function(...n){return jr(t,(async t=>jr(n,(async n=>t(n)))))}:function(...n){return jr(t,(t=>jr(n,(n=>t(n)))))}}function ju(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=Ht(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Cu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=Ht(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Su=Kn(B,F,ie,se,ju,Cu);function Bu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Fu=Bu(s),Ru=Bu($);function Nu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Tu=Nu(l),Pu=Nu(j);function Uu(t,n){const r=wr(t),e=r.push||r.add;if(e&&Ht(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else Ht(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Lu(t,n){const r={};return s(t,((t,e)=>{r[n[e]]=t})),r}function _u(t,n,r){return!ho(t)&&!ho(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,r):de(n)?n.test(t):Ht(n)?n(t):w(n)?C(n,(n=>_u(t,n))):jr(n,(n=>_u(t,n))):w(t)?de(n)?C(t,(t=>t.test(n))):Ht(n)?C(t,n):w(n)?C(n,(n=>_u(t,n))):t.includes(n,r):!!nt(t)&&(de(n)?xr(t,(t=>t.test(n))):Ht(n)?xr(t,n):nt(n)?xr(t,((t,r)=>t===n[r])):xr(t,(t=>_u(t,n))))))}const Du=Bn(/\./),Zu=(t,n,r)=>(n&&!c(t[n])&&(t[n]=r),t);class ku{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const qu=v(ku);function Vu(t,n){return qu.set(t,n)}function zu(){er(setTimeout(rr,0),(t=>{qu.remove(t)}))}function Gu(t,...n){return Qn(n,(n=>{Qn(n,((n,r)=>{if(t[r]&&(nt(n)||w(n)||n.forEach))return Gu(t[r],n);t[r]=n}))})),t}class Ju{static models=new Map;constructor(t,n){c(n)?(en(this,n),this.modelName=t,Ju.models.set(t,n)):en(this,t)}delete(t){Ju.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Ju.models.set(t||this.modelName,this)}has(t){return Ju.models.has(t||this.modelName)}get(t){return Ju.models.get(t||this.modelName)}}function Wu(t,n){return c(n)?v(Ju,[t,n]):k(t,Ju.models)}function Hu(t,n){return[t,n]}function Ku(t,n,r){const e=t.length,o=[];for(let u=0;uC(r,(r=>rt(t[r],n[r])));function Yu(t,n,r){return n&&nt(t)||Qt(n)&&w(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function tc(t,n,r){return Qt(r)&&w(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class nc{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Dn(t,(n=>{t[n]=new nc(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new nc(r),!0)})}}function rc(){return[]}function ec(){return!1}const oc=()=>({}),uc=()=>"",cc=()=>!0;async function ic(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const ac=v(lc);class hc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):c(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=wr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function gc(t){return new hc(t)}async function pc(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function n(t){return t.length=0,t}function r(t){return t.slice()}function e(t){return void 0===t}function o(t){return Boolean(t.length)}function u(t){return null===t}function c(t){return!e(t)&&!u(t)}function i(t){return t}function s(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const f=n.call(e,t,u,r,i,s,o);c(f)&&r.push(f)})):s(t,((t,u,i,s)=>{const f=n(t,u,r,i,s,e,o);c(f)&&r.push(f)})),r}async function l(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const u=await n(t,e,r,o);c(u)&&r.push(u)})),r}const{sign:h}=Math;function g(t){return-1===h(t)}function p(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function m(t,n,r=1,e=[]){return g(r)?e:t{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function x(t,n=1,r=t.length){return t.splice(n,r)}const O=(t,n=1,r=t.length)=>x(t,0,r-n);function $(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function j(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function C(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function F(t,n,r=[],e){return await l(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function R(t,n){return n?t.slice(0,n):t[0]}function N(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat(A(n))),[]);return r}function T(t){return t.slice(0,t.length-1)}function P(t,...n){return f(t,(t=>{if(C(n,(n=>n.includes(t))))return t}))}function U(t,n,r){if(!t)return;const e=t.length;if(c(r))for(let o=0;o(r=r[t],c(r)))),r}const q=Object.keys;function V(t){if(t)return q(t)}const z=Object.hasOwn;function G(t,...n){if(t)return C(n,(n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}}))}function J(t,...n){if(t)return Boolean(n.find((n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}})))}function W(t,n){return t?.constructor===n||!1}function H(t){return n=>W(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...r){return r?t(n)&&C(r,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!c(t)&&"Object("===t.constructor.toString().trim().slice(9,16),rt=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const r=V(t);if(G(n,r))return C(r,(r=>rt(t[r],n[r])))}else if(w(t)&&t.length===n.length)return C(t,((t,r)=>rt(t,n[r])));return!1};function et(t,n){return t.length===n.length&&C(t,((t,r)=>rt(n[r],t)))}const ot=Math.max;function ut(t){return ot(...t)}function ct(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function it(t,n,r=[],e,o){return c(e)?s(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):s(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function st(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function lt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function at(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function dt(t,n){return n-t}function mt(t){return t.sort(dt)}function wt(t,n){let r=t.length;for(let e=0;er)return $t(t);if(1===n)return[t[Et(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Ft(t,n=1){return t.slice(0,n)}function Rt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Nt(t,n,r){return r.indexOf(t)===n}function Tt(t,n,r){return t!==r[n-1]}function Pt(t,n){return n?t.filter(Tt):t.filter(Nt)}function Ut(...t){return Pt(I(t))}function Lt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Vt(...t){const n=v(Map),r=[];return 2===t.length?M(t[0],t[1]):(s(t,((t,r)=>{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&r.push(t.child)})),r)}function zt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Gt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Jt(t){return tt(t)&&t||c(t)&&Buffer.from(t)||Buffer.alloc(0)}function Wt(t){return t.fill(0),t}const Ht=t=>!!c(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=H(String);function tn(t){return!Yt(t)}const nn=Object.assign;function rn(t,n){if(nt(n))nn(t,n);else if(Ht(n)){const r=n.name;r?t[r]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function en(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function sn(t,n){let r=0;return s(t,(t=>{t[n]&&r++})),r}function fn(t,n){let r=0;return s(t,(t=>{t[n]||r++})),r}function ln(t,n,r,e,o){if(t[o]===e)return!0}function an(t,n,r="id"){const e=t.findIndex(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function hn(t,n,r="id"){const e=t.find(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function gn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function pn(t,n="id",r){return t.sort(((t,e)=>gn(t,e,n,r)))}function dn(t,n){return pn(t,n,!1)[0]}function mn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function wn(t,n="id",r){return t.sort(((t,e)=>mn(t,e,n,r)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const r={};return s(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function vn(t,n="id"){const r={};return s(t,(t=>{r[t[n]]=t})),r}function An(t,n,r,e){return it(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function In(t,n,r,e){return ft(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function Mn(t,n){return it(t,(t=>En(t,n)))}function xn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function On(t,n="id",r){return t.sort(((t,e)=>xn(t,e,n,r)))}function $n(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function jn(t,n="id",r){return t.sort(((t,e)=>$n(t,e,n,r)))}function Cn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Sn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Bn(t){return n=>!!c(n)&&t.test(n)}const Fn=Bn(/\.css$/),Rn=Bn(/\.html$/),Nn=Bn(/\.js$/),Tn=Bn(/\.json$/);function Pn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Un(t,n){return(...r)=>t(...r.splice(0,n))}function Ln(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const _n=async(t,n,r,e)=>{if(!t)return;const o=V(t);return c(r)?await l(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await l(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Dn(t,n,r,e){if(!t)return;const o=V(t);return c(r)?s(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):s(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Zn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let h;const g=Hn(s);if(c(i)&&s)return h=w(i)?g?n:t:nt(i)||Ht(i)?g?e:r:o?g?u:o:Gn(i)?u:g?e:r,h(i,s,f,l,a)}}const Qn=Kn(s,l,Dn,_n,Vn,Jn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function tr(t,r=t.length){const e=[],o=(...u)=>{if(e.push(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function nr(t,r=t.length){const e=[],o=(...u)=>{if(e.unshift(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function rr(){}function er(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const cr=v(ur);function ir(t,n){return cr.set(t,n)}function sr(){er(setTimeout(rr,0),(t=>{cr.remove(t)}))}const fr=Reflect.apply;function lr(t,n,r){if(Ht(t))return fr(t,n,r)}function ar(t,n){function r(...t){!1!==r.id&&cr.remove(r.id),r.id=ir((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(cr.remove(r.id),r.id=!1)},r}function hr(t,n,...r){if(Ht(t))return n?t.call(n,...r):t(...r)}function gr(t){return(...n)=>!t(...n)}function pr(t=0){return(...n)=>n[t]}const dr=t=>{let n;return(...r)=>(c(n)||(n=t(...r)),n)};function mr(t){return t?.constructor}function wr(t,n=[]){const r=mr(t);return r===Function&&"function"===r.name?function(){}:v(r,n)}function yr(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=Ht(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function br(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=Ht(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function vr(t,n,r={}){if(t)return await _n(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function Ar(t,n,r={},e,o){if(t)return c(e)?Dn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Dn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Ir=Kn(it,ft,Ar,vr,yr,br);function Er(t){return(...n)=>Ir(t,(t=>t(...n)))}async function Mr(t,n){if(!t)return;return S(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function xr(t,n){if(!t)return;return C(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Or(t,n=i){if(w(t)||qn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function $r(t,n=i,r){if(Gn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(w(t)||qn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const jr=Kn(C,S,xr,Mr,Or,$r);function Cr(t){return n=>jr(t,(t=>t(n)))}function Sr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Br(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=ir((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{cr.remove(r.id),r.id=!1},r}function Fr(t,n){return(...r)=>n(t,...r)}const Rr=Function.prototype;function Nr(t){return Rr.call.bind(t)}const Tr=Object.getOwnPropertyNames,Pr=Object.getOwnPropertyDescriptor,Ur=Object.defineProperty,Lr=Nr(Object.hasOwnProperty),_r=Object.is;function Dr(t,n){return t+n}function Zr(t){return t-1}function kr(t,n){return t/n}function qr(t){return t+1}function Vr(t,n){return t*n}function zr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Gr}=Math;function Jr(t,n=0){return Gr()*(t-n)+n}function Wr(t,n){return t%n}function Hr(t){return t.reduce(((t,n)=>t-n),0)}function Kr(t){return t.reduce(((t,n)=>t+n),0)}function Qr(t,n,r){return t>n&&tr}const{sign:Yr}=Math;function te(t){return 1===Yr(t)}function ne(t){return 0===t}function re(t){return!(1&~t)}function ee(t){return!(1&t)}const oe=Object.entries;function ue(t){if(c(t))return oe(t)}function ce(t){const n=[];return Dn(t,((t,r)=>{c(t)&&n.push(r)})),n}async function ie(t,n=i,r={}){return await _n(t,(async(t,e,o,u,i)=>{const s=await n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function se(t,n=i,r={}){return Dn(t,((t,e,o,u,i)=>{const s=n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function fe(t,n,r={}){return Dn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function le(t,n,r={}){return await _n(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function ae(t,n={}){if(t)return Dn(t,((t,r)=>{n[t]=r})),n}const he=(t,n)=>{if(t===n)return!0;const r=V(t),e=V(n);return r.length===e.length&&C(r,(r=>t[r]===n[r]))},ge=/[()[\]{}*+?^$|#.,/\\\s-]/g;function pe(t){return t.replace(ge,"\\$&")}function de(t,n){return n?de(it(t,pe)):RegExp(t.join("|"))}const me=Q("RegExp"),we=X(me);function ye(t,n){if(!t)return{};if(w(n)){const r=de(n);return fe(t,((t,n)=>!r.test(n)))}if(we(n))return fe(t,((t,r)=>!n.test(r)));if(Yt(n))return fe(t,((t,r)=>r!==n));if(Qt(n)){const r=n.toString();return fe(t,((t,n)=>n!==r))}return Ht(n)?fe(t,((t,r)=>!n(t,r))):nn({},t)}const be=(t,n,r={})=>{if(t)return s(n,(n=>{r[n]=t[n]})),r};function ve(t){if(!t)return;if(nt(t))return V(t).length;const n=t.length;if(c(n))return n;const r=t.size;return c(n)?r:V(t).length}const Ae=(t,n)=>{const r={};return s(t,((t,e)=>{r[t]=n[e]})),r},Ie=t=>{const n=[],r=[];return Dn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Ee=/[ _-]+/g;function Me(t){let n="";return t.replace(Ee," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const xe=/[ _-]+/g,Oe=/[ ]+/g;function $e(t){return t.replace(/([A-Z]+)/g," $1").replace(xe," ").trim().toLowerCase().replace(Oe,"-")}const je=/[ _-]+/g,Ce=/[ ]+/g;function Se(t){return t.replace(/([A-Z]+)/g," $1").replace(je," ").trim().toLowerCase().replace(Ce,"_")}const Be=/[ _-]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Be," ").trim().toUpperCase()}const Re=/[ _-]+/g;function Ne(t){return t.replace(/([A-Z]+)/g," $1").replace(Re," ").trim().toLowerCase()}function Te(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Pe(t,n=1){return t[t.length-n]}function Ue(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Le(t,n=1){return t.slice(0,-1*n)}function _e(t,n=1){return t.substring(n)}function De(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const Ze=/%(?![\da-f]{2})/gi,ke=/&/g,qe=//g,ze=/"/g;function Ge(t){return decodeURIComponent(t.replace(Ze,(()=>"%25")))}function Je(t){return t.replace(ke,"&").replace(qe,"<").replace(Ve,">").replace(ze,""")}function We(t){return Je(Ge(t))}const He=/\S+/g,Ke=/\w+/g;function Qe(t){return t.match(He)||[]}function Xe(t){return t.match(Ke)||[]}function Ye(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function to(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const no=/\w+/g;function ro(t){return t[0].toUpperCase()}function eo(t){return ro(t)+_e(t)}function oo(t){return ro(t)+_e(t).toLowerCase()}function uo(t){return t.replace(no,(t=>eo(t)))}function co(t){return t.replace(no,(t=>oo(t)))}function io(t){return mr(t)?.name}function so(t){return!!c(t)&&"[object Arguments]"===t.toString()}const fo=Q("Map"),lo=X(fo),ao=/Array/,ho="Array";function go(t){if(t){const n=io(t);if(ao.test(n)&&n!==ho)return!0}return!1}function po(t){return!c(t)}function mo(t,n){if(po(t)||Ht(t))return!1;if(w(t)||go(t))return!0;const r=t.length;if(!po(r)||!Qt(r)||r<0)return!1;if(n){const n=V(t);return!!n&&jr(n,((t,n)=>n>=0&&Qt(n)))}return!0}const wo=Q("BigInt"),yo=X(wo),bo=Q("Boolean"),vo=X(bo),Ao=Q("ArrayBuffer"),Io=X(Ao);function Eo(t,n){return!(!t||!n)&&t instanceof n}const Mo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function xo(t){if(c(t)){const n=t?.constructor?.name;return Mo.test(n)}return!1}const Oo=Q("Date"),$o=X(Oo);function jo(t){return Yt(t)||w(t)?!o(t):nt(t)?!ve(t):!c(t)}function Co(t){return!1===t}const So=Q("Float32Array"),Bo=X(So),Fo=Q("Float64Array"),Ro=X(Fo),{isInteger:No}=Number,To=No,Po=Q("Int16Array"),Uo=X(Po),Lo=Q("Int32Array"),_o=X(Lo),Do=Q("Int8Array"),Zo=X(Do);function ko(t){return c(t)&&"function"==typeof t[Symbol.iterator]}function qo(t){return!!t&&t instanceof Promise}function Vo(t){return!!t&&(qo(t)||Hn(t)||Gn(t))}function zo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Go(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Jo(t,n){return!po(t)&&!po(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Wo}=Number,Ho=Wo;function Ko(t,n){const r=mr(t),e=mr(n);return r===e&&r.name===e.name}function Qo(t){return!0===t}const Xo=Q("Uint16Array"),Yo=X(Xo),tu=Q("Uint32Array"),nu=X(tu),ru=Q("Uint8Array"),eu=X(ru),ou=Q("Uint8ClampedArray"),uu=X(ou),cu=Q("WeakMap"),iu=X(cu),su=void 0!==globalThis.Deno,fu=void 0!==globalThis.process&&process.versions&&process.versions.node;function lu(t,n=!0){return Boolean(t)&&n}function au(t,n=!0){return!1===Boolean(t)&&n}function hu(t,n,r,e){if(c(t)){if(Ht(n))return r?lr(n,r,e):n(...e);if(nt(n))return n[r]=t,n}}function gu(t,n){return Co(rt(t,n))}const pu=JSON;function du(t,n){if(t)return pu.parse(t,n)}const mu=pu.stringify;function wu(t,n,r){const e=globalThis.options||r;let o;return Ht(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${mu(t)}\n\t\tExpected: ${mu(n)}`,e)}async function yu(t,n,r){const e=await t;return!(Ht(n)&&!1===await n(e,r))&&!gu(e,n)||wu(e,n,r)}function bu(t,n,r){if(Vo(t)||Vo(n))return yu(t,n,r);return!(Ht(n)&&!1===n(t,r))&&!gu(t,n)||wu(t,n,r)}function vu(t,n,r){const e=Ir(t,(t=>Ht(t)?t.bind(n):t));return r?en(r,e):e}function Au(t){if(t){if(tt(t))return Wt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Iu=globalThis.structuredClone;function Eu(t){return Iu(t)}async function Mu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;ulu(t)))}async function Ou(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);c(e)&&r.push(e)}return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);c(u)&&e(u)}return o}const u=Ht(o.set);for await(const[r,e]of t){const i=await n(e,r,o,t);c(i)&&(u?o.set(r,i):o[r]=i)}return o}function $u(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);c(u)&&o(u)}return e}const o=Ht(e.set);for(const[r,u]of t){const i=n(u,r,e,t);c(i)&&(o?e.set(r,i):e[r]=i)}return e}const ju=Kn(f,a,se,ie,$u,Ou);function Cu(...t){return Hn(t[0])?async function(...n){return jr(t,(async t=>jr(n,(async n=>t(n)))))}:function(...n){return jr(t,(t=>jr(n,(n=>t(n)))))}}function Su(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=Ht(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Bu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=Ht(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Fu=Kn(B,F,fe,le,Su,Bu);function Ru(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Nu=Ru(s),Tu=Ru($);function Pu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Uu=Pu(l),Lu=Pu(j);function _u(t,n){const r=wr(t),e=r.push||r.add;if(e&&Ht(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else Ht(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Du(t,n){const r={};return s(t,((t,e)=>{r[n[e]]=t})),r}function Zu(t,n,r){return!po(t)&&!po(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,r):we(n)?n.test(t):Ht(n)?n(t):w(n)?C(n,(n=>Zu(t,n))):jr(n,(n=>Zu(t,n))):w(t)?we(n)?C(t,(t=>t.test(n))):Ht(n)?C(t,n):w(n)?C(n,(n=>Zu(t,n))):t.includes(n,r):!!nt(t)&&(we(n)?xr(t,(t=>t.test(n))):Ht(n)?xr(t,n):nt(n)?xr(t,((t,r)=>t===n[r])):xr(t,(t=>Zu(t,n))))))}const ku=Bn(/\./),qu=(t,n,r)=>(n&&!c(t[n])&&(t[n]=r),t);class Vu{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const zu=v(Vu);function Gu(t,n){return zu.set(t,n)}function Ju(){er(setTimeout(rr,0),(t=>{zu.remove(t)}))}function Wu(t,...n){return Qn(n,(n=>{Qn(n,((n,r)=>{if(t[r]&&(nt(n)||w(n)||n.forEach))return Wu(t[r],n);t[r]=n}))})),t}class Hu{static models=new Map;constructor(t,n){c(n)?(en(this,n),this.modelName=t,Hu.models.set(t,n)):en(this,t)}delete(t){Hu.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Hu.models.set(t||this.modelName,this)}has(t){return Hu.models.has(t||this.modelName)}get(t){return Hu.models.get(t||this.modelName)}}function Ku(t,n){return c(n)?v(Hu,[t,n]):k(t,Hu.models)}function Qu(t,n){return[t,n]}function Xu(t,n,r){const e=t.length,o=[];for(let u=0;uC(r,(r=>rt(t[r],n[r])));function nc(t,n,r){return n&&nt(t)||Qt(n)&&w(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function rc(t,n,r){return Qt(r)&&w(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class ec{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Dn(t,(n=>{t[n]=new ec(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new ec(r),!0)})}}function oc(){return[]}function uc(){return!1}const cc=()=>({}),ic=()=>"",sc=()=>!0;async function fc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const gc=v(hc);class pc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):c(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=wr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function dc(t){return new pc(t)}async function mc(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0;index < arrayLength;index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [key, value] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst zipedObject = {};\n\teachArray(properties, (item, key) => {\n\t\tzipedObject[item] = values[key];\n\t});\n\treturn zipedObject;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst unZippedKeys = [];\n\tconst values = [];\n\teachObject(object, (item, key) => {\n\t\tunZippedKeys.push(key);\n\t\tvalues.push(item);\n\t});\n\treturn [unZippedKeys, values];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(compactMapArray, compactMapAsyncArray,\n\tcompactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0;index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn (isEqual(on, value)) ? off : on;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n"],"names":["chunk","array","size","chunked","index","forEach","item","key","push","clearArray","source","length","cloneArray","slice","isUndefined","undefined","hasLength","Boolean","isNull","hasValue","returnValue","eachArray","iteratee","thisBind","additionalArg","arrayLength","call","compactMapArray","results","thisCall","arrayOriginal","returned","async","eachAsyncArray","compactMapAsyncArray","result","sign","Math","isNegative","rangeUp","start","end","step","sourceArray","position","rangeDown","range","isArray","Array","isNotArray","reflectConstruct","Reflect","construct","target","argumentsList","newTarget","args","ensureArray","flattenDeep","flat","Infinity","callback","difference","sources","differencesMap","Map","differences","currentArray","parentIndex","child","childIndex","childRoot","get","count","set","drop","amount","upTo","splice","dropRight","eachRight","additionalArgument","eachRightAsync","everyArray","sourceLength","everyAsyncArray","filterArray","filterAsyncArray","first","flatten","level","i","reduce","previousValue","currentValue","concat","initial","intersection","arrays","otherItem","includes","invokeArray","regexToPath","regexCloseBracket","emptyString","toPath","replace","split","propertyString","link","objectKeys","Object","keys","hasOwn","hasKeys","properties","pathArray","lastPath","pop","initialPathObject","hasAnyKeys","find","isConstructor","constructor","isConstructorFactory","constructorName","name","isConstructorNameFactory","isTypeFactory","method","primarySource","otherSources","isBufferCall","isBuffer","isPlainObject","toString","trim","isEqual","equals","sourceProperties","isMatchArray","compareArray","mathNativeMax","max","largest","last","indexFrom","mapArray","concurrentEachArray","Promise","all","mapAsyncArray","mapRightArray","trueIndex","mapWhile","subtract","minuend","subtrahend","sortNumberAscending","numberList","sort","partition","predicate","rejected","subtractReverse","sortNumberDescening","remove","removeThese","removeBy","rest","right","floor","random","randomInt","min","isNumberEqual","arrayFrom","from","toArray","arrayLike","mapFn","thisArg","shuffle","shuffleArray","value","sample","sampleArray","used","mathNativeMin","smallest","getNumberInsertIndex","insertIndex","take","endIndex","takeRight","indexRight","onlyUnique","indexOf","sortUnique","unique","isSorted","filter","union","untilFalseArray","untilTrueArray","whileCompactMap","whileEachArray","whileMapArray","without","sourcesSet","Set","has","xor","xorMap","xored","zip","map","unZip","arraySet","ensureBuffer","Buffer","alloc","clearBuffer","fill","isFunction","Function","isNumberCall","isNumber","isNotNumber","isString","String","isNotString","objectAssign","assign","assignToObject","assignToClass","prototype","extendClass","countBy","collection","object","countKey","propertyName","countWithoutKey","findIndexCache","element","indexMatch","findIndex","id","findItem","sortCollectionDescendingFilter","previous","next","ifMatch","previousKey","nextKey","sortCollectionDescending","getLowest","sortCollectionAscendingFilter","sortCollectionAscending","getHighest","groupBy","sortedObject","indexBy","invokeCollection","property","invokeCollectionAsync","pluckObject","targets","pluck","sortObjectsAlphabetically","localeCompare","sortCollectionAlphabetically","sortObjectsAlphabeticallyReverse","sortCollectionAlphabeticallyReverse","getFileExtension","substring","lastIndexOf","getFilename","regexTestFactory","regexType","test","isFileCSS","isFileHTML","isFileJS","isFileJSON","after","callable","point","ary","before","eachAsyncObject","propertyCount","eachObject","objectKeysArray","forEachAsync","values","valuesLength","isSetCall","isSet","forOf","isGeneratorCall","isGenerator","forOfAsync","generatorArgs","isAsyncCall","isAsync","generateLoop","arrayLoop","arrayLoopAsync","objectLoop","objectLoopAsync","forOfLoop","forOfLoopAsync","argument1","argument2","argument3","isIterateeAsync","each","Chain","methods","this","addChainMethod","thisChain","methodName","setValue","done","chain","config","curry","arity","curries","curried","curryArgs","curryRight","unshift","noop","times","timesMap","Timers","list","clearTimeout","delete","time","currentThis","setTimeout","clear","timers","timer","clearTimers","applyNative","apply","thisArgument","debounce","debounced","bind","ifInvoke","negate","nthArg","once","getType","cloneType","sourceType","forOfMap","resultsObject","methodPush","add","methodPushBound","methodSet","forOfMapAsync","resultsGenerator","mapAsyncObject","thisObject","mapObject","original","over","iteratees","everyAsyncObject","everyObject","forOfEvery","forOfEveryAsync","every","overEvery","predicates","arg","reArg","indexes","throttle","throttled","shouldThrottle","wrap","wrapper","functionPrototype","cacheNativeMethod","getPropNames","getOwnPropertyNames","getPropDesc","getOwnPropertyDescriptor","defProp","defineProperty","hasProp","hasOwnProperty","isSame","is","augend","addend","deduct","divide","increment","multiply","calcProgress","total","currentAmount","randomFloat","remainder","subtractAll","a","b","sumAll","isNumberInRange","isNumberNotInRange","isPositive","isZero","objectEntries","entries","getEntries","compactKeys","compactedKeys","compactMapAsyncObject","compactMapObject","filterObject","filterAsyncObject","invert","isMatchObject","sourceKeys","targetKeys","escapeRegexRegex","escapeRegex","arrayToRegex","makeSafe","RegExp","join","isRegexCall","isRegex","omit","blacklist","blacklistRegex","numberToString","pick","whitelist","objectSize","objectLengthProperty","objectSizeProperty","zipObject","zipedObject","unZipObject","unZippedKeys","normalizeCase","camelCase","toLowerCase","toUpperCase","space","kebabCase","snakeCase","upperCase","lowerCase","insertInRange","string","text","rightString","chunkString","match","initialString","restString","replaceList","words","rawURLDecodeRegex","andRegex","lessThanRegex","moreThanRegex","doubleQuoteRegex","rawURLDecode","decodeURIComponent","htmlEntities","sanitize","tokenizeRegEx","wordsRegEx","tokenize","truncate","maxLength","stringLength","breakAll","breakAllLength","truncateDown","truncateRight","truncateUp","getWords","upperFirstLetter","upperFirst","upperFirstOnly","upperFirstAll","upperFirstOnlyAll","getTypeName","isArguments","isMapCall","isMap","typedArrayRegex","arrayConstructorName","isTypedArray","noValue","isArrayLike","strictFlag","isBigIntCall","isBigInt","isBooleanCall","isBoolean","isArrayBufferCall","isArrayBuffer","isChild","sourceChild","targetParent","constructorNames","isCloneable","isDateCall","isDate","isEmpty","isFalse","isF32Call","isF32","isF64Call","isF64","isInteger","Number","isFloat","isI16Call","isI16","isI32Call","isI32","isI8Call","isI8","isIterable","Symbol","iterator","isPromise","isKindAsync","isParent","sourceParent","targetChild","isPrimitive","type","isRelated","targetOne","targetTwo","isSafeInteger","isSafeInt","isSameType","other","otherType","isTrue","isU16Call","isU16","isU32Call","isU32","isU8Call","isU8","isU8CCall","isU8C","isWeakMapCall","isWeakMap","isDeno","globalThis","Deno","isNodejs","process","versions","node","isTruthy","returnIfTrue","isFalsy","ifValue","optional","notEqual","jsonNative","JSON","jsonParse","reviver","parse","stringify","createAssertError","expected","localOptions","options","errorTitle","title","file","Error","assertAsync","sourceArg","assert","bindAll","bindThis","targetAssign","structuredCloneSafe","structuredClone","clone","concurrent","compact","sourceKeysLength","targetObject","keyName","forOfCompactMapAsync","forOfCompactMap","compactMap","everyArg","forOfFilter","forOfFilterAsync","returnFlow","flow","flowRight","flowAsync","flowAsyncRight","forMap","cloned","methodBound","arraysToObject","search","hasDot","ifNotAssign","rootObject","equalThis","Intervals","clearInterval","setInterval","intervals","interval","clearIntervals","merge","currentSource","sourceItem","sourceKey","Model","static","modelName","modelSource","models","model","pair","concurrentStatus","queue","allSettled","promise","propertyMatch","compared","setKey","Store","data","Proxy","proxySource","console","log","stubArray","stubFalse","stubObject","stubString","stubTrue","timesAsync","timesMapAsync","toggle","on","off","UniqID","totalActive","freed","totalFree","shift","free","isActive","shouldReset","reset","uniqID","VirtualStorage","initialObject","items","get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AQ,EAAGA,EAAQqB,EAAarB,IAAS,CACjD,MAAM2R,EAAWrR,EAAON,GACxBwB,EAAQxB,SAAeM,EAAON,GAAOsB,KAAKH,KAAaiC,EAAMpD,EAAO2R,EACpE,MAED,IAAK,IAAI3R,EAAQ,EAAGA,EAAQqB,EAAarB,IAAS,CACjD,MAAM2R,EAAWrR,EAAON,GACxBwB,EAAQxB,SAAeM,EAAON,MAAUoD,EAAMpD,EAAO2R,EACrD,CAEF,OAAOnQ,CACR,CCnBO,SAASqpB,GAAOvqB,EAAQa,KAAaiC,GAC3C,MAAM/B,EAAcf,EAAOC,OACrBiB,EAAU,GAChB,GAAIL,EACH,IAAK,IAAInB,EAAQ,EAAGA,EAAQqB,EAAarB,IAAS,CACjD,MAAM2R,EAAWrR,EAAON,GACxBwB,EAAQxB,GAAS2R,EAASrQ,KAAKH,KAAaiC,EAAMpD,EAAO2R,EACzD,MAED,IAAK,IAAI3R,EAAQ,EAAGA,EAAQqB,EAAarB,IAAS,CACjD,MAAM2R,EAAWrR,EAAON,GACxBwB,EAAQxB,GAAS2R,KAAYvO,EAAMpD,EAAO2R,EAC1C,CAEF,OAAOnQ,CACR"} \ No newline at end of file +{"version":3,"file":"basic.js","sources":["../../source/arrays/chunk.js","../../source/arrays/clear.js","../../source/arrays/clone.js","../../source/types/isUndefined.js","../../source/utilities/hasLength.js","../../source/types/isNull.js","../../source/types/hasValue.js","../../source/utilities/returnValue.js","../../source/arrays/each.js","../../source/arrays/compactMap.js","../../source/arrays/eachAsync.js","../../source/arrays/compactMapAsync.js","../../source/numbers/isNegative.js","../../source/arrays/range.js","../../source/types/isArray.js","../../source/classes/construct.js","../../source/arrays/ensure.js","../../source/arrays/flattenDeep.js","../../source/utilities/forEach.js","../../source/arrays/difference.js","../../source/arrays/drop.js","../../source/arrays/dropRight.js","../../source/arrays/eachRight.js","../../source/arrays/eachRightAsync.js","../../source/arrays/every.js","../../source/arrays/everyAsync.js","../../source/arrays/filter.js","../../source/arrays/filterAsync.js","../../source/arrays/first.js","../../source/arrays/flatten.js","../../source/arrays/initial.js","../../source/arrays/intersect.js","../../source/arrays/invoke.js","../../source/utilities/toPath.js","../../source/utilities/get.js","../../source/objects/keys.js","../../source/objects/hasKeys.js","../../source/types/isConstructor.js","../../source/types/isTypeFactory.js","../../source/types/isBuffer.js","../../source/types/isPlainObject.js","../../source/utilities/isEqual.js","../../source/arrays/isMatch.js","../../source/arrays/largest.js","../../source/arrays/last.js","../../source/arrays/map.js","../../source/arrays/concurrentEach.js","../../source/arrays/mapAsync.js","../../source/arrays/mapRight.js","../../source/arrays/mapWhile.js","../../source/math/subtract.js","../../source/arrays/sortNumberAscending.js","../../source/arrays/partition.js","../../source/math/subtractReverse.js","../../source/arrays/sortNumberDescening.js","../../source/arrays/remove.js","../../source/arrays/rest.js","../../source/arrays/right.js","../../source/math/randomInt.js","../../source/numbers/isNumberEqual.js","../../source/internal/array.js","../../source/arrays/shuffle.js","../../source/arrays/sample.js","../../source/arrays/smallest.js","../../source/arrays/getNumberInsertIndex.js","../../source/arrays/take.js","../../source/arrays/takeRight.js","../../source/arrays/unique.js","../../source/arrays/union.js","../../source/arrays/untilFalse.js","../../source/arrays/untilTrue.js","../../source/arrays/whileCompactMap.js","../../source/arrays/whileEach.js","../../source/arrays/whileMap.js","../../source/arrays/without.js","../../source/arrays/xor.js","../../source/arrays/zip.js","../../source/buffers/ensure.js","../../source/buffers/clear.js","../../source/types/isFunction.js","../../source/types/isNumber.js","../../source/types/isString.js","../../source/objects/assign.js","../../source/classes/extendClass.js","../../source/collection/countBy.js","../../source/collection/countKey.js","../../source/collection/countWithoutKey.js","../../source/collection/findIndexCache.js","../../source/collection/findIndex.js","../../source/collection/findItem.js","../../source/collection/sortCollectionDescending.js","../../source/collection/getLowest.js","../../source/collection/sortCollectionAscending.js","../../source/collection/getHighest.js","../../source/collection/groupBy.js","../../source/collection/indexBy.js","../../source/collection/invoke.js","../../source/collection/invokeAsync.js","../../source/objects/pluckObject.js","../../source/collection/pluck.js","../../source/collection/sortCollectionAlphabetically.js","../../source/collection/sortCollectionAlphabeticallyReverse.js","../../source/files/getExtension.js","../../source/files/getFilename.js","../../source/internal/regexTestFactory.js","../../source/files/isFileCSS.js","../../source/files/isFileHTML.js","../../source/files/isFileJS.js","../../source/files/isFileJSON.js","../../source/functions/after.js","../../source/functions/ary.js","../../source/functions/before.js","../../source/objects/eachAsync.js","../../source/objects/each.js","../../source/utilities/forEachAsync.js","../../source/types/isSet.js","../../source/utilities/forOf.js","../../source/types/isGenerator.js","../../source/utilities/forOfAsync.js","../../source/types/isAsync.js","../../source/utilities/generateLoop.js","../../source/utilities/each.js","../../source/functions/chain.js","../../source/functions/curry.js","../../source/functions/curryRight.js","../../source/utilities/noop.js","../../source/utilities/times.js","../../source/utilities/timer.js","../../source/internal/apply.js","../../source/functions/debounce.js","../../source/functions/ifInvoke.js","../../source/functions/negate.js","../../source/functions/nthArg.js","../../source/functions/once.js","../../source/types/getType.js","../../source/types/cloneType.js","../../source/utilities/forOfMap.js","../../source/utilities/forOfMapAsync.js","../../source/objects/mapAsync.js","../../source/objects/map.js","../../source/utilities/map.js","../../source/functions/over.js","../../source/objects/everyAsync.js","../../source/objects/every.js","../../source/utilities/forOfEvery.js","../../source/utilities/forOfEveryAsync.js","../../source/utilities/every.js","../../source/functions/overEvery.js","../../source/functions/rearged.js","../../source/functions/throttle.js","../../source/functions/wrap.js","../../source/utilities/cacheNativeMethod.js","../../source/internal/object.js","../../source/internal/isSame.js","../../source/math/add.js","../../source/math/deduct.js","../../source/math/divide.js","../../source/math/increment.js","../../source/math/multiple.js","../../source/math/progress.js","../../source/math/randomFloat.js","../../source/math/remainder.js","../../source/math/subtractAll.js","../../source/math/sumAll.js","../../source/numbers/isNumberInRange.js","../../source/numbers/isNumberNotInRange.js","../../source/numbers/isPositive.js","../../source/numbers/isZero.js","../../source/numbers/isOdd.js","../../source/numbers/isEven.js","../../source/objects/getEntries.js","../../source/objects/compactKeys.js","../../source/objects/compactMapAsync.js","../../source/objects/compactMap.js","../../source/objects/filter.js","../../source/objects/filterAsync.js","../../source/objects/invert.js","../../source/objects/isMatch.js","../../source/regexps/escapeRegex.js","../../source/regexps/arrayToRegex.js","../../source/types/isRegex.js","../../source/objects/omit.js","../../source/objects/pick.js","../../source/objects/size.js","../../source/objects/zip.js","../../source/strings/camelCase.js","../../source/strings/kebabCase.js","../../source/strings/snakeCase.js","../../source/strings/upperCase.js","../../source/strings/lowerCase.js","../../source/strings/range.js","../../source/strings/replace.js","../../source/strings/sanitize.js","../../source/strings/tokenize.js","../../source/strings/truncate.js","../../source/strings/typography.js","../../source/types/getTypeName.js","../../source/types/isArguments.js","../../source/types/isMap.js","../../source/types/isTypedArray.js","../../source/types/noValue.js","../../source/types/isArrayLike.js","../../source/types/isBigInt.js","../../source/types/isBoolean.js","../../source/types/isArrayBuffer.js","../../source/types/isChild.js","../../source/types/isCloneable.js","../../source/types/isDate.js","../../source/types/isEmpty.js","../../source/types/isFalse.js","../../source/types/isF32.js","../../source/types/isF64.js","../../source/types/isFloat.js","../../source/types/isI16.js","../../source/types/isI32.js","../../source/types/isI8.js","../../source/types/isIterable.js","../../source/types/isPromise.js","../../source/types/isKindAsync.js","../../source/types/isParent.js","../../source/types/isPrimitive.js","../../source/types/isRelated.js","../../source/types/isSafeInt.js","../../source/types/isSameType.js","../../source/types/isTrue.js","../../source/types/isU16.js","../../source/types/isU32.js","../../source/types/isU8.js","../../source/types/isU8C.js","../../source/types/isWeakMap.js","../../source/types/isDeno.js","../../source/types/isNode.js","../../source/types/isTruthy.js","../../source/types/isFalsy.js","../../source/utilities/ifValue.js","../../source/utilities/notEqual.js","../../source/utilities/json.js","../../source/utilities/assert.js","../../source/utilities/bindAll.js","../../source/utilities/clear.js","../../source/utilities/clone.js","../../source/utilities/concurrent.js","../../source/utilities/compact.js","../../source/utilities/forOfCompactMapAsync.js","../../source/utilities/forOfCompactMap.js","../../source/utilities/compactMap.js","../../source/utilities/everyArg.js","../../source/utilities/forOfFilter.js","../../source/utilities/forOfFilterAsync.js","../../source/utilities/filter.js","../../source/utilities/flow.js","../../source/utilities/flowAsync.js","../../source/utilities/forMap.js","../../source/utilities/arraysToObject.js","../../source/utilities/has.js","../../source/utilities/hasDot.js","../../source/utilities/ifNotAssign.js","../../source/utilities/interval.js","../../source/utilities/merge.js","../../source/utilities/model.js","../../source/utilities/pair.js","../../source/utilities/concurrentStatus.js","../../source/utilities/promise.js","../../source/utilities/propertyMatch.js","../../source/utilities/setKey.js","../../source/utilities/setValue.js","../../source/utilities/store.js","../../source/utilities/stubArray.js","../../source/utilities/stubFalse.js","../../source/utilities/stubObject.js","../../source/utilities/stubString.js","../../source/utilities/stubTrue.js","../../source/utilities/timesAsync.js","../../source/utilities/toggle.js","../../source/utilities/uid.js","../../source/utilities/virtualStorage.js","../../source/utilities/inAsync.js","../../source/utilities/inSync.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = isArray(propertyString) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [\n\t\tkey,\n\t\tvalue\n\t] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = isIterateeAsync ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = isIterateeAsync ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","/**\n * Checks if a number is odd & returns true or false.\n *\n * @function isOdd\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isOdd, assert } from '@universalweb/acid';\n * assert(isOdd(1), true);\n */\nexport function isOdd(source) {\n\treturn (source & 1) === 1;\n}\n","/**\n * Checks if a number is even & returns true or false.\n *\n * @function isEven\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEven, assert } from '@universalweb/acid';\n * assert(isEven(1), true);\n */\nexport function isEven(source) {\n\treturn (source & 1) === 0;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst source = {};\n\teachArray(properties, (item, key) => {\n\t\tsource[item] = values[key];\n\t});\n\treturn source;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst objectKeys = [];\n\tconst objectValues = [];\n\teachObject(object, (item, key) => {\n\t\tobjectKeys.push(key);\n\t\tobjectValues.push(item);\n\t});\n\treturn [\n\t\tobjectKeys,\n\t\tobjectValues,\n\t];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(\n\tcompactMapArray,\n\tcompactMapAsyncArray,\n\tcompactMapObject,\n\tcompactMapAsyncObject,\n\tforOfCompactMap,\n\tforOfCompactMapAsync\n);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn ((isEqual(on, value)) ? off : on);\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n"],"names":["chunk","array","size","chunked","index","forEach","item","key","push","clearArray","source","length","cloneArray","slice","isUndefined","undefined","hasLength","Boolean","isNull","hasValue","returnValue","eachArray","iteratee","thisBind","additionalArg","arrayLength","call","compactMapArray","results","thisCall","arrayOriginal","returned","async","eachAsyncArray","compactMapAsyncArray","result","sign","Math","isNegative","rangeUp","start","end","step","sourceArray","position","rangeDown","range","isArray","Array","isNotArray","reflectConstruct","Reflect","construct","target","argumentsList","newTarget","args","ensureArray","flattenDeep","flat","Infinity","callback","difference","sources","differencesMap","Map","differences","currentArray","parentIndex","child","childIndex","childRoot","get","count","set","drop","amount","upTo","splice","dropRight","eachRight","additionalArgument","eachRightAsync","everyArray","sourceLength","everyAsyncArray","filterArray","filterAsyncArray","first","flatten","level","i","reduce","previousValue","currentValue","concat","initial","intersection","arrays","otherItem","includes","invokeArray","regexToPath","regexCloseBracket","emptyString","toPath","replace","split","propertyString","link","objectKeys","Object","keys","hasOwn","hasKeys","properties","pathArray","lastPath","pop","initialPathObject","hasAnyKeys","find","isConstructor","constructor","isConstructorFactory","constructorName","name","isConstructorNameFactory","isTypeFactory","method","primarySource","otherSources","isBufferCall","isBuffer","isPlainObject","toString","trim","isEqual","equals","sourceProperties","isMatchArray","compareArray","mathNativeMax","max","largest","last","indexFrom","mapArray","concurrentEachArray","Promise","all","mapAsyncArray","mapRightArray","trueIndex","mapWhile","subtract","minuend","subtrahend","sortNumberAscending","numberList","sort","partition","predicate","rejected","subtractReverse","sortNumberDescening","remove","removeThese","removeBy","rest","right","floor","random","randomInt","min","isNumberEqual","arrayFrom","from","toArray","arrayLike","mapFn","thisArg","shuffle","shuffleArray","value","sample","sampleArray","used","mathNativeMin","smallest","getNumberInsertIndex","insertIndex","take","endIndex","takeRight","indexRight","onlyUnique","indexOf","sortUnique","unique","isSorted","filter","union","untilFalseArray","untilTrueArray","whileCompactMap","whileEachArray","whileMapArray","without","sourcesSet","Set","has","xor","xorMap","xored","zip","map","unZip","arraySet","ensureBuffer","Buffer","alloc","clearBuffer","fill","isFunction","Function","isNumberCall","isNumber","isNotNumber","isString","String","isNotString","objectAssign","assign","assignToObject","assignToClass","prototype","extendClass","countBy","collection","object","countKey","propertyName","countWithoutKey","findIndexCache","element","indexMatch","findIndex","id","findItem","sortCollectionDescendingFilter","previous","next","ifMatch","previousKey","nextKey","sortCollectionDescending","getLowest","sortCollectionAscendingFilter","sortCollectionAscending","getHighest","groupBy","sortedObject","indexBy","invokeCollection","property","invokeCollectionAsync","pluckObject","targets","pluck","sortObjectsAlphabetically","localeCompare","sortCollectionAlphabetically","sortObjectsAlphabeticallyReverse","sortCollectionAlphabeticallyReverse","getFileExtension","substring","lastIndexOf","getFilename","regexTestFactory","regexType","test","isFileCSS","isFileHTML","isFileJS","isFileJSON","after","callable","point","ary","before","eachAsyncObject","propertyCount","eachObject","objectKeysArray","forEachAsync","values","valuesLength","isSetCall","isSet","forOf","isGeneratorCall","isGenerator","forOfAsync","generatorArgs","isAsyncCall","isAsync","generateLoop","arrayLoop","arrayLoopAsync","objectLoop","objectLoopAsync","forOfLoop","forOfLoopAsync","argument1","argument2","argument3","isIterateeAsync","each","Chain","methods","this","addChainMethod","thisChain","methodName","setValue","done","chain","config","curry","arity","curries","curried","curryArgs","curryRight","unshift","noop","times","timesMap","Timers","list","clearTimeout","delete","time","currentThis","setTimeout","clear","timers","timer","clearTimers","applyNative","apply","thisArgument","debounce","debounced","bind","ifInvoke","negate","nthArg","once","getType","cloneType","sourceType","forOfMap","resultsObject","methodPush","add","methodPushBound","methodSet","forOfMapAsync","resultsGenerator","mapAsyncObject","thisObject","mapObject","original","over","iteratees","everyAsyncObject","everyObject","forOfEvery","forOfEveryAsync","every","overEvery","predicates","arg","reArg","indexes","throttle","throttled","shouldThrottle","wrap","wrapper","functionPrototype","cacheNativeMethod","getPropNames","getOwnPropertyNames","getPropDesc","getOwnPropertyDescriptor","defProp","defineProperty","hasProp","hasOwnProperty","isSame","is","augend","addend","deduct","divide","increment","multiply","calcProgress","total","currentAmount","randomFloat","remainder","subtractAll","a","b","sumAll","isNumberInRange","isNumberNotInRange","isPositive","isZero","isOdd","isEven","objectEntries","entries","getEntries","compactKeys","compactedKeys","compactMapAsyncObject","compactMapObject","filterObject","filterAsyncObject","invert","isMatchObject","sourceKeys","targetKeys","escapeRegexRegex","escapeRegex","arrayToRegex","makeSafe","RegExp","join","isRegexCall","isRegex","omit","blacklist","blacklistRegex","numberToString","pick","whitelist","objectSize","objectLengthProperty","objectSizeProperty","zipObject","unZipObject","objectValues","normalizeCase","camelCase","toLowerCase","toUpperCase","space","kebabCase","snakeCase","upperCase","lowerCase","insertInRange","string","text","rightString","chunkString","match","initialString","restString","replaceList","words","rawURLDecodeRegex","andRegex","lessThanRegex","moreThanRegex","doubleQuoteRegex","rawURLDecode","decodeURIComponent","htmlEntities","sanitize","tokenizeRegEx","wordsRegEx","tokenize","truncate","maxLength","stringLength","breakAll","breakAllLength","truncateDown","truncateRight","truncateUp","getWords","upperFirstLetter","upperFirst","upperFirstOnly","upperFirstAll","upperFirstOnlyAll","getTypeName","isArguments","isMapCall","isMap","typedArrayRegex","arrayConstructorName","isTypedArray","noValue","isArrayLike","strictFlag","isBigIntCall","isBigInt","isBooleanCall","isBoolean","isArrayBufferCall","isArrayBuffer","isChild","sourceChild","targetParent","constructorNames","isCloneable","isDateCall","isDate","isEmpty","isFalse","isF32Call","isF32","isF64Call","isF64","isInteger","Number","isFloat","isI16Call","isI16","isI32Call","isI32","isI8Call","isI8","isIterable","Symbol","iterator","isPromise","isKindAsync","isParent","sourceParent","targetChild","isPrimitive","type","isRelated","targetOne","targetTwo","isSafeInteger","isSafeInt","isSameType","other","otherType","isTrue","isU16Call","isU16","isU32Call","isU32","isU8Call","isU8","isU8CCall","isU8C","isWeakMapCall","isWeakMap","isDeno","globalThis","Deno","isNodejs","process","versions","node","isTruthy","returnIfTrue","isFalsy","ifValue","optional","notEqual","jsonNative","JSON","jsonParse","reviver","parse","stringify","createAssertError","expected","localOptions","options","errorTitle","title","file","Error","assertAsync","sourceArg","assert","bindAll","bindThis","targetAssign","structuredCloneSafe","structuredClone","clone","concurrent","compact","sourceKeysLength","targetObject","keyName","forOfCompactMapAsync","forOfCompactMap","compactMap","everyArg","forOfFilter","forOfFilterAsync","returnFlow","flow","flowRight","flowAsync","flowAsyncRight","forMap","cloned","methodBound","arraysToObject","search","hasDot","ifNotAssign","rootObject","equalThis","Intervals","clearInterval","setInterval","intervals","interval","clearIntervals","merge","currentSource","sourceItem","sourceKey","Model","static","modelName","modelSource","models","model","pair","concurrentStatus","queue","allSettled","promise","propertyMatch","compared","setKey","Store","data","Proxy","proxySource","console","log","stubArray","stubFalse","stubObject","stubString","stubTrue","timesAsync","timesMapAsync","toggle","on","off","UniqID","totalActive","freed","totalFree","shift","free","isActive","shouldReset","reset","uniqID","VirtualStorage","initialObject","items","getItem","hasItem","setItem","removeItem","virtualStorage","inAsync","inSync"],"mappings":"AAcO,SAASA,EAAMC,EAAOC,EAAO,GACnC,MAAMC,EAAU,GAChB,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wB,EAAQxB,SAAeM,EAAON,GAAOsB,KAAKH,KAAaiC,EAAMpD,EAAO2R,EACpE,MAED,IAAK,IAAI3R,EAAQ,EAAGA,EAAQqB,EAAarB,IAAS,CACjD,MAAM2R,EAAWrR,EAAON,GACxBwB,EAAQxB,SAAeM,EAAON,MAAUoD,EAAMpD,EAAO2R,EACrD,CAEF,OAAOnQ,CACR,CCnBO,SAASspB,GAAOxqB,EAAQa,KAAaiC,GAC3C,MAAM/B,EAAcf,EAAOC,OACrBiB,EAAU,GAChB,GAAIL,EACH,IAAK,IAAInB,EAAQ,EAAGA,EAAQqB,EAAarB,IAAS,CACjD,MAAM2R,EAAWrR,EAAON,GACxBwB,EAAQxB,GAAS2R,EAASrQ,KAAKH,KAAaiC,EAAMpD,EAAO2R,EACzD,MAED,IAAK,IAAI3R,EAAQ,EAAGA,EAAQqB,EAAarB,IAAS,CACjD,MAAM2R,EAAWrR,EAAON,GACxBwB,EAAQxB,GAAS2R,KAAYvO,EAAMpD,EAAO2R,EAC1C,CAEF,OAAOnQ,CACR"} \ No newline at end of file diff --git a/build/module/browser/bundle.js b/build/module/browser/bundle.js index 4dc24d0..ba0d395 100644 --- a/build/module/browser/bundle.js +++ b/build/module/browser/bundle.js @@ -869,7 +869,7 @@ function get(propertyString, target) { return false; } let link = target; - const pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString); + const pathArray = isArray(propertyString) ? propertyString : toPath(propertyString); everyArray(pathArray, (item) => { link = link[item]; return hasValue(link); @@ -1279,7 +1279,7 @@ function mapRightArray(source, iteratee, results = [], additionalArgument) { */ function mapWhile(source, iteratee, results = [], additionalArgument) { const arrayLength = source.length; - for (let index = 0;index < arrayLength;index++) { + for (let index = 0; index < arrayLength; index++) { const item = source[index]; const returned = iteratee(item, index, results, source, arrayLength, additionalArgument); if (returned === false) { @@ -2953,7 +2953,10 @@ function forOf(source, iteratee) { } return source; } - for (const [key, value] of source) { + for (const [ + key, + value + ] of source) { iteratee(value, key, source); } return source; @@ -3015,15 +3018,15 @@ function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, fo if (!hasValue(source) || !iteratee) { return; } else if (isArray(source)) { - returned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop; + returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; } else if (isPlainObject(source) || isFunction(source)) { - returned = (isIterateeAsync) ? objectLoopAsync : objectLoop; + returned = isIterateeAsync ? objectLoopAsync : objectLoop; } else if (forOfLoop) { - returned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop; + returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; } else if (isGenerator(source)) { returned = forOfLoopAsync; } else { - returned = (isIterateeAsync) ? objectLoopAsync : objectLoop; + returned = isIterateeAsync ? objectLoopAsync : objectLoop; } return returned(source, iteratee, argument1, argument2, argument3); }; @@ -4307,6 +4310,40 @@ function isZero(source) { return source === 0; } +/** + * Checks if a number is odd & returns true or false. + * + * @function isOdd + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isOdd, assert } from '@universalweb/acid'; + * assert(isOdd(1), true); + */ +function isOdd(source) { + return (source & 1) === 1; +} + +/** + * Checks if a number is even & returns true or false. + * + * @function isEven + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEven, assert } from '@universalweb/acid'; + * assert(isEven(1), true); + */ +function isEven(source) { + return (source & 1) === 0; +} + const objectEntries = Object.entries; /** * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error. @@ -4680,11 +4717,11 @@ function objectSize(source) { * // => { 'a': 1, 'b': 2 } */ const zipObject = (properties, values) => { - const zipedObject = {}; + const source = {}; eachArray(properties, (item, key) => { - zipedObject[item] = values[key]; + source[item] = values[key]; }); - return zipedObject; + return source; }; /** * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. @@ -4700,13 +4737,16 @@ const zipObject = (properties, values) => { * // => [['a', 'b'], [1, 2]] */ const unZipObject = (object) => { - const unZippedKeys = []; - const values = []; + const objectKeys = []; + const objectValues = []; eachObject(object, (item, key) => { - unZippedKeys.push(key); - values.push(item); + objectKeys.push(key); + objectValues.push(item); }); - return [unZippedKeys, values]; + return [ + objectKeys, + objectValues, + ]; }; const normalizeCase$4 = /[ _-]+/g; @@ -6246,8 +6286,14 @@ function forOfCompactMap(source, iteratee = returnValue, resultsObject) { * return item; * }), {b: 2, c: 3}); */ -const compactMap = generateLoop(compactMapArray, compactMapAsyncArray, - compactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync); +const compactMap = generateLoop( + compactMapArray, + compactMapAsyncArray, + compactMapObject, + compactMapAsyncObject, + forOfCompactMap, + forOfCompactMapAsync +); function everyArg(...methods) { if (isAsync(methods[0])) { @@ -6841,7 +6887,7 @@ function pair(argument1, argument2) { function concurrentStatus(source, iteratee, additionalArgument) { const arrayLength = source.length; const queue = []; - for (let index = 0;index < arrayLength; index++) { + for (let index = 0; index < arrayLength; index++) { queue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument); } return Promise.allSettled(queue); @@ -7095,7 +7141,7 @@ async function timesMapAsync(amount, iteratee, results = []) { * // => false */ function toggle(value, on = true, off = false) { - return (isEqual(on, value)) ? off : on; + return ((isEqual(on, value)) ? off : on); } /** @@ -8004,5 +8050,5 @@ function isNodeList(source) { return (hasValue(source)) ? source.toString() === objectNodeList : false; } -export { BrowserStorage, Chain, Intervals, Model, Store, Timers, UniqID, VirtualStorage, add, after, append, apply, arrayToRegex, arraysToObject, ary, assert, assertAsync, assign, assignToClass, assignToObject, before, bindAll, browserStorage, cacheNativeMethod, calcProgress, camelCase, chain, chunk, chunkString, clear, clearArray, clearBuffer, clearIntervals, clearTimers, clone, cloneArray, cloneType, cnsl, cnslTheme, compact, compactKeys, compactMap, compactMapArray, compactMapAsyncArray, compactMapAsyncObject, compactMapObject, concurrent, concurrentEachArray, concurrentStatus, construct, constructorName, countBy, countKey, countWithoutKey, createFragment, curry, curryRight, debounce, deduct, defProp, difference, divide, drop, dropRight, each, eachArray, eachAsyncArray, eachAsyncObject, eachObject, eachRight, eachRightAsync, ensureArray, ensureBuffer, isZero as equalsZero, escapeRegex, escapeRegexRegex, eventAdd, eventRemove, every, everyArg, everyArray, everyAsyncArray, everyAsyncObject, everyObject, extendClass, filter, filterArray, filterAsyncArray, filterAsyncObject, filterObject, findIndex, findIndexCache, findItem, first, flatten, flattenDeep, flow, flowAsync, flowAsyncRight, flowRight, forEach, forEachAsync, forMap, forOf, forOfAsync, forOfCompactMap, forOfCompactMapAsync, forOfEvery, forOfEveryAsync, forOfFilter, forOfFilterAsync, forOfMap, forOfMapAsync, generateLoop, get, getByClass, getById, getByTag, getEntries, getFileExtension, getFilename, getHighest, getLowest, getNumberInsertIndex, getPropDesc, getPropNames, getType, getTypeName, groupBy, has, hasAnyKeys, hasDot, hasKeys, hasLength, hasLocal, hasProp, hasValue, htmlEntities, ifInvoke, ifNotAssign, ifValue, importjs, inAsync, inSync, increment, indexBy, info, initial, initialString, insertInRange, intersection, interval, intervals, invert, invokeArray, invokeCollection, invokeCollectionAsync, isAgent, isArguments, isArray, isArrayBuffer, isArrayBufferCall, isArrayLike, isAsync, isAsyncCall, isBigInt, isBigIntCall, isBoolean, isBooleanCall, isBuffer, isBufferCall, isChild, isCloneable, isConstructor, isConstructorFactory, isConstructorNameFactory, isDate, isDateCall, isDeno, isDocumentReady, isDom, isEmpty, isEnter, isEqual, isF32, isF32Call, isF64, isF64Call, isFalse, isFalsy, isFileCSS, isFileHTML, isFileJS, isFileJSON, isFloat, isFunction, isGenerator, isGeneratorCall, isHTMLCollection, isI16, isI16Call, isI32, isI32Call, isI8, isI8Call, isIterable, isKindAsync, isMap, isMapCall, isMatchArray, isMatchObject, isNegative, isNodeList, isNodejs, isNotArray, isNotNumber, isNotString, isNull, isNumber, isNumberCall, isNumberEqual, isNumberInRange, isNumberNotInRange, isParent, isPlainObject, isPositive, isPrimitive, isPromise, isRegex, isRegexCall, isRelated, isSafeInt, isSame, isSameType, isSet, isSetCall, isString, isTrue, isTruthy, isTypeFactory, isTypedArray, isU16, isU16Call, isU32, isU32Call, isU8, isU8C, isU8CCall, isU8Call, isUndefined, isWeakMap, isWeakMapCall, isZero, jsonParse, kebabCase, keys, largest, last, lowerCase, map, mapArray, mapAsyncArray, mapAsyncObject, mapObject, mapRightArray, mapWhile, merge, model, multiply, negate, noValue, nodeAttribute, noop, notEqual, nthArg, objectAssign, objectEntries, objectSize, omit, once, onlyUnique, over, overEvery, pair, partition, pick, pluck, pluckObject, promise, propertyMatch, querySelector, querySelectorAll, randomFloat, randomInt, range, rangeDown, rangeUp, rawURLDecode, reArg, regexTestFactory, remainder, remove, removeBy, replaceList, rest, restString, returnValue, right, rightString, sample, sanitize, saveDimensions, selector, setKey, setValue, shuffle, smallest, snakeCase, sortCollectionAlphabetically, sortCollectionAlphabeticallyReverse, sortCollectionAscending, sortCollectionAscendingFilter, sortCollectionDescending, sortCollectionDescendingFilter, sortNumberAscending, sortNumberDescening, sortObjectsAlphabetically, sortObjectsAlphabeticallyReverse, sortUnique, stringify, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, subtractAll, subtractReverse, sumAll, take, takeRight, themes, throttle, timer, timers, times, timesAsync, timesMap, timesMapAsync, toArray, toPath, toggle, tokenize, truncate, truncateRight, unZip, unZipObject, union, uniqID, unique, untilFalseArray, untilTrueArray, updateDimensions, upperCase, upperFirst, upperFirstAll, upperFirstLetter, upperFirstOnly, upperFirstOnlyAll, virtualStorage, whileCompactMap, whileEachArray, whileMapArray, without, words, wrap, xor, zip, zipObject }; +export { BrowserStorage, Chain, Intervals, Model, Store, Timers, UniqID, VirtualStorage, add, after, append, apply, arrayToRegex, arraysToObject, ary, assert, assertAsync, assign, assignToClass, assignToObject, before, bindAll, browserStorage, cacheNativeMethod, calcProgress, camelCase, chain, chunk, chunkString, clear, clearArray, clearBuffer, clearIntervals, clearTimers, clone, cloneArray, cloneType, cnsl, cnslTheme, compact, compactKeys, compactMap, compactMapArray, compactMapAsyncArray, compactMapAsyncObject, compactMapObject, concurrent, concurrentEachArray, concurrentStatus, construct, constructorName, countBy, countKey, countWithoutKey, createFragment, curry, curryRight, debounce, deduct, defProp, difference, divide, drop, dropRight, each, eachArray, eachAsyncArray, eachAsyncObject, eachObject, eachRight, eachRightAsync, ensureArray, ensureBuffer, isZero as equalsZero, escapeRegex, escapeRegexRegex, eventAdd, eventRemove, every, everyArg, everyArray, everyAsyncArray, everyAsyncObject, everyObject, extendClass, filter, filterArray, filterAsyncArray, filterAsyncObject, filterObject, findIndex, findIndexCache, findItem, first, flatten, flattenDeep, flow, flowAsync, flowAsyncRight, flowRight, forEach, forEachAsync, forMap, forOf, forOfAsync, forOfCompactMap, forOfCompactMapAsync, forOfEvery, forOfEveryAsync, forOfFilter, forOfFilterAsync, forOfMap, forOfMapAsync, generateLoop, get, getByClass, getById, getByTag, getEntries, getFileExtension, getFilename, getHighest, getLowest, getNumberInsertIndex, getPropDesc, getPropNames, getType, getTypeName, groupBy, has, hasAnyKeys, hasDot, hasKeys, hasLength, hasLocal, hasProp, hasValue, htmlEntities, ifInvoke, ifNotAssign, ifValue, importjs, inAsync, inSync, increment, indexBy, info, initial, initialString, insertInRange, intersection, interval, intervals, invert, invokeArray, invokeCollection, invokeCollectionAsync, isAgent, isArguments, isArray, isArrayBuffer, isArrayBufferCall, isArrayLike, isAsync, isAsyncCall, isBigInt, isBigIntCall, isBoolean, isBooleanCall, isBuffer, isBufferCall, isChild, isCloneable, isConstructor, isConstructorFactory, isConstructorNameFactory, isDate, isDateCall, isDeno, isDocumentReady, isDom, isEmpty, isEnter, isEqual, isEven, isF32, isF32Call, isF64, isF64Call, isFalse, isFalsy, isFileCSS, isFileHTML, isFileJS, isFileJSON, isFloat, isFunction, isGenerator, isGeneratorCall, isHTMLCollection, isI16, isI16Call, isI32, isI32Call, isI8, isI8Call, isIterable, isKindAsync, isMap, isMapCall, isMatchArray, isMatchObject, isNegative, isNodeList, isNodejs, isNotArray, isNotNumber, isNotString, isNull, isNumber, isNumberCall, isNumberEqual, isNumberInRange, isNumberNotInRange, isOdd, isParent, isPlainObject, isPositive, isPrimitive, isPromise, isRegex, isRegexCall, isRelated, isSafeInt, isSame, isSameType, isSet, isSetCall, isString, isTrue, isTruthy, isTypeFactory, isTypedArray, isU16, isU16Call, isU32, isU32Call, isU8, isU8C, isU8CCall, isU8Call, isUndefined, isWeakMap, isWeakMapCall, isZero, jsonParse, kebabCase, keys, largest, last, lowerCase, map, mapArray, mapAsyncArray, mapAsyncObject, mapObject, mapRightArray, mapWhile, merge, model, multiply, negate, noValue, nodeAttribute, noop, notEqual, nthArg, objectAssign, objectEntries, objectSize, omit, once, onlyUnique, over, overEvery, pair, partition, pick, pluck, pluckObject, promise, propertyMatch, querySelector, querySelectorAll, randomFloat, randomInt, range, rangeDown, rangeUp, rawURLDecode, reArg, regexTestFactory, remainder, remove, removeBy, replaceList, rest, restString, returnValue, right, rightString, sample, sanitize, saveDimensions, selector, setKey, setValue, shuffle, smallest, snakeCase, sortCollectionAlphabetically, sortCollectionAlphabeticallyReverse, sortCollectionAscending, sortCollectionAscendingFilter, sortCollectionDescending, sortCollectionDescendingFilter, sortNumberAscending, sortNumberDescening, sortObjectsAlphabetically, sortObjectsAlphabeticallyReverse, sortUnique, stringify, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, subtractAll, subtractReverse, sumAll, take, takeRight, themes, throttle, timer, timers, times, timesAsync, timesMap, timesMapAsync, toArray, toPath, toggle, tokenize, truncate, truncateRight, unZip, unZipObject, union, uniqID, unique, untilFalseArray, untilTrueArray, updateDimensions, upperCase, upperFirst, upperFirstAll, upperFirstLetter, upperFirstOnly, upperFirstOnlyAll, virtualStorage, whileCompactMap, whileEachArray, whileMapArray, without, words, wrap, xor, zip, zipObject }; //# sourceMappingURL=bundle.js.map diff --git a/build/module/browser/bundle.js.map b/build/module/browser/bundle.js.map index 3887328..6695c3b 100644 --- a/build/module/browser/bundle.js.map +++ b/build/module/browser/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","sources":["../../../source/arrays/chunk.js","../../../source/arrays/clear.js","../../../source/arrays/clone.js","../../../source/types/isUndefined.js","../../../source/utilities/hasLength.js","../../../source/types/isNull.js","../../../source/types/hasValue.js","../../../source/utilities/returnValue.js","../../../source/arrays/each.js","../../../source/arrays/compactMap.js","../../../source/arrays/eachAsync.js","../../../source/arrays/compactMapAsync.js","../../../source/numbers/isNegative.js","../../../source/arrays/range.js","../../../source/types/isArray.js","../../../source/classes/construct.js","../../../source/arrays/ensure.js","../../../source/arrays/flattenDeep.js","../../../source/utilities/forEach.js","../../../source/arrays/difference.js","../../../source/arrays/drop.js","../../../source/arrays/dropRight.js","../../../source/arrays/eachRight.js","../../../source/arrays/eachRightAsync.js","../../../source/arrays/every.js","../../../source/arrays/everyAsync.js","../../../source/arrays/filter.js","../../../source/arrays/filterAsync.js","../../../source/arrays/first.js","../../../source/arrays/flatten.js","../../../source/arrays/initial.js","../../../source/arrays/intersect.js","../../../source/arrays/invoke.js","../../../source/utilities/toPath.js","../../../source/utilities/get.js","../../../source/objects/keys.js","../../../source/objects/hasKeys.js","../../../source/types/isConstructor.js","../../../source/types/isTypeFactory.js","../../../source/types/isBuffer.js","../../../source/types/isPlainObject.js","../../../source/utilities/isEqual.js","../../../source/arrays/isMatch.js","../../../source/arrays/largest.js","../../../source/arrays/last.js","../../../source/arrays/map.js","../../../source/arrays/concurrentEach.js","../../../source/arrays/mapAsync.js","../../../source/arrays/mapRight.js","../../../source/arrays/mapWhile.js","../../../source/math/subtract.js","../../../source/arrays/sortNumberAscending.js","../../../source/arrays/partition.js","../../../source/math/subtractReverse.js","../../../source/arrays/sortNumberDescening.js","../../../source/arrays/remove.js","../../../source/arrays/rest.js","../../../source/arrays/right.js","../../../source/math/randomInt.js","../../../source/numbers/isNumberEqual.js","../../../source/internal/array.js","../../../source/arrays/shuffle.js","../../../source/arrays/sample.js","../../../source/arrays/smallest.js","../../../source/arrays/getNumberInsertIndex.js","../../../source/arrays/take.js","../../../source/arrays/takeRight.js","../../../source/arrays/unique.js","../../../source/arrays/union.js","../../../source/arrays/untilFalse.js","../../../source/arrays/untilTrue.js","../../../source/arrays/whileCompactMap.js","../../../source/arrays/whileEach.js","../../../source/arrays/whileMap.js","../../../source/arrays/without.js","../../../source/arrays/xor.js","../../../source/arrays/zip.js","../../../source/buffers/ensure.js","../../../source/buffers/clear.js","../../../source/types/isFunction.js","../../../source/types/isNumber.js","../../../source/types/isString.js","../../../source/objects/assign.js","../../../source/classes/extendClass.js","../../../source/collection/countBy.js","../../../source/collection/countKey.js","../../../source/collection/countWithoutKey.js","../../../source/collection/findIndexCache.js","../../../source/collection/findIndex.js","../../../source/collection/findItem.js","../../../source/collection/sortCollectionDescending.js","../../../source/collection/getLowest.js","../../../source/collection/sortCollectionAscending.js","../../../source/collection/getHighest.js","../../../source/collection/groupBy.js","../../../source/collection/indexBy.js","../../../source/collection/invoke.js","../../../source/collection/invokeAsync.js","../../../source/objects/pluckObject.js","../../../source/collection/pluck.js","../../../source/collection/sortCollectionAlphabetically.js","../../../source/collection/sortCollectionAlphabeticallyReverse.js","../../../source/files/getExtension.js","../../../source/files/getFilename.js","../../../source/internal/regexTestFactory.js","../../../source/files/isFileCSS.js","../../../source/files/isFileHTML.js","../../../source/files/isFileJS.js","../../../source/files/isFileJSON.js","../../../source/functions/after.js","../../../source/functions/ary.js","../../../source/functions/before.js","../../../source/objects/eachAsync.js","../../../source/objects/each.js","../../../source/utilities/forEachAsync.js","../../../source/types/isSet.js","../../../source/utilities/forOf.js","../../../source/types/isGenerator.js","../../../source/utilities/forOfAsync.js","../../../source/types/isAsync.js","../../../source/utilities/generateLoop.js","../../../source/utilities/each.js","../../../source/functions/chain.js","../../../source/functions/curry.js","../../../source/functions/curryRight.js","../../../source/utilities/noop.js","../../../source/utilities/times.js","../../../source/utilities/timer.js","../../../source/internal/apply.js","../../../source/functions/debounce.js","../../../source/functions/ifInvoke.js","../../../source/functions/negate.js","../../../source/functions/nthArg.js","../../../source/functions/once.js","../../../source/types/getType.js","../../../source/types/cloneType.js","../../../source/utilities/forOfMap.js","../../../source/utilities/forOfMapAsync.js","../../../source/objects/mapAsync.js","../../../source/objects/map.js","../../../source/utilities/map.js","../../../source/functions/over.js","../../../source/objects/everyAsync.js","../../../source/objects/every.js","../../../source/utilities/forOfEvery.js","../../../source/utilities/forOfEveryAsync.js","../../../source/utilities/every.js","../../../source/functions/overEvery.js","../../../source/functions/rearged.js","../../../source/functions/throttle.js","../../../source/functions/wrap.js","../../../source/utilities/cacheNativeMethod.js","../../../source/internal/object.js","../../../source/internal/isSame.js","../../../source/math/add.js","../../../source/math/deduct.js","../../../source/math/divide.js","../../../source/math/increment.js","../../../source/math/multiple.js","../../../source/math/progress.js","../../../source/math/randomFloat.js","../../../source/math/remainder.js","../../../source/math/subtractAll.js","../../../source/math/sumAll.js","../../../source/numbers/isNumberInRange.js","../../../source/numbers/isNumberNotInRange.js","../../../source/numbers/isPositive.js","../../../source/numbers/isZero.js","../../../source/objects/getEntries.js","../../../source/objects/compactKeys.js","../../../source/objects/compactMapAsync.js","../../../source/objects/compactMap.js","../../../source/objects/filter.js","../../../source/objects/filterAsync.js","../../../source/objects/invert.js","../../../source/objects/isMatch.js","../../../source/regexps/escapeRegex.js","../../../source/regexps/arrayToRegex.js","../../../source/types/isRegex.js","../../../source/objects/omit.js","../../../source/objects/pick.js","../../../source/objects/size.js","../../../source/objects/zip.js","../../../source/strings/camelCase.js","../../../source/strings/kebabCase.js","../../../source/strings/snakeCase.js","../../../source/strings/upperCase.js","../../../source/strings/lowerCase.js","../../../source/strings/range.js","../../../source/strings/replace.js","../../../source/strings/sanitize.js","../../../source/strings/tokenize.js","../../../source/strings/truncate.js","../../../source/strings/typography.js","../../../source/types/getTypeName.js","../../../source/types/isArguments.js","../../../source/types/isMap.js","../../../source/types/isTypedArray.js","../../../source/types/noValue.js","../../../source/types/isArrayLike.js","../../../source/types/isBigInt.js","../../../source/types/isBoolean.js","../../../source/types/isArrayBuffer.js","../../../source/types/isChild.js","../../../source/types/isCloneable.js","../../../source/types/isDate.js","../../../source/types/isEmpty.js","../../../source/types/isFalse.js","../../../source/types/isF32.js","../../../source/types/isF64.js","../../../source/types/isFloat.js","../../../source/types/isI16.js","../../../source/types/isI32.js","../../../source/types/isI8.js","../../../source/types/isIterable.js","../../../source/types/isPromise.js","../../../source/types/isKindAsync.js","../../../source/types/isParent.js","../../../source/types/isPrimitive.js","../../../source/types/isRelated.js","../../../source/types/isSafeInt.js","../../../source/types/isSameType.js","../../../source/types/isTrue.js","../../../source/types/isU16.js","../../../source/types/isU32.js","../../../source/types/isU8.js","../../../source/types/isU8C.js","../../../source/types/isWeakMap.js","../../../source/types/isDeno.js","../../../source/types/isNode.js","../../../source/types/isTruthy.js","../../../source/types/isFalsy.js","../../../source/utilities/ifValue.js","../../../source/utilities/notEqual.js","../../../source/utilities/json.js","../../../source/utilities/assert.js","../../../source/utilities/bindAll.js","../../../source/utilities/clear.js","../../../source/utilities/clone.js","../../../source/utilities/concurrent.js","../../../source/utilities/compact.js","../../../source/utilities/forOfCompactMapAsync.js","../../../source/utilities/forOfCompactMap.js","../../../source/utilities/compactMap.js","../../../source/utilities/everyArg.js","../../../source/utilities/forOfFilter.js","../../../source/utilities/forOfFilterAsync.js","../../../source/utilities/filter.js","../../../source/utilities/flow.js","../../../source/utilities/flowAsync.js","../../../source/utilities/forMap.js","../../../source/utilities/arraysToObject.js","../../../source/utilities/has.js","../../../source/utilities/hasDot.js","../../../source/utilities/ifNotAssign.js","../../../source/utilities/interval.js","../../../source/utilities/merge.js","../../../source/utilities/model.js","../../../source/utilities/pair.js","../../../source/utilities/concurrentStatus.js","../../../source/utilities/promise.js","../../../source/utilities/propertyMatch.js","../../../source/utilities/setKey.js","../../../source/utilities/setValue.js","../../../source/utilities/store.js","../../../source/utilities/stubArray.js","../../../source/utilities/stubFalse.js","../../../source/utilities/stubObject.js","../../../source/utilities/stubString.js","../../../source/utilities/stubTrue.js","../../../source/utilities/timesAsync.js","../../../source/utilities/toggle.js","../../../source/utilities/uid.js","../../../source/utilities/virtualStorage.js","../../../source/utilities/inAsync.js","../../../source/utilities/inSync.js","../../../source/browser/agent.js","../../../source/browser/event.js","../../../source/browser/isEnter.js","../../../source/browser/frag.js","../../../source/browser/append.js","../../../source/browser/attribute.js","../../../source/browser/selector.js","../../../source/browser/importScript.js","../../../source/browser/ready.js","../../../source/browser/info.js","../../../source/browser/dimensions.js","../../../source/browser/storage.js","../../../source/browser/console.js","../../../source/browser/is.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0;index < arrayLength;index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [key, value] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst zipedObject = {};\n\teachArray(properties, (item, key) => {\n\t\tzipedObject[item] = values[key];\n\t});\n\treturn zipedObject;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst unZippedKeys = [];\n\tconst values = [];\n\teachObject(object, (item, key) => {\n\t\tunZippedKeys.push(key);\n\t\tvalues.push(item);\n\t});\n\treturn [unZippedKeys, values];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(compactMapArray, compactMapAsyncArray,\n\tcompactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0;index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn (isEqual(on, value)) ? off : on;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from '../objects/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isBoolean } from '../types/isBoolean.js';\nimport { keys } from '../objects/keys.js';\nimport { noop } from '../utilities/noop';\n/**\n * Checks to see of the browser agent has a string.\n *\n * @function isAgent\n * @category browser\n * @type {Function}\n * @param {String} source - The string to search for.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isAgent, assert } from '@universalweb/acid';\n * assert(isAgent('NotThere'), false);\n */\nexport function isAgent(source) {\n\treturn (hasValue(source)) ? isAgent[source] : keys(isAgent);\n}\nconst userAgent = globalThis.navigator?.userAgentData;\nif (userAgent) {\n\teachObject(userAgent, (value, key) => {\n\t\tif (isBoolean(value) && value) {\n\t\t\tisAgent[key] = value;\n\t\t}\n\t});\n\teachArray(userAgent.brands, (value) => {\n\t\tisAgent[value.brand] = value.version;\n\t});\n} else if (navigator.userAgent) {\n\tlet userAgentNormalized = navigator.userAgent.toLowerCase();\n\tuserAgentNormalized = userAgentNormalized.replace(/_/g, '.');\n\tuserAgentNormalized = userAgentNormalized.replace(/[#_,;()]/g, '');\n\tconst userAgentSplit = userAgentNormalized.split(/ |\\//);\n\teachArray(userAgentSplit, (item) => {\n\t\tisAgent[item] = true;\n\t});\n}\n\n","/**\n * Attaches an event listener to a node.\n *\n * @function eventAdd\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventAdd(document.body, 'click', () => {console.log('CLICKED');});\n * // = > document.body\n */\nexport function eventAdd(node, eventName, callback, useCapture) {\n\tnode.addEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n/**\n * Attaches an event listener to a node.\n *\n * @function eventRemove\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventRemove(document.body, () => {console.log('CLICKED');});\n * // = > Undefined\n */\nexport function eventRemove(node, eventName, callback, useCapture) {\n\tnode.removeEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n\n","/**\n * Checks if the keycode of the event is strictly equal to 13.\n *\n * @function isEnter\n * @category browser\n * @type {Function}\n * @param {Object} eventObject - Object to be checked.\n * @returns {Boolean} - Returns true if the keycode property of the object equals 13.\n *\n * @example\n * isEnter('click');\n * // => false\n */\nexport function isEnter(eventObject) {\n\treturn eventObject.keyCode === 13;\n}\n\n","/**\n * Create a document fragment.\n *\n * @function createFragment\n * @category browser\n * @type {Function}\n * @ignore\n * @returns {Fragment} - Returns a new document fragment.\n */\nexport const createFragment = document.createDocumentFragment.bind(document);\n","/**\n * Append a DOM node.\n *\n * @function append\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @ignore\n * @param {Node} parentNode - The parent node.\n * @param {Node} child - The node to be appended.\n * @returns {undefined} - Returns the child.\n */\nexport function append(parentNode, child) {\n\tparentNode.appendChild(child);\n\treturn child;\n}\n","import { eachObject } from '../objects/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { mapArray } from '../arrays/map.js';\nimport { zipObject } from '../objects/zip.js';\n/**\n * Assign attributes to a DOM node.\n *\n * @function nodeAttribute\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @async\n * @param {Node} node - The DOM node.\n * @param {Object|Array} object - Object with key being the attribute name and the value being the attribute value. If an array is given it will get the values corresponding to the array items.\n * @returns {Object|Node} - If using an array this returns an object of attribute names as keys and their values as the property value. If using an object this will return the provided node.\n *\n * @example\n * nodeAttribute(document.body, { 'data-example': 'test'});\n */\nexport function nodeAttribute(node, object) {\n\tif (isArray(object)) {\n\t\treturn zipObject(object, mapArray(object, (item) => {\n\t\t\treturn node.getAttribute(item);\n\t\t}));\n\t}\n\teachObject(object, (item, key) => {\n\t\tnode.setAttribute(key, item);\n\t});\n\treturn node;\n}\n\n","import { restString } from '../strings/range.js';\nconst dotString = '.';\nconst poundString = '#';\nconst classTest = /^.[\\w_-]+$/;\nconst tagTest = /^[A-Za-z]+$/;\nconst regexSpace = /\\s/;\n/**\n * Wrapper around getElementsByClassName.\n *\n * @function getByClass\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByClass = document.getElementsByClassName.bind(document);\n/**\n * Wrapper around getElementsByTagName.\n *\n * @function getByTag\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByTag = document.getElementsByTagName.bind(document);\n/**\n * Wrapper around getElementsByIdName.\n *\n * @function getById\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getById = document.getElementById.bind(document);\n/**\n * Wrapper around querySelector.\n *\n * @function querySelector\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelector = document.querySelector.bind(document);\n/**\n * Wrapper around querySelectorAll.\n *\n * @function querySelectorAll\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelectorAll = document.querySelectorAll.bind(document);\n/**\n * Returns relevant DOM node.\n *\n * @function selector\n * @category browser\n * @ignoreTest\n * @param {String} select - String to be evaluated.\n * @type {Function}\n * @returns {Node} - Returns a DOM node.\n *\n * @example\n * selector('#node');\n * // =>
\n */\nexport function selector(select) {\n\tconst firstLetter = select[0];\n\tswitch (firstLetter) {\n\t\tcase poundString: {\n\t\t\tif (!regexSpace.test(select)) {\n\t\t\t\treturn getById(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase dotString: {\n\t\t\tif (classTest.test(select)) {\n\t\t\t\treturn getByClass(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tif (tagTest.test(select)) {\n\t\t\t\treturn getByTag(select);\n\t\t\t}\n\t\t}\n\t}\n\treturn querySelectorAll(select);\n}\n\n","import { append } from './append.js';\nimport { eventAdd } from './event.js';\nimport { hasDot } from '../utilities/hasDot.js';\nimport { nodeAttribute } from './attribute.js';\nimport { promise } from '../utilities/promise.js';\nimport { querySelector } from './selector.js';\nconst createElementCache = document.createElement.bind(document);\nconst nodeAttachLoadingEvents = (node) => {\n\treturn promise((accept) => {\n\t\teventAdd(node, 'load', accept, true);\n\t\teventAdd(node, 'error', accept, true);\n\t\tappend(querySelector('head'), node);\n\t});\n};\n/**\n * Asynchronously import a js file and append it to the head node.\n * If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity.\n *\n * @function importjs\n * @category browser\n * @type {Function}\n * @async\n * @param {*} url - URL of the script to import. If not \".\" is found in the file name \".js\" will be appended.\n * @returns {Promise} - Returns a promise which returns a \"load\" or \"error\" event associated with the script.\n *\n * @example\n * importjs('core.js');\n * importjs('core');\n */\nexport function importjs(url) {\n\tconst src = hasDot(url) && url || `${url}.js`;\n\tconst node = nodeAttribute(createElementCache('script'), {\n\t\tasync: '',\n\t\tsrc\n\t});\n\treturn nodeAttachLoadingEvents(node);\n}\n\n","import { eventAdd } from './event.js';\nimport { getById } from './selector.js';\nimport { importjs } from './importScript.js';\n/**\n * Runs a function if the document has finished loading. If not, add an eventlistener.\n *\n * @function isDocumentReady\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Function} callable - Function to be run.\n * @returns {Boolean|Function} - If the document is ready, returns a function. If not, return false.\n *\n * @example\n * isDocumentReady(() => {return 1});\n * // => 1\n */\nexport function isDocumentReady(callable) {\n\tconst state = document.readyState;\n\tconst checkStatus = state === 'interactive' || state === 'completed' || state === 'complete';\n\tif (checkStatus) {\n\t\treturn (callable) ? callable() : true;\n\t}\n\tif (callable) {\n\t\teventAdd(document, 'DOMContentLoaded', callable);\n\t}\n\treturn false;\n}\nisDocumentReady(() => {\n\tconst scriptTag = getById('AcidLib');\n\tconst scriptName = (scriptTag && scriptTag.getAttribute('data-index')) || '/index';\n\timportjs(scriptName);\n});\n","const protocol = location.protocol;\nconst protocolSocket = (protocol === 'http:') ? 'ws' : 'wss';\nconst hostname = location.hostname;\n/**\n * Holds client hardware, browser, and host info.\n *\n * @memberof $\n * @category browser\n * @ignoreTest\n * @property {Object} info - Client hardware & host info.\n * @type {Object}\n */\nexport const info = {\n\thardware: {\n\t\tcores: navigator.hardwareConcurrency\n\t},\n\thost: {\n\t\tname: hostname,\n\t\tprotocol,\n\t\tprotocolSocket,\n\t}\n};\n\n","import { assign } from '../objects/assign.js';\nimport { eventAdd } from './event.js';\nimport { info } from './info.js';\nimport { isDocumentReady } from './ready.js';\nexport function saveDimensions() {\n\tassign(info, {\n\t\tbodyHeight: document.body.offsetHeight,\n\t\tbodyWidth: document.body.offsetWidth,\n\t\twindowHeight: window.innerHeight,\n\t\twindowWidth: window.innerWidth,\n\t});\n}\n/**\n * Save current document & window dimensions to the info property.\n *\n * @function updateDimensions\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * updateDimensions();\n */\nexport function updateDimensions() {\n\tsaveDimensions();\n}\nisDocumentReady(updateDimensions);\neventAdd(window, 'load', updateDimensions, true);\neventAdd(window, 'resize', updateDimensions, true);\n\n","/**\n * LocalStorage Module..\n *\n * @module browser/storage\n */\nimport { hasValue } from '../types/hasValue.js';\nimport { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nimport { virtualStorage } from '../utilities/virtualStorage.js';\nexport let hasLocal;\nfunction hasStorage(storeCheck) {\n\ttry {\n\t\tstoreCheck().removeItem('TESTING');\n\t\thasLocal = true;\n\t} catch (e) {\n\t\thasLocal = false;\n\t}\n}\nhasStorage(() => {\n\treturn localStorage;\n});\n/**\n * Constructs a virtual storage container with localStorage support.\n * BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported.\n * If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed.\n * BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed.\n *\n * @class BrowserStorage\n * @category browser\n * @returns {BrowserStorage} - Returns a new instance of BrowserStorage.\n *\n * @example\n * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n * const storageBrowserStorage = construct(BrowserStorage);\n * storageBrowserStorage.setItem('key', 'value');\n * assert(storageBrowserStorage.getItem('key'), 'value');\n */\nexport class BrowserStorage {\n\tconstructor(initialObject) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local = localStorage;\n\t\t}\n\t\tthis.storage = virtualStorage(initialObject);\n\t}\n\thasLocal = hasLocal;\n\t/**\n\t * Save an item to a browserStorage.\n\t *\n\t * @function setItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.setItem(key, (isString(value)) ? value : stringify(value));\n\t\t}\n\t\treturn this.storage.setItem(key, value);\n\t}\n\t/**\n\t * Get an item from a browserStorage.\n\t *\n\t * @function getItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tgetItem(key) {\n\t\tconst item = this.storage.getItem(key);\n\t\tif (hasValue(item)) {\n\t\t\treturn item;\n\t\t}\n\t\tif (!hasValue(item) && this.hasLocal) {\n\t\t\treturn this.local.getItem(key);\n\t\t}\n\t}\n\t/**\n\t * Clears all data for the browserStorage including all of localStorage if supported.\n\t *\n\t * @function clear\n\t * @class BrowserStorage\n\t * @category browser\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.clear();\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tclear() {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.clear();\n\t\t}\n\t\tthis.storage.clear();\n\t}\n\t/**\n\t * Remove an item from a browserStorage.\n\t *\n\t * @class BrowserStorage\n\t * @category browser\n\t * @function removeItem\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.removeItem('key');\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tremoveItem(key) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.removeItem(key);\n\t\t}\n\t\tthis.storage.removeItem(key);\n\t}\n}\n/**\n * The browserStorage function is a factory which wraps the BrowserStorage class constructor.\n *\n * @function browserStorage\n * @category browser\n * @type {Function}\n * @returns {*} - Returns a new BrowserStorage Object.\n *\n * @example\n * const storageBrowserStorage = browserStorage();\n * // => New BrowserStorage Object\n */\nexport function browserStorage(virtualFlag) {\n\treturn new BrowserStorage(virtualFlag);\n}\n\n","import { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nconst generateTheme = (color, bg) => {\n\treturn `color:${color};background:${bg};`;\n};\nexport const themes = {\n\talert: generateTheme('#fff', '#f44336'),\n\timportant: generateTheme('#fff', '#E91E63'),\n\tnotify: generateTheme('#fff', '#651FFF'),\n\twarning: generateTheme('#000', '#FFEA00'),\n};\n/**\n * Console.trace wrapper with theme support.\n *\n * @function cnsl\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Object} value - The value to be logged.\n * @param {String} themeName - The name of the theme to be used.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnsl('Lucy', 'notify');\n * // 'Lucy'\n */\nexport const cnsl = (value, themeName) => {\n\tconst data = isString(value) ? value : stringify(value);\n\tif (themeName === 'alert' || themeName === 'warning') {\n\t\treturn console.trace(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n\t}\n\tconsole.log(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n};\n/**\n * Create color themes for cnsl method.\n *\n * @function cnslTheme\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {String} themeName - The name of the theme.\n * @param {String} color - The text color.\n * @param {String} background - The background color of the block.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnslTheme('BlackNWhite', '#fff', '#000');\n */\nexport const cnslTheme = (themeName, color, background) => {\n\tthemes[themeName] = generateTheme(color, background);\n};\n\n","import { difference } from '../arrays/difference.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Checks if value is a plain DOM Node.\n *\n * @function isDom\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDom, assert } from '@universalweb/acid';\n * assert(isDom(document.querySelectorAll('head')), true);\n */\nexport function isDom(source) {\n\treturn source && source.nodeType !== 9;\n}\n/**\n * Checks if the value is a HTMLCollection.\n *\n * @function isHTMLCollection\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isHTMLCollection, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isHTMLCollection(document.getElementsByClassName('test')), true);\n */\nconst objectHTMLCollection = '[object HTMLCollection]';\nexport function isHTMLCollection(source) {\n\treturn (hasValue(source)) ? source.toString() === objectHTMLCollection : false;\n}\n/**\n * Checks if the value is a NodeList.\n *\n * @function isNodeList\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNodeList, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isNodeList(document.querySelectorAll('.test')), true);\n */\nconst objectNodeList = '[object NodeList]';\nexport function isNodeList(source) {\n\treturn (hasValue(source)) ? source.toString() === objectNodeList : false;\n}\n"],"names":["sign","random","normalizeCase","space","returnFlow"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,EAAE;AACvC,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;AACpB,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;AACf,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK;AAC9B,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC,EAAE;AACrB,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpB,GAAG,IAAI,GAAG,EAAE;AACZ,IAAI,KAAK,EAAE,CAAC;AACZ,IAAI;AACJ,GAAG;AACH,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5B,EAAE,CAAC,CAAC;AACJ,CAAC,OAAO,OAAO,CAAC;AAChB;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,MAAM,EAAE;AACnC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;AACnB,CAAC,OAAO,MAAM,CAAC;A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ACA;AACA;AACA;AACA;AACA;AACO,SAAS,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE;AACrC,CAAC,OAAO,CAAC,GAAG,GAAG,KAAK;AACpB,EAAE,OAAO,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC,CAAC;AAChC,EAAE,CAAC;AACH;;ACpBA,MAAM,iBAAiB,GAAG,QAAQ,CAAC,SAAS,CAAC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,MAAM,EAAE;AAC1C,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5C;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,MAAM,CAAC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,MAAM,CAAC,yBAAyB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,MAAM,CAAC,eAAe;AACjC,MAAC,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,cAAc;;AC/C9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,CAAC;;ACd7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE;AACpC,CAAC,OAAO,MAAM,GAAG,MAAM,CAAC;AACxB;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,MAAM,CAAC,MAAM,EAAE;AAC/B,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;AACnB;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE;AACtC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;AACvB;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS,CAAC,MAAM,EAAE;AAClC,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;AACnB;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE;AACxC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;AACvB;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE;AACnD,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE;AAClB,EAAE,OAAO,KAAK,CAAC;AACf,EAAE;AACF,CAAC,IAAI,aAAa,KAAK,CAAC,EAAE;AAC1B,EAAE,OAAO,CAAC,CAAC;AACX,EAAE;AACF,CAAC,OAAO,CAAC,aAAa,GAAG,KAAK,IAAI,GAAG,CAAC;AACtC;;ACtBA,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,EAAE;AAC1C,CAAC,OAAO,MAAM,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AACrC;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAA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Q,CAAC,MAAM,CAAC,CAAC;AAC1B;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,OAAO,CAAC,MAAM,EAAE;AAChC,CAAC,OAAO,MAAM,KAAK,KAAK,CAAC;AACzB;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,wBAAwB,CAAC,cAAc,EAAE;AACtD,MAAC,KAAK,GAAG,aAAa,CAAC,SAAS;;ACb5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,wBAAwB,CAAC,cAAc,EAAE;AACtD,MAAC,KAAK,GAAG,aAAa,CAAC,SAAS;;AChB5C,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG;;ACZvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,wBAAwB,CAAC,YAAY,EAAE;AACpD,MAAC,KAAK,GAAG,aAAa,CAAC,SAAS;;ACd5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,wBAAwB,CAAC,YAAY,EAAE;AACpD,MAAC,KAAK,GAAG,aAAa,CAAC,SAAS;;ACb5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,wBAAwB,CAAC,WAAW,EAAE;AAClD,MAAC,IAAI,GAAG,aAAa,CAAC,QAAQ;;ACf1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,MAAM,EAAE;AACnC,CAAC,OA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AAC,SAAS,CAAC,GAAG,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACtD;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,MAAM,EAAE;AAC9B,CAAC,OAAO,MAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,CAAC;AACxC,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAChD,SAAS,gBAAgB,CAAC,MAAM,EAAE;AACzC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,QAAQ,EAAE,KAAK,oBAAoB,GAAG,KAAK,CAAC;AAChF,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,cAAc,GAAG,mBAAmB,CAAC;AACpC,SAAS,UAAU,CAAC,MAAM,EAAE;AACnC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,QAAQ,EAAE,KAAK,cAAc,GAAG,KAAK,CAAC;AAC1E;;;;"} \ No newline at end of file +{"version":3,"file":"bundle.js","sources":["../../../source/arrays/chunk.js","../../../source/arrays/clear.js","../../../source/arrays/clone.js","../../../source/types/isUndefined.js","../../../source/utilities/hasLength.js","../../../source/types/isNull.js","../../../source/types/hasValue.js","../../../source/utilities/returnValue.js","../../../source/arrays/each.js","../../../source/arrays/compactMap.js","../../../source/arrays/eachAsync.js","../../../source/arrays/compactMapAsync.js","../../../source/numbers/isNegative.js","../../../source/arrays/range.js","../../../source/types/isArray.js","../../../source/classes/construct.js","../../../source/arrays/ensure.js","../../../source/arrays/flattenDeep.js","../../../source/utilities/forEach.js","../../../source/arrays/difference.js","../../../source/arrays/drop.js","../../../source/arrays/dropRight.js","../../../source/arrays/eachRight.js","../../../source/arrays/eachRightAsync.js","../../../source/arrays/every.js","../../../source/arrays/everyAsync.js","../../../source/arrays/filter.js","../../../source/arrays/filterAsync.js","../../../source/arrays/first.js","../../../source/arrays/flatten.js","../../../source/arrays/initial.js","../../../source/arrays/intersect.js","../../../source/arrays/invoke.js","../../../source/utilities/toPath.js","../../../source/utilities/get.js","../../../source/objects/keys.js","../../../source/objects/hasKeys.js","../../../source/types/isConstructor.js","../../../source/types/isTypeFactory.js","../../../source/types/isBuffer.js","../../../source/types/isPlainObject.js","../../../source/utilities/isEqual.js","../../../source/arrays/isMatch.js","../../../source/arrays/largest.js","../../../source/arrays/last.js","../../../source/arrays/map.js","../../../source/arrays/concurrentEach.js","../../../source/arrays/mapAsync.js","../../../source/arrays/mapRight.js","../../../source/arrays/mapWhile.js","../../../source/math/subtract.js","../../../source/arrays/sortNumberAscending.js","../../../source/arrays/partition.js","../../../source/math/subtractReverse.js","../../../source/arrays/sortNumberDescening.js","../../../source/arrays/remove.js","../../../source/arrays/rest.js","../../../source/arrays/right.js","../../../source/math/randomInt.js","../../../source/numbers/isNumberEqual.js","../../../source/internal/array.js","../../../source/arrays/shuffle.js","../../../source/arrays/sample.js","../../../source/arrays/smallest.js","../../../source/arrays/getNumberInsertIndex.js","../../../source/arrays/take.js","../../../source/arrays/takeRight.js","../../../source/arrays/unique.js","../../../source/arrays/union.js","../../../source/arrays/untilFalse.js","../../../source/arrays/untilTrue.js","../../../source/arrays/whileCompactMap.js","../../../source/arrays/whileEach.js","../../../source/arrays/whileMap.js","../../../source/arrays/without.js","../../../source/arrays/xor.js","../../../source/arrays/zip.js","../../../source/buffers/ensure.js","../../../source/buffers/clear.js","../../../source/types/isFunction.js","../../../source/types/isNumber.js","../../../source/types/isString.js","../../../source/objects/assign.js","../../../source/classes/extendClass.js","../../../source/collection/countBy.js","../../../source/collection/countKey.js","../../../source/collection/countWithoutKey.js","../../../source/collection/findIndexCache.js","../../../source/collection/findIndex.js","../../../source/collection/findItem.js","../../../source/collection/sortCollectionDescending.js","../../../source/collection/getLowest.js","../../../source/collection/sortCollectionAscending.js","../../../source/collection/getHighest.js","../../../source/collection/groupBy.js","../../../source/collection/indexBy.js","../../../source/collection/invoke.js","../../../source/collection/invokeAsync.js","../../../source/objects/pluckObject.js","../../../source/collection/pluck.js","../../../source/collection/sortCollectionAlphabetically.js","../../../source/collection/sortCollectionAlphabeticallyReverse.js","../../../source/files/getExtension.js","../../../source/files/getFilename.js","../../../source/internal/regexTestFactory.js","../../../source/files/isFileCSS.js","../../../source/files/isFileHTML.js","../../../source/files/isFileJS.js","../../../source/files/isFileJSON.js","../../../source/functions/after.js","../../../source/functions/ary.js","../../../source/functions/before.js","../../../source/objects/eachAsync.js","../../../source/objects/each.js","../../../source/utilities/forEachAsync.js","../../../source/types/isSet.js","../../../source/utilities/forOf.js","../../../source/types/isGenerator.js","../../../source/utilities/forOfAsync.js","../../../source/types/isAsync.js","../../../source/utilities/generateLoop.js","../../../source/utilities/each.js","../../../source/functions/chain.js","../../../source/functions/curry.js","../../../source/functions/curryRight.js","../../../source/utilities/noop.js","../../../source/utilities/times.js","../../../source/utilities/timer.js","../../../source/internal/apply.js","../../../source/functions/debounce.js","../../../source/functions/ifInvoke.js","../../../source/functions/negate.js","../../../source/functions/nthArg.js","../../../source/functions/once.js","../../../source/types/getType.js","../../../source/types/cloneType.js","../../../source/utilities/forOfMap.js","../../../source/utilities/forOfMapAsync.js","../../../source/objects/mapAsync.js","../../../source/objects/map.js","../../../source/utilities/map.js","../../../source/functions/over.js","../../../source/objects/everyAsync.js","../../../source/objects/every.js","../../../source/utilities/forOfEvery.js","../../../source/utilities/forOfEveryAsync.js","../../../source/utilities/every.js","../../../source/functions/overEvery.js","../../../source/functions/rearged.js","../../../source/functions/throttle.js","../../../source/functions/wrap.js","../../../source/utilities/cacheNativeMethod.js","../../../source/internal/object.js","../../../source/internal/isSame.js","../../../source/math/add.js","../../../source/math/deduct.js","../../../source/math/divide.js","../../../source/math/increment.js","../../../source/math/multiple.js","../../../source/math/progress.js","../../../source/math/randomFloat.js","../../../source/math/remainder.js","../../../source/math/subtractAll.js","../../../source/math/sumAll.js","../../../source/numbers/isNumberInRange.js","../../../source/numbers/isNumberNotInRange.js","../../../source/numbers/isPositive.js","../../../source/numbers/isZero.js","../../../source/numbers/isOdd.js","../../../source/numbers/isEven.js","../../../source/objects/getEntries.js","../../../source/objects/compactKeys.js","../../../source/objects/compactMapAsync.js","../../../source/objects/compactMap.js","../../../source/objects/filter.js","../../../source/objects/filterAsync.js","../../../source/objects/invert.js","../../../source/objects/isMatch.js","../../../source/regexps/escapeRegex.js","../../../source/regexps/arrayToRegex.js","../../../source/types/isRegex.js","../../../source/objects/omit.js","../../../source/objects/pick.js","../../../source/objects/size.js","../../../source/objects/zip.js","../../../source/strings/camelCase.js","../../../source/strings/kebabCase.js","../../../source/strings/snakeCase.js","../../../source/strings/upperCase.js","../../../source/strings/lowerCase.js","../../../source/strings/range.js","../../../source/strings/replace.js","../../../source/strings/sanitize.js","../../../source/strings/tokenize.js","../../../source/strings/truncate.js","../../../source/strings/typography.js","../../../source/types/getTypeName.js","../../../source/types/isArguments.js","../../../source/types/isMap.js","../../../source/types/isTypedArray.js","../../../source/types/noValue.js","../../../source/types/isArrayLike.js","../../../source/types/isBigInt.js","../../../source/types/isBoolean.js","../../../source/types/isArrayBuffer.js","../../../source/types/isChild.js","../../../source/types/isCloneable.js","../../../source/types/isDate.js","../../../source/types/isEmpty.js","../../../source/types/isFalse.js","../../../source/types/isF32.js","../../../source/types/isF64.js","../../../source/types/isFloat.js","../../../source/types/isI16.js","../../../source/types/isI32.js","../../../source/types/isI8.js","../../../source/types/isIterable.js","../../../source/types/isPromise.js","../../../source/types/isKindAsync.js","../../../source/types/isParent.js","../../../source/types/isPrimitive.js","../../../source/types/isRelated.js","../../../source/types/isSafeInt.js","../../../source/types/isSameType.js","../../../source/types/isTrue.js","../../../source/types/isU16.js","../../../source/types/isU32.js","../../../source/types/isU8.js","../../../source/types/isU8C.js","../../../source/types/isWeakMap.js","../../../source/types/isDeno.js","../../../source/types/isNode.js","../../../source/types/isTruthy.js","../../../source/types/isFalsy.js","../../../source/utilities/ifValue.js","../../../source/utilities/notEqual.js","../../../source/utilities/json.js","../../../source/utilities/assert.js","../../../source/utilities/bindAll.js","../../../source/utilities/clear.js","../../../source/utilities/clone.js","../../../source/utilities/concurrent.js","../../../source/utilities/compact.js","../../../source/utilities/forOfCompactMapAsync.js","../../../source/utilities/forOfCompactMap.js","../../../source/utilities/compactMap.js","../../../source/utilities/everyArg.js","../../../source/utilities/forOfFilter.js","../../../source/utilities/forOfFilterAsync.js","../../../source/utilities/filter.js","../../../source/utilities/flow.js","../../../source/utilities/flowAsync.js","../../../source/utilities/forMap.js","../../../source/utilities/arraysToObject.js","../../../source/utilities/has.js","../../../source/utilities/hasDot.js","../../../source/utilities/ifNotAssign.js","../../../source/utilities/interval.js","../../../source/utilities/merge.js","../../../source/utilities/model.js","../../../source/utilities/pair.js","../../../source/utilities/concurrentStatus.js","../../../source/utilities/promise.js","../../../source/utilities/propertyMatch.js","../../../source/utilities/setKey.js","../../../source/utilities/setValue.js","../../../source/utilities/store.js","../../../source/utilities/stubArray.js","../../../source/utilities/stubFalse.js","../../../source/utilities/stubObject.js","../../../source/utilities/stubString.js","../../../source/utilities/stubTrue.js","../../../source/utilities/timesAsync.js","../../../source/utilities/toggle.js","../../../source/utilities/uid.js","../../../source/utilities/virtualStorage.js","../../../source/utilities/inAsync.js","../../../source/utilities/inSync.js","../../../source/browser/agent.js","../../../source/browser/event.js","../../../source/browser/isEnter.js","../../../source/browser/frag.js","../../../source/browser/append.js","../../../source/browser/attribute.js","../../../source/browser/selector.js","../../../source/browser/importScript.js","../../../source/browser/ready.js","../../../source/browser/info.js","../../../source/browser/dimensions.js","../../../source/browser/storage.js","../../../source/browser/console.js","../../../source/browser/is.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = isArray(propertyString) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [\n\t\tkey,\n\t\tvalue\n\t] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = isIterateeAsync ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = isIterateeAsync ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","/**\n * Checks if a number is odd & returns true or false.\n *\n * @function isOdd\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isOdd, assert } from '@universalweb/acid';\n * assert(isOdd(1), true);\n */\nexport function isOdd(source) {\n\treturn (source & 1) === 1;\n}\n","/**\n * Checks if a number is even & returns true or false.\n *\n * @function isEven\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEven, assert } from '@universalweb/acid';\n * assert(isEven(1), true);\n */\nexport function isEven(source) {\n\treturn (source & 1) === 0;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst source = {};\n\teachArray(properties, (item, key) => {\n\t\tsource[item] = values[key];\n\t});\n\treturn source;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst objectKeys = [];\n\tconst objectValues = [];\n\teachObject(object, (item, key) => {\n\t\tobjectKeys.push(key);\n\t\tobjectValues.push(item);\n\t});\n\treturn [\n\t\tobjectKeys,\n\t\tobjectValues,\n\t];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(\n\tcompactMapArray,\n\tcompactMapAsyncArray,\n\tcompactMapObject,\n\tcompactMapAsyncObject,\n\tforOfCompactMap,\n\tforOfCompactMapAsync\n);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn ((isEqual(on, value)) ? off : on);\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from '../objects/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isBoolean } from '../types/isBoolean.js';\nimport { keys } from '../objects/keys.js';\nimport { noop } from '../utilities/noop';\n/**\n * Checks to see of the browser agent has a string.\n *\n * @function isAgent\n * @category browser\n * @type {Function}\n * @param {String} source - The string to search for.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isAgent, assert } from '@universalweb/acid';\n * assert(isAgent('NotThere'), false);\n */\nexport function isAgent(source) {\n\treturn (hasValue(source)) ? isAgent[source] : keys(isAgent);\n}\nconst userAgent = globalThis.navigator?.userAgentData;\nif (userAgent) {\n\teachObject(userAgent, (value, key) => {\n\t\tif (isBoolean(value) && value) {\n\t\t\tisAgent[key] = value;\n\t\t}\n\t});\n\teachArray(userAgent.brands, (value) => {\n\t\tisAgent[value.brand] = value.version;\n\t});\n} else if (navigator.userAgent) {\n\tlet userAgentNormalized = navigator.userAgent.toLowerCase();\n\tuserAgentNormalized = userAgentNormalized.replace(/_/g, '.');\n\tuserAgentNormalized = userAgentNormalized.replace(/[#_,;()]/g, '');\n\tconst userAgentSplit = userAgentNormalized.split(/ |\\//);\n\teachArray(userAgentSplit, (item) => {\n\t\tisAgent[item] = true;\n\t});\n}\n\n","/**\n * Attaches an event listener to a node.\n *\n * @function eventAdd\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventAdd(document.body, 'click', () => {console.log('CLICKED');});\n * // = > document.body\n */\nexport function eventAdd(node, eventName, callback, useCapture) {\n\tnode.addEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n/**\n * Attaches an event listener to a node.\n *\n * @function eventRemove\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventRemove(document.body, () => {console.log('CLICKED');});\n * // = > Undefined\n */\nexport function eventRemove(node, eventName, callback, useCapture) {\n\tnode.removeEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n\n","/**\n * Checks if the keycode of the event is strictly equal to 13.\n *\n * @function isEnter\n * @category browser\n * @type {Function}\n * @param {Object} eventObject - Object to be checked.\n * @returns {Boolean} - Returns true if the keycode property of the object equals 13.\n *\n * @example\n * isEnter('click');\n * // => false\n */\nexport function isEnter(eventObject) {\n\treturn eventObject.keyCode === 13;\n}\n\n","/**\n * Create a document fragment.\n *\n * @function createFragment\n * @category browser\n * @type {Function}\n * @ignore\n * @returns {Fragment} - Returns a new document fragment.\n */\nexport const createFragment = document.createDocumentFragment.bind(document);\n","/**\n * Append a DOM node.\n *\n * @function append\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @ignore\n * @param {Node} parentNode - The parent node.\n * @param {Node} child - The node to be appended.\n * @returns {undefined} - Returns the child.\n */\nexport function append(parentNode, child) {\n\tparentNode.appendChild(child);\n\treturn child;\n}\n","import { eachObject } from '../objects/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { mapArray } from '../arrays/map.js';\nimport { zipObject } from '../objects/zip.js';\n/**\n * Assign attributes to a DOM node.\n *\n * @function nodeAttribute\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @async\n * @param {Node} node - The DOM node.\n * @param {Object|Array} object - Object with key being the attribute name and the value being the attribute value. If an array is given it will get the values corresponding to the array items.\n * @returns {Object|Node} - If using an array this returns an object of attribute names as keys and their values as the property value. If using an object this will return the provided node.\n *\n * @example\n * nodeAttribute(document.body, { 'data-example': 'test'});\n */\nexport function nodeAttribute(node, object) {\n\tif (isArray(object)) {\n\t\treturn zipObject(object, mapArray(object, (item) => {\n\t\t\treturn node.getAttribute(item);\n\t\t}));\n\t}\n\teachObject(object, (item, key) => {\n\t\tnode.setAttribute(key, item);\n\t});\n\treturn node;\n}\n\n","import { restString } from '../strings/range.js';\nconst dotString = '.';\nconst poundString = '#';\nconst classTest = /^.[\\w_-]+$/;\nconst tagTest = /^[A-Za-z]+$/;\nconst regexSpace = /\\s/;\n/**\n * Wrapper around getElementsByClassName.\n *\n * @function getByClass\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByClass = document.getElementsByClassName.bind(document);\n/**\n * Wrapper around getElementsByTagName.\n *\n * @function getByTag\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByTag = document.getElementsByTagName.bind(document);\n/**\n * Wrapper around getElementsByIdName.\n *\n * @function getById\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getById = document.getElementById.bind(document);\n/**\n * Wrapper around querySelector.\n *\n * @function querySelector\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelector = document.querySelector.bind(document);\n/**\n * Wrapper around querySelectorAll.\n *\n * @function querySelectorAll\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelectorAll = document.querySelectorAll.bind(document);\n/**\n * Returns relevant DOM node.\n *\n * @function selector\n * @category browser\n * @ignoreTest\n * @param {String} select - String to be evaluated.\n * @type {Function}\n * @returns {Node} - Returns a DOM node.\n *\n * @example\n * selector('#node');\n * // =>
\n */\nexport function selector(select) {\n\tconst firstLetter = select[0];\n\tswitch (firstLetter) {\n\t\tcase poundString: {\n\t\t\tif (!regexSpace.test(select)) {\n\t\t\t\treturn getById(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase dotString: {\n\t\t\tif (classTest.test(select)) {\n\t\t\t\treturn getByClass(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tif (tagTest.test(select)) {\n\t\t\t\treturn getByTag(select);\n\t\t\t}\n\t\t}\n\t}\n\treturn querySelectorAll(select);\n}\n\n","import { append } from './append.js';\nimport { eventAdd } from './event.js';\nimport { hasDot } from '../utilities/hasDot.js';\nimport { nodeAttribute } from './attribute.js';\nimport { promise } from '../utilities/promise.js';\nimport { querySelector } from './selector.js';\nconst createElementCache = document.createElement.bind(document);\nconst nodeAttachLoadingEvents = (node) => {\n\treturn promise((accept) => {\n\t\teventAdd(node, 'load', accept, true);\n\t\teventAdd(node, 'error', accept, true);\n\t\tappend(querySelector('head'), node);\n\t});\n};\n/**\n * Asynchronously import a js file and append it to the head node.\n * If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity.\n *\n * @function importjs\n * @category browser\n * @type {Function}\n * @async\n * @param {*} url - URL of the script to import. If not \".\" is found in the file name \".js\" will be appended.\n * @returns {Promise} - Returns a promise which returns a \"load\" or \"error\" event associated with the script.\n *\n * @example\n * importjs('core.js');\n * importjs('core');\n */\nexport function importjs(url) {\n\tconst src = hasDot(url) && url || `${url}.js`;\n\tconst node = nodeAttribute(createElementCache('script'), {\n\t\tasync: '',\n\t\tsrc\n\t});\n\treturn nodeAttachLoadingEvents(node);\n}\n\n","import { eventAdd } from './event.js';\nimport { getById } from './selector.js';\nimport { importjs } from './importScript.js';\n/**\n * Runs a function if the document has finished loading. If not, add an eventlistener.\n *\n * @function isDocumentReady\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Function} callable - Function to be run.\n * @returns {Boolean|Function} - If the document is ready, returns a function. If not, return false.\n *\n * @example\n * isDocumentReady(() => {return 1});\n * // => 1\n */\nexport function isDocumentReady(callable) {\n\tconst state = document.readyState;\n\tconst checkStatus = state === 'interactive' || state === 'completed' || state === 'complete';\n\tif (checkStatus) {\n\t\treturn (callable) ? callable() : true;\n\t}\n\tif (callable) {\n\t\teventAdd(document, 'DOMContentLoaded', callable);\n\t}\n\treturn false;\n}\nisDocumentReady(() => {\n\tconst scriptTag = getById('AcidLib');\n\tconst scriptName = (scriptTag && scriptTag.getAttribute('data-index')) || '/index';\n\timportjs(scriptName);\n});\n","const protocol = location.protocol;\nconst protocolSocket = (protocol === 'http:') ? 'ws' : 'wss';\nconst hostname = location.hostname;\n/**\n * Holds client hardware, browser, and host info.\n *\n * @memberof $\n * @category browser\n * @ignoreTest\n * @property {Object} info - Client hardware & host info.\n * @type {Object}\n */\nexport const info = {\n\thardware: {\n\t\tcores: navigator.hardwareConcurrency\n\t},\n\thost: {\n\t\tname: hostname,\n\t\tprotocol,\n\t\tprotocolSocket,\n\t}\n};\n\n","import { assign } from '../objects/assign.js';\nimport { eventAdd } from './event.js';\nimport { info } from './info.js';\nimport { isDocumentReady } from './ready.js';\nexport function saveDimensions() {\n\tassign(info, {\n\t\tbodyHeight: document.body.offsetHeight,\n\t\tbodyWidth: document.body.offsetWidth,\n\t\twindowHeight: window.innerHeight,\n\t\twindowWidth: window.innerWidth,\n\t});\n}\n/**\n * Save current document & window dimensions to the info property.\n *\n * @function updateDimensions\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * updateDimensions();\n */\nexport function updateDimensions() {\n\tsaveDimensions();\n}\nisDocumentReady(updateDimensions);\neventAdd(window, 'load', updateDimensions, true);\neventAdd(window, 'resize', updateDimensions, true);\n\n","/**\n * LocalStorage Module..\n *\n * @module browser/storage\n */\nimport { hasValue } from '../types/hasValue.js';\nimport { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nimport { virtualStorage } from '../utilities/virtualStorage.js';\nexport let hasLocal;\nfunction hasStorage(storeCheck) {\n\ttry {\n\t\tstoreCheck().removeItem('TESTING');\n\t\thasLocal = true;\n\t} catch (e) {\n\t\thasLocal = false;\n\t}\n}\nhasStorage(() => {\n\treturn localStorage;\n});\n/**\n * Constructs a virtual storage container with localStorage support.\n * BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported.\n * If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed.\n * BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed.\n *\n * @class BrowserStorage\n * @category browser\n * @returns {BrowserStorage} - Returns a new instance of BrowserStorage.\n *\n * @example\n * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n * const storageBrowserStorage = construct(BrowserStorage);\n * storageBrowserStorage.setItem('key', 'value');\n * assert(storageBrowserStorage.getItem('key'), 'value');\n */\nexport class BrowserStorage {\n\tconstructor(initialObject) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local = localStorage;\n\t\t}\n\t\tthis.storage = virtualStorage(initialObject);\n\t}\n\thasLocal = hasLocal;\n\t/**\n\t * Save an item to a browserStorage.\n\t *\n\t * @function setItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.setItem(key, (isString(value)) ? value : stringify(value));\n\t\t}\n\t\treturn this.storage.setItem(key, value);\n\t}\n\t/**\n\t * Get an item from a browserStorage.\n\t *\n\t * @function getItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tgetItem(key) {\n\t\tconst item = this.storage.getItem(key);\n\t\tif (hasValue(item)) {\n\t\t\treturn item;\n\t\t}\n\t\tif (!hasValue(item) && this.hasLocal) {\n\t\t\treturn this.local.getItem(key);\n\t\t}\n\t}\n\t/**\n\t * Clears all data for the browserStorage including all of localStorage if supported.\n\t *\n\t * @function clear\n\t * @class BrowserStorage\n\t * @category browser\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.clear();\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tclear() {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.clear();\n\t\t}\n\t\tthis.storage.clear();\n\t}\n\t/**\n\t * Remove an item from a browserStorage.\n\t *\n\t * @class BrowserStorage\n\t * @category browser\n\t * @function removeItem\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.removeItem('key');\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tremoveItem(key) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.removeItem(key);\n\t\t}\n\t\tthis.storage.removeItem(key);\n\t}\n}\n/**\n * The browserStorage function is a factory which wraps the BrowserStorage class constructor.\n *\n * @function browserStorage\n * @category browser\n * @type {Function}\n * @returns {*} - Returns a new BrowserStorage Object.\n *\n * @example\n * const storageBrowserStorage = browserStorage();\n * // => New BrowserStorage Object\n */\nexport function browserStorage(virtualFlag) {\n\treturn new BrowserStorage(virtualFlag);\n}\n\n","import { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nconst generateTheme = (color, bg) => {\n\treturn `color:${color};background:${bg};`;\n};\nexport const themes = {\n\talert: generateTheme('#fff', '#f44336'),\n\timportant: generateTheme('#fff', '#E91E63'),\n\tnotify: generateTheme('#fff', '#651FFF'),\n\twarning: generateTheme('#000', '#FFEA00'),\n};\n/**\n * Console.trace wrapper with theme support.\n *\n * @function cnsl\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Object} value - The value to be logged.\n * @param {String} themeName - The name of the theme to be used.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnsl('Lucy', 'notify');\n * // 'Lucy'\n */\nexport const cnsl = (value, themeName) => {\n\tconst data = isString(value) ? value : stringify(value);\n\tif (themeName === 'alert' || themeName === 'warning') {\n\t\treturn console.trace(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n\t}\n\tconsole.log(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n};\n/**\n * Create color themes for cnsl method.\n *\n * @function cnslTheme\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {String} themeName - The name of the theme.\n * @param {String} color - The text color.\n * @param {String} background - The background color of the block.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnslTheme('BlackNWhite', '#fff', '#000');\n */\nexport const cnslTheme = (themeName, color, background) => {\n\tthemes[themeName] = generateTheme(color, background);\n};\n\n","import { difference } from '../arrays/difference.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Checks if value is a plain DOM Node.\n *\n * @function isDom\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDom, assert } from '@universalweb/acid';\n * assert(isDom(document.querySelectorAll('head')), true);\n */\nexport function isDom(source) {\n\treturn source && source.nodeType !== 9;\n}\n/**\n * Checks if the value is a HTMLCollection.\n *\n * @function isHTMLCollection\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isHTMLCollection, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isHTMLCollection(document.getElementsByClassName('test')), true);\n */\nconst objectHTMLCollection = '[object HTMLCollection]';\nexport function isHTMLCollection(source) {\n\treturn (hasValue(source)) ? source.toString() === objectHTMLCollection : false;\n}\n/**\n * Checks if the value is a NodeList.\n *\n * @function isNodeList\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNodeList, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isNodeList(document.querySelectorAll('.test')), true);\n */\nconst objectNodeList = '[object NodeList]';\nexport function isNodeList(source) {\n\treturn (hasValue(source)) ? source.toString() === objectNodeList : false;\n}\n"],"names":["sign","random","normalizeCase","space","returnFlow"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,EAAE;AACvC,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;AACpB,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;AACf,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK;AAC9B,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC,EAAE;AACrB,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpB,GAAG,IAAI,GAAG,EAAE;AACZ,IAAI,KAAK,EAAE,CAAC;AACZ,IAAI;AACJ,GAAG;AACH,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5B,EAAE,CAAC,CAAC;AACJ,CAAC,OAAO,OAAO,CAAC;AAChB;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,MAAM,EAAE;AACnC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;AACnB,CAAC,OAAO,MAAM,CAAC;AACf;;AChBA;AACA;AAC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IAAI,CAAC,KAAK,EAAE,OAAO,EAAE;AACrC,CAAC,OAAO,CAAC,GAAG,GAAG,KAAK;AACpB,EAAE,OAAO,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC,CAAC;AAChC,EAAE,CAAC;AACH;;ACpBA,MAAM,iBAAiB,GAAG,QAAQ,CAAC,SAAS,CAAC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,MAAM,EAAE;AAC1C,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5C;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,MAAM,CAAC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,MAAM,CAAC,yBAAyB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,MAAM,CAAC,eAAe;AACjC,MAAC,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,cAAc;;AC/C9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,CAAC;;ACd7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE;AACpC,CAAC,OAAO,MAAM,GAAG,MAAM,CAAC;AACxB;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,MAAM,CAAC,MAAM,EAAE;AAC/B,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;AACnB;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE;AACtC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;AACvB;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS,CAAC,MAAM,EAAE;AAClC,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;AACnB;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE;AACxC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;AACvB;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE;AACnD,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE;AAClB,EAAE,OAAO,KAAK,CAAC;AACf,EAAE;AACF,CAAC,IAAI,aAAa,KAAK,CAAC,EAAE;AAC1B,EAAE,OAAO,CAAC,CAAC;AACX,EAAE;AACF,CAAC,OAAO,CAAC,aAAa,GAAG,KAAK,IAAI,GAAG,CAAC;AACtC;;ACtBA,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,EAAE;AAC1C,CAAC,OAAO,MAAM,EAAE,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AACrC;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS,CAAC,MAAM,EAAE,KAAK,E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DAAiD,CAAC,CAAC,CAAC;AAC7G,EAAE;AACF,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,iDAAiD,CAAC,CAAC,CAAC;AACnG,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,KAAK;AAC3D,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACtD;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,MAAM,EAAE;AAC9B,CAAC,OAAO,MAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,CAAC;AACxC,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAChD,SAAS,gBAAgB,CAAC,MAAM,EAAE;AACzC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,QAAQ,EAAE,KAAK,oBAAoB,GAAG,KAAK,CAAC;AAChF,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,cAAc,GAAG,mBAAmB,CAAC;AACpC,SAAS,UAAU,CAAC,MAAM,EAAE;AACnC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,QAAQ,EAAE,KAAK,cAAc,GAAG,KAAK,CAAC;AAC1E;;;;"} \ No newline at end of file diff --git a/build/module/browser/index.js b/build/module/browser/index.js index 8233df5..4824c67 100644 --- a/build/module/browser/index.js +++ b/build/module/browser/index.js @@ -1,2 +1,2 @@ -function t(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e}function n(t){return t.length=0,t}function e(t){return t.slice()}function r(t){return void 0===t}function o(t){return Boolean(t.length)}function c(t){return null===t}function u(t){return!r(t)&&!c(t)}function i(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const f=n.call(r,t,c,e,i,s,o);u(f)&&e.push(f)})):s(t,((t,c,i,s)=>{const f=n(t,c,e,i,s,r,o);u(f)&&e.push(f)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const c=await n(t,r,e,o);u(c)&&e.push(c)})),e}const{sign:h}=Math;function d(t){return-1===h(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}function m(t,n,e=1,r=[]){return d(e)?r:t{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function $(t,n=1,e=t.length){return t.splice(n,e)}const S=(t,n=1,e=t.length)=>$(t,0,e-n);function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function C(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function j(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,c,u,r)&&e.push(t)})),e}async function L(t,n,e=[],r){return await a(t,(async(t,o,c,u)=>{!0===await n(t,o,e,c,u,r)&&e.push(t)})),e}function T(t,n){return n?t.slice(0,n):t[0]}function B(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e}function N(t){return t.slice(0,t.length-1)}function R(t,...n){return f(t,(t=>{if(j(n,(n=>n.includes(t))))return t}))}function P(t,n,e){if(!t)return;const r=t.length;if(u(e))for(let o=0;o(e=e[t],u(e)))),e}const q=Object.keys;function z(t){if(t)return q(t)}const H=Object.hasOwn;function W(t,...n){if(t)return j(n,(n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}}))}function G(t,...n){if(t)return Boolean(n.find((n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}})))}function V(t,n){return t?.constructor===n||!1}function J(t){return n=>V(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...e){return e?t(n)&&j(e,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!u(t)&&"Object("===t.constructor.toString().trim().slice(9,16),et=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const e=z(t);if(W(n,e))return j(e,(e=>et(t[e],n[e])))}else if(w(t)&&t.length===n.length)return j(t,((t,e)=>et(t,n[e])));return!1};function rt(t,n){return t.length===n.length&&j(t,((t,e)=>et(n[e],t)))}const ot=Math.max;function ct(t){return ot(...t)}function ut(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]}function it(t,n,e=[],r,o){return u(r)?s(t,((t,c,u,i)=>{e[c]=n.call(r,t,c,e,u,i,o)})):s(t,((t,r,c,u)=>{e[r]=n(t,r,e,c,u,o)})),e}async function st(t,n,e){if(!t)return;const r=[],o=t.length;if(e)for(let c=0;c{e[r]=await n(t,r,e,o)})),e}function at(t,n,e=[],r){let o=0;const c=t.length;for(let u=c-1;u>=0;u--)e[o]=n(t[u],u,t,c,r),o++;return e}function lt(t,n,e=[],r){const o=t.length;for(let c=0;c{if(n(t,r))return t;e.push(t)})),e]}function pt(t,n){return n-t}function mt(t){return t.sort(pt)}function wt(t,n){let e=t.length;for(let r=0;re)return Mt(t);if(1===n)return[t[Et(e-1,0)]];const r=[],o={};let c,u=0;for(;u(e=r,n>=t&&(e=r+1,!0)))),e}function Lt(t,n=1){return t.slice(0,n)}function Tt(t,n=1){const e=t.length;return t.slice(e-n,e)}function Bt(t,n,e){return e.indexOf(t)===n}function Nt(t,n,e){return t!==e[n-1]}function Rt(t,n){return n?t.filter(Nt):t.filter(Bt)}function Pt(...t){return Rt(I(t))}function Ut(t,n){const e=t.length;for(let r=0;r!e.has(t)))}function zt(...t){const n=v(Map),e=[];return 2===t.length?x(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&e.push(t.child)})),e)}function Ht(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Wt(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Gt(t){return tt(t)&&t||u(t)&&Buffer.from(t)||Buffer.alloc(0)}function Vt(t){return t.fill(0),t}const Jt=t=>!!u(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=J(String);function tn(t){return!Yt(t)}const nn=Object.assign;function en(t,n){if(nt(n))nn(t,n);else if(Jt(n)){const e=n.name;e?t[e]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function rn(t,...n){const e=n.length;for(let r=0;r{r=n(t),e[r]||(e[r]=0),e[r]++})),e}function sn(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e}function fn(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e}function an(t,n,e,r,o){if(t[o]===r)return!0}function ln(t,n,e="id"){const r=t.findIndex(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function hn(t,n,e="id"){const r=t.find(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function dn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?-1:0:1:-1}function gn(t,n="id",e){return t.sort(((t,r)=>dn(t,r,n,e)))}function pn(t,n){return gn(t,n,!1)[0]}function mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?1:0:-1:1}function wn(t,n="id",e){return t.sort(((t,r)=>mn(t,r,n,e)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e}function vn(t,n="id"){const e={};return s(t,(t=>{e[t[n]]=t})),e}function An(t,n,e,r){return it(t,r?(t,o)=>t[n].call(r,e):(t,r)=>t[n](e))}function In(t,n,e,r){return ft(t,r?t=>t[n].call(r,e):async t=>t[n](e))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function xn(t,n){return it(t,(t=>En(t,n)))}function $n(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):o.localeCompare(c)}function Sn(t,n="id",e){return t.sort(((t,r)=>$n(t,r,n,e)))}function Mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c.localeCompare(o)}function Cn(t,n="id",e){return t.sort(((t,r)=>Mn(t,r,n,e)))}function jn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function On(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Fn(t){return n=>!!u(n)&&t.test(n)}const Ln=Fn(/\.css$/),Tn=Fn(/\.html$/),Bn=Fn(/\.js$/),Nn=Fn(/\.json$/);function Rn(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)}function Pn(t,n){return(...e)=>t(...e.splice(0,n))}function Un(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)}const _n=async(t,n,e,r)=>{if(!t)return;const o=z(t);return u(e)?await a(o,((c,u,i,s)=>n.call(e,t[c],c,t,s,o,r))):await a(o,((e,c,u,i)=>n(t[e],e,t,i,o,r))),t};function kn(t,n,e,r){if(!t)return;const o=z(t);return u(e)?s(o,((o,c,u,i)=>{n.call(e,t[o],o,t,i,u,r)})):s(o,((e,o,c,u)=>{n(t[e],e,t,u,c,r)})),t}async function Dn(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{let h;const d=Jn(s);if(u(i)&&s)return h=w(i)?d?n:t:nt(i)||Jt(i)?d?r:e:o?d?c:o:Wn(i)?c:d?r:e,h(i,s,f,a,l)}}const Qn=Kn(s,a,kn,_n,zn,Gn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function te(t,e=t.length){const r=[],o=(...c)=>{if(r.push(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ne(t,e=t.length){const r=[],o=(...c)=>{if(r.unshift(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ee(){}function re(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ue=v(ce);function ie(t,n){return ue.set(t,n)}function se(){re(setTimeout(ee,0),(t=>{ue.remove(t)}))}const fe=Reflect.apply;function ae(t,n,e){if(Jt(t))return fe(t,n,e)}function le(t,n){function e(...t){!1!==e.id&&ue.remove(e.id),e.id=ie((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(ue.remove(e.id),e.id=!1)},e}function he(t,n,...e){if(Jt(t))return n?t.call(n,...e):t(...e)}function de(t){return(...n)=>!t(...n)}function ge(t=0){return(...n)=>n[t]}const pe=t=>{let n;return(...e)=>(u(n)||(n=t(...e)),n)};function me(t){return t?.constructor}function we(t,n=[]){const e=me(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function ye(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=Jt(r.set);for(const[e,c]of t){const u=n(c,e,r,t);o?r.set(e,u):r[e]=u}return r}async function be(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const c=Jt(o.set);for await(const[e,r]of t){const u=await n(r,e,o,t);c?o.set(e,u):o[e]=u}return o}async function ve(t,n,e={}){if(t)return await _n(t,(async(t,r,o,c,u)=>{e[r]=await n(t,r,e,o,c,u)})),e}function Ae(t,n,e={},r,o){if(t)return u(r)?kn(t,((t,c,u,i,s)=>{e[c]=n.call(r,t,c,e,u,i,s,o)})):kn(t,((t,r,c,u,i)=>{e[r]=n(t,r,e,c,u,i,o)})),e}const Ie=Kn(it,ft,Ae,ve,ye,be);function Ee(t){return(...n)=>Ie(t,(t=>t(...n)))}async function xe(t,n){if(!t)return;return O(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function $e(t,n){if(!t)return;return j(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function Se(t,n=i){if(w(t)||qn(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function Me(t,n=i,e){if(Wn(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(w(t)||qn(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const Ce=Kn(j,O,$e,xe,Se,Me);function je(t){return n=>Ce(t,(t=>t(n)))}function Oe(t,n){return(...e)=>t(...n.map((t=>e[t])))}function Fe(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=ie((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{ue.remove(e.id),e.id=!1},e}function Le(t,n){return(...e)=>n(t,...e)}const Te=Function.prototype;function Be(t){return Te.call.bind(t)}const Ne=Object.getOwnPropertyNames,Re=Object.getOwnPropertyDescriptor,Pe=Object.defineProperty,Ue=Be(Object.hasOwnProperty),_e=Object.is;function ke(t,n){return t+n}function De(t){return t-1}function Ze(t,n){return t/n}function qe(t){return t+1}function ze(t,n){return t*n}function He(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:We}=Math;function Ge(t,n=0){return We()*(t-n)+n}function Ve(t,n){return t%n}function Je(t){return t.reduce(((t,n)=>t-n),0)}function Ke(t){return t.reduce(((t,n)=>t+n),0)}function Qe(t,n,e){return t>n&&te}const{sign:Ye}=Math;function tr(t){return 1===Ye(t)}function nr(t){return 0===t}const er=Object.entries;function rr(t){if(u(t))return er(t)}function or(t){const n=[];return kn(t,((t,e)=>{u(t)&&n.push(e)})),n}async function cr(t,n=i,e={}){return await _n(t,(async(t,r,o,c,i)=>{const s=await n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function ur(t,n=i,e={}){return kn(t,((t,r,o,c,i)=>{const s=n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function ir(t,n,e={}){return kn(t,((t,r,o,c,u)=>{!0===n(t,r,e,o,c,u)&&(e[r]=t)})),e}async function sr(t,n,e={}){return await _n(t,(async(t,r,o,c,u)=>{!0===await n(t,r,e,o,c,u)&&(e[r]=t)})),e}function fr(t,n={}){if(t)return kn(t,((t,e)=>{n[t]=e})),n}const ar=(t,n)=>{if(t===n)return!0;const e=z(t),r=z(n);return e.length===r.length&&j(e,(e=>t[e]===n[e]))},lr=/[()[\]{}*+?^$|#.,/\\\s-]/g;function hr(t){return t.replace(lr,"\\$&")}function dr(t,n){return n?dr(it(t,hr)):RegExp(t.join("|"))}const gr=Q("RegExp"),pr=X(gr);function mr(t,n){if(!t)return{};if(w(n)){const e=dr(n);return ir(t,((t,n)=>!e.test(n)))}if(pr(n))return ir(t,((t,e)=>!n.test(e)));if(Yt(n))return ir(t,((t,e)=>e!==n));if(Qt(n)){const e=n.toString();return ir(t,((t,n)=>n!==e))}return Jt(n)?ir(t,((t,e)=>!n(t,e))):nn({},t)}const wr=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e};function yr(t){if(!t)return;if(nt(t))return z(t).length;const n=t.length;if(u(n))return n;const e=t.size;return u(n)?e:z(t).length}const br=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},vr=t=>{const n=[],e=[];return kn(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},Ar=/[ _-]+/g;function Ir(t){let n="";return t.replace(Ar," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Er=/[ _-]+/g,xr=/[ ]+/g;function $r(t){return t.replace(/([A-Z]+)/g," $1").replace(Er," ").trim().toLowerCase().replace(xr,"-")}const Sr=/[ _-]+/g,Mr=/[ ]+/g;function Cr(t){return t.replace(/([A-Z]+)/g," $1").replace(Sr," ").trim().toLowerCase().replace(Mr,"_")}const jr=/[ _-]+/g;function Or(t){return t.replace(/([A-Z]+)/g," $1").replace(jr," ").trim().toUpperCase()}const Fr=/[ _-]+/g;function Lr(t){return t.replace(/([A-Z]+)/g," $1").replace(Fr," ").trim().toLowerCase()}function Tr(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)}function Br(t,n=1){return t[t.length-n]}function Nr(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Rr(t,n=1){return t.slice(0,-1*n)}function Pr(t,n=1){return t.substring(n)}function Ur(t,n,e){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),e)}const _r=/%(?![\da-f]{2})/gi,kr=/&/g,Dr=//g,qr=/"/g;function zr(t){return decodeURIComponent(t.replace(_r,(()=>"%25")))}function Hr(t){return t.replace(kr,"&").replace(Dr,"<").replace(Zr,">").replace(qr,""")}function Wr(t){return Hr(zr(t))}const Gr=/\S+/g,Vr=/\w+/g;function Jr(t){return t.match(Gr)||[]}function Kr(t){return t.match(Vr)||[]}function Qr(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=e-n;for(;u=0&&(c=r[u]," "!==c);u--);return t.slice(0,u).trim()})(t,n,e):t}function Xr(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=n;for(;u0&&(c=r[u]," "!==c);u++);return t.substring(u,e).trim()})(t,n,e):t}const Yr=/\w+/g;function to(t){return t[0].toUpperCase()}function no(t){return to(t)+Pr(t)}function eo(t){return to(t)+Pr(t).toLowerCase()}function ro(t){return t.replace(Yr,(t=>no(t)))}function oo(t){return t.replace(Yr,(t=>eo(t)))}function co(t){return me(t)?.name}function uo(t){return!!u(t)&&"[object Arguments]"===t.toString()}const io=Q("Map"),so=X(io),fo=/Array/,ao="Array";function lo(t){if(t){const n=co(t);if(fo.test(n)&&n!==ao)return!0}return!1}function ho(t){return!u(t)}function go(t,n){if(ho(t)||Jt(t))return!1;if(w(t)||lo(t))return!0;const e=t.length;if(!ho(e)||!Qt(e)||e<0)return!1;if(n){const n=z(t);return!!n&&Ce(n,((t,n)=>n>=0&&Qt(n)))}return!0}const po=Q("BigInt"),mo=X(po),wo=Q("Boolean"),yo=X(wo),bo=Q("ArrayBuffer"),vo=X(bo);function Ao(t,n){return!(!t||!n)&&t instanceof n}const Io=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function Eo(t){if(u(t)){const n=t?.constructor?.name;return Io.test(n)}return!1}const xo=Q("Date"),$o=X(xo);function So(t){return Yt(t)||w(t)?!o(t):nt(t)?!yr(t):!u(t)}function Mo(t){return!1===t}const Co=Q("Float32Array"),jo=X(Co),Oo=Q("Float64Array"),Fo=X(Oo),{isInteger:Lo}=Number,To=Lo,Bo=Q("Int16Array"),No=X(Bo),Ro=Q("Int32Array"),Po=X(Ro),Uo=Q("Int8Array"),_o=X(Uo);function ko(t){return u(t)&&"function"==typeof t[Symbol.iterator]}function Do(t){return!!t&&t instanceof Promise}function Zo(t){return!!t&&(Do(t)||Jn(t)||Wn(t))}function qo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function zo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Ho(t,n){return!ho(t)&&!ho(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Wo}=Number,Go=Wo;function Vo(t,n){const e=me(t),r=me(n);return e===r&&e.name===r.name}function Jo(t){return!0===t}const Ko=Q("Uint16Array"),Qo=X(Ko),Xo=Q("Uint32Array"),Yo=X(Xo),tc=Q("Uint8Array"),nc=X(tc),ec=Q("Uint8ClampedArray"),rc=X(ec),oc=Q("WeakMap"),cc=X(oc),uc=void 0!==globalThis.Deno,ic=void 0!==globalThis.process&&process.versions&&process.versions.node;function sc(t,n=!0){return Boolean(t)&&n}function fc(t,n=!0){return!1===Boolean(t)&&n}function ac(t,n,e,r){if(u(t)){if(Jt(n))return e?ae(n,e,r):n(...r);if(nt(n))return n[e]=t,n}}function lc(t,n){return Mo(et(t,n))}const hc=JSON;function dc(t,n){if(t)return hc.parse(t,n)}const gc=hc.stringify;function pc(t,n,e){const r=globalThis.options||e;let o;return Jt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${gc(t)}\n\t\tExpected: ${gc(n)}`,r)}async function mc(t,n,e){const r=await t;return!(Jt(n)&&!1===await n(r,e))&&!lc(r,n)||pc(r,n,e)}function wc(t,n,e){if(Zo(t)||Zo(n))return mc(t,n,e);return!(Jt(n)&&!1===n(t,e))&&!lc(t,n)||pc(t,n,e)}function yc(t,n,e){const r=Ie(t,(t=>Jt(t)?t.bind(n):t));return e?rn(e,r):r}function bc(t){if(t){if(tt(t))return Vt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const vc=globalThis.structuredClone;function Ac(t){return vc(t)}async function Ic(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;csc(t)))}async function xc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);u(r)&&e.push(r)}return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);u(c)&&r(c)}return o}const c=Jt(o.set);for await(const[e,r]of t){const i=await n(r,e,o,t);u(i)&&(c?o.set(e,i):o[e]=i)}return o}function $c(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);u(c)&&o(c)}return r}const o=Jt(r.set);for(const[e,c]of t){const i=n(c,e,r,t);u(i)&&(o?r.set(e,i):r[e]=i)}return r}const Sc=Kn(f,l,ur,cr,$c,xc);function Mc(...t){return Jn(t[0])?async function(...n){return Ce(t,(async t=>Ce(n,(async n=>t(n)))))}:function(...n){return Ce(t,(t=>Ce(n,(n=>t(n)))))}}function Cc(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=Jt(r.set);for(const[o,c]of t){!0===n(c,o,r,t)&&(e?r.set(o,c):r[o]=c)}}return r}async function jc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=Jt(o.set);for await(const[r,c]of t){!0===await n(c,r,o,t)&&(e?o.set(r,c):o[r]=c)}}return o}const Oc=Kn(F,L,ir,sr,Cc,jc);function Fc(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const Lc=Fc(s),Tc=Fc(M);function Bc(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const Nc=Bc(a),Rc=Bc(C);function Pc(t,n){const e=we(t),r=e.push||e.add;if(r&&Jt(r)){const o=r.bind(e);t.forEach((t=>{const r=n(t,e);o(r)}))}else Jt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e}function Uc(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e}function _c(t,n,e){return!ho(t)&&!ho(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,e):pr(n)?n.test(t):Jt(n)?n(t):w(n)?j(n,(n=>_c(t,n))):Ce(n,(n=>_c(t,n))):w(t)?pr(n)?j(t,(t=>t.test(n))):Jt(n)?j(t,n):w(n)?j(n,(n=>_c(t,n))):t.includes(n,e):!!nt(t)&&(pr(n)?$e(t,(t=>t.test(n))):Jt(n)?$e(t,n):nt(n)?$e(t,((t,e)=>t===n[e])):$e(t,(t=>_c(t,n))))))}const kc=Fn(/\./),Dc=(t,n,e)=>(n&&!u(t[n])&&(t[n]=e),t);class Zc{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const qc=v(Zc);function zc(t,n){return qc.set(t,n)}function Hc(){re(setTimeout(ee,0),(t=>{qc.remove(t)}))}function Wc(t,...n){return Qn(n,(n=>{Qn(n,((n,e)=>{if(t[e]&&(nt(n)||w(n)||n.forEach))return Wc(t[e],n);t[e]=n}))})),t}class Gc{static models=new Map;constructor(t,n){u(n)?(rn(this,n),this.modelName=t,Gc.models.set(t,n)):rn(this,t)}delete(t){Gc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Gc.models.set(t||this.modelName,this)}has(t){return Gc.models.has(t||this.modelName)}get(t){return Gc.models.get(t||this.modelName)}}function Vc(t,n){return u(n)?v(Gc,[t,n]):Z(t,Gc.models)}function Jc(t,n){return[t,n]}function Kc(t,n,e){const r=t.length,o=[];for(let c=0;cj(e,(e=>et(t[e],n[e])));function Yc(t,n,e){return n&&nt(t)||Qt(n)&&w(t)?t[n]=e:t.set?t.set(n,e):t.push?t.push(e):t.add?t.add(e):t[n]=e,t}function tu(t,n,e){return Qt(e)&&w(t)?t[e]=n:t.push?t.push(n):t.add?t.add(n):t[e]=n,t}class nu{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;kn(t,(n=>{t[n]=new nu(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new nu(e),!0)})}}function eu(){return[]}function ru(){return!1}const ou=()=>({}),cu=()=>"",uu=()=>!0;async function iu(t,n){for(let e=0;e0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const lu=v(au);class hu{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):u(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=we(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function du(t){return new hu(t)}async function gu(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;c{yo(t)&&t&&(mu[n]=t)})),s(wu.brands,(t=>{mu[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{mu[t]=!0}))}function yu(t,n,e,r){return t.addEventListener(n,e,r),t}function bu(t,n,e,r){return t.removeEventListener(n,e,r),t}function vu(t){return 13===t.keyCode}const Au=document.createDocumentFragment.bind(document);function Iu(t,n){return t.appendChild(n),n}function Eu(t,n){return w(n)?br(n,it(n,(n=>t.getAttribute(n)))):(kn(n,((n,e)=>{t.setAttribute(e,n)})),t)}const xu=/^.[\w_-]+$/,$u=/^[A-Za-z]+$/,Su=/\s/,Mu=document.getElementsByClassName.bind(document),Cu=document.getElementsByTagName.bind(document),ju=document.getElementById.bind(document),Ou=document.querySelector.bind(document),Fu=document.querySelectorAll.bind(document);function Lu(t){switch(t[0]){case"#":if(!Su.test(t))return ju(Pr(t));break;case".":if(xu.test(t))return Mu(Pr(t));break;default:if($u.test(t))return Cu(t)}return Fu(t)}const Tu=document.createElement.bind(document);function Bu(t){const n=kc(t)&&t||`${t}.js`;return(t=>Qc((n=>{yu(t,"load",n,!0),yu(t,"error",n,!0),Iu(Ou("head"),t)})))(Eu(Tu("script"),{async:"",src:n}))}function Nu(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&yu(document,"DOMContentLoaded",t),!1)}Nu((()=>{const t=ju("AcidLib");Bu(t&&t.getAttribute("data-index")||"/index")}));const Ru=location.protocol,Pu="http:"===Ru?"ws":"wss",Uu=location.hostname,_u={hardware:{cores:navigator.hardwareConcurrency},host:{name:Uu,protocol:Ru,protocolSocket:Pu}};function ku(){rn(_u,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Du(){ku()}let Zu;Nu(Du),yu(window,"load",Du,!0),yu(window,"resize",Du,!0),function(t){try{t().removeItem("TESTING"),Zu=!0}catch(t){Zu=!1}}((()=>localStorage));class qu{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=du(t)}hasLocal=Zu;setItem(t,n){return this.hasLocal&&this.local.setItem(t,Yt(n)?n:gc(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return u(n)?n:!u(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}function zu(t){return new qu(t)}const Hu=(t,n)=>`color:${t};background:${n};`,Wu={alert:Hu("#fff","#f44336"),important:Hu("#fff","#E91E63"),notify:Hu("#fff","#651FFF"),warning:Hu("#000","#FFEA00")},Gu=(t,n)=>{const e=Yt(t)?t:gc(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},Vu=(t,n,e)=>{Wu[t]=Hu(n,e)};function Ju(t){return t&&9!==t.nodeType}function Ku(t){return!!u(t)&&"[object HTMLCollection]"===t.toString()}function Qu(t){return!!u(t)&&"[object NodeList]"===t.toString()}export{qu as BrowserStorage,Xn as Chain,Zc as Intervals,Gc as Model,nu as Store,ce as Timers,au as UniqID,hu as VirtualStorage,ke as add,Rn as after,Iu as append,ae as apply,dr as arrayToRegex,Uc as arraysToObject,Pn as ary,wc as assert,mc as assertAsync,rn as assign,on as assignToClass,en as assignToObject,Un as before,yc as bindAll,zu as browserStorage,Be as cacheNativeMethod,He as calcProgress,Ir as camelCase,Yn as chain,t as chunk,Nr as chunkString,bc as clear,n as clearArray,Vt as clearBuffer,Hc as clearIntervals,se as clearTimers,Ac as clone,e as cloneArray,we as cloneType,Gu as cnsl,Vu as cnslTheme,Ec as compact,or as compactKeys,Sc as compactMap,f as compactMapArray,l as compactMapAsyncArray,cr as compactMapAsyncObject,ur as compactMapObject,Ic as concurrent,st as concurrentEachArray,Kc as concurrentStatus,v as construct,K as constructorName,un as countBy,sn as countKey,fn as countWithoutKey,Au as createFragment,te as curry,ne as curryRight,le as debounce,De as deduct,Pe as defProp,x as difference,Ze as divide,$ as drop,S as dropRight,Qn as each,s as eachArray,a as eachAsyncArray,_n as eachAsyncObject,kn as eachObject,M as eachRight,C as eachRightAsync,A as ensureArray,Gt as ensureBuffer,nr as equalsZero,hr as escapeRegex,lr as escapeRegexRegex,yu as eventAdd,bu as eventRemove,Ce as every,Mc as everyArg,j as everyArray,O as everyAsyncArray,xe as everyAsyncObject,$e as everyObject,cn as extendClass,Oc as filter,F as filterArray,L as filterAsyncArray,sr as filterAsyncObject,ir as filterObject,ln as findIndex,an as findIndexCache,hn as findItem,T as first,B as flatten,I as flattenDeep,Lc as flow,Nc as flowAsync,Rc as flowAsyncRight,Tc as flowRight,E as forEach,Dn as forEachAsync,Pc as forMap,zn as forOf,Gn as forOfAsync,$c as forOfCompactMap,xc as forOfCompactMapAsync,Se as forOfEvery,Me as forOfEveryAsync,Cc as forOfFilter,jc as forOfFilterAsync,ye as forOfMap,be as forOfMapAsync,Kn as generateLoop,Z as get,Mu as getByClass,ju as getById,Cu as getByTag,rr as getEntries,jn as getFileExtension,On as getFilename,yn as getHighest,pn as getLowest,Ft as getNumberInsertIndex,Re as getPropDesc,Ne as getPropNames,me as getType,co as getTypeName,bn as groupBy,_c as has,G as hasAnyKeys,kc as hasDot,W as hasKeys,o as hasLength,Zu as hasLocal,Ue as hasProp,u as hasValue,Hr as htmlEntities,he as ifInvoke,Dc as ifNotAssign,ac as ifValue,Bu as importjs,gu as inAsync,pu as inSync,qe as increment,vn as indexBy,_u as info,N as initial,Rr as initialString,Tr as insertInRange,R as intersection,zc as interval,qc as intervals,fr as invert,P as invokeArray,An as invokeCollection,In as invokeCollectionAsync,mu as isAgent,uo as isArguments,w as isArray,vo as isArrayBuffer,bo as isArrayBufferCall,go as isArrayLike,Jn as isAsync,Vn as isAsyncCall,mo as isBigInt,po as isBigIntCall,yo as isBoolean,wo as isBooleanCall,tt as isBuffer,Y as isBufferCall,Ao as isChild,Eo as isCloneable,V as isConstructor,J as isConstructorFactory,Q as isConstructorNameFactory,$o as isDate,xo as isDateCall,uc as isDeno,Nu as isDocumentReady,Ju as isDom,So as isEmpty,vu as isEnter,et as isEqual,jo as isF32,Co as isF32Call,Fo as isF64,Oo as isF64Call,Mo as isFalse,fc as isFalsy,Ln as isFileCSS,Tn as isFileHTML,Bn as isFileJS,Nn as isFileJSON,To as isFloat,Jt as isFunction,Wn as isGenerator,Hn as isGeneratorCall,Ku as isHTMLCollection,No as isI16,Bo as isI16Call,Po as isI32,Ro as isI32Call,_o as isI8,Uo as isI8Call,ko as isIterable,Zo as isKindAsync,so as isMap,io as isMapCall,rt as isMatchArray,ar as isMatchObject,d as isNegative,Qu as isNodeList,ic as isNodejs,y as isNotArray,Xt as isNotNumber,tn as isNotString,c as isNull,Qt as isNumber,Kt as isNumberCall,xt as isNumberEqual,Qe as isNumberInRange,Xe as isNumberNotInRange,qo as isParent,nt as isPlainObject,tr as isPositive,zo as isPrimitive,Do as isPromise,pr as isRegex,gr as isRegexCall,Ho as isRelated,Go as isSafeInt,_e as isSame,Vo as isSameType,qn as isSet,Zn as isSetCall,Yt as isString,Jo as isTrue,sc as isTruthy,X as isTypeFactory,lo as isTypedArray,Qo as isU16,Ko as isU16Call,Yo as isU32,Xo as isU32Call,nc as isU8,rc as isU8C,ec as isU8CCall,tc as isU8Call,r as isUndefined,cc as isWeakMap,oc as isWeakMapCall,nr as isZero,dc as jsonParse,$r as kebabCase,z as keys,ct as largest,ut as last,Lr as lowerCase,Ie as map,it as mapArray,ft as mapAsyncArray,ve as mapAsyncObject,Ae as mapObject,at as mapRightArray,lt as mapWhile,Wc as merge,Vc as model,ze as multiply,de as negate,ho as noValue,Eu as nodeAttribute,ee as noop,lc as notEqual,ge as nthArg,nn as objectAssign,er as objectEntries,yr as objectSize,mr as omit,pe as once,Bt as onlyUnique,Ee as over,je as overEvery,Jc as pair,gt as partition,wr as pick,xn as pluck,En as pluckObject,Qc as promise,Xc as propertyMatch,Ou as querySelector,Fu as querySelectorAll,Ge as randomFloat,Et as randomInt,m as range,p as rangeDown,g as rangeUp,zr as rawURLDecode,Oe as reArg,Fn as regexTestFactory,Ve as remainder,wt as remove,yt as removeBy,Ur as replaceList,bt as rest,Pr as restString,i as returnValue,vt as right,Br as rightString,Ct as sample,Wr as sanitize,ku as saveDimensions,Lu as selector,Yc as setKey,tu as setValue,Mt as shuffle,Ot as smallest,Cr as snakeCase,Sn as sortCollectionAlphabetically,Cn as sortCollectionAlphabeticallyReverse,wn as sortCollectionAscending,mn as sortCollectionAscendingFilter,gn as sortCollectionDescending,dn as sortCollectionDescendingFilter,dt as sortNumberAscending,mt as sortNumberDescening,$n as sortObjectsAlphabetically,Mn as sortObjectsAlphabeticallyReverse,Nt as sortUnique,gc as stringify,eu as stubArray,ru as stubFalse,ou as stubObject,cu as stubString,uu as stubTrue,ht as subtract,Je as subtractAll,pt as subtractReverse,Ke as sumAll,Lt as take,Tt as takeRight,Wu as themes,Fe as throttle,ie as timer,ue as timers,re as times,iu as timesAsync,oe as timesMap,su as timesMapAsync,St as toArray,D as toPath,fu as toggle,Jr as tokenize,Qr as truncate,Xr as truncateRight,Wt as unZip,vr as unZipObject,Pt as union,lu as uniqID,Rt as unique,Ut as untilFalseArray,_t as untilTrueArray,Du as updateDimensions,Or as upperCase,no as upperFirst,ro as upperFirstAll,to as upperFirstLetter,eo as upperFirstOnly,oo as upperFirstOnlyAll,du as virtualStorage,kt as whileCompactMap,Dt as whileEachArray,Zt as whileMapArray,qt as without,Kr as words,Le as wrap,zt as xor,Ht as zip,br as zipObject}; +function t(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e}function n(t){return t.length=0,t}function e(t){return t.slice()}function r(t){return void 0===t}function o(t){return Boolean(t.length)}function c(t){return null===t}function u(t){return!r(t)&&!c(t)}function i(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const f=n.call(r,t,c,e,i,s,o);u(f)&&e.push(f)})):s(t,((t,c,i,s)=>{const f=n(t,c,e,i,s,r,o);u(f)&&e.push(f)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const c=await n(t,r,e,o);u(c)&&e.push(c)})),e}const{sign:h}=Math;function d(t){return-1===h(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}function m(t,n,e=1,r=[]){return d(e)?r:t{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function $(t,n=1,e=t.length){return t.splice(n,e)}const S=(t,n=1,e=t.length)=>$(t,0,e-n);function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function C(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function j(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,c,u,r)&&e.push(t)})),e}async function L(t,n,e=[],r){return await a(t,(async(t,o,c,u)=>{!0===await n(t,o,e,c,u,r)&&e.push(t)})),e}function T(t,n){return n?t.slice(0,n):t[0]}function B(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e}function N(t){return t.slice(0,t.length-1)}function R(t,...n){return f(t,(t=>{if(j(n,(n=>n.includes(t))))return t}))}function P(t,n,e){if(!t)return;const r=t.length;if(u(e))for(let o=0;o(e=e[t],u(e)))),e}const q=Object.keys;function z(t){if(t)return q(t)}const H=Object.hasOwn;function W(t,...n){if(t)return j(n,(n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}}))}function G(t,...n){if(t)return Boolean(n.find((n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}})))}function V(t,n){return t?.constructor===n||!1}function J(t){return n=>V(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...e){return e?t(n)&&j(e,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!u(t)&&"Object("===t.constructor.toString().trim().slice(9,16),et=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const e=z(t);if(W(n,e))return j(e,(e=>et(t[e],n[e])))}else if(w(t)&&t.length===n.length)return j(t,((t,e)=>et(t,n[e])));return!1};function rt(t,n){return t.length===n.length&&j(t,((t,e)=>et(n[e],t)))}const ot=Math.max;function ct(t){return ot(...t)}function ut(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]}function it(t,n,e=[],r,o){return u(r)?s(t,((t,c,u,i)=>{e[c]=n.call(r,t,c,e,u,i,o)})):s(t,((t,r,c,u)=>{e[r]=n(t,r,e,c,u,o)})),e}async function st(t,n,e){if(!t)return;const r=[],o=t.length;if(e)for(let c=0;c{e[r]=await n(t,r,e,o)})),e}function at(t,n,e=[],r){let o=0;const c=t.length;for(let u=c-1;u>=0;u--)e[o]=n(t[u],u,t,c,r),o++;return e}function lt(t,n,e=[],r){const o=t.length;for(let c=0;c{if(n(t,r))return t;e.push(t)})),e]}function pt(t,n){return n-t}function mt(t){return t.sort(pt)}function wt(t,n){let e=t.length;for(let r=0;re)return Mt(t);if(1===n)return[t[Et(e-1,0)]];const r=[],o={};let c,u=0;for(;u(e=r,n>=t&&(e=r+1,!0)))),e}function Lt(t,n=1){return t.slice(0,n)}function Tt(t,n=1){const e=t.length;return t.slice(e-n,e)}function Bt(t,n,e){return e.indexOf(t)===n}function Nt(t,n,e){return t!==e[n-1]}function Rt(t,n){return n?t.filter(Nt):t.filter(Bt)}function Pt(...t){return Rt(I(t))}function Ut(t,n){const e=t.length;for(let r=0;r!e.has(t)))}function zt(...t){const n=v(Map),e=[];return 2===t.length?x(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&e.push(t.child)})),e)}function Ht(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Wt(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Gt(t){return tt(t)&&t||u(t)&&Buffer.from(t)||Buffer.alloc(0)}function Vt(t){return t.fill(0),t}const Jt=t=>!!u(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=J(String);function tn(t){return!Yt(t)}const nn=Object.assign;function en(t,n){if(nt(n))nn(t,n);else if(Jt(n)){const e=n.name;e?t[e]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function rn(t,...n){const e=n.length;for(let r=0;r{r=n(t),e[r]||(e[r]=0),e[r]++})),e}function sn(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e}function fn(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e}function an(t,n,e,r,o){if(t[o]===r)return!0}function ln(t,n,e="id"){const r=t.findIndex(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function hn(t,n,e="id"){const r=t.find(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function dn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?-1:0:1:-1}function gn(t,n="id",e){return t.sort(((t,r)=>dn(t,r,n,e)))}function pn(t,n){return gn(t,n,!1)[0]}function mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?1:0:-1:1}function wn(t,n="id",e){return t.sort(((t,r)=>mn(t,r,n,e)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e}function vn(t,n="id"){const e={};return s(t,(t=>{e[t[n]]=t})),e}function An(t,n,e,r){return it(t,r?(t,o)=>t[n].call(r,e):(t,r)=>t[n](e))}function In(t,n,e,r){return ft(t,r?t=>t[n].call(r,e):async t=>t[n](e))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function xn(t,n){return it(t,(t=>En(t,n)))}function $n(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):o.localeCompare(c)}function Sn(t,n="id",e){return t.sort(((t,r)=>$n(t,r,n,e)))}function Mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c.localeCompare(o)}function Cn(t,n="id",e){return t.sort(((t,r)=>Mn(t,r,n,e)))}function jn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function On(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Fn(t){return n=>!!u(n)&&t.test(n)}const Ln=Fn(/\.css$/),Tn=Fn(/\.html$/),Bn=Fn(/\.js$/),Nn=Fn(/\.json$/);function Rn(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)}function Pn(t,n){return(...e)=>t(...e.splice(0,n))}function Un(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)}const _n=async(t,n,e,r)=>{if(!t)return;const o=z(t);return u(e)?await a(o,((c,u,i,s)=>n.call(e,t[c],c,t,s,o,r))):await a(o,((e,c,u,i)=>n(t[e],e,t,i,o,r))),t};function kn(t,n,e,r){if(!t)return;const o=z(t);return u(e)?s(o,((o,c,u,i)=>{n.call(e,t[o],o,t,i,u,r)})):s(o,((e,o,c,u)=>{n(t[e],e,t,u,c,r)})),t}async function Dn(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{let h;const d=Jn(s);if(u(i)&&s)return h=w(i)?d?n:t:nt(i)||Jt(i)?d?r:e:o?d?c:o:Wn(i)?c:d?r:e,h(i,s,f,a,l)}}const Qn=Kn(s,a,kn,_n,zn,Gn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function te(t,e=t.length){const r=[],o=(...c)=>{if(r.push(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ne(t,e=t.length){const r=[],o=(...c)=>{if(r.unshift(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ee(){}function re(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ue=v(ce);function ie(t,n){return ue.set(t,n)}function se(){re(setTimeout(ee,0),(t=>{ue.remove(t)}))}const fe=Reflect.apply;function ae(t,n,e){if(Jt(t))return fe(t,n,e)}function le(t,n){function e(...t){!1!==e.id&&ue.remove(e.id),e.id=ie((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(ue.remove(e.id),e.id=!1)},e}function he(t,n,...e){if(Jt(t))return n?t.call(n,...e):t(...e)}function de(t){return(...n)=>!t(...n)}function ge(t=0){return(...n)=>n[t]}const pe=t=>{let n;return(...e)=>(u(n)||(n=t(...e)),n)};function me(t){return t?.constructor}function we(t,n=[]){const e=me(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function ye(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=Jt(r.set);for(const[e,c]of t){const u=n(c,e,r,t);o?r.set(e,u):r[e]=u}return r}async function be(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const c=Jt(o.set);for await(const[e,r]of t){const u=await n(r,e,o,t);c?o.set(e,u):o[e]=u}return o}async function ve(t,n,e={}){if(t)return await _n(t,(async(t,r,o,c,u)=>{e[r]=await n(t,r,e,o,c,u)})),e}function Ae(t,n,e={},r,o){if(t)return u(r)?kn(t,((t,c,u,i,s)=>{e[c]=n.call(r,t,c,e,u,i,s,o)})):kn(t,((t,r,c,u,i)=>{e[r]=n(t,r,e,c,u,i,o)})),e}const Ie=Kn(it,ft,Ae,ve,ye,be);function Ee(t){return(...n)=>Ie(t,(t=>t(...n)))}async function xe(t,n){if(!t)return;return O(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function $e(t,n){if(!t)return;return j(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function Se(t,n=i){if(w(t)||qn(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function Me(t,n=i,e){if(Wn(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(w(t)||qn(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const Ce=Kn(j,O,$e,xe,Se,Me);function je(t){return n=>Ce(t,(t=>t(n)))}function Oe(t,n){return(...e)=>t(...n.map((t=>e[t])))}function Fe(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=ie((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{ue.remove(e.id),e.id=!1},e}function Le(t,n){return(...e)=>n(t,...e)}const Te=Function.prototype;function Be(t){return Te.call.bind(t)}const Ne=Object.getOwnPropertyNames,Re=Object.getOwnPropertyDescriptor,Pe=Object.defineProperty,Ue=Be(Object.hasOwnProperty),_e=Object.is;function ke(t,n){return t+n}function De(t){return t-1}function Ze(t,n){return t/n}function qe(t){return t+1}function ze(t,n){return t*n}function He(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:We}=Math;function Ge(t,n=0){return We()*(t-n)+n}function Ve(t,n){return t%n}function Je(t){return t.reduce(((t,n)=>t-n),0)}function Ke(t){return t.reduce(((t,n)=>t+n),0)}function Qe(t,n,e){return t>n&&te}const{sign:Ye}=Math;function tr(t){return 1===Ye(t)}function nr(t){return 0===t}function er(t){return!(1&~t)}function rr(t){return!(1&t)}const or=Object.entries;function cr(t){if(u(t))return or(t)}function ur(t){const n=[];return kn(t,((t,e)=>{u(t)&&n.push(e)})),n}async function ir(t,n=i,e={}){return await _n(t,(async(t,r,o,c,i)=>{const s=await n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function sr(t,n=i,e={}){return kn(t,((t,r,o,c,i)=>{const s=n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function fr(t,n,e={}){return kn(t,((t,r,o,c,u)=>{!0===n(t,r,e,o,c,u)&&(e[r]=t)})),e}async function ar(t,n,e={}){return await _n(t,(async(t,r,o,c,u)=>{!0===await n(t,r,e,o,c,u)&&(e[r]=t)})),e}function lr(t,n={}){if(t)return kn(t,((t,e)=>{n[t]=e})),n}const hr=(t,n)=>{if(t===n)return!0;const e=z(t),r=z(n);return e.length===r.length&&j(e,(e=>t[e]===n[e]))},dr=/[()[\]{}*+?^$|#.,/\\\s-]/g;function gr(t){return t.replace(dr,"\\$&")}function pr(t,n){return n?pr(it(t,gr)):RegExp(t.join("|"))}const mr=Q("RegExp"),wr=X(mr);function yr(t,n){if(!t)return{};if(w(n)){const e=pr(n);return fr(t,((t,n)=>!e.test(n)))}if(wr(n))return fr(t,((t,e)=>!n.test(e)));if(Yt(n))return fr(t,((t,e)=>e!==n));if(Qt(n)){const e=n.toString();return fr(t,((t,n)=>n!==e))}return Jt(n)?fr(t,((t,e)=>!n(t,e))):nn({},t)}const br=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e};function vr(t){if(!t)return;if(nt(t))return z(t).length;const n=t.length;if(u(n))return n;const e=t.size;return u(n)?e:z(t).length}const Ar=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Ir=t=>{const n=[],e=[];return kn(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},Er=/[ _-]+/g;function xr(t){let n="";return t.replace(Er," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const $r=/[ _-]+/g,Sr=/[ ]+/g;function Mr(t){return t.replace(/([A-Z]+)/g," $1").replace($r," ").trim().toLowerCase().replace(Sr,"-")}const Cr=/[ _-]+/g,jr=/[ ]+/g;function Or(t){return t.replace(/([A-Z]+)/g," $1").replace(Cr," ").trim().toLowerCase().replace(jr,"_")}const Fr=/[ _-]+/g;function Lr(t){return t.replace(/([A-Z]+)/g," $1").replace(Fr," ").trim().toUpperCase()}const Tr=/[ _-]+/g;function Br(t){return t.replace(/([A-Z]+)/g," $1").replace(Tr," ").trim().toLowerCase()}function Nr(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)}function Rr(t,n=1){return t[t.length-n]}function Pr(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Ur(t,n=1){return t.slice(0,-1*n)}function _r(t,n=1){return t.substring(n)}function kr(t,n,e){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),e)}const Dr=/%(?![\da-f]{2})/gi,Zr=/&/g,qr=//g,Hr=/"/g;function Wr(t){return decodeURIComponent(t.replace(Dr,(()=>"%25")))}function Gr(t){return t.replace(Zr,"&").replace(qr,"<").replace(zr,">").replace(Hr,""")}function Vr(t){return Gr(Wr(t))}const Jr=/\S+/g,Kr=/\w+/g;function Qr(t){return t.match(Jr)||[]}function Xr(t){return t.match(Kr)||[]}function Yr(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=e-n;for(;u=0&&(c=r[u]," "!==c);u--);return t.slice(0,u).trim()})(t,n,e):t}function to(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=n;for(;u0&&(c=r[u]," "!==c);u++);return t.substring(u,e).trim()})(t,n,e):t}const no=/\w+/g;function eo(t){return t[0].toUpperCase()}function ro(t){return eo(t)+_r(t)}function oo(t){return eo(t)+_r(t).toLowerCase()}function co(t){return t.replace(no,(t=>ro(t)))}function uo(t){return t.replace(no,(t=>oo(t)))}function io(t){return me(t)?.name}function so(t){return!!u(t)&&"[object Arguments]"===t.toString()}const fo=Q("Map"),ao=X(fo),lo=/Array/,ho="Array";function go(t){if(t){const n=io(t);if(lo.test(n)&&n!==ho)return!0}return!1}function po(t){return!u(t)}function mo(t,n){if(po(t)||Jt(t))return!1;if(w(t)||go(t))return!0;const e=t.length;if(!po(e)||!Qt(e)||e<0)return!1;if(n){const n=z(t);return!!n&&Ce(n,((t,n)=>n>=0&&Qt(n)))}return!0}const wo=Q("BigInt"),yo=X(wo),bo=Q("Boolean"),vo=X(bo),Ao=Q("ArrayBuffer"),Io=X(Ao);function Eo(t,n){return!(!t||!n)&&t instanceof n}const xo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function $o(t){if(u(t)){const n=t?.constructor?.name;return xo.test(n)}return!1}const So=Q("Date"),Mo=X(So);function Co(t){return Yt(t)||w(t)?!o(t):nt(t)?!vr(t):!u(t)}function jo(t){return!1===t}const Oo=Q("Float32Array"),Fo=X(Oo),Lo=Q("Float64Array"),To=X(Lo),{isInteger:Bo}=Number,No=Bo,Ro=Q("Int16Array"),Po=X(Ro),Uo=Q("Int32Array"),_o=X(Uo),ko=Q("Int8Array"),Do=X(ko);function Zo(t){return u(t)&&"function"==typeof t[Symbol.iterator]}function qo(t){return!!t&&t instanceof Promise}function zo(t){return!!t&&(qo(t)||Jn(t)||Wn(t))}function Ho(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Wo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Go(t,n){return!po(t)&&!po(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Vo}=Number,Jo=Vo;function Ko(t,n){const e=me(t),r=me(n);return e===r&&e.name===r.name}function Qo(t){return!0===t}const Xo=Q("Uint16Array"),Yo=X(Xo),tc=Q("Uint32Array"),nc=X(tc),ec=Q("Uint8Array"),rc=X(ec),oc=Q("Uint8ClampedArray"),cc=X(oc),uc=Q("WeakMap"),ic=X(uc),sc=void 0!==globalThis.Deno,fc=void 0!==globalThis.process&&process.versions&&process.versions.node;function ac(t,n=!0){return Boolean(t)&&n}function lc(t,n=!0){return!1===Boolean(t)&&n}function hc(t,n,e,r){if(u(t)){if(Jt(n))return e?ae(n,e,r):n(...r);if(nt(n))return n[e]=t,n}}function dc(t,n){return jo(et(t,n))}const gc=JSON;function pc(t,n){if(t)return gc.parse(t,n)}const mc=gc.stringify;function wc(t,n,e){const r=globalThis.options||e;let o;return Jt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${mc(t)}\n\t\tExpected: ${mc(n)}`,r)}async function yc(t,n,e){const r=await t;return!(Jt(n)&&!1===await n(r,e))&&!dc(r,n)||wc(r,n,e)}function bc(t,n,e){if(zo(t)||zo(n))return yc(t,n,e);return!(Jt(n)&&!1===n(t,e))&&!dc(t,n)||wc(t,n,e)}function vc(t,n,e){const r=Ie(t,(t=>Jt(t)?t.bind(n):t));return e?rn(e,r):r}function Ac(t){if(t){if(tt(t))return Vt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Ic=globalThis.structuredClone;function Ec(t){return Ic(t)}async function xc(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;cac(t)))}async function Sc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);u(r)&&e.push(r)}return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);u(c)&&r(c)}return o}const c=Jt(o.set);for await(const[e,r]of t){const i=await n(r,e,o,t);u(i)&&(c?o.set(e,i):o[e]=i)}return o}function Mc(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);u(c)&&o(c)}return r}const o=Jt(r.set);for(const[e,c]of t){const i=n(c,e,r,t);u(i)&&(o?r.set(e,i):r[e]=i)}return r}const Cc=Kn(f,l,sr,ir,Mc,Sc);function jc(...t){return Jn(t[0])?async function(...n){return Ce(t,(async t=>Ce(n,(async n=>t(n)))))}:function(...n){return Ce(t,(t=>Ce(n,(n=>t(n)))))}}function Oc(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=Jt(r.set);for(const[o,c]of t){!0===n(c,o,r,t)&&(e?r.set(o,c):r[o]=c)}}return r}async function Fc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=Jt(o.set);for await(const[r,c]of t){!0===await n(c,r,o,t)&&(e?o.set(r,c):o[r]=c)}}return o}const Lc=Kn(F,L,fr,ar,Oc,Fc);function Tc(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const Bc=Tc(s),Nc=Tc(M);function Rc(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const Pc=Rc(a),Uc=Rc(C);function _c(t,n){const e=we(t),r=e.push||e.add;if(r&&Jt(r)){const o=r.bind(e);t.forEach((t=>{const r=n(t,e);o(r)}))}else Jt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e}function kc(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e}function Dc(t,n,e){return!po(t)&&!po(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,e):wr(n)?n.test(t):Jt(n)?n(t):w(n)?j(n,(n=>Dc(t,n))):Ce(n,(n=>Dc(t,n))):w(t)?wr(n)?j(t,(t=>t.test(n))):Jt(n)?j(t,n):w(n)?j(n,(n=>Dc(t,n))):t.includes(n,e):!!nt(t)&&(wr(n)?$e(t,(t=>t.test(n))):Jt(n)?$e(t,n):nt(n)?$e(t,((t,e)=>t===n[e])):$e(t,(t=>Dc(t,n))))))}const Zc=Fn(/\./),qc=(t,n,e)=>(n&&!u(t[n])&&(t[n]=e),t);class zc{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Hc=v(zc);function Wc(t,n){return Hc.set(t,n)}function Gc(){re(setTimeout(ee,0),(t=>{Hc.remove(t)}))}function Vc(t,...n){return Qn(n,(n=>{Qn(n,((n,e)=>{if(t[e]&&(nt(n)||w(n)||n.forEach))return Vc(t[e],n);t[e]=n}))})),t}class Jc{static models=new Map;constructor(t,n){u(n)?(rn(this,n),this.modelName=t,Jc.models.set(t,n)):rn(this,t)}delete(t){Jc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Jc.models.set(t||this.modelName,this)}has(t){return Jc.models.has(t||this.modelName)}get(t){return Jc.models.get(t||this.modelName)}}function Kc(t,n){return u(n)?v(Jc,[t,n]):Z(t,Jc.models)}function Qc(t,n){return[t,n]}function Xc(t,n,e){const r=t.length,o=[];for(let c=0;cj(e,(e=>et(t[e],n[e])));function nu(t,n,e){return n&&nt(t)||Qt(n)&&w(t)?t[n]=e:t.set?t.set(n,e):t.push?t.push(e):t.add?t.add(e):t[n]=e,t}function eu(t,n,e){return Qt(e)&&w(t)?t[e]=n:t.push?t.push(n):t.add?t.add(n):t[e]=n,t}class ru{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;kn(t,(n=>{t[n]=new ru(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new ru(e),!0)})}}function ou(){return[]}function cu(){return!1}const uu=()=>({}),iu=()=>"",su=()=>!0;async function fu(t,n){for(let e=0;e0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const du=v(hu);class gu{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):u(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=we(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function pu(t){return new gu(t)}async function mu(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;c{vo(t)&&t&&(yu[n]=t)})),s(bu.brands,(t=>{yu[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{yu[t]=!0}))}function vu(t,n,e,r){return t.addEventListener(n,e,r),t}function Au(t,n,e,r){return t.removeEventListener(n,e,r),t}function Iu(t){return 13===t.keyCode}const Eu=document.createDocumentFragment.bind(document);function xu(t,n){return t.appendChild(n),n}function $u(t,n){return w(n)?Ar(n,it(n,(n=>t.getAttribute(n)))):(kn(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Su=/^.[\w_-]+$/,Mu=/^[A-Za-z]+$/,Cu=/\s/,ju=document.getElementsByClassName.bind(document),Ou=document.getElementsByTagName.bind(document),Fu=document.getElementById.bind(document),Lu=document.querySelector.bind(document),Tu=document.querySelectorAll.bind(document);function Bu(t){switch(t[0]){case"#":if(!Cu.test(t))return Fu(_r(t));break;case".":if(Su.test(t))return ju(_r(t));break;default:if(Mu.test(t))return Ou(t)}return Tu(t)}const Nu=document.createElement.bind(document);function Ru(t){const n=Zc(t)&&t||`${t}.js`;return(t=>Yc((n=>{vu(t,"load",n,!0),vu(t,"error",n,!0),xu(Lu("head"),t)})))($u(Nu("script"),{async:"",src:n}))}function Pu(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&vu(document,"DOMContentLoaded",t),!1)}Pu((()=>{const t=Fu("AcidLib");Ru(t&&t.getAttribute("data-index")||"/index")}));const Uu=location.protocol,_u="http:"===Uu?"ws":"wss",ku=location.hostname,Du={hardware:{cores:navigator.hardwareConcurrency},host:{name:ku,protocol:Uu,protocolSocket:_u}};function Zu(){rn(Du,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function qu(){Zu()}let zu;Pu(qu),vu(window,"load",qu,!0),vu(window,"resize",qu,!0),function(t){try{t().removeItem("TESTING"),zu=!0}catch(t){zu=!1}}((()=>localStorage));class Hu{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=pu(t)}hasLocal=zu;setItem(t,n){return this.hasLocal&&this.local.setItem(t,Yt(n)?n:mc(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return u(n)?n:!u(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}function Wu(t){return new Hu(t)}const Gu=(t,n)=>`color:${t};background:${n};`,Vu={alert:Gu("#fff","#f44336"),important:Gu("#fff","#E91E63"),notify:Gu("#fff","#651FFF"),warning:Gu("#000","#FFEA00")},Ju=(t,n)=>{const e=Yt(t)?t:mc(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Vu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Vu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},Ku=(t,n,e)=>{Vu[t]=Gu(n,e)};function Qu(t){return t&&9!==t.nodeType}function Xu(t){return!!u(t)&&"[object HTMLCollection]"===t.toString()}function Yu(t){return!!u(t)&&"[object NodeList]"===t.toString()}export{Hu as BrowserStorage,Xn as Chain,zc as Intervals,Jc as Model,ru as Store,ce as Timers,hu as UniqID,gu as VirtualStorage,ke as add,Rn as after,xu as append,ae as apply,pr as arrayToRegex,kc as arraysToObject,Pn as ary,bc as assert,yc as assertAsync,rn as assign,on as assignToClass,en as assignToObject,Un as before,vc as bindAll,Wu as browserStorage,Be as cacheNativeMethod,He as calcProgress,xr as camelCase,Yn as chain,t as chunk,Pr as chunkString,Ac as clear,n as clearArray,Vt as clearBuffer,Gc as clearIntervals,se as clearTimers,Ec as clone,e as cloneArray,we as cloneType,Ju as cnsl,Ku as cnslTheme,$c as compact,ur as compactKeys,Cc as compactMap,f as compactMapArray,l as compactMapAsyncArray,ir as compactMapAsyncObject,sr as compactMapObject,xc as concurrent,st as concurrentEachArray,Xc as concurrentStatus,v as construct,K as constructorName,un as countBy,sn as countKey,fn as countWithoutKey,Eu as createFragment,te as curry,ne as curryRight,le as debounce,De as deduct,Pe as defProp,x as difference,Ze as divide,$ as drop,S as dropRight,Qn as each,s as eachArray,a as eachAsyncArray,_n as eachAsyncObject,kn as eachObject,M as eachRight,C as eachRightAsync,A as ensureArray,Gt as ensureBuffer,nr as equalsZero,gr as escapeRegex,dr as escapeRegexRegex,vu as eventAdd,Au as eventRemove,Ce as every,jc as everyArg,j as everyArray,O as everyAsyncArray,xe as everyAsyncObject,$e as everyObject,cn as extendClass,Lc as filter,F as filterArray,L as filterAsyncArray,ar as filterAsyncObject,fr as filterObject,ln as findIndex,an as findIndexCache,hn as findItem,T as first,B as flatten,I as flattenDeep,Bc as flow,Pc as flowAsync,Uc as flowAsyncRight,Nc as flowRight,E as forEach,Dn as forEachAsync,_c as forMap,zn as forOf,Gn as forOfAsync,Mc as forOfCompactMap,Sc as forOfCompactMapAsync,Se as forOfEvery,Me as forOfEveryAsync,Oc as forOfFilter,Fc as forOfFilterAsync,ye as forOfMap,be as forOfMapAsync,Kn as generateLoop,Z as get,ju as getByClass,Fu as getById,Ou as getByTag,cr as getEntries,jn as getFileExtension,On as getFilename,yn as getHighest,pn as getLowest,Ft as getNumberInsertIndex,Re as getPropDesc,Ne as getPropNames,me as getType,io as getTypeName,bn as groupBy,Dc as has,G as hasAnyKeys,Zc as hasDot,W as hasKeys,o as hasLength,zu as hasLocal,Ue as hasProp,u as hasValue,Gr as htmlEntities,he as ifInvoke,qc as ifNotAssign,hc as ifValue,Ru as importjs,mu as inAsync,wu as inSync,qe as increment,vn as indexBy,Du as info,N as initial,Ur as initialString,Nr as insertInRange,R as intersection,Wc as interval,Hc as intervals,lr as invert,P as invokeArray,An as invokeCollection,In as invokeCollectionAsync,yu as isAgent,so as isArguments,w as isArray,Io as isArrayBuffer,Ao as isArrayBufferCall,mo as isArrayLike,Jn as isAsync,Vn as isAsyncCall,yo as isBigInt,wo as isBigIntCall,vo as isBoolean,bo as isBooleanCall,tt as isBuffer,Y as isBufferCall,Eo as isChild,$o as isCloneable,V as isConstructor,J as isConstructorFactory,Q as isConstructorNameFactory,Mo as isDate,So as isDateCall,sc as isDeno,Pu as isDocumentReady,Qu as isDom,Co as isEmpty,Iu as isEnter,et as isEqual,rr as isEven,Fo as isF32,Oo as isF32Call,To as isF64,Lo as isF64Call,jo as isFalse,lc as isFalsy,Ln as isFileCSS,Tn as isFileHTML,Bn as isFileJS,Nn as isFileJSON,No as isFloat,Jt as isFunction,Wn as isGenerator,Hn as isGeneratorCall,Xu as isHTMLCollection,Po as isI16,Ro as isI16Call,_o as isI32,Uo as isI32Call,Do as isI8,ko as isI8Call,Zo as isIterable,zo as isKindAsync,ao as isMap,fo as isMapCall,rt as isMatchArray,hr as isMatchObject,d as isNegative,Yu as isNodeList,fc as isNodejs,y as isNotArray,Xt as isNotNumber,tn as isNotString,c as isNull,Qt as isNumber,Kt as isNumberCall,xt as isNumberEqual,Qe as isNumberInRange,Xe as isNumberNotInRange,er as isOdd,Ho as isParent,nt as isPlainObject,tr as isPositive,Wo as isPrimitive,qo as isPromise,wr as isRegex,mr as isRegexCall,Go as isRelated,Jo as isSafeInt,_e as isSame,Ko as isSameType,qn as isSet,Zn as isSetCall,Yt as isString,Qo as isTrue,ac as isTruthy,X as isTypeFactory,go as isTypedArray,Yo as isU16,Xo as isU16Call,nc as isU32,tc as isU32Call,rc as isU8,cc as isU8C,oc as isU8CCall,ec as isU8Call,r as isUndefined,ic as isWeakMap,uc as isWeakMapCall,nr as isZero,pc as jsonParse,Mr as kebabCase,z as keys,ct as largest,ut as last,Br as lowerCase,Ie as map,it as mapArray,ft as mapAsyncArray,ve as mapAsyncObject,Ae as mapObject,at as mapRightArray,lt as mapWhile,Vc as merge,Kc as model,ze as multiply,de as negate,po as noValue,$u as nodeAttribute,ee as noop,dc as notEqual,ge as nthArg,nn as objectAssign,or as objectEntries,vr as objectSize,yr as omit,pe as once,Bt as onlyUnique,Ee as over,je as overEvery,Qc as pair,gt as partition,br as pick,xn as pluck,En as pluckObject,Yc as promise,tu as propertyMatch,Lu as querySelector,Tu as querySelectorAll,Ge as randomFloat,Et as randomInt,m as range,p as rangeDown,g as rangeUp,Wr as rawURLDecode,Oe as reArg,Fn as regexTestFactory,Ve as remainder,wt as remove,yt as removeBy,kr as replaceList,bt as rest,_r as restString,i as returnValue,vt as right,Rr as rightString,Ct as sample,Vr as sanitize,Zu as saveDimensions,Bu as selector,nu as setKey,eu as setValue,Mt as shuffle,Ot as smallest,Or as snakeCase,Sn as sortCollectionAlphabetically,Cn as sortCollectionAlphabeticallyReverse,wn as sortCollectionAscending,mn as sortCollectionAscendingFilter,gn as sortCollectionDescending,dn as sortCollectionDescendingFilter,dt as sortNumberAscending,mt as sortNumberDescening,$n as sortObjectsAlphabetically,Mn as sortObjectsAlphabeticallyReverse,Nt as sortUnique,mc as stringify,ou as stubArray,cu as stubFalse,uu as stubObject,iu as stubString,su as stubTrue,ht as subtract,Je as subtractAll,pt as subtractReverse,Ke as sumAll,Lt as take,Tt as takeRight,Vu as themes,Fe as throttle,ie as timer,ue as timers,re as times,fu as timesAsync,oe as timesMap,au as timesMapAsync,St as toArray,D as toPath,lu as toggle,Qr as tokenize,Yr as truncate,to as truncateRight,Wt as unZip,Ir as unZipObject,Pt as union,du as uniqID,Rt as unique,Ut as untilFalseArray,_t as untilTrueArray,qu as updateDimensions,Lr as upperCase,ro as upperFirst,co as upperFirstAll,eo as upperFirstLetter,oo as upperFirstOnly,uo as upperFirstOnlyAll,pu as virtualStorage,kt as whileCompactMap,Dt as whileEachArray,Zt as whileMapArray,qt as without,Xr as words,Le as wrap,zt as xor,Ht as zip,Ar as zipObject}; //# sourceMappingURL=index.js.map diff --git a/build/module/browser/index.js.map b/build/module/browser/index.js.map index 1adcbac..835a2ec 100644 --- a/build/module/browser/index.js.map +++ b/build/module/browser/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../../../source/arrays/chunk.js","../../../source/arrays/clear.js","../../../source/arrays/clone.js","../../../source/types/isUndefined.js","../../../source/utilities/hasLength.js","../../../source/types/isNull.js","../../../source/types/hasValue.js","../../../source/utilities/returnValue.js","../../../source/arrays/each.js","../../../source/arrays/compactMap.js","../../../source/arrays/eachAsync.js","../../../source/arrays/compactMapAsync.js","../../../source/numbers/isNegative.js","../../../source/arrays/range.js","../../../source/types/isArray.js","../../../source/classes/construct.js","../../../source/arrays/ensure.js","../../../source/arrays/flattenDeep.js","../../../source/utilities/forEach.js","../../../source/arrays/difference.js","../../../source/arrays/drop.js","../../../source/arrays/dropRight.js","../../../source/arrays/eachRight.js","../../../source/arrays/eachRightAsync.js","../../../source/arrays/every.js","../../../source/arrays/everyAsync.js","../../../source/arrays/filter.js","../../../source/arrays/filterAsync.js","../../../source/arrays/first.js","../../../source/arrays/flatten.js","../../../source/arrays/initial.js","../../../source/arrays/intersect.js","../../../source/arrays/invoke.js","../../../source/utilities/toPath.js","../../../source/utilities/get.js","../../../source/objects/keys.js","../../../source/objects/hasKeys.js","../../../source/types/isConstructor.js","../../../source/types/isTypeFactory.js","../../../source/types/isBuffer.js","../../../source/types/isPlainObject.js","../../../source/utilities/isEqual.js","../../../source/arrays/isMatch.js","../../../source/arrays/largest.js","../../../source/arrays/last.js","../../../source/arrays/map.js","../../../source/arrays/concurrentEach.js","../../../source/arrays/mapAsync.js","../../../source/arrays/mapRight.js","../../../source/arrays/mapWhile.js","../../../source/math/subtract.js","../../../source/arrays/sortNumberAscending.js","../../../source/arrays/partition.js","../../../source/math/subtractReverse.js","../../../source/arrays/sortNumberDescening.js","../../../source/arrays/remove.js","../../../source/arrays/rest.js","../../../source/arrays/right.js","../../../source/math/randomInt.js","../../../source/numbers/isNumberEqual.js","../../../source/internal/array.js","../../../source/arrays/shuffle.js","../../../source/arrays/sample.js","../../../source/arrays/smallest.js","../../../source/arrays/getNumberInsertIndex.js","../../../source/arrays/take.js","../../../source/arrays/takeRight.js","../../../source/arrays/unique.js","../../../source/arrays/union.js","../../../source/arrays/untilFalse.js","../../../source/arrays/untilTrue.js","../../../source/arrays/whileCompactMap.js","../../../source/arrays/whileEach.js","../../../source/arrays/whileMap.js","../../../source/arrays/without.js","../../../source/arrays/xor.js","../../../source/arrays/zip.js","../../../source/buffers/ensure.js","../../../source/buffers/clear.js","../../../source/types/isFunction.js","../../../source/types/isNumber.js","../../../source/types/isString.js","../../../source/objects/assign.js","../../../source/classes/extendClass.js","../../../source/collection/countBy.js","../../../source/collection/countKey.js","../../../source/collection/countWithoutKey.js","../../../source/collection/findIndexCache.js","../../../source/collection/findIndex.js","../../../source/collection/findItem.js","../../../source/collection/sortCollectionDescending.js","../../../source/collection/getLowest.js","../../../source/collection/sortCollectionAscending.js","../../../source/collection/getHighest.js","../../../source/collection/groupBy.js","../../../source/collection/indexBy.js","../../../source/collection/invoke.js","../../../source/collection/invokeAsync.js","../../../source/objects/pluckObject.js","../../../source/collection/pluck.js","../../../source/collection/sortCollectionAlphabetically.js","../../../source/collection/sortCollectionAlphabeticallyReverse.js","../../../source/files/getExtension.js","../../../source/files/getFilename.js","../../../source/internal/regexTestFactory.js","../../../source/files/isFileCSS.js","../../../source/files/isFileHTML.js","../../../source/files/isFileJS.js","../../../source/files/isFileJSON.js","../../../source/functions/after.js","../../../source/functions/ary.js","../../../source/functions/before.js","../../../source/objects/eachAsync.js","../../../source/objects/each.js","../../../source/utilities/forEachAsync.js","../../../source/types/isSet.js","../../../source/utilities/forOf.js","../../../source/types/isGenerator.js","../../../source/utilities/forOfAsync.js","../../../source/types/isAsync.js","../../../source/utilities/generateLoop.js","../../../source/utilities/each.js","../../../source/functions/chain.js","../../../source/functions/curry.js","../../../source/functions/curryRight.js","../../../source/utilities/noop.js","../../../source/utilities/times.js","../../../source/utilities/timer.js","../../../source/internal/apply.js","../../../source/functions/debounce.js","../../../source/functions/ifInvoke.js","../../../source/functions/negate.js","../../../source/functions/nthArg.js","../../../source/functions/once.js","../../../source/types/getType.js","../../../source/types/cloneType.js","../../../source/utilities/forOfMap.js","../../../source/utilities/forOfMapAsync.js","../../../source/objects/mapAsync.js","../../../source/objects/map.js","../../../source/utilities/map.js","../../../source/functions/over.js","../../../source/objects/everyAsync.js","../../../source/objects/every.js","../../../source/utilities/forOfEvery.js","../../../source/utilities/forOfEveryAsync.js","../../../source/utilities/every.js","../../../source/functions/overEvery.js","../../../source/functions/rearged.js","../../../source/functions/throttle.js","../../../source/functions/wrap.js","../../../source/utilities/cacheNativeMethod.js","../../../source/internal/object.js","../../../source/internal/isSame.js","../../../source/math/add.js","../../../source/math/deduct.js","../../../source/math/divide.js","../../../source/math/increment.js","../../../source/math/multiple.js","../../../source/math/progress.js","../../../source/math/randomFloat.js","../../../source/math/remainder.js","../../../source/math/subtractAll.js","../../../source/math/sumAll.js","../../../source/numbers/isNumberInRange.js","../../../source/numbers/isNumberNotInRange.js","../../../source/numbers/isPositive.js","../../../source/numbers/isZero.js","../../../source/objects/getEntries.js","../../../source/objects/compactKeys.js","../../../source/objects/compactMapAsync.js","../../../source/objects/compactMap.js","../../../source/objects/filter.js","../../../source/objects/filterAsync.js","../../../source/objects/invert.js","../../../source/objects/isMatch.js","../../../source/regexps/escapeRegex.js","../../../source/regexps/arrayToRegex.js","../../../source/types/isRegex.js","../../../source/objects/omit.js","../../../source/objects/pick.js","../../../source/objects/size.js","../../../source/objects/zip.js","../../../source/strings/camelCase.js","../../../source/strings/kebabCase.js","../../../source/strings/snakeCase.js","../../../source/strings/upperCase.js","../../../source/strings/lowerCase.js","../../../source/strings/range.js","../../../source/strings/replace.js","../../../source/strings/sanitize.js","../../../source/strings/tokenize.js","../../../source/strings/truncate.js","../../../source/strings/typography.js","../../../source/types/getTypeName.js","../../../source/types/isArguments.js","../../../source/types/isMap.js","../../../source/types/isTypedArray.js","../../../source/types/noValue.js","../../../source/types/isArrayLike.js","../../../source/types/isBigInt.js","../../../source/types/isBoolean.js","../../../source/types/isArrayBuffer.js","../../../source/types/isChild.js","../../../source/types/isCloneable.js","../../../source/types/isDate.js","../../../source/types/isEmpty.js","../../../source/types/isFalse.js","../../../source/types/isF32.js","../../../source/types/isF64.js","../../../source/types/isFloat.js","../../../source/types/isI16.js","../../../source/types/isI32.js","../../../source/types/isI8.js","../../../source/types/isIterable.js","../../../source/types/isPromise.js","../../../source/types/isKindAsync.js","../../../source/types/isParent.js","../../../source/types/isPrimitive.js","../../../source/types/isRelated.js","../../../source/types/isSafeInt.js","../../../source/types/isSameType.js","../../../source/types/isTrue.js","../../../source/types/isU16.js","../../../source/types/isU32.js","../../../source/types/isU8.js","../../../source/types/isU8C.js","../../../source/types/isWeakMap.js","../../../source/types/isDeno.js","../../../source/types/isNode.js","../../../source/types/isTruthy.js","../../../source/types/isFalsy.js","../../../source/utilities/ifValue.js","../../../source/utilities/notEqual.js","../../../source/utilities/json.js","../../../source/utilities/assert.js","../../../source/utilities/bindAll.js","../../../source/utilities/clear.js","../../../source/utilities/clone.js","../../../source/utilities/concurrent.js","../../../source/utilities/compact.js","../../../source/utilities/forOfCompactMapAsync.js","../../../source/utilities/forOfCompactMap.js","../../../source/utilities/compactMap.js","../../../source/utilities/everyArg.js","../../../source/utilities/forOfFilter.js","../../../source/utilities/forOfFilterAsync.js","../../../source/utilities/filter.js","../../../source/utilities/flow.js","../../../source/utilities/flowAsync.js","../../../source/utilities/forMap.js","../../../source/utilities/arraysToObject.js","../../../source/utilities/has.js","../../../source/utilities/hasDot.js","../../../source/utilities/ifNotAssign.js","../../../source/utilities/interval.js","../../../source/utilities/merge.js","../../../source/utilities/model.js","../../../source/utilities/pair.js","../../../source/utilities/concurrentStatus.js","../../../source/utilities/promise.js","../../../source/utilities/propertyMatch.js","../../../source/utilities/setKey.js","../../../source/utilities/setValue.js","../../../source/utilities/store.js","../../../source/utilities/stubArray.js","../../../source/utilities/stubFalse.js","../../../source/utilities/stubObject.js","../../../source/utilities/stubString.js","../../../source/utilities/stubTrue.js","../../../source/utilities/timesAsync.js","../../../source/utilities/toggle.js","../../../source/utilities/uid.js","../../../source/utilities/virtualStorage.js","../../../source/utilities/inAsync.js","../../../source/utilities/inSync.js","../../../source/browser/agent.js","../../../source/browser/event.js","../../../source/browser/isEnter.js","../../../source/browser/frag.js","../../../source/browser/append.js","../../../source/browser/attribute.js","../../../source/browser/selector.js","../../../source/browser/importScript.js","../../../source/browser/ready.js","../../../source/browser/info.js","../../../source/browser/dimensions.js","../../../source/browser/storage.js","../../../source/browser/console.js","../../../source/browser/is.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0;index < arrayLength;index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [key, value] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst zipedObject = {};\n\teachArray(properties, (item, key) => {\n\t\tzipedObject[item] = values[key];\n\t});\n\treturn zipedObject;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst unZippedKeys = [];\n\tconst values = [];\n\teachObject(object, (item, key) => {\n\t\tunZippedKeys.push(key);\n\t\tvalues.push(item);\n\t});\n\treturn [unZippedKeys, values];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(compactMapArray, compactMapAsyncArray,\n\tcompactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0;index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn (isEqual(on, value)) ? off : on;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from '../objects/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isBoolean } from '../types/isBoolean.js';\nimport { keys } from '../objects/keys.js';\nimport { noop } from '../utilities/noop';\n/**\n * Checks to see of the browser agent has a string.\n *\n * @function isAgent\n * @category browser\n * @type {Function}\n * @param {String} source - The string to search for.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isAgent, assert } from '@universalweb/acid';\n * assert(isAgent('NotThere'), false);\n */\nexport function isAgent(source) {\n\treturn (hasValue(source)) ? isAgent[source] : keys(isAgent);\n}\nconst userAgent = globalThis.navigator?.userAgentData;\nif (userAgent) {\n\teachObject(userAgent, (value, key) => {\n\t\tif (isBoolean(value) && value) {\n\t\t\tisAgent[key] = value;\n\t\t}\n\t});\n\teachArray(userAgent.brands, (value) => {\n\t\tisAgent[value.brand] = value.version;\n\t});\n} else if (navigator.userAgent) {\n\tlet userAgentNormalized = navigator.userAgent.toLowerCase();\n\tuserAgentNormalized = userAgentNormalized.replace(/_/g, '.');\n\tuserAgentNormalized = userAgentNormalized.replace(/[#_,;()]/g, '');\n\tconst userAgentSplit = userAgentNormalized.split(/ |\\//);\n\teachArray(userAgentSplit, (item) => {\n\t\tisAgent[item] = true;\n\t});\n}\n\n","/**\n * Attaches an event listener to a node.\n *\n * @function eventAdd\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventAdd(document.body, 'click', () => {console.log('CLICKED');});\n * // = > document.body\n */\nexport function eventAdd(node, eventName, callback, useCapture) {\n\tnode.addEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n/**\n * Attaches an event listener to a node.\n *\n * @function eventRemove\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventRemove(document.body, () => {console.log('CLICKED');});\n * // = > Undefined\n */\nexport function eventRemove(node, eventName, callback, useCapture) {\n\tnode.removeEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n\n","/**\n * Checks if the keycode of the event is strictly equal to 13.\n *\n * @function isEnter\n * @category browser\n * @type {Function}\n * @param {Object} eventObject - Object to be checked.\n * @returns {Boolean} - Returns true if the keycode property of the object equals 13.\n *\n * @example\n * isEnter('click');\n * // => false\n */\nexport function isEnter(eventObject) {\n\treturn eventObject.keyCode === 13;\n}\n\n","/**\n * Create a document fragment.\n *\n * @function createFragment\n * @category browser\n * @type {Function}\n * @ignore\n * @returns {Fragment} - Returns a new document fragment.\n */\nexport const createFragment = document.createDocumentFragment.bind(document);\n","/**\n * Append a DOM node.\n *\n * @function append\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @ignore\n * @param {Node} parentNode - The parent node.\n * @param {Node} child - The node to be appended.\n * @returns {undefined} - Returns the child.\n */\nexport function append(parentNode, child) {\n\tparentNode.appendChild(child);\n\treturn child;\n}\n","import { eachObject } from '../objects/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { mapArray } from '../arrays/map.js';\nimport { zipObject } from '../objects/zip.js';\n/**\n * Assign attributes to a DOM node.\n *\n * @function nodeAttribute\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @async\n * @param {Node} node - The DOM node.\n * @param {Object|Array} object - Object with key being the attribute name and the value being the attribute value. If an array is given it will get the values corresponding to the array items.\n * @returns {Object|Node} - If using an array this returns an object of attribute names as keys and their values as the property value. If using an object this will return the provided node.\n *\n * @example\n * nodeAttribute(document.body, { 'data-example': 'test'});\n */\nexport function nodeAttribute(node, object) {\n\tif (isArray(object)) {\n\t\treturn zipObject(object, mapArray(object, (item) => {\n\t\t\treturn node.getAttribute(item);\n\t\t}));\n\t}\n\teachObject(object, (item, key) => {\n\t\tnode.setAttribute(key, item);\n\t});\n\treturn node;\n}\n\n","import { restString } from '../strings/range.js';\nconst dotString = '.';\nconst poundString = '#';\nconst classTest = /^.[\\w_-]+$/;\nconst tagTest = /^[A-Za-z]+$/;\nconst regexSpace = /\\s/;\n/**\n * Wrapper around getElementsByClassName.\n *\n * @function getByClass\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByClass = document.getElementsByClassName.bind(document);\n/**\n * Wrapper around getElementsByTagName.\n *\n * @function getByTag\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByTag = document.getElementsByTagName.bind(document);\n/**\n * Wrapper around getElementsByIdName.\n *\n * @function getById\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getById = document.getElementById.bind(document);\n/**\n * Wrapper around querySelector.\n *\n * @function querySelector\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelector = document.querySelector.bind(document);\n/**\n * Wrapper around querySelectorAll.\n *\n * @function querySelectorAll\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelectorAll = document.querySelectorAll.bind(document);\n/**\n * Returns relevant DOM node.\n *\n * @function selector\n * @category browser\n * @ignoreTest\n * @param {String} select - String to be evaluated.\n * @type {Function}\n * @returns {Node} - Returns a DOM node.\n *\n * @example\n * selector('#node');\n * // =>
\n */\nexport function selector(select) {\n\tconst firstLetter = select[0];\n\tswitch (firstLetter) {\n\t\tcase poundString: {\n\t\t\tif (!regexSpace.test(select)) {\n\t\t\t\treturn getById(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase dotString: {\n\t\t\tif (classTest.test(select)) {\n\t\t\t\treturn getByClass(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tif (tagTest.test(select)) {\n\t\t\t\treturn getByTag(select);\n\t\t\t}\n\t\t}\n\t}\n\treturn querySelectorAll(select);\n}\n\n","import { append } from './append.js';\nimport { eventAdd } from './event.js';\nimport { hasDot } from '../utilities/hasDot.js';\nimport { nodeAttribute } from './attribute.js';\nimport { promise } from '../utilities/promise.js';\nimport { querySelector } from './selector.js';\nconst createElementCache = document.createElement.bind(document);\nconst nodeAttachLoadingEvents = (node) => {\n\treturn promise((accept) => {\n\t\teventAdd(node, 'load', accept, true);\n\t\teventAdd(node, 'error', accept, true);\n\t\tappend(querySelector('head'), node);\n\t});\n};\n/**\n * Asynchronously import a js file and append it to the head node.\n * If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity.\n *\n * @function importjs\n * @category browser\n * @type {Function}\n * @async\n * @param {*} url - URL of the script to import. If not \".\" is found in the file name \".js\" will be appended.\n * @returns {Promise} - Returns a promise which returns a \"load\" or \"error\" event associated with the script.\n *\n * @example\n * importjs('core.js');\n * importjs('core');\n */\nexport function importjs(url) {\n\tconst src = hasDot(url) && url || `${url}.js`;\n\tconst node = nodeAttribute(createElementCache('script'), {\n\t\tasync: '',\n\t\tsrc\n\t});\n\treturn nodeAttachLoadingEvents(node);\n}\n\n","import { eventAdd } from './event.js';\nimport { getById } from './selector.js';\nimport { importjs } from './importScript.js';\n/**\n * Runs a function if the document has finished loading. If not, add an eventlistener.\n *\n * @function isDocumentReady\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Function} callable - Function to be run.\n * @returns {Boolean|Function} - If the document is ready, returns a function. If not, return false.\n *\n * @example\n * isDocumentReady(() => {return 1});\n * // => 1\n */\nexport function isDocumentReady(callable) {\n\tconst state = document.readyState;\n\tconst checkStatus = state === 'interactive' || state === 'completed' || state === 'complete';\n\tif (checkStatus) {\n\t\treturn (callable) ? callable() : true;\n\t}\n\tif (callable) {\n\t\teventAdd(document, 'DOMContentLoaded', callable);\n\t}\n\treturn false;\n}\nisDocumentReady(() => {\n\tconst scriptTag = getById('AcidLib');\n\tconst scriptName = (scriptTag && scriptTag.getAttribute('data-index')) || '/index';\n\timportjs(scriptName);\n});\n","const protocol = location.protocol;\nconst protocolSocket = (protocol === 'http:') ? 'ws' : 'wss';\nconst hostname = location.hostname;\n/**\n * Holds client hardware, browser, and host info.\n *\n * @memberof $\n * @category browser\n * @ignoreTest\n * @property {Object} info - Client hardware & host info.\n * @type {Object}\n */\nexport const info = {\n\thardware: {\n\t\tcores: navigator.hardwareConcurrency\n\t},\n\thost: {\n\t\tname: hostname,\n\t\tprotocol,\n\t\tprotocolSocket,\n\t}\n};\n\n","import { assign } from '../objects/assign.js';\nimport { eventAdd } from './event.js';\nimport { info } from './info.js';\nimport { isDocumentReady } from './ready.js';\nexport function saveDimensions() {\n\tassign(info, {\n\t\tbodyHeight: document.body.offsetHeight,\n\t\tbodyWidth: document.body.offsetWidth,\n\t\twindowHeight: window.innerHeight,\n\t\twindowWidth: window.innerWidth,\n\t});\n}\n/**\n * Save current document & window dimensions to the info property.\n *\n * @function updateDimensions\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * updateDimensions();\n */\nexport function updateDimensions() {\n\tsaveDimensions();\n}\nisDocumentReady(updateDimensions);\neventAdd(window, 'load', updateDimensions, true);\neventAdd(window, 'resize', updateDimensions, true);\n\n","/**\n * LocalStorage Module..\n *\n * @module browser/storage\n */\nimport { hasValue } from '../types/hasValue.js';\nimport { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nimport { virtualStorage } from '../utilities/virtualStorage.js';\nexport let hasLocal;\nfunction hasStorage(storeCheck) {\n\ttry {\n\t\tstoreCheck().removeItem('TESTING');\n\t\thasLocal = true;\n\t} catch (e) {\n\t\thasLocal = false;\n\t}\n}\nhasStorage(() => {\n\treturn localStorage;\n});\n/**\n * Constructs a virtual storage container with localStorage support.\n * BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported.\n * If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed.\n * BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed.\n *\n * @class BrowserStorage\n * @category browser\n * @returns {BrowserStorage} - Returns a new instance of BrowserStorage.\n *\n * @example\n * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n * const storageBrowserStorage = construct(BrowserStorage);\n * storageBrowserStorage.setItem('key', 'value');\n * assert(storageBrowserStorage.getItem('key'), 'value');\n */\nexport class BrowserStorage {\n\tconstructor(initialObject) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local = localStorage;\n\t\t}\n\t\tthis.storage = virtualStorage(initialObject);\n\t}\n\thasLocal = hasLocal;\n\t/**\n\t * Save an item to a browserStorage.\n\t *\n\t * @function setItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.setItem(key, (isString(value)) ? value : stringify(value));\n\t\t}\n\t\treturn this.storage.setItem(key, value);\n\t}\n\t/**\n\t * Get an item from a browserStorage.\n\t *\n\t * @function getItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tgetItem(key) {\n\t\tconst item = this.storage.getItem(key);\n\t\tif (hasValue(item)) {\n\t\t\treturn item;\n\t\t}\n\t\tif (!hasValue(item) && this.hasLocal) {\n\t\t\treturn this.local.getItem(key);\n\t\t}\n\t}\n\t/**\n\t * Clears all data for the browserStorage including all of localStorage if supported.\n\t *\n\t * @function clear\n\t * @class BrowserStorage\n\t * @category browser\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.clear();\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tclear() {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.clear();\n\t\t}\n\t\tthis.storage.clear();\n\t}\n\t/**\n\t * Remove an item from a browserStorage.\n\t *\n\t * @class BrowserStorage\n\t * @category browser\n\t * @function removeItem\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.removeItem('key');\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tremoveItem(key) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.removeItem(key);\n\t\t}\n\t\tthis.storage.removeItem(key);\n\t}\n}\n/**\n * The browserStorage function is a factory which wraps the BrowserStorage class constructor.\n *\n * @function browserStorage\n * @category browser\n * @type {Function}\n * @returns {*} - Returns a new BrowserStorage Object.\n *\n * @example\n * const storageBrowserStorage = browserStorage();\n * // => New BrowserStorage Object\n */\nexport function browserStorage(virtualFlag) {\n\treturn new BrowserStorage(virtualFlag);\n}\n\n","import { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nconst generateTheme = (color, bg) => {\n\treturn `color:${color};background:${bg};`;\n};\nexport const themes = {\n\talert: generateTheme('#fff', '#f44336'),\n\timportant: generateTheme('#fff', '#E91E63'),\n\tnotify: generateTheme('#fff', '#651FFF'),\n\twarning: generateTheme('#000', '#FFEA00'),\n};\n/**\n * Console.trace wrapper with theme support.\n *\n * @function cnsl\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Object} value - The value to be logged.\n * @param {String} themeName - The name of the theme to be used.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnsl('Lucy', 'notify');\n * // 'Lucy'\n */\nexport const cnsl = (value, themeName) => {\n\tconst data = isString(value) ? value : stringify(value);\n\tif (themeName === 'alert' || themeName === 'warning') {\n\t\treturn console.trace(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n\t}\n\tconsole.log(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n};\n/**\n * Create color themes for cnsl method.\n *\n * @function cnslTheme\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {String} themeName - The name of the theme.\n * @param {String} color - The text color.\n * @param {String} background - The background color of the block.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnslTheme('BlackNWhite', '#fff', '#000');\n */\nexport const cnslTheme = (themeName, color, background) => {\n\tthemes[themeName] = generateTheme(color, background);\n};\n\n","import { difference } from '../arrays/difference.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Checks if value is a plain DOM Node.\n *\n * @function isDom\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDom, assert } from '@universalweb/acid';\n * assert(isDom(document.querySelectorAll('head')), true);\n */\nexport function isDom(source) {\n\treturn source && source.nodeType !== 9;\n}\n/**\n * Checks if the value is a HTMLCollection.\n *\n * @function isHTMLCollection\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isHTMLCollection, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isHTMLCollection(document.getElementsByClassName('test')), true);\n */\nconst objectHTMLCollection = '[object HTMLCollection]';\nexport function isHTMLCollection(source) {\n\treturn (hasValue(source)) ? source.toString() === objectHTMLCollection : false;\n}\n/**\n * Checks if the value is a NodeList.\n *\n * @function isNodeList\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNodeList, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isNodeList(document.querySelectorAll('.test')), true);\n */\nconst objectNodeList = '[object NodeList]';\nexport function isNodeList(source) {\n\treturn (hasValue(source)) ? source.toString() === objectNodeList : false;\n}\n"],"names":["chunk","array","size","chunked","index","forEach","item","key","push","clearArray","source","length","cloneArray","slice","isUndefined","undefined","hasLength","Boolean","isNull","hasValue","returnValue","eachArray","iteratee","thisBind","additionalArg","arrayLength","call","compactMapArray","results","thisCall","arrayOriginal","returned","async","eachAsyncArray","compactMapAsyncArray","result","sign","Math","isNegative","rangeUp","start","end","step","sourceArray","position","rangeDown","range","isArray","Array","isNotArray","reflectConstruct","Reflect","construct","target","argumentsList","newTarget","args","ensureArray","flattenDeep","flat","Infinity","callback","difference","sources","differencesMap","Map","differences","currentArray","parentIndex","child","childIndex","childRoot","get","count","set","drop","amount","upTo","splice","dropRight","eachRight","additionalArgument","eachRightAsync","everyArray","sourceLength","everyAsyncArray","filterArray","filterAsyncArray","first","flatten","level","i","reduce","previousValue","currentValue","concat","initial","intersection","arrays","otherItem","includes","invokeArray","regexToPath","regexCloseBracket","emptyString","toPath","replace","split","propertyString","link","objectKeys","Object","keys","hasOwn","hasKeys","properties","pathArray","lastPath","pop","initialPathObject","hasAnyKeys","find","isConstructor","constructor","isConstructorFactory","constructorName","name","isConstructorNameFactory","isTypeFactory","method","primarySource","otherSources","isBufferCall","isBuffer","isPlainObject","toString","trim","isEqual","equals","sourceProperties","isMatchArray","compareArray","mathNativeMax","max","largest","last","indexFrom","mapArray","concurrentEachArray","Promise","all","mapAsyncArray","mapRightArray","trueIndex","mapWhile","subtract","minuend","subtrahend","sortNumberAscending","numberList","sort","partition","predicate","rejected","subtractReverse","sortNumberDescening","remove","removeThese","removeBy","rest","right","floor","random","randomInt","min","isNumberEqual","arrayFrom","from","toArray","arrayLike","mapFn","thisArg","shuffle","shuffleArray","value","sample","sampleArray","used","mathNativeMin","smallest","getNumberInsertIndex","insertIndex","take","endIndex","takeRight","indexRight","onlyUnique","indexOf","sortUnique","unique","isSorted","filter","union","untilFalseArray","untilTrueArray","whileCompactMap","whileEachArray","whileMapArray","without","sourcesSet","Set","has","xor","xorMap","xored","zip","map","unZip","arraySet","ensureBuffer","Buffer","alloc","clearBuffer","fill","isFunction","Function","isNumberCall","isNumber","isNotNumber","isString","String","isNotString","objectAssign","assign","assignToObject","assignToClass","prototype","extendClass","countBy","collection","object","countKey","propertyName","countWithoutKey","findIndexCache","element","indexMatch","findIndex","id","findItem","sortCollectionDescendingFilter","previous","next","ifMatch","previousKey","nextKey","sortCollectionDescending","getLowest","sortCollectionAscendingFilter","sortCollectionAscending","getHighest","groupBy","sortedObject","indexBy","invokeCollection","property","invokeCollectionAsync","pluckObject","targets","pluck","sortObjectsAlphabetically","localeCompare","sortCollectionAlphabetically","sortObjectsAlphabeticallyReverse","sortCollectionAlphabeticallyReverse","getFileExtension","substring","lastIndexOf","getFilename","regexTestFactory","regexType","test","isFileCSS","isFileHTML","isFileJS","isFileJSON","after","callable","point","ary","before","eachAsyncObject","propertyCount","eachObject","objectKeysArray","forEachAsync","values","valuesLength","isSetCall","isSet","forOf","isGeneratorCall","isGenerator","forOfAsync","generatorArgs","isAsyncCall","isAsync","generateLoop","arrayLoop","arrayLoopAsync","objectLoop","objectLoopAsync","forOfLoop","forOfLoopAsync","argument1","argument2","argument3","isIterateeAsync","each","Chain","methods","this","addChainMethod","thisChain","methodName","setValue","done","chain","config","curry","arity","curries","curried","curryArgs","curryRight","unshift","noop","times","timesMap","Timers","list","clearTimeout","delete","time","currentThis","setTimeout","clear","timers","timer","clearTimers","applyNative","apply","thisArgument","debounce","debounced","bind","ifInvoke","negate","nthArg","once","getType","cloneType","sourceType","forOfMap","resultsObject","methodPush","add","methodPushBound","methodSet","forOfMapAsync","resultsGenerator","mapAsyncObject","thisObject","mapObject","original","over","iteratees","everyAsyncObject","everyObject","forOfEvery","forOfEveryAsync","every","overEvery","predicates","arg","reArg","indexes","throttle","throttled","shouldThrottle","wrap","wrapper","functionPrototype","cacheNativeMethod","getPropNames","getOwnPropertyNames","getPropDesc","getOwnPropertyDescriptor","defProp","defineProperty","hasProp","hasOwnProperty","isSame","is","augend","addend","deduct","divide","increment","multiply","calcProgress","total","currentAmount","randomFloat","remainder","subtractAll","a","b","sumAll","isNumberInRange","isNumberNotInRange","isPositive","isZero","objectEntries","entries","getEntries","compactKeys","compactedKeys","compactMapAsyncObject","compactMapObject","filterObject","filterAsyncObject","invert","isMatchObject","sourceKeys","targetKeys","escapeRegexRegex","escapeRegex","arrayToRegex","makeSafe","RegExp","join","isRegexCall","isRegex","omit","blacklist","blacklistRegex","numberToString","pick","whitelist","objectSize","objectLengthProperty","objectSizeProperty","zipObject","zipedObject","unZipObject","unZippedKeys","normalizeCase","camelCase","toLowerCase","toUpperCase","space","kebabCase","snakeCase","upperCase","lowerCase","insertInRange","string","text","rightString","chunkString","match","initialString","restString","replaceList","words","rawURLDecodeRegex","andRegex","lessThanRegex","moreThanRegex","doubleQuoteRegex","rawURLDecode","decodeURIComponent","htmlEntities","sanitize","tokenizeRegEx","wordsRegEx","tokenize","truncate","maxLength","stringLength","breakAll","breakAllLength","truncateDown","truncateRight","truncateUp","getWords","upperFirstLetter","upperFirst","upperFirstOnly","upperFirstAll","upperFirstOnlyAll","getTypeName","isArguments","isMapCall","isMap","typedArrayRegex","arrayConstructorName","isTypedArray","noValue","isArrayLike","strictFlag","isBigIntCall","isBigInt","isBooleanCall","isBoolean","isArrayBufferCall","isArrayBuffer","isChild","sourceChild","targetParent","constructorNames","isCloneable","isDateCall","isDate","isEmpty","isFalse","isF32Call","isF32","isF64Call","isF64","isInteger","Number","isFloat","isI16Call","isI16","isI32Call","isI32","isI8Call","isI8","isIterable","Symbol","iterator","isPromise","isKindAsync","isParent","sourceParent","targetChild","isPrimitive","type","isRelated","targetOne","targetTwo","isSafeInteger","isSafeInt","isSameType","other","otherType","isTrue","isU16Call","isU16","isU32Call","isU32","isU8Call","isU8","isU8CCall","isU8C","isWeakMapCall","isWeakMap","isDeno","globalThis","Deno","isNodejs","process","versions","node","isTruthy","returnIfTrue","isFalsy","ifValue","optional","notEqual","jsonNative","JSON","jsonParse","reviver","parse","stringify","createAssertError","expected","localOptions","options","errorTitle","title","file","Error","assertAsync","sourceArg","assert","bindAll","bindThis","targetAssign","structuredCloneSafe","structuredClone","clone","concurrent","compact","sourceKeysLength","targetObject","keyName","forOfCompactMapAsync","forOfCompactMap","compactMap","everyArg","forOfFilter","forOfFilterAsync","returnFlow","flow","flowRight","flowAsync","flowAsyncRight","forMap","cloned","methodBound","arraysToObject","search","hasDot","ifNotAssign","rootObject","equalThis","Intervals","clearInterval","setInterval","intervals","interval","clearIntervals","merge","currentSource","sourceItem","sourceKey","Model","static","modelName","modelSource","models","model","pair","concurrentStatus","queue","allSettled","promise","propertyMatch","compared","setKey","Store","data","Proxy","proxySource","console","log","stubArray","stubFalse","stubObject","stubString","stubTrue","timesAsync","timesMapAsync","toggle","on","off","UniqID","totalActive","freed","totalFree","shift","free","isActive","shouldReset","reset","uniqID","VirtualStorage","initialObject","items","getItem","hasItem","setItem","removeItem","virtualStorage","inAsync","inSync","isAgent","userAgent","navigator","userAgentData","brands","brand","version","userAgentNormalized","eventAdd","eventName","useCapture","addEventListener","eventRemove","removeEventListener","isEnter","eventObject","keyCode","createFragment","document","createDocumentFragment","append","parentNode","appendChild","nodeAttribute","getAttribute","setAttribute","classTest","tagTest","regexSpace","getByClass","getElementsByClassName","getByTag","getElementsByTagName","getById","getElementById","querySelector","querySelectorAll","selector","select","createElementCache","createElement","importjs","url","src","accept","nodeAttachLoadingEvents","isDocumentReady","state","readyState","scriptTag","protocol","location","protocolSocket","hostname","info","hardware","cores","hardwareConcurrency","host","saveDimensions","bodyHeight","body","offsetHeight","bodyWidth","offsetWidth","windowHeight","window","innerHeight","windowWidth","innerWidth","updateDimensions","hasLocal","storeCheck","e","hasStorage","localStorage","BrowserStorage","local","storage","browserStorage","virtualFlag","generateTheme","color","bg","themes","alert","important","notify","warning","cnsl","themeName","trace","cnslTheme","background","isDom","nodeType","isHTMLCollection","isNodeList"],"mappings":"AAcO,SAASA,EAAMC,EAAOC,EAAO,GACnC,MAAMC,EAAU,GAChB,IAAIC,EAAQ,EAUZ,OATAH,EAAMI,SAAQ,CAACC,EAAMC,KACdA,EAAML,IACXC,EAAQK,KAAK,IACTD,GACHH,KAGFD,EAAQC,GAAOI,KAAKF,EAAK,IAEnBH,CACR,CCdO,SAASM,EAAWC,GAE1B,OADAA,EAAOC,OAAS,EACTD,CACR,CCHO,SAASE,EAAWF,GAC1B,OAAOA,EAAOG,OACf,CCJO,SAASC,EAAYJ,GAC3B,YAAkBK,IAAXL,CACR,CCAO,SAASM,EAAUN,GACzB,OAAOO,QAAQP,EAAOC,OACvB,CCFO,SAASO,EAAOR,GACtB,OAAkB,OAAXA,CACR,CCDO,SAASS,EAAST,GACxB,OAAQI,EAAYJ,K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KAAKwb,UACRxb,KAAK8b,MAAMjF,WAAWvqB,GAEvB0T,KAAK+b,QAAQlF,WAAWvqB,EACxB,EAcK,SAAS0vB,GAAeC,GAC9B,OAAO,IAAIJ,GAAeI,EAC3B,CCrJA,MAAMC,GAAgB,CAACC,EAAOC,IACtB,SAASD,gBAAoBC,KAExBC,GAAS,CACrBC,MAAOJ,GAAc,OAAQ,WAC7BK,UAAWL,GAAc,OAAQ,WACjCM,OAAQN,GAAc,OAAQ,WAC9BO,QAASP,GAAc,OAAQ,YAiBnBQ,GAAO,CAACnlB,EAAOolB,KAC3B,MAAM7H,EAAO1a,GAAS7C,GAASA,EAAQmZ,GAAUnZ,GACjD,GAAkB,UAAdolB,GAAuC,YAAdA,EAC5B,OAAO1H,QAAQ2H,MAAM,KAAK9H,IAAQ,GAAGuH,GAAOM,uDAE7C1H,QAAQC,IAAI,KAAKJ,IAAQ,GAAGuH,GAAOM,sDAA8D,EAiBrFE,GAAY,CAACF,EAAWR,EAAOW,KAC3CT,GAAOM,GAAaT,GAAcC,EAAOW,EAAW,EClC9C,SAASC,GAAMtwB,GACrB,OAAOA,GAA8B,IAApBA,EAAOuwB,QACzB,CAgBO,SAASC,GAAiBxwB,GAChC,QAAQS,EAAST,IAFW,4BAEAA,EAAO6H,UACpC,CAgBO,SAAS4oB,GAAWzwB,GAC1B,QAAQS,EAAST,IAFK,sBAEMA,EAAO6H,UACpC"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../../../source/arrays/chunk.js","../../../source/arrays/clear.js","../../../source/arrays/clone.js","../../../source/types/isUndefined.js","../../../source/utilities/hasLength.js","../../../source/types/isNull.js","../../../source/types/hasValue.js","../../../source/utilities/returnValue.js","../../../source/arrays/each.js","../../../source/arrays/compactMap.js","../../../source/arrays/eachAsync.js","../../../source/arrays/compactMapAsync.js","../../../source/numbers/isNegative.js","../../../source/arrays/range.js","../../../source/types/isArray.js","../../../source/classes/construct.js","../../../source/arrays/ensure.js","../../../source/arrays/flattenDeep.js","../../../source/utilities/forEach.js","../../../source/arrays/difference.js","../../../source/arrays/drop.js","../../../source/arrays/dropRight.js","../../../source/arrays/eachRight.js","../../../source/arrays/eachRightAsync.js","../../../source/arrays/every.js","../../../source/arrays/everyAsync.js","../../../source/arrays/filter.js","../../../source/arrays/filterAsync.js","../../../source/arrays/first.js","../../../source/arrays/flatten.js","../../../source/arrays/initial.js","../../../source/arrays/intersect.js","../../../source/arrays/invoke.js","../../../source/utilities/toPath.js","../../../source/utilities/get.js","../../../source/objects/keys.js","../../../source/objects/hasKeys.js","../../../source/types/isConstructor.js","../../../source/types/isTypeFactory.js","../../../source/types/isBuffer.js","../../../source/types/isPlainObject.js","../../../source/utilities/isEqual.js","../../../source/arrays/isMatch.js","../../../source/arrays/largest.js","../../../source/arrays/last.js","../../../source/arrays/map.js","../../../source/arrays/concurrentEach.js","../../../source/arrays/mapAsync.js","../../../source/arrays/mapRight.js","../../../source/arrays/mapWhile.js","../../../source/math/subtract.js","../../../source/arrays/sortNumberAscending.js","../../../source/arrays/partition.js","../../../source/math/subtractReverse.js","../../../source/arrays/sortNumberDescening.js","../../../source/arrays/remove.js","../../../source/arrays/rest.js","../../../source/arrays/right.js","../../../source/math/randomInt.js","../../../source/numbers/isNumberEqual.js","../../../source/internal/array.js","../../../source/arrays/shuffle.js","../../../source/arrays/sample.js","../../../source/arrays/smallest.js","../../../source/arrays/getNumberInsertIndex.js","../../../source/arrays/take.js","../../../source/arrays/takeRight.js","../../../source/arrays/unique.js","../../../source/arrays/union.js","../../../source/arrays/untilFalse.js","../../../source/arrays/untilTrue.js","../../../source/arrays/whileCompactMap.js","../../../source/arrays/whileEach.js","../../../source/arrays/whileMap.js","../../../source/arrays/without.js","../../../source/arrays/xor.js","../../../source/arrays/zip.js","../../../source/buffers/ensure.js","../../../source/buffers/clear.js","../../../source/types/isFunction.js","../../../source/types/isNumber.js","../../../source/types/isString.js","../../../source/objects/assign.js","../../../source/classes/extendClass.js","../../../source/collection/countBy.js","../../../source/collection/countKey.js","../../../source/collection/countWithoutKey.js","../../../source/collection/findIndexCache.js","../../../source/collection/findIndex.js","../../../source/collection/findItem.js","../../../source/collection/sortCollectionDescending.js","../../../source/collection/getLowest.js","../../../source/collection/sortCollectionAscending.js","../../../source/collection/getHighest.js","../../../source/collection/groupBy.js","../../../source/collection/indexBy.js","../../../source/collection/invoke.js","../../../source/collection/invokeAsync.js","../../../source/objects/pluckObject.js","../../../source/collection/pluck.js","../../../source/collection/sortCollectionAlphabetically.js","../../../source/collection/sortCollectionAlphabeticallyReverse.js","../../../source/files/getExtension.js","../../../source/files/getFilename.js","../../../source/internal/regexTestFactory.js","../../../source/files/isFileCSS.js","../../../source/files/isFileHTML.js","../../../source/files/isFileJS.js","../../../source/files/isFileJSON.js","../../../source/functions/after.js","../../../source/functions/ary.js","../../../source/functions/before.js","../../../source/objects/eachAsync.js","../../../source/objects/each.js","../../../source/utilities/forEachAsync.js","../../../source/types/isSet.js","../../../source/utilities/forOf.js","../../../source/types/isGenerator.js","../../../source/utilities/forOfAsync.js","../../../source/types/isAsync.js","../../../source/utilities/generateLoop.js","../../../source/utilities/each.js","../../../source/functions/chain.js","../../../source/functions/curry.js","../../../source/functions/curryRight.js","../../../source/utilities/noop.js","../../../source/utilities/times.js","../../../source/utilities/timer.js","../../../source/internal/apply.js","../../../source/functions/debounce.js","../../../source/functions/ifInvoke.js","../../../source/functions/negate.js","../../../source/functions/nthArg.js","../../../source/functions/once.js","../../../source/types/getType.js","../../../source/types/cloneType.js","../../../source/utilities/forOfMap.js","../../../source/utilities/forOfMapAsync.js","../../../source/objects/mapAsync.js","../../../source/objects/map.js","../../../source/utilities/map.js","../../../source/functions/over.js","../../../source/objects/everyAsync.js","../../../source/objects/every.js","../../../source/utilities/forOfEvery.js","../../../source/utilities/forOfEveryAsync.js","../../../source/utilities/every.js","../../../source/functions/overEvery.js","../../../source/functions/rearged.js","../../../source/functions/throttle.js","../../../source/functions/wrap.js","../../../source/utilities/cacheNativeMethod.js","../../../source/internal/object.js","../../../source/internal/isSame.js","../../../source/math/add.js","../../../source/math/deduct.js","../../../source/math/divide.js","../../../source/math/increment.js","../../../source/math/multiple.js","../../../source/math/progress.js","../../../source/math/randomFloat.js","../../../source/math/remainder.js","../../../source/math/subtractAll.js","../../../source/math/sumAll.js","../../../source/numbers/isNumberInRange.js","../../../source/numbers/isNumberNotInRange.js","../../../source/numbers/isPositive.js","../../../source/numbers/isZero.js","../../../source/numbers/isOdd.js","../../../source/numbers/isEven.js","../../../source/objects/getEntries.js","../../../source/objects/compactKeys.js","../../../source/objects/compactMapAsync.js","../../../source/objects/compactMap.js","../../../source/objects/filter.js","../../../source/objects/filterAsync.js","../../../source/objects/invert.js","../../../source/objects/isMatch.js","../../../source/regexps/escapeRegex.js","../../../source/regexps/arrayToRegex.js","../../../source/types/isRegex.js","../../../source/objects/omit.js","../../../source/objects/pick.js","../../../source/objects/size.js","../../../source/objects/zip.js","../../../source/strings/camelCase.js","../../../source/strings/kebabCase.js","../../../source/strings/snakeCase.js","../../../source/strings/upperCase.js","../../../source/strings/lowerCase.js","../../../source/strings/range.js","../../../source/strings/replace.js","../../../source/strings/sanitize.js","../../../source/strings/tokenize.js","../../../source/strings/truncate.js","../../../source/strings/typography.js","../../../source/types/getTypeName.js","../../../source/types/isArguments.js","../../../source/types/isMap.js","../../../source/types/isTypedArray.js","../../../source/types/noValue.js","../../../source/types/isArrayLike.js","../../../source/types/isBigInt.js","../../../source/types/isBoolean.js","../../../source/types/isArrayBuffer.js","../../../source/types/isChild.js","../../../source/types/isCloneable.js","../../../source/types/isDate.js","../../../source/types/isEmpty.js","../../../source/types/isFalse.js","../../../source/types/isF32.js","../../../source/types/isF64.js","../../../source/types/isFloat.js","../../../source/types/isI16.js","../../../source/types/isI32.js","../../../source/types/isI8.js","../../../source/types/isIterable.js","../../../source/types/isPromise.js","../../../source/types/isKindAsync.js","../../../source/types/isParent.js","../../../source/types/isPrimitive.js","../../../source/types/isRelated.js","../../../source/types/isSafeInt.js","../../../source/types/isSameType.js","../../../source/types/isTrue.js","../../../source/types/isU16.js","../../../source/types/isU32.js","../../../source/types/isU8.js","../../../source/types/isU8C.js","../../../source/types/isWeakMap.js","../../../source/types/isDeno.js","../../../source/types/isNode.js","../../../source/types/isTruthy.js","../../../source/types/isFalsy.js","../../../source/utilities/ifValue.js","../../../source/utilities/notEqual.js","../../../source/utilities/json.js","../../../source/utilities/assert.js","../../../source/utilities/bindAll.js","../../../source/utilities/clear.js","../../../source/utilities/clone.js","../../../source/utilities/concurrent.js","../../../source/utilities/compact.js","../../../source/utilities/forOfCompactMapAsync.js","../../../source/utilities/forOfCompactMap.js","../../../source/utilities/compactMap.js","../../../source/utilities/everyArg.js","../../../source/utilities/forOfFilter.js","../../../source/utilities/forOfFilterAsync.js","../../../source/utilities/filter.js","../../../source/utilities/flow.js","../../../source/utilities/flowAsync.js","../../../source/utilities/forMap.js","../../../source/utilities/arraysToObject.js","../../../source/utilities/has.js","../../../source/utilities/hasDot.js","../../../source/utilities/ifNotAssign.js","../../../source/utilities/interval.js","../../../source/utilities/merge.js","../../../source/utilities/model.js","../../../source/utilities/pair.js","../../../source/utilities/concurrentStatus.js","../../../source/utilities/promise.js","../../../source/utilities/propertyMatch.js","../../../source/utilities/setKey.js","../../../source/utilities/setValue.js","../../../source/utilities/store.js","../../../source/utilities/stubArray.js","../../../source/utilities/stubFalse.js","../../../source/utilities/stubObject.js","../../../source/utilities/stubString.js","../../../source/utilities/stubTrue.js","../../../source/utilities/timesAsync.js","../../../source/utilities/toggle.js","../../../source/utilities/uid.js","../../../source/utilities/virtualStorage.js","../../../source/utilities/inAsync.js","../../../source/utilities/inSync.js","../../../source/browser/agent.js","../../../source/browser/event.js","../../../source/browser/isEnter.js","../../../source/browser/frag.js","../../../source/browser/append.js","../../../source/browser/attribute.js","../../../source/browser/selector.js","../../../source/browser/importScript.js","../../../source/browser/ready.js","../../../source/browser/info.js","../../../source/browser/dimensions.js","../../../source/browser/storage.js","../../../source/browser/console.js","../../../source/browser/is.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = isArray(propertyString) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [\n\t\tkey,\n\t\tvalue\n\t] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = isIterateeAsync ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = isIterateeAsync ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","/**\n * Checks if a number is odd & returns true or false.\n *\n * @function isOdd\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isOdd, assert } from '@universalweb/acid';\n * assert(isOdd(1), true);\n */\nexport function isOdd(source) {\n\treturn (source & 1) === 1;\n}\n","/**\n * Checks if a number is even & returns true or false.\n *\n * @function isEven\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEven, assert } from '@universalweb/acid';\n * assert(isEven(1), true);\n */\nexport function isEven(source) {\n\treturn (source & 1) === 0;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst source = {};\n\teachArray(properties, (item, key) => {\n\t\tsource[item] = values[key];\n\t});\n\treturn source;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst objectKeys = [];\n\tconst objectValues = [];\n\teachObject(object, (item, key) => {\n\t\tobjectKeys.push(key);\n\t\tobjectValues.push(item);\n\t});\n\treturn [\n\t\tobjectKeys,\n\t\tobjectValues,\n\t];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(\n\tcompactMapArray,\n\tcompactMapAsyncArray,\n\tcompactMapObject,\n\tcompactMapAsyncObject,\n\tforOfCompactMap,\n\tforOfCompactMapAsync\n);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn ((isEqual(on, value)) ? off : on);\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from '../objects/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isBoolean } from '../types/isBoolean.js';\nimport { keys } from '../objects/keys.js';\nimport { noop } from '../utilities/noop';\n/**\n * Checks to see of the browser agent has a string.\n *\n * @function isAgent\n * @category browser\n * @type {Function}\n * @param {String} source - The string to search for.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isAgent, assert } from '@universalweb/acid';\n * assert(isAgent('NotThere'), false);\n */\nexport function isAgent(source) {\n\treturn (hasValue(source)) ? isAgent[source] : keys(isAgent);\n}\nconst userAgent = globalThis.navigator?.userAgentData;\nif (userAgent) {\n\teachObject(userAgent, (value, key) => {\n\t\tif (isBoolean(value) && value) {\n\t\t\tisAgent[key] = value;\n\t\t}\n\t});\n\teachArray(userAgent.brands, (value) => {\n\t\tisAgent[value.brand] = value.version;\n\t});\n} else if (navigator.userAgent) {\n\tlet userAgentNormalized = navigator.userAgent.toLowerCase();\n\tuserAgentNormalized = userAgentNormalized.replace(/_/g, '.');\n\tuserAgentNormalized = userAgentNormalized.replace(/[#_,;()]/g, '');\n\tconst userAgentSplit = userAgentNormalized.split(/ |\\//);\n\teachArray(userAgentSplit, (item) => {\n\t\tisAgent[item] = true;\n\t});\n}\n\n","/**\n * Attaches an event listener to a node.\n *\n * @function eventAdd\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventAdd(document.body, 'click', () => {console.log('CLICKED');});\n * // = > document.body\n */\nexport function eventAdd(node, eventName, callback, useCapture) {\n\tnode.addEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n/**\n * Attaches an event listener to a node.\n *\n * @function eventRemove\n * @category browser\n * @type {Function}\n * @param {Node} node - Given node.\n * @param {String} eventName - A string representing the event type.\n * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs.\n * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.\n * @returns {Node} - Returns given node.\n *\n * @example\n * eventRemove(document.body, () => {console.log('CLICKED');});\n * // = > Undefined\n */\nexport function eventRemove(node, eventName, callback, useCapture) {\n\tnode.removeEventListener(eventName, callback, useCapture);\n\treturn node;\n}\n\n","/**\n * Checks if the keycode of the event is strictly equal to 13.\n *\n * @function isEnter\n * @category browser\n * @type {Function}\n * @param {Object} eventObject - Object to be checked.\n * @returns {Boolean} - Returns true if the keycode property of the object equals 13.\n *\n * @example\n * isEnter('click');\n * // => false\n */\nexport function isEnter(eventObject) {\n\treturn eventObject.keyCode === 13;\n}\n\n","/**\n * Create a document fragment.\n *\n * @function createFragment\n * @category browser\n * @type {Function}\n * @ignore\n * @returns {Fragment} - Returns a new document fragment.\n */\nexport const createFragment = document.createDocumentFragment.bind(document);\n","/**\n * Append a DOM node.\n *\n * @function append\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @ignore\n * @param {Node} parentNode - The parent node.\n * @param {Node} child - The node to be appended.\n * @returns {undefined} - Returns the child.\n */\nexport function append(parentNode, child) {\n\tparentNode.appendChild(child);\n\treturn child;\n}\n","import { eachObject } from '../objects/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { mapArray } from '../arrays/map.js';\nimport { zipObject } from '../objects/zip.js';\n/**\n * Assign attributes to a DOM node.\n *\n * @function nodeAttribute\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @async\n * @param {Node} node - The DOM node.\n * @param {Object|Array} object - Object with key being the attribute name and the value being the attribute value. If an array is given it will get the values corresponding to the array items.\n * @returns {Object|Node} - If using an array this returns an object of attribute names as keys and their values as the property value. If using an object this will return the provided node.\n *\n * @example\n * nodeAttribute(document.body, { 'data-example': 'test'});\n */\nexport function nodeAttribute(node, object) {\n\tif (isArray(object)) {\n\t\treturn zipObject(object, mapArray(object, (item) => {\n\t\t\treturn node.getAttribute(item);\n\t\t}));\n\t}\n\teachObject(object, (item, key) => {\n\t\tnode.setAttribute(key, item);\n\t});\n\treturn node;\n}\n\n","import { restString } from '../strings/range.js';\nconst dotString = '.';\nconst poundString = '#';\nconst classTest = /^.[\\w_-]+$/;\nconst tagTest = /^[A-Za-z]+$/;\nconst regexSpace = /\\s/;\n/**\n * Wrapper around getElementsByClassName.\n *\n * @function getByClass\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByClass = document.getElementsByClassName.bind(document);\n/**\n * Wrapper around getElementsByTagName.\n *\n * @function getByTag\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getByTag = document.getElementsByTagName.bind(document);\n/**\n * Wrapper around getElementsByIdName.\n *\n * @function getById\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const getById = document.getElementById.bind(document);\n/**\n * Wrapper around querySelector.\n *\n * @function querySelector\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelector = document.querySelector.bind(document);\n/**\n * Wrapper around querySelectorAll.\n *\n * @function querySelectorAll\n * @category browser\n * @ignoreTest\n * @type {Function}\n */\nexport const querySelectorAll = document.querySelectorAll.bind(document);\n/**\n * Returns relevant DOM node.\n *\n * @function selector\n * @category browser\n * @ignoreTest\n * @param {String} select - String to be evaluated.\n * @type {Function}\n * @returns {Node} - Returns a DOM node.\n *\n * @example\n * selector('#node');\n * // =>
\n */\nexport function selector(select) {\n\tconst firstLetter = select[0];\n\tswitch (firstLetter) {\n\t\tcase poundString: {\n\t\t\tif (!regexSpace.test(select)) {\n\t\t\t\treturn getById(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase dotString: {\n\t\t\tif (classTest.test(select)) {\n\t\t\t\treturn getByClass(restString(select));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tif (tagTest.test(select)) {\n\t\t\t\treturn getByTag(select);\n\t\t\t}\n\t\t}\n\t}\n\treturn querySelectorAll(select);\n}\n\n","import { append } from './append.js';\nimport { eventAdd } from './event.js';\nimport { hasDot } from '../utilities/hasDot.js';\nimport { nodeAttribute } from './attribute.js';\nimport { promise } from '../utilities/promise.js';\nimport { querySelector } from './selector.js';\nconst createElementCache = document.createElement.bind(document);\nconst nodeAttachLoadingEvents = (node) => {\n\treturn promise((accept) => {\n\t\teventAdd(node, 'load', accept, true);\n\t\teventAdd(node, 'error', accept, true);\n\t\tappend(querySelector('head'), node);\n\t});\n};\n/**\n * Asynchronously import a js file and append it to the head node.\n * If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity.\n *\n * @function importjs\n * @category browser\n * @type {Function}\n * @async\n * @param {*} url - URL of the script to import. If not \".\" is found in the file name \".js\" will be appended.\n * @returns {Promise} - Returns a promise which returns a \"load\" or \"error\" event associated with the script.\n *\n * @example\n * importjs('core.js');\n * importjs('core');\n */\nexport function importjs(url) {\n\tconst src = hasDot(url) && url || `${url}.js`;\n\tconst node = nodeAttribute(createElementCache('script'), {\n\t\tasync: '',\n\t\tsrc\n\t});\n\treturn nodeAttachLoadingEvents(node);\n}\n\n","import { eventAdd } from './event.js';\nimport { getById } from './selector.js';\nimport { importjs } from './importScript.js';\n/**\n * Runs a function if the document has finished loading. If not, add an eventlistener.\n *\n * @function isDocumentReady\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Function} callable - Function to be run.\n * @returns {Boolean|Function} - If the document is ready, returns a function. If not, return false.\n *\n * @example\n * isDocumentReady(() => {return 1});\n * // => 1\n */\nexport function isDocumentReady(callable) {\n\tconst state = document.readyState;\n\tconst checkStatus = state === 'interactive' || state === 'completed' || state === 'complete';\n\tif (checkStatus) {\n\t\treturn (callable) ? callable() : true;\n\t}\n\tif (callable) {\n\t\teventAdd(document, 'DOMContentLoaded', callable);\n\t}\n\treturn false;\n}\nisDocumentReady(() => {\n\tconst scriptTag = getById('AcidLib');\n\tconst scriptName = (scriptTag && scriptTag.getAttribute('data-index')) || '/index';\n\timportjs(scriptName);\n});\n","const protocol = location.protocol;\nconst protocolSocket = (protocol === 'http:') ? 'ws' : 'wss';\nconst hostname = location.hostname;\n/**\n * Holds client hardware, browser, and host info.\n *\n * @memberof $\n * @category browser\n * @ignoreTest\n * @property {Object} info - Client hardware & host info.\n * @type {Object}\n */\nexport const info = {\n\thardware: {\n\t\tcores: navigator.hardwareConcurrency\n\t},\n\thost: {\n\t\tname: hostname,\n\t\tprotocol,\n\t\tprotocolSocket,\n\t}\n};\n\n","import { assign } from '../objects/assign.js';\nimport { eventAdd } from './event.js';\nimport { info } from './info.js';\nimport { isDocumentReady } from './ready.js';\nexport function saveDimensions() {\n\tassign(info, {\n\t\tbodyHeight: document.body.offsetHeight,\n\t\tbodyWidth: document.body.offsetWidth,\n\t\twindowHeight: window.innerHeight,\n\t\twindowWidth: window.innerWidth,\n\t});\n}\n/**\n * Save current document & window dimensions to the info property.\n *\n * @function updateDimensions\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * updateDimensions();\n */\nexport function updateDimensions() {\n\tsaveDimensions();\n}\nisDocumentReady(updateDimensions);\neventAdd(window, 'load', updateDimensions, true);\neventAdd(window, 'resize', updateDimensions, true);\n\n","/**\n * LocalStorage Module..\n *\n * @module browser/storage\n */\nimport { hasValue } from '../types/hasValue.js';\nimport { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nimport { virtualStorage } from '../utilities/virtualStorage.js';\nexport let hasLocal;\nfunction hasStorage(storeCheck) {\n\ttry {\n\t\tstoreCheck().removeItem('TESTING');\n\t\thasLocal = true;\n\t} catch (e) {\n\t\thasLocal = false;\n\t}\n}\nhasStorage(() => {\n\treturn localStorage;\n});\n/**\n * Constructs a virtual storage container with localStorage support.\n * BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported.\n * If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed.\n * BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed.\n *\n * @class BrowserStorage\n * @category browser\n * @returns {BrowserStorage} - Returns a new instance of BrowserStorage.\n *\n * @example\n * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n * const storageBrowserStorage = construct(BrowserStorage);\n * storageBrowserStorage.setItem('key', 'value');\n * assert(storageBrowserStorage.getItem('key'), 'value');\n */\nexport class BrowserStorage {\n\tconstructor(initialObject) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local = localStorage;\n\t\t}\n\t\tthis.storage = virtualStorage(initialObject);\n\t}\n\thasLocal = hasLocal;\n\t/**\n\t * Save an item to a browserStorage.\n\t *\n\t * @function setItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.setItem(key, (isString(value)) ? value : stringify(value));\n\t\t}\n\t\treturn this.storage.setItem(key, value);\n\t}\n\t/**\n\t * Get an item from a browserStorage.\n\t *\n\t * @function getItem\n\t * @class BrowserStorage\n\t * @category browser\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t */\n\tgetItem(key) {\n\t\tconst item = this.storage.getItem(key);\n\t\tif (hasValue(item)) {\n\t\t\treturn item;\n\t\t}\n\t\tif (!hasValue(item) && this.hasLocal) {\n\t\t\treturn this.local.getItem(key);\n\t\t}\n\t}\n\t/**\n\t * Clears all data for the browserStorage including all of localStorage if supported.\n\t *\n\t * @function clear\n\t * @class BrowserStorage\n\t * @category browser\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.clear();\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tclear() {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.clear();\n\t\t}\n\t\tthis.storage.clear();\n\t}\n\t/**\n\t * Remove an item from a browserStorage.\n\t *\n\t * @class BrowserStorage\n\t * @category browser\n\t * @function removeItem\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { BrowserStorage, construct, assert } from '@universalweb/acid';\n\t * const storageBrowserStorage = construct(BrowserStorage);\n\t * storageBrowserStorage.setItem('key', 'value');\n\t * assert(storageBrowserStorage.getItem('key'), 'value');\n\t * storageBrowserStorage.removeItem('key');\n\t * assert(storageBrowserStorage.getItem('key'), undefined);\n\t */\n\tremoveItem(key) {\n\t\tif (this.hasLocal) {\n\t\t\tthis.local.removeItem(key);\n\t\t}\n\t\tthis.storage.removeItem(key);\n\t}\n}\n/**\n * The browserStorage function is a factory which wraps the BrowserStorage class constructor.\n *\n * @function browserStorage\n * @category browser\n * @type {Function}\n * @returns {*} - Returns a new BrowserStorage Object.\n *\n * @example\n * const storageBrowserStorage = browserStorage();\n * // => New BrowserStorage Object\n */\nexport function browserStorage(virtualFlag) {\n\treturn new BrowserStorage(virtualFlag);\n}\n\n","import { isString } from '../types/isString.js';\nimport { stringify } from '../utilities/json.js';\nconst generateTheme = (color, bg) => {\n\treturn `color:${color};background:${bg};`;\n};\nexport const themes = {\n\talert: generateTheme('#fff', '#f44336'),\n\timportant: generateTheme('#fff', '#E91E63'),\n\tnotify: generateTheme('#fff', '#651FFF'),\n\twarning: generateTheme('#000', '#FFEA00'),\n};\n/**\n * Console.trace wrapper with theme support.\n *\n * @function cnsl\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {Object} value - The value to be logged.\n * @param {String} themeName - The name of the theme to be used.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnsl('Lucy', 'notify');\n * // 'Lucy'\n */\nexport const cnsl = (value, themeName) => {\n\tconst data = isString(value) ? value : stringify(value);\n\tif (themeName === 'alert' || themeName === 'warning') {\n\t\treturn console.trace(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n\t}\n\tconsole.log(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`);\n};\n/**\n * Create color themes for cnsl method.\n *\n * @function cnslTheme\n * @category browser\n * @ignoreTest\n * @type {Function}\n * @param {String} themeName - The name of the theme.\n * @param {String} color - The text color.\n * @param {String} background - The background color of the block.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * cnslTheme('BlackNWhite', '#fff', '#000');\n */\nexport const cnslTheme = (themeName, color, background) => {\n\tthemes[themeName] = generateTheme(color, background);\n};\n\n","import { difference } from '../arrays/difference.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Checks if value is a plain DOM Node.\n *\n * @function isDom\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDom, assert } from '@universalweb/acid';\n * assert(isDom(document.querySelectorAll('head')), true);\n */\nexport function isDom(source) {\n\treturn source && source.nodeType !== 9;\n}\n/**\n * Checks if the value is a HTMLCollection.\n *\n * @function isHTMLCollection\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isHTMLCollection, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isHTMLCollection(document.getElementsByClassName('test')), true);\n */\nconst objectHTMLCollection = '[object HTMLCollection]';\nexport function isHTMLCollection(source) {\n\treturn (hasValue(source)) ? source.toString() === objectHTMLCollection : false;\n}\n/**\n * Checks if the value is a NodeList.\n *\n * @function isNodeList\n * @category browser\n * @ignoreTest\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNodeList, assert } from '@universalweb/acid';\n * document.body.innerHTML = '
';\n * assert(isNodeList(document.querySelectorAll('.test')), true);\n */\nconst objectNodeList = '[object NodeList]';\nexport function isNodeList(source) {\n\treturn (hasValue(source)) ? source.toString() === objectNodeList : false;\n}\n"],"names":["chunk","array","size","chunked","index","forEach","item","key","push","clearArray","source","length","cloneArray","slice","isUndefined","undefined","hasLength","Boolean","isNull","hasValue","returnValue","eachArray","iteratee","thisBind","additionalArg","arrayLength","call","compactMapArray","results","thisCall","arrayOriginal","returned","async","eachAsyncArray","compactMapAsyncArray","result","sign","Math","isNegative","rangeUp","start","end","step","sourceArray","position","rangeDown","range","isArray","Array","isNotArray","reflectConstruct","Reflect","construct","target","argumentsList","newTarget","args","ensureArray","flattenDeep","flat","Infinity","callback","difference","sources","differencesMap","Map","differences","currentArray","parentIndex","child","childIndex","childRoot","get","count","set","drop","amount","upTo","splice","dropRight","eachRight","additionalArgument","eachRightAsync","everyArray","sourceLength","everyAsyncArray","filterArray","filterAsyncArray","first","flatten","level","i","reduce","previousValue","currentValue","concat","initial","intersection","arrays","otherItem","includes","invokeArray","regexToPath","regexCloseBracket","emptyString","toPath","replace","split","propertyString","link","objectKeys","Object","keys","hasOwn","hasKeys","properties","pathArray","lastPath","pop","initialPathObject","hasAnyKeys","find","isConstructor","constructor","isConstructorFactory","constructorName","name","isConstructorNameFactory","isTypeFactory","method","primarySource","otherSources","isBufferCall","isBuffer","isPlainObject","toString","trim","isEqual","equals","sourceProperties","isMatchArray","compareArray","mathNativeMax","max","largest","last","indexFrom","mapArray","concurrentEachArray","Promise","all","mapAsyncArray","mapRightArray","trueIndex","mapWhile","subtract","minuend","subtrahend","sortNumberAscending","numberList","sort","partition","predicate","rejected","subtractReverse","sortNumberDescening","remove","removeThese","removeBy","rest","right","floor","random","randomInt","min","isNumberEqual","arrayFrom","from","toArray","arrayLike","mapFn","thisArg","shuffle","shuffleArray","value","sample","sampleArray","used","mathNativeMin","smallest","getNumberInsertIndex","insertIndex","take","endIndex","takeRight","indexRight","onlyUnique","indexOf","sortUnique","unique","isSorted","filter","union","untilFalseArray","untilTrueArray","whileCompactMap","whileEachArray","whileMapArray","without","sourcesSet","Set","has","xor","xorMap","xored","zip","map","unZip","arraySet","ensureBuffer","Buffer","alloc","clearBuffer","fill","isFunction","Function","isNumberCall","isNumber","isNotNumber","isString","String","isNotString","objectAssign","assign","assignToObject","assignToClass","prototype","extendClass","countBy","collection","object","countKey","propertyName","countWithoutKey","findIndexCache","element","indexMatch","findIndex","id","findItem","sortCollectionDescendingFilter","previous","next","ifMatch","previousKey","nextKey","sortCollectionDescending","getLowest","sortCollectionAscendingFilter","sortCollectionAscending","getHighest","groupBy","sortedObject","indexBy","invokeCollection","property","invokeCollectionAsync","pluckObject","targets","pluck","sortObjectsAlphabetically","localeCompare","sortCollectionAlphabetically","sortObjectsAlphabeticallyReverse","sortCollectionAlphabeticallyReverse","getFileExtension","substring","lastIndexOf","getFilename","regexTestFactory","regexType","test","isFileCSS","isFileHTML","isFileJS","isFileJSON","after","callable","point","ary","before","eachAsyncObject","propertyCount","eachObject","objectKeysArray","forEachAsync","values","valuesLength","isSetCall","isSet","forOf","isGeneratorCall","isGenerator","forOfAsync","generatorArgs","isAsyncCall","isAsync","generateLoop","arrayLoop","arrayLoopAsync","objectLoop","objectLoopAsync","forOfLoop","forOfLoopAsync","argument1","argument2","argument3","isIterateeAsync","each","Chain","methods","this","addChainMethod","thisChain","methodName","setValue","done","chain","config","curry","arity","curries","curried","curryArgs","curryRight","unshift","noop","times","timesMap","Timers","list","clearTimeout","delete","time","currentThis","setTimeout","clear","timers","timer","clearTimers","applyNative","apply","thisArgument","debounce","debounced","bind","ifInvoke","negate","nthArg","once","getType","cloneType","sourceType","forOfMap","resultsObject","methodPush","add","methodPushBound","methodSet","forOfMapAsync","resultsGenerator","mapAsyncObject","thisObject","mapObject","original","over","iteratees","everyAsyncObject","everyObject","forOfEvery","forOfEveryAsync","every","overEvery","predicates","arg","reArg","indexes","throttle","throttled","shouldThrottle","wrap","wrapper","functionPrototype","cacheNativeMethod","getPropNames","getOwnPropertyNames","getPropDesc","getOwnPropertyDescriptor","defProp","defineProperty","hasProp","hasOwnProperty","isSame","is","augend","addend","deduct","divide","increment","multiply","calcProgress","total","currentAmount","randomFloat","remainder","subtractAll","a","b","sumAll","isNumberInRange","isNumberNotInRange","isPositive","isZero","isOdd","isEven","objectEntries","entries","getEntries","compactKeys","compactedKeys","compactMapAsyncObject","compactMapObject","filterObject","filterAsyncObject","invert","isMatchObject","sourceKeys","targetKeys","escapeRegexRegex","escapeRegex","arrayToRegex","makeSafe","RegExp","join","isRegexCall","isRegex","omit","blacklist","blacklistRegex","numberToString","pick","whitelist","objectSize","objectLengthProperty","objectSizeProperty","zipObject","unZipObject","objectValues","normalizeCase","camelCase","toLowerCase","toUpperCase","space","kebabCase","snakeCase","upperCase","lowerCase","insertInRange","string","text","rightString","chunkString","match","initialString","restString","replaceList","words","rawURLDecodeRegex","andRegex","lessThanRegex","moreThanRegex","doubleQuoteRegex","rawURLDecode","decodeURIComponent","htmlEntities","sanitize","tokenizeRegEx","wordsRegEx","tokenize","truncate","maxLength","stringLength","breakAll","breakAllLength","truncateDown","truncateRight","truncateUp","getWords","upperFirstLetter","upperFirst","upperFirstOnly","upperFirstAll","upperFirstOnlyAll","getTypeName","isArguments","isMapCall","isMap","typedArrayRegex","arrayConstructorName","isTypedArray","noValue","isArrayLike","strictFlag","isBigIntCall","isBigInt","isBooleanCall","isBoolean","isArrayBufferCall","isArrayBuffer","isChild","sourceChild","targetParent","constructorNames","isCloneable","isDateCall","isDate","isEmpty","isFalse","isF32Call","isF32","isF64Call","isF64","isInteger","Number","isFloat","isI16Call","isI16","isI32Call","isI32","isI8Call","isI8","isIterable","Symbol","iterator","isPromise","isKindAsync","isParent","sourceParent","targetChild","isPrimitive","type","isRelated","targetOne","targetTwo","isSafeInteger","isSafeInt","isSameType","other","otherType","isTrue","isU16Call","isU16","isU32Call","isU32","isU8Call","isU8","isU8CCall","isU8C","isWeakMapCall","isWeakMap","isDeno","globalThis","Deno","isNodejs","process","versions","node","isTruthy","returnIfTrue","isFalsy","ifValue","optional","notEqual","jsonNative","JSON","jsonParse","reviver","parse","stringify","createAssertError","expected","localOptions","options","errorTitle","title","file","Error","assertAsync","sourceArg","assert","bindAll","bindThis","targetAssign","structuredCloneSafe","structuredClone","clone","concurrent","compact","sourceKeysLength","targetObject","keyName","forOfCompactMapAsync","forOfCompactMap","compactMap","everyArg","forOfFilter","forOfFilterAsync","returnFlow","flow","flowRight","flowAsync","flowAsyncRight","forMap","cloned","methodBound","arraysToObject","search","hasDot","ifNotAssign","rootObject","equalThis","Intervals","clearInterval","setInterval","intervals","interval","clearIntervals","merge","currentSource","sourceItem","sourceKey","Model","static","modelName","modelSource","models","model","pair","concurrentStatus","queue","allSettled","promise","propertyMatch","compared","setKey","Store","data","Proxy","proxySource","console","log","stubArray","stubFalse","stubObject","stubString","stubTrue","timesAsync","timesMapAsync","toggle","on","off","UniqID","totalActive","freed","totalFree","shift","free","isActive","shouldReset","reset","uniqID","VirtualStorage","initialObject","items","getItem","hasItem","setItem","removeItem","virtualStorage","inAsync","inSync","isAgent","userAgent","navigator","userAgentData","brands","brand","version","userAgentNormalized","eventAdd","eventName","useCapture","addEventListener","eventRemove","removeEventListener","isEnter","eventObject","keyCode","createFragment","document","createDocumentFragment","append","parentNode","appendChild","nodeAttribute","getAttribute","setAttribute","classTest","tagTest","regexSpace","getByClass","getElementsByClassName","getByTag","getElementsByTagName","getById","getElementById","querySelector","querySelectorAll","selector","select","createElementCache","createElement","importjs","url","src","accept","nodeAttachLoadingEvents","isDocumentReady","state","readyState","scriptTag","protocol","location","protocolSocket","hostname","info","hardware","cores","hardwareConcurrency","host","saveDimensions","bodyHeight","body","offsetHeight","bodyWidth","offsetWidth","windowHeight","window","innerHeight","windowWidth","innerWidth","updateDimensions","hasLocal","storeCheck","e","hasStorage","localStorage","BrowserStorage","local","storage","browserStorage","virtualFlag","generateTheme","color","bg","themes","alert","important","notify","warning","cnsl","themeName","trace","cnslTheme","background","isDom","nodeType","isHTMLCollection","isNodeList"],"mappings":"AAcO,SAASA,EAAMC,EAAOC,EAAO,GACnC,MAAMC,EAAU,GAChB,IAAIC,EAAQ,EAUZ,OATAH,EAAMI,SAAQ,CAACC,EAAMC,KACdA,EAAML,IACXC,EAAQK,KAAK,IACTD,GACHH,KAGFD,EAAQC,GAAOI,KAAKF,EAAK,IAEnBH,CACR,CCdO,SAASM,EAAWC,GAE1B,OADAA,EAAOC,OAAS,EACTD,CACR,CCHO,SAASE,EAAWF,GAC1B,OAAOA,EAAOG,OACf,CCJO,SAASC,EAAYJ,GAC3B,YAAkBK,IAAXL,CACR,CCAO,SAASM,EAAUN,GACzB,OAAOO,QAAQP,EAAOC,OACvB,CCFO,SAASO,EAAOR,GACtB,OAAkB,OAAXA,CACR,CCDO,SAASS,EAAST,GACxB,OAAQI,EAAYJ,KAAYQ,EAAOR,EACxC,CCRO,SAASU,EAAYV,GAC3B,OAAOA,CACR,CCYO,SAASW,EAAUX,EAAQY,EAAUC,EAAUC,GACrD,IAAKd,EACJ,OAED,MAAMe,EAAcf,EAAOC,OAC3B,GAAIQ,EAASI,GACZ,IAAK,IAAInB,EAAQ,EAAGA,EAAQqB,EAAarB,IACxCkB,EAASI,KAAKH,EAAUb,EAAON,GAAQA,EAAOM,EAAQe,EAAaD,QAGpE,IAAK,IAAIpB,EAAQ,EAAGA,EAAQqB,EAAarB,IACxC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,WAC9BO,QAASP,GAAc,OAAQ,YAiBnBQ,GAAO,CAACplB,EAAOqlB,KAC3B,MAAM7H,EAAO3a,GAAS7C,GAASA,EAAQoZ,GAAUpZ,GACjD,GAAkB,UAAdqlB,GAAuC,YAAdA,EAC5B,OAAO1H,QAAQ2H,MAAM,KAAK9H,IAAQ,GAAGuH,GAAOM,uDAE7C1H,QAAQC,IAAI,KAAKJ,IAAQ,GAAGuH,GAAOM,sDAA8D,EAiBrFE,GAAY,CAACF,EAAWR,EAAOW,KAC3CT,GAAOM,GAAaT,GAAcC,EAAOW,EAAW,EClC9C,SAASC,GAAMvwB,GACrB,OAAOA,GAA8B,IAApBA,EAAOwwB,QACzB,CAgBO,SAASC,GAAiBzwB,GAChC,QAAQS,EAAST,IAFW,4BAEAA,EAAO6H,UACpC,CAgBO,SAAS6oB,GAAW1wB,GAC1B,QAAQS,EAAST,IAFK,sBAEMA,EAAO6H,UACpC"} \ No newline at end of file diff --git a/build/module/bundle.js b/build/module/bundle.js index 85f6455..34bda30 100644 --- a/build/module/bundle.js +++ b/build/module/bundle.js @@ -874,7 +874,7 @@ function get(propertyString, target) { return false; } let link = target; - const pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString); + const pathArray = isArray(propertyString) ? propertyString : toPath(propertyString); everyArray(pathArray, (item) => { link = link[item]; return hasValue(link); @@ -1284,7 +1284,7 @@ function mapRightArray(source, iteratee, results = [], additionalArgument) { */ function mapWhile(source, iteratee, results = [], additionalArgument) { const arrayLength = source.length; - for (let index = 0;index < arrayLength;index++) { + for (let index = 0; index < arrayLength; index++) { const item = source[index]; const returned = iteratee(item, index, results, source, arrayLength, additionalArgument); if (returned === false) { @@ -2958,7 +2958,10 @@ function forOf(source, iteratee) { } return source; } - for (const [key, value] of source) { + for (const [ + key, + value + ] of source) { iteratee(value, key, source); } return source; @@ -3020,15 +3023,15 @@ function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, fo if (!hasValue(source) || !iteratee) { return; } else if (isArray(source)) { - returned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop; + returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; } else if (isPlainObject(source) || isFunction(source)) { - returned = (isIterateeAsync) ? objectLoopAsync : objectLoop; + returned = isIterateeAsync ? objectLoopAsync : objectLoop; } else if (forOfLoop) { - returned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop; + returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; } else if (isGenerator(source)) { returned = forOfLoopAsync; } else { - returned = (isIterateeAsync) ? objectLoopAsync : objectLoop; + returned = isIterateeAsync ? objectLoopAsync : objectLoop; } return returned(source, iteratee, argument1, argument2, argument3); }; @@ -4312,6 +4315,40 @@ function isZero(source) { return source === 0; } +/** + * Checks if a number is odd & returns true or false. + * + * @function isOdd + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isOdd, assert } from '@universalweb/acid'; + * assert(isOdd(1), true); + */ +function isOdd(source) { + return (source & 1) === 1; +} + +/** + * Checks if a number is even & returns true or false. + * + * @function isEven + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEven, assert } from '@universalweb/acid'; + * assert(isEven(1), true); + */ +function isEven(source) { + return (source & 1) === 0; +} + const objectEntries = Object.entries; /** * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error. @@ -4685,11 +4722,11 @@ function objectSize(source) { * // => { 'a': 1, 'b': 2 } */ const zipObject = (properties, values) => { - const zipedObject = {}; + const source = {}; eachArray(properties, (item, key) => { - zipedObject[item] = values[key]; + source[item] = values[key]; }); - return zipedObject; + return source; }; /** * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. @@ -4705,13 +4742,16 @@ const zipObject = (properties, values) => { * // => [['a', 'b'], [1, 2]] */ const unZipObject = (object) => { - const unZippedKeys = []; - const values = []; + const objectKeys = []; + const objectValues = []; eachObject(object, (item, key) => { - unZippedKeys.push(key); - values.push(item); + objectKeys.push(key); + objectValues.push(item); }); - return [unZippedKeys, values]; + return [ + objectKeys, + objectValues, + ]; }; const normalizeCase$4 = /[ _-]+/g; @@ -6251,8 +6291,14 @@ function forOfCompactMap(source, iteratee = returnValue, resultsObject) { * return item; * }), {b: 2, c: 3}); */ -const compactMap = generateLoop(compactMapArray, compactMapAsyncArray, - compactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync); +const compactMap = generateLoop( + compactMapArray, + compactMapAsyncArray, + compactMapObject, + compactMapAsyncObject, + forOfCompactMap, + forOfCompactMapAsync +); function everyArg(...methods) { if (isAsync(methods[0])) { @@ -6846,7 +6892,7 @@ function pair(argument1, argument2) { function concurrentStatus(source, iteratee, additionalArgument) { const arrayLength = source.length; const queue = []; - for (let index = 0;index < arrayLength; index++) { + for (let index = 0; index < arrayLength; index++) { queue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument); } return Promise.allSettled(queue); @@ -7100,7 +7146,7 @@ async function timesMapAsync(amount, iteratee, results = []) { * // => false */ function toggle(value, on = true, off = false) { - return (isEqual(on, value)) ? off : on; + return ((isEqual(on, value)) ? off : on); } /** @@ -7443,5 +7489,5 @@ function currentPath(importMeta) { return path$1.dirname(fileURLToPath(importMeta.url)); } -export { Chain, Intervals, Model, Store, Timers, UniqID, VirtualStorage, add, after, apply, arrayToRegex, arraysToObject, ary, assert, assertAsync, assign, assignToClass, assignToObject, before, bindAll, cacheNativeMethod, calcProgress, camelCase, chain, chunk, chunkString, clear, clearArray, clearBuffer, clearIntervals, clearTimers, clone, cloneArray, cloneType, compact, compactKeys, compactMap, compactMapArray, compactMapAsyncArray, compactMapAsyncObject, compactMapObject, concurrent, concurrentEachArray, concurrentStatus, construct, constructorName, copyFolder, countBy, countKey, countWithoutKey, currentFile, currentPath, curry, curryRight, debounce, deduct, defProp, difference, divide, drop, dropRight, each, eachArray, eachAsyncArray, eachAsyncObject, eachObject, eachRight, eachRightAsync, ensureArray, ensureBuffer, isZero as equalsZero, escapeRegex, escapeRegexRegex, every, everyArg, everyArray, everyAsyncArray, everyAsyncObject, everyObject, extendClass, filter, filterArray, filterAsyncArray, filterAsyncObject, filterObject, findIndex, findIndexCache, findItem, first, flatten, flattenDeep, flow, flowAsync, flowAsyncRight, flowRight, forEach, forEachAsync, forMap, forOf, forOfAsync, forOfCompactMap, forOfCompactMapAsync, forOfEvery, forOfEveryAsync, forOfFilter, forOfFilterAsync, forOfMap, forOfMapAsync, generateLoop, get, getEntries, getFileExtension, getFilename, getHighest, getLowest, getNumberInsertIndex, getPropDesc, getPropNames, getType, getTypeName, groupBy, has, hasAnyKeys, hasDot, hasKeys, hasLength, hasProp, hasValue, htmlEntities, ifInvoke, ifNotAssign, ifValue, inAsync, inSync, increment, indexBy, initial, initialString, insertInRange, intersection, interval, intervals, invert, invokeArray, invokeCollection, invokeCollectionAsync, isArguments, isArray, isArrayBuffer, isArrayBufferCall, isArrayLike, isAsync, isAsyncCall, isBigInt, isBigIntCall, isBoolean, isBooleanCall, isBuffer, isBufferCall, isChild, isCloneable, isConstructor, isConstructorFactory, isConstructorNameFactory, isDate, isDateCall, isDeno, isEmpty, isEqual, isF32, isF32Call, isF64, isF64Call, isFalse, isFalsy, isFileCSS, isFileHTML, isFileJS, isFileJSON, isFloat, isFunction, isGenerator, isGeneratorCall, isI16, isI16Call, isI32, isI32Call, isI8, isI8Call, isIterable, isKindAsync, isMap, isMapCall, isMatchArray, isMatchObject, isNegative, isNodejs, isNotArray, isNotNumber, isNotString, isNull, isNumber, isNumberCall, isNumberEqual, isNumberInRange, isNumberNotInRange, isParent, isPlainObject, isPositive, isPrimitive, isPromise, isRegex, isRegexCall, isRelated, isSafeInt, isSame, isSameType, isSet, isSetCall, isString, isTrue, isTruthy, isTypeFactory, isTypedArray, isU16, isU16Call, isU32, isU32Call, isU8, isU8C, isU8CCall, isU8Call, isUndefined, isWeakMap, isWeakMapCall, isZero, jsonParse, kebabCase, keys, largest, last, lowerCase, map, mapArray, mapAsyncArray, mapAsyncObject, mapObject, mapRightArray, mapWhile, merge, model, multiply, negate, noValue, noop, notEqual, nthArg, objectAssign, objectEntries, objectSize, omit, once, onlyUnique, over, overEvery, pair, partition, pick, pluck, pluckObject, promise, propertyMatch, randomFloat, randomInt, range, rangeDown, rangeUp, rawURLDecode, reArg, regexTestFactory, remainder, remove, removeBy, replaceList, rest, restString, returnValue, right, rightString, sample, sanitize, setKey, setValue, shuffle, smallest, snakeCase, sortCollectionAlphabetically, sortCollectionAlphabeticallyReverse, sortCollectionAscending, sortCollectionAscendingFilter, sortCollectionDescending, sortCollectionDescendingFilter, sortNumberAscending, sortNumberDescening, sortObjectsAlphabetically, sortObjectsAlphabeticallyReverse, sortUnique, stringify, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, subtractAll, subtractReverse, sumAll, take, takeRight, throttle, timer, timers, times, timesAsync, timesMap, timesMapAsync, toArray, toPath, toggle, tokenize, truncate, truncateRight, unZip, unZipObject, union, uniqID, unique, untilFalseArray, untilTrueArray, upperCase, upperFirst, upperFirstAll, upperFirstLetter, upperFirstOnly, upperFirstOnlyAll, virtualStorage, whileCompactMap, whileEachArray, whileMapArray, without, words, wrap, xor, zip, zipObject }; +export { Chain, Intervals, Model, Store, Timers, UniqID, VirtualStorage, add, after, apply, arrayToRegex, arraysToObject, ary, assert, assertAsync, assign, assignToClass, assignToObject, before, bindAll, cacheNativeMethod, calcProgress, camelCase, chain, chunk, chunkString, clear, clearArray, clearBuffer, clearIntervals, clearTimers, clone, cloneArray, cloneType, compact, compactKeys, compactMap, compactMapArray, compactMapAsyncArray, compactMapAsyncObject, compactMapObject, concurrent, concurrentEachArray, concurrentStatus, construct, constructorName, copyFolder, countBy, countKey, countWithoutKey, currentFile, currentPath, curry, curryRight, debounce, deduct, defProp, difference, divide, drop, dropRight, each, eachArray, eachAsyncArray, eachAsyncObject, eachObject, eachRight, eachRightAsync, ensureArray, ensureBuffer, isZero as equalsZero, escapeRegex, escapeRegexRegex, every, everyArg, everyArray, everyAsyncArray, everyAsyncObject, everyObject, extendClass, filter, filterArray, filterAsyncArray, filterAsyncObject, filterObject, findIndex, findIndexCache, findItem, first, flatten, flattenDeep, flow, flowAsync, flowAsyncRight, flowRight, forEach, forEachAsync, forMap, forOf, forOfAsync, forOfCompactMap, forOfCompactMapAsync, forOfEvery, forOfEveryAsync, forOfFilter, forOfFilterAsync, forOfMap, forOfMapAsync, generateLoop, get, getEntries, getFileExtension, getFilename, getHighest, getLowest, getNumberInsertIndex, getPropDesc, getPropNames, getType, getTypeName, groupBy, has, hasAnyKeys, hasDot, hasKeys, hasLength, hasProp, hasValue, htmlEntities, ifInvoke, ifNotAssign, ifValue, inAsync, inSync, increment, indexBy, initial, initialString, insertInRange, intersection, interval, intervals, invert, invokeArray, invokeCollection, invokeCollectionAsync, isArguments, isArray, isArrayBuffer, isArrayBufferCall, isArrayLike, isAsync, isAsyncCall, isBigInt, isBigIntCall, isBoolean, isBooleanCall, isBuffer, isBufferCall, isChild, isCloneable, isConstructor, isConstructorFactory, isConstructorNameFactory, isDate, isDateCall, isDeno, isEmpty, isEqual, isEven, isF32, isF32Call, isF64, isF64Call, isFalse, isFalsy, isFileCSS, isFileHTML, isFileJS, isFileJSON, isFloat, isFunction, isGenerator, isGeneratorCall, isI16, isI16Call, isI32, isI32Call, isI8, isI8Call, isIterable, isKindAsync, isMap, isMapCall, isMatchArray, isMatchObject, isNegative, isNodejs, isNotArray, isNotNumber, isNotString, isNull, isNumber, isNumberCall, isNumberEqual, isNumberInRange, isNumberNotInRange, isOdd, isParent, isPlainObject, isPositive, isPrimitive, isPromise, isRegex, isRegexCall, isRelated, isSafeInt, isSame, isSameType, isSet, isSetCall, isString, isTrue, isTruthy, isTypeFactory, isTypedArray, isU16, isU16Call, isU32, isU32Call, isU8, isU8C, isU8CCall, isU8Call, isUndefined, isWeakMap, isWeakMapCall, isZero, jsonParse, kebabCase, keys, largest, last, lowerCase, map, mapArray, mapAsyncArray, mapAsyncObject, mapObject, mapRightArray, mapWhile, merge, model, multiply, negate, noValue, noop, notEqual, nthArg, objectAssign, objectEntries, objectSize, omit, once, onlyUnique, over, overEvery, pair, partition, pick, pluck, pluckObject, promise, propertyMatch, randomFloat, randomInt, range, rangeDown, rangeUp, rawURLDecode, reArg, regexTestFactory, remainder, remove, removeBy, replaceList, rest, restString, returnValue, right, rightString, sample, sanitize, setKey, setValue, shuffle, smallest, snakeCase, sortCollectionAlphabetically, sortCollectionAlphabeticallyReverse, sortCollectionAscending, sortCollectionAscendingFilter, sortCollectionDescending, sortCollectionDescendingFilter, sortNumberAscending, sortNumberDescening, sortObjectsAlphabetically, sortObjectsAlphabeticallyReverse, sortUnique, stringify, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, subtractAll, subtractReverse, sumAll, take, takeRight, throttle, timer, timers, times, timesAsync, timesMap, timesMapAsync, toArray, toPath, toggle, tokenize, truncate, truncateRight, unZip, unZipObject, union, uniqID, unique, untilFalseArray, untilTrueArray, upperCase, upperFirst, upperFirstAll, upperFirstLetter, upperFirstOnly, upperFirstOnlyAll, virtualStorage, whileCompactMap, whileEachArray, whileMapArray, without, words, wrap, xor, zip, zipObject }; //# sourceMappingURL=bundle.js.map diff --git a/build/module/bundle.js.map b/build/module/bundle.js.map index e60eec3..8a68f9f 100644 --- a/build/module/bundle.js.map +++ b/build/module/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","sources":["../../source/arrays/chunk.js","../../source/arrays/clear.js","../../source/arrays/clone.js","../../source/types/isUndefined.js","../../source/utilities/hasLength.js","../../source/types/isNull.js","../../source/types/hasValue.js","../../source/utilities/returnValue.js","../../source/arrays/each.js","../../source/arrays/compactMap.js","../../source/arrays/eachAsync.js","../../source/arrays/compactMapAsync.js","../../source/numbers/isNegative.js","../../source/arrays/range.js","../../source/types/isArray.js","../../source/classes/construct.js","../../source/arrays/ensure.js","../../source/arrays/flattenDeep.js","../../source/utilities/forEach.js","../../source/arrays/difference.js","../../source/arrays/drop.js","../../source/arrays/dropRight.js","../../source/arrays/eachRight.js","../../source/arrays/eachRightAsync.js","../../source/arrays/every.js","../../source/arrays/everyAsync.js","../../source/arrays/filter.js","../../source/arrays/filterAsync.js","../../source/arrays/first.js","../../source/arrays/flatten.js","../../source/arrays/initial.js","../../source/arrays/intersect.js","../../source/arrays/invoke.js","../../source/utilities/toPath.js","../../source/utilities/get.js","../../source/objects/keys.js","../../source/objects/hasKeys.js","../../source/types/isConstructor.js","../../source/types/isTypeFactory.js","../../source/types/isBuffer.js","../../source/types/isPlainObject.js","../../source/utilities/isEqual.js","../../source/arrays/isMatch.js","../../source/arrays/largest.js","../../source/arrays/last.js","../../source/arrays/map.js","../../source/arrays/concurrentEach.js","../../source/arrays/mapAsync.js","../../source/arrays/mapRight.js","../../source/arrays/mapWhile.js","../../source/math/subtract.js","../../source/arrays/sortNumberAscending.js","../../source/arrays/partition.js","../../source/math/subtractReverse.js","../../source/arrays/sortNumberDescening.js","../../source/arrays/remove.js","../../source/arrays/rest.js","../../source/arrays/right.js","../../source/math/randomInt.js","../../source/numbers/isNumberEqual.js","../../source/internal/array.js","../../source/arrays/shuffle.js","../../source/arrays/sample.js","../../source/arrays/smallest.js","../../source/arrays/getNumberInsertIndex.js","../../source/arrays/take.js","../../source/arrays/takeRight.js","../../source/arrays/unique.js","../../source/arrays/union.js","../../source/arrays/untilFalse.js","../../source/arrays/untilTrue.js","../../source/arrays/whileCompactMap.js","../../source/arrays/whileEach.js","../../source/arrays/whileMap.js","../../source/arrays/without.js","../../source/arrays/xor.js","../../source/arrays/zip.js","../../source/buffers/ensure.js","../../source/buffers/clear.js","../../source/types/isFunction.js","../../source/types/isNumber.js","../../source/types/isString.js","../../source/objects/assign.js","../../source/classes/extendClass.js","../../source/collection/countBy.js","../../source/collection/countKey.js","../../source/collection/countWithoutKey.js","../../source/collection/findIndexCache.js","../../source/collection/findIndex.js","../../source/collection/findItem.js","../../source/collection/sortCollectionDescending.js","../../source/collection/getLowest.js","../../source/collection/sortCollectionAscending.js","../../source/collection/getHighest.js","../../source/collection/groupBy.js","../../source/collection/indexBy.js","../../source/collection/invoke.js","../../source/collection/invokeAsync.js","../../source/objects/pluckObject.js","../../source/collection/pluck.js","../../source/collection/sortCollectionAlphabetically.js","../../source/collection/sortCollectionAlphabeticallyReverse.js","../../source/files/getExtension.js","../../source/files/getFilename.js","../../source/internal/regexTestFactory.js","../../source/files/isFileCSS.js","../../source/files/isFileHTML.js","../../source/files/isFileJS.js","../../source/files/isFileJSON.js","../../source/functions/after.js","../../source/functions/ary.js","../../source/functions/before.js","../../source/objects/eachAsync.js","../../source/objects/each.js","../../source/utilities/forEachAsync.js","../../source/types/isSet.js","../../source/utilities/forOf.js","../../source/types/isGenerator.js","../../source/utilities/forOfAsync.js","../../source/types/isAsync.js","../../source/utilities/generateLoop.js","../../source/utilities/each.js","../../source/functions/chain.js","../../source/functions/curry.js","../../source/functions/curryRight.js","../../source/utilities/noop.js","../../source/utilities/times.js","../../source/utilities/timer.js","../../source/internal/apply.js","../../source/functions/debounce.js","../../source/functions/ifInvoke.js","../../source/functions/negate.js","../../source/functions/nthArg.js","../../source/functions/once.js","../../source/types/getType.js","../../source/types/cloneType.js","../../source/utilities/forOfMap.js","../../source/utilities/forOfMapAsync.js","../../source/objects/mapAsync.js","../../source/objects/map.js","../../source/utilities/map.js","../../source/functions/over.js","../../source/objects/everyAsync.js","../../source/objects/every.js","../../source/utilities/forOfEvery.js","../../source/utilities/forOfEveryAsync.js","../../source/utilities/every.js","../../source/functions/overEvery.js","../../source/functions/rearged.js","../../source/functions/throttle.js","../../source/functions/wrap.js","../../source/utilities/cacheNativeMethod.js","../../source/internal/object.js","../../source/internal/isSame.js","../../source/math/add.js","../../source/math/deduct.js","../../source/math/divide.js","../../source/math/increment.js","../../source/math/multiple.js","../../source/math/progress.js","../../source/math/randomFloat.js","../../source/math/remainder.js","../../source/math/subtractAll.js","../../source/math/sumAll.js","../../source/numbers/isNumberInRange.js","../../source/numbers/isNumberNotInRange.js","../../source/numbers/isPositive.js","../../source/numbers/isZero.js","../../source/objects/getEntries.js","../../source/objects/compactKeys.js","../../source/objects/compactMapAsync.js","../../source/objects/compactMap.js","../../source/objects/filter.js","../../source/objects/filterAsync.js","../../source/objects/invert.js","../../source/objects/isMatch.js","../../source/regexps/escapeRegex.js","../../source/regexps/arrayToRegex.js","../../source/types/isRegex.js","../../source/objects/omit.js","../../source/objects/pick.js","../../source/objects/size.js","../../source/objects/zip.js","../../source/strings/camelCase.js","../../source/strings/kebabCase.js","../../source/strings/snakeCase.js","../../source/strings/upperCase.js","../../source/strings/lowerCase.js","../../source/strings/range.js","../../source/strings/replace.js","../../source/strings/sanitize.js","../../source/strings/tokenize.js","../../source/strings/truncate.js","../../source/strings/typography.js","../../source/types/getTypeName.js","../../source/types/isArguments.js","../../source/types/isMap.js","../../source/types/isTypedArray.js","../../source/types/noValue.js","../../source/types/isArrayLike.js","../../source/types/isBigInt.js","../../source/types/isBoolean.js","../../source/types/isArrayBuffer.js","../../source/types/isChild.js","../../source/types/isCloneable.js","../../source/types/isDate.js","../../source/types/isEmpty.js","../../source/types/isFalse.js","../../source/types/isF32.js","../../source/types/isF64.js","../../source/types/isFloat.js","../../source/types/isI16.js","../../source/types/isI32.js","../../source/types/isI8.js","../../source/types/isIterable.js","../../source/types/isPromise.js","../../source/types/isKindAsync.js","../../source/types/isParent.js","../../source/types/isPrimitive.js","../../source/types/isRelated.js","../../source/types/isSafeInt.js","../../source/types/isSameType.js","../../source/types/isTrue.js","../../source/types/isU16.js","../../source/types/isU32.js","../../source/types/isU8.js","../../source/types/isU8C.js","../../source/types/isWeakMap.js","../../source/types/isDeno.js","../../source/types/isNode.js","../../source/types/isTruthy.js","../../source/types/isFalsy.js","../../source/utilities/ifValue.js","../../source/utilities/notEqual.js","../../source/utilities/json.js","../../source/utilities/assert.js","../../source/utilities/bindAll.js","../../source/utilities/clear.js","../../source/utilities/clone.js","../../source/utilities/concurrent.js","../../source/utilities/compact.js","../../source/utilities/forOfCompactMapAsync.js","../../source/utilities/forOfCompactMap.js","../../source/utilities/compactMap.js","../../source/utilities/everyArg.js","../../source/utilities/forOfFilter.js","../../source/utilities/forOfFilterAsync.js","../../source/utilities/filter.js","../../source/utilities/flow.js","../../source/utilities/flowAsync.js","../../source/utilities/forMap.js","../../source/utilities/arraysToObject.js","../../source/utilities/has.js","../../source/utilities/hasDot.js","../../source/utilities/ifNotAssign.js","../../source/utilities/interval.js","../../source/utilities/merge.js","../../source/utilities/model.js","../../source/utilities/pair.js","../../source/utilities/concurrentStatus.js","../../source/utilities/promise.js","../../source/utilities/propertyMatch.js","../../source/utilities/setKey.js","../../source/utilities/setValue.js","../../source/utilities/store.js","../../source/utilities/stubArray.js","../../source/utilities/stubFalse.js","../../source/utilities/stubObject.js","../../source/utilities/stubString.js","../../source/utilities/stubTrue.js","../../source/utilities/timesAsync.js","../../source/utilities/toggle.js","../../source/utilities/uid.js","../../source/utilities/virtualStorage.js","../../source/utilities/inAsync.js","../../source/utilities/inSync.js","../../source/filesystem/copyFolder.js","../../source/filesystem/directory.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0;index < arrayLength;index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [key, value] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst zipedObject = {};\n\teachArray(properties, (item, key) => {\n\t\tzipedObject[item] = values[key];\n\t});\n\treturn zipedObject;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst unZippedKeys = [];\n\tconst values = [];\n\teachObject(object, (item, key) => {\n\t\tunZippedKeys.push(key);\n\t\tvalues.push(item);\n\t});\n\treturn [unZippedKeys, values];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(compactMapArray, compactMapAsyncArray,\n\tcompactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0;index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn (isEqual(on, value)) ? off : on;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import {\n\tcopyFile,\n\tmkdir,\n\treaddir,\n\tstat\n} from 'node:fs/promises';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport path from 'node:path';\nasync function copyToPath(sourceFolder, destinationFolder, file) {\n\tconst sourcePath = path.join(sourceFolder, file);\n\tconst destinationPath = path.join(destinationFolder, file);\n\tawait copyFile(sourcePath, destinationPath);\n}\nexport async function copyFolder(sourceFolder, destinationFolder) {\n\tconst files = await readdir(sourceFolder);\n\tawait eachAsyncArray(files, async (file) => {\n\t\tconst sourcePath = path.join(sourceFolder, file);\n\t\tconst filestats = await stat(sourcePath);\n\t\tif (filestats.isDirectory()) {\n\t\t\tconst folderDestination = path.join(destinationFolder, file.replace(sourceFolder, ''));\n\t\t\tawait mkdir(folderDestination, {\n\t\t\t\trecursive: true\n\t\t\t});\n\t\t\tawait copyFolder(sourcePath, folderDestination);\n\t\t} else {\n\t\t\tawait copyToPath(sourceFolder, destinationFolder, file);\n\t\t}\n\t});\n\treturn true;\n}\n\n","import { fileURLToPath } from 'node:url';\nimport path from 'path';\nexport function currentFile(importMeta) {\n\tif (globalThis.__filename) {\n\t\treturn __filename;\n\t}\n\treturn fileURLToPath(importMeta.url);\n}\nexport function currentPath(importMeta) {\n\tif (globalThis.__dirname) {\n\t\treturn __dirname;\n\t}\n\treturn path.dirname(fileURLToPath(importMeta.url));\n}\n"],"names":["sign","random","normalizeCase","space","returnFlow","path"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,MAAM,CAAC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,MAAM,CAAC,yBAAyB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,MAAM,CAAC,eAAe;AACjC,MAAC,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,cAAc;;AC/C9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,CAAC;;ACd7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE;AACpC,CAAC,OAAO,MAAM,GAAG,MAAM,CAAC;AACxB;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,MAAM,CAAC,MAAM,EAAE;AAC/B,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;AACnB;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE;AACtC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;AACvB;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS,CAAC,MAAM,EAAE;AAClC,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;AACnB;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE;AACxC,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C;AACL,EAAE;AACF;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS,GAAG;AAC5B,CAAC,OAAO,EAAE,CAAC;AACX;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS,GAAG;AAC5B,CAAC,OAAO,KAAK,CAAC;AACd;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,UAAU,GAAG,MAAM;AAChC,CAAC,OAAO,EAAE,CAAC;AACX;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,UAAU,GAAG,MAAM;AAChC,CAAC,OAAO,EAAE,CAAC;AACX;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,MAAM;AAC9B,CAAC,OAAO,IAAI,CAAC;AACb;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE;AACnD,CAAC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,KAAK,EAAE,EAAE;AAC9C,EAAE,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;AACzB,EAAE;AACF,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,EAAE,EAAE;AACpE,CAAC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,KAAK,EAAE,EAAE;AAC9C,EAAE,OAAO,CAAC,KAAK,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;AACpB,EAAE;AACF,CAAC,OAAO,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AACtC,CAAC;AACM,SAAS,WAAW,CAAC,UAAU,EAAE;AACxC,CAAC,IAAI,UAAU,CAAC,SAAS,EAAE;AAC3B,EAAE,OAAO,SAAS,CAAC;AACnB,EAAE;AACF,CAAC,OAAOC,MAAI,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD;;;;"} \ No newline at end of file +{"version":3,"file":"bundle.js","sources":["../../source/arrays/chunk.js","../../source/arrays/clear.js","../../source/arrays/clone.js","../../source/types/isUndefined.js","../../source/utilities/hasLength.js","../../source/types/isNull.js","../../source/types/hasValue.js","../../source/utilities/returnValue.js","../../source/arrays/each.js","../../source/arrays/compactMap.js","../../source/arrays/eachAsync.js","../../source/arrays/compactMapAsync.js","../../source/numbers/isNegative.js","../../source/arrays/range.js","../../source/types/isArray.js","../../source/classes/construct.js","../../source/arrays/ensure.js","../../source/arrays/flattenDeep.js","../../source/utilities/forEach.js","../../source/arrays/difference.js","../../source/arrays/drop.js","../../source/arrays/dropRight.js","../../source/arrays/eachRight.js","../../source/arrays/eachRightAsync.js","../../source/arrays/every.js","../../source/arrays/everyAsync.js","../../source/arrays/filter.js","../../source/arrays/filterAsync.js","../../source/arrays/first.js","../../source/arrays/flatten.js","../../source/arrays/initial.js","../../source/arrays/intersect.js","../../source/arrays/invoke.js","../../source/utilities/toPath.js","../../source/utilities/get.js","../../source/objects/keys.js","../../source/objects/hasKeys.js","../../source/types/isConstructor.js","../../source/types/isTypeFactory.js","../../source/types/isBuffer.js","../../source/types/isPlainObject.js","../../source/utilities/isEqual.js","../../source/arrays/isMatch.js","../../source/arrays/largest.js","../../source/arrays/last.js","../../source/arrays/map.js","../../source/arrays/concurrentEach.js","../../source/arrays/mapAsync.js","../../source/arrays/mapRight.js","../../source/arrays/mapWhile.js","../../source/math/subtract.js","../../source/arrays/sortNumberAscending.js","../../source/arrays/partition.js","../../source/math/subtractReverse.js","../../source/arrays/sortNumberDescening.js","../../source/arrays/remove.js","../../source/arrays/rest.js","../../source/arrays/right.js","../../source/math/randomInt.js","../../source/numbers/isNumberEqual.js","../../source/internal/array.js","../../source/arrays/shuffle.js","../../source/arrays/sample.js","../../source/arrays/smallest.js","../../source/arrays/getNumberInsertIndex.js","../../source/arrays/take.js","../../source/arrays/takeRight.js","../../source/arrays/unique.js","../../source/arrays/union.js","../../source/arrays/untilFalse.js","../../source/arrays/untilTrue.js","../../source/arrays/whileCompactMap.js","../../source/arrays/whileEach.js","../../source/arrays/whileMap.js","../../source/arrays/without.js","../../source/arrays/xor.js","../../source/arrays/zip.js","../../source/buffers/ensure.js","../../source/buffers/clear.js","../../source/types/isFunction.js","../../source/types/isNumber.js","../../source/types/isString.js","../../source/objects/assign.js","../../source/classes/extendClass.js","../../source/collection/countBy.js","../../source/collection/countKey.js","../../source/collection/countWithoutKey.js","../../source/collection/findIndexCache.js","../../source/collection/findIndex.js","../../source/collection/findItem.js","../../source/collection/sortCollectionDescending.js","../../source/collection/getLowest.js","../../source/collection/sortCollectionAscending.js","../../source/collection/getHighest.js","../../source/collection/groupBy.js","../../source/collection/indexBy.js","../../source/collection/invoke.js","../../source/collection/invokeAsync.js","../../source/objects/pluckObject.js","../../source/collection/pluck.js","../../source/collection/sortCollectionAlphabetically.js","../../source/collection/sortCollectionAlphabeticallyReverse.js","../../source/files/getExtension.js","../../source/files/getFilename.js","../../source/internal/regexTestFactory.js","../../source/files/isFileCSS.js","../../source/files/isFileHTML.js","../../source/files/isFileJS.js","../../source/files/isFileJSON.js","../../source/functions/after.js","../../source/functions/ary.js","../../source/functions/before.js","../../source/objects/eachAsync.js","../../source/objects/each.js","../../source/utilities/forEachAsync.js","../../source/types/isSet.js","../../source/utilities/forOf.js","../../source/types/isGenerator.js","../../source/utilities/forOfAsync.js","../../source/types/isAsync.js","../../source/utilities/generateLoop.js","../../source/utilities/each.js","../../source/functions/chain.js","../../source/functions/curry.js","../../source/functions/curryRight.js","../../source/utilities/noop.js","../../source/utilities/times.js","../../source/utilities/timer.js","../../source/internal/apply.js","../../source/functions/debounce.js","../../source/functions/ifInvoke.js","../../source/functions/negate.js","../../source/functions/nthArg.js","../../source/functions/once.js","../../source/types/getType.js","../../source/types/cloneType.js","../../source/utilities/forOfMap.js","../../source/utilities/forOfMapAsync.js","../../source/objects/mapAsync.js","../../source/objects/map.js","../../source/utilities/map.js","../../source/functions/over.js","../../source/objects/everyAsync.js","../../source/objects/every.js","../../source/utilities/forOfEvery.js","../../source/utilities/forOfEveryAsync.js","../../source/utilities/every.js","../../source/functions/overEvery.js","../../source/functions/rearged.js","../../source/functions/throttle.js","../../source/functions/wrap.js","../../source/utilities/cacheNativeMethod.js","../../source/internal/object.js","../../source/internal/isSame.js","../../source/math/add.js","../../source/math/deduct.js","../../source/math/divide.js","../../source/math/increment.js","../../source/math/multiple.js","../../source/math/progress.js","../../source/math/randomFloat.js","../../source/math/remainder.js","../../source/math/subtractAll.js","../../source/math/sumAll.js","../../source/numbers/isNumberInRange.js","../../source/numbers/isNumberNotInRange.js","../../source/numbers/isPositive.js","../../source/numbers/isZero.js","../../source/numbers/isOdd.js","../../source/numbers/isEven.js","../../source/objects/getEntries.js","../../source/objects/compactKeys.js","../../source/objects/compactMapAsync.js","../../source/objects/compactMap.js","../../source/objects/filter.js","../../source/objects/filterAsync.js","../../source/objects/invert.js","../../source/objects/isMatch.js","../../source/regexps/escapeRegex.js","../../source/regexps/arrayToRegex.js","../../source/types/isRegex.js","../../source/objects/omit.js","../../source/objects/pick.js","../../source/objects/size.js","../../source/objects/zip.js","../../source/strings/camelCase.js","../../source/strings/kebabCase.js","../../source/strings/snakeCase.js","../../source/strings/upperCase.js","../../source/strings/lowerCase.js","../../source/strings/range.js","../../source/strings/replace.js","../../source/strings/sanitize.js","../../source/strings/tokenize.js","../../source/strings/truncate.js","../../source/strings/typography.js","../../source/types/getTypeName.js","../../source/types/isArguments.js","../../source/types/isMap.js","../../source/types/isTypedArray.js","../../source/types/noValue.js","../../source/types/isArrayLike.js","../../source/types/isBigInt.js","../../source/types/isBoolean.js","../../source/types/isArrayBuffer.js","../../source/types/isChild.js","../../source/types/isCloneable.js","../../source/types/isDate.js","../../source/types/isEmpty.js","../../source/types/isFalse.js","../../source/types/isF32.js","../../source/types/isF64.js","../../source/types/isFloat.js","../../source/types/isI16.js","../../source/types/isI32.js","../../source/types/isI8.js","../../source/types/isIterable.js","../../source/types/isPromise.js","../../source/types/isKindAsync.js","../../source/types/isParent.js","../../source/types/isPrimitive.js","../../source/types/isRelated.js","../../source/types/isSafeInt.js","../../source/types/isSameType.js","../../source/types/isTrue.js","../../source/types/isU16.js","../../source/types/isU32.js","../../source/types/isU8.js","../../source/types/isU8C.js","../../source/types/isWeakMap.js","../../source/types/isDeno.js","../../source/types/isNode.js","../../source/types/isTruthy.js","../../source/types/isFalsy.js","../../source/utilities/ifValue.js","../../source/utilities/notEqual.js","../../source/utilities/json.js","../../source/utilities/assert.js","../../source/utilities/bindAll.js","../../source/utilities/clear.js","../../source/utilities/clone.js","../../source/utilities/concurrent.js","../../source/utilities/compact.js","../../source/utilities/forOfCompactMapAsync.js","../../source/utilities/forOfCompactMap.js","../../source/utilities/compactMap.js","../../source/utilities/everyArg.js","../../source/utilities/forOfFilter.js","../../source/utilities/forOfFilterAsync.js","../../source/utilities/filter.js","../../source/utilities/flow.js","../../source/utilities/flowAsync.js","../../source/utilities/forMap.js","../../source/utilities/arraysToObject.js","../../source/utilities/has.js","../../source/utilities/hasDot.js","../../source/utilities/ifNotAssign.js","../../source/utilities/interval.js","../../source/utilities/merge.js","../../source/utilities/model.js","../../source/utilities/pair.js","../../source/utilities/concurrentStatus.js","../../source/utilities/promise.js","../../source/utilities/propertyMatch.js","../../source/utilities/setKey.js","../../source/utilities/setValue.js","../../source/utilities/store.js","../../source/utilities/stubArray.js","../../source/utilities/stubFalse.js","../../source/utilities/stubObject.js","../../source/utilities/stubString.js","../../source/utilities/stubTrue.js","../../source/utilities/timesAsync.js","../../source/utilities/toggle.js","../../source/utilities/uid.js","../../source/utilities/virtualStorage.js","../../source/utilities/inAsync.js","../../source/utilities/inSync.js","../../source/filesystem/copyFolder.js","../../source/filesystem/directory.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = isArray(propertyString) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [\n\t\tkey,\n\t\tvalue\n\t] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = isIterateeAsync ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = isIterateeAsync ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","/**\n * Checks if a number is odd & returns true or false.\n *\n * @function isOdd\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isOdd, assert } from '@universalweb/acid';\n * assert(isOdd(1), true);\n */\nexport function isOdd(source) {\n\treturn (source & 1) === 1;\n}\n","/**\n * Checks if a number is even & returns true or false.\n *\n * @function isEven\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEven, assert } from '@universalweb/acid';\n * assert(isEven(1), true);\n */\nexport function isEven(source) {\n\treturn (source & 1) === 0;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst source = {};\n\teachArray(properties, (item, key) => {\n\t\tsource[item] = values[key];\n\t});\n\treturn source;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst objectKeys = [];\n\tconst objectValues = [];\n\teachObject(object, (item, key) => {\n\t\tobjectKeys.push(key);\n\t\tobjectValues.push(item);\n\t});\n\treturn [\n\t\tobjectKeys,\n\t\tobjectValues,\n\t];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(\n\tcompactMapArray,\n\tcompactMapAsyncArray,\n\tcompactMapObject,\n\tcompactMapAsyncObject,\n\tforOfCompactMap,\n\tforOfCompactMapAsync\n);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn ((isEqual(on, value)) ? off : on);\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import {\n\tcopyFile,\n\tmkdir,\n\treaddir,\n\tstat\n} from 'node:fs/promises';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport path from 'node:path';\nasync function copyToPath(sourceFolder, destinationFolder, file) {\n\tconst sourcePath = path.join(sourceFolder, file);\n\tconst destinationPath = path.join(destinationFolder, file);\n\tawait copyFile(sourcePath, destinationPath);\n}\nexport async function copyFolder(sourceFolder, destinationFolder) {\n\tconst files = await readdir(sourceFolder);\n\tawait eachAsyncArray(files, async (file) => {\n\t\tconst sourcePath = path.join(sourceFolder, file);\n\t\tconst filestats = await stat(sourcePath);\n\t\tif (filestats.isDirectory()) {\n\t\t\tconst folderDestination = path.join(destinationFolder, file.replace(sourceFolder, ''));\n\t\t\tawait mkdir(folderDestination, {\n\t\t\t\trecursive: true\n\t\t\t});\n\t\t\tawait copyFolder(sourcePath, folderDestination);\n\t\t} else {\n\t\t\tawait copyToPath(sourceFolder, destinationFolder, file);\n\t\t}\n\t});\n\treturn true;\n}\n\n","import { fileURLToPath } from 'node:url';\nimport path from 'path';\nexport function currentFile(importMeta) {\n\tif (globalThis.__filename) {\n\t\treturn __filename;\n\t}\n\treturn fileURLToPath(importMeta.url);\n}\nexport function currentPath(importMeta) {\n\tif (globalThis.__dirname) {\n\t\treturn __dirname;\n\t}\n\treturn path.dirname(fileURLToPath(importMeta.url));\n}\n"],"names":["sign","random","normalizeCase","space","returnFlow","path"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,KAAK,EAAE,IAAI,GAAG,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ACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,MAAM,CAAC,yBAAyB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,MAAM,CAAC,eAAe;AACjC,MAAC,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,cAAc;;AC/C9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,CAAC;;ACd7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE;AACpC,CAAC,OAAO,MAAM,GAAG,MAAM,CAAC;AACxB;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,MAAM,CAAC,MAAM,EAAE;AAC/B,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;AACnB;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE;AACtC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;AACvB;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS,CAAC,MAAM,EAAE;AAClC,CAAC,OAAO,MAAM,GAAG,CAAC,CAAC;AACnB;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE;AACxC,CAAC,OAAO,MAAM,GAAG,KAAK,CAAC;AACvB;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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iBAAiB,CAAC,CAAC;AACnD,GAAG,MAAM;AACT,GAAG,MAAM,UAAU,CAAC,YAAY,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC;AAC3D,GAAG;AACH,EAAE,CAAC,CAAC;AACJ,CAAC,OAAO,IAAI,CAAC;AACb;;AC3BO,SAAS,WAAW,CAAC,UAAU,EAAE;AACxC,CAAC,IAAI,UAAU,CAAC,UAAU,EAAE;AAC5B,EAAE,OAAO,UAAU,CAAC;AACpB,EAAE;AACF,CAAC,OAAO,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AACtC,CAAC;AACM,SAAS,WAAW,CAAC,UAAU,EAAE;AACxC,CAAC,IAAI,UAAU,CAAC,SAAS,EAAE;AAC3B,EAAE,OAAO,SAAS,CAAC;AACnB,EAAE;AACF,CAAC,OAAOC,MAAI,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD;;;;"} \ No newline at end of file diff --git a/build/module/index.js b/build/module/index.js index d8f8b32..d9d37f6 100644 --- a/build/module/index.js +++ b/build/module/index.js @@ -1,2 +1,2 @@ -import{readdir as t,stat as n,mkdir as r,copyFile as e}from"node:fs/promises";import o from"node:path";import{fileURLToPath as u}from"node:url";import c from"path";function i(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function s(t){return t.length=0,t}function f(t){return t.slice()}function a(t){return void 0===t}function l(t){return Boolean(t.length)}function h(t){return null===t}function p(t){return!a(t)&&!h(t)}function g(t){return t}function d(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const s=n.call(e,t,u,r,c,i,o);p(s)&&r.push(s)})):d(t,((t,u,c,i)=>{const s=n(t,u,r,c,i,e,o);p(s)&&r.push(s)})),r}async function w(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const u=await n(t,e,r,o);p(u)&&r.push(u)})),r}const{sign:b}=Math;function v(t){return-1===b(t)}function A(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function E(t,n,r=1,e=[]){return v(r)?e:t{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function T(t,n=1,r=t.length){return t.splice(n,r)}const _=(t,n=1,r=t.length)=>T(t,0,r-n);function F(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function R(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function N(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function D(t,n,r=[],e){return await w(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function L(t,n){return n?t.slice(0,n):t[0]}function Z(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat($(n))),[]);return r}function k(t){return t.slice(0,t.length-1)}function q(t,...n){return m(t,(t=>{if(N(n,(n=>n.includes(t))))return t}))}function V(t,n,r){if(!t)return;const e=t.length;if(p(r))for(let o=0;o(r=r[t],p(r)))),r}const K=Object.keys;function Q(t){if(t)return K(t)}const X=Object.hasOwn;function Y(t,...n){if(t)return N(n,(n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}}))}function tt(t,...n){if(t)return Boolean(n.find((n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}})))}function nt(t,n){return t?.constructor===n||!1}function rt(t){return n=>nt(n,t)}function et(t){return t?.constructor?.name}function ot(t){return n=>et(n)===t||!1}function ut(t){return function(n,...r){return r?t(n)&&N(r,t):t(n)}}const ct=ot("Buffer"),it=ut(ct),st=t=>!!p(t)&&"Object("===t.constructor.toString().trim().slice(9,16),ft=(t,n)=>{if(t===n)return!0;if(it(t))return t.equals(n);if(t.toString()===n.toString())if(st(t)){const r=Q(t);if(Y(n,r))return N(r,(r=>ft(t[r],n[r])))}else if(j(t)&&t.length===n.length)return N(t,((t,r)=>ft(t,n[r])));return!1};function at(t,n){return t.length===n.length&&N(t,((t,r)=>ft(n[r],t)))}const lt=Math.max;function ht(t){return lt(...t)}function pt(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function gt(t,n,r=[],e,o){return p(e)?d(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):d(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function dt(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function wt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function yt(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function It(t,n){return n-t}function Et(t){return t.sort(It)}function jt(t,n){let r=t.length;for(let e=0;er)return Ft(t);if(1===n)return[t[St(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Dt(t,n=1){return t.slice(0,n)}function Lt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Zt(t,n,r){return r.indexOf(t)===n}function kt(t,n,r){return t!==r[n-1]}function qt(t,n){return n?t.filter(kt):t.filter(Zt)}function Vt(...t){return qt(C(t))}function zt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Qt(...t){const n=O(Map),r=[];return 2===t.length?B(t[0],t[1]):(d(t,((t,r)=>{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&r.push(t.child)})),r)}function Xt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Yt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function tn(t){return it(t)&&t||p(t)&&Buffer.from(t)||Buffer.alloc(0)}function nn(t){return t.fill(0),t}const rn=t=>!!p(t)&&t instanceof Function,en=ot("Number"),on=ut(en);function un(t){return!on(t)}const cn=rt(String);function sn(t){return!cn(t)}const fn=Object.assign;function an(t,n){if(st(n))fn(t,n);else if(rn(n)){const r=n.name;r?t[r]=n:fn(t,n)}else(cn(n)||on(n))&&(t[n]=n);return t}function ln(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function dn(t,n){let r=0;return d(t,(t=>{t[n]&&r++})),r}function mn(t,n){let r=0;return d(t,(t=>{t[n]||r++})),r}function wn(t,n,r,e,o){if(t[o]===e)return!0}function yn(t,n,r="id"){const e=t.findIndex(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function bn(t,n,r="id"){const e=t.find(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function vn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function An(t,n="id",r){return t.sort(((t,e)=>vn(t,e,n,r)))}function In(t,n){return An(t,n,!1)[0]}function En(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function jn(t,n="id",r){return t.sort(((t,e)=>En(t,e,n,r)))}function Mn(t,n="id"){return jn(t,n)[0]}function xn(t,n){const r={};return d(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function On(t,n="id"){const r={};return d(t,(t=>{r[t[n]]=t})),r}function $n(t,n,r,e){return gt(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function Cn(t,n,r,e){return mt(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function Sn(t,n){if(t)return cn(n)?t[n]:gt(n,(n=>t[n]))}function Bn(t,n){return gt(t,(t=>Sn(t,n)))}function Tn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function _n(t,n="id",r){return t.sort(((t,e)=>Tn(t,e,n,r)))}function Fn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function Rn(t,n="id",r){return t.sort(((t,e)=>Fn(t,e,n,r)))}function Nn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Pn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Un(t){return n=>!!p(n)&&t.test(n)}const Dn=Un(/\.css$/),Ln=Un(/\.html$/),Zn=Un(/\.js$/),kn=Un(/\.json$/);function qn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Vn(t,n){return(...r)=>t(...r.splice(0,n))}function zn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const Gn=async(t,n,r,e)=>{if(!t)return;const o=Q(t);return p(r)?await w(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await w(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Jn(t,n,r,e){if(!t)return;const o=Q(t);return p(r)?d(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):d(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Wn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let l;const h=rr(i);if(p(c)&&i)return l=j(c)?h?n:t:st(c)||rn(c)?h?e:r:o?h?u:o:Yn(c)?u:h?e:r,l(c,i,s,f,a)}}const or=er(d,w,Jn,Gn,Qn,tr);class ur{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;or(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function cr(t){return O(ur,[t])}function ir(t,n=t.length){const r=[],e=(...o)=>{if(r.push(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function sr(t,n=t.length){const r=[],e=(...o)=>{if(r.unshift(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function fr(){}function ar(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=O(hr);function gr(t,n){return pr.set(t,n)}function dr(){ar(setTimeout(fr,0),(t=>{pr.remove(t)}))}const mr=Reflect.apply;function wr(t,n,r){if(rn(t))return mr(t,n,r)}function yr(t,n){function r(...t){!1!==r.id&&pr.remove(r.id),r.id=gr((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(pr.remove(r.id),r.id=!1)},r}function br(t,n,...r){if(rn(t))return n?t.call(n,...r):t(...r)}function vr(t){return(...n)=>!t(...n)}function Ar(t=0){return(...n)=>n[t]}const Ir=t=>{let n;return(...r)=>(p(n)||(n=t(...r)),n)};function Er(t){return t?.constructor}function jr(t,n=[]){const r=Er(t);return r===Function&&"function"===r.name?function(){}:O(r,n)}function Mr(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function xr(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function Or(t,n,r={}){if(t)return await Gn(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function $r(t,n,r={},e,o){if(t)return p(e)?Jn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Jn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Cr=er(gt,mt,$r,Or,Mr,xr);function Sr(t){return(...n)=>Cr(t,(t=>t(...n)))}async function Br(t,n){if(!t)return;return P(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Tr(t,n){if(!t)return;return N(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function _r(t,n=g){if(j(t)||Kn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function Fr(t,n=g,r){if(Yn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(j(t)||Kn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const Rr=er(N,P,Tr,Br,_r,Fr);function Nr(t){return n=>Rr(t,(t=>t(n)))}function Pr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Ur(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=gr((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{pr.remove(r.id),r.id=!1},r}function Dr(t,n){return(...r)=>n(t,...r)}const Lr=Function.prototype;function Zr(t){return Lr.call.bind(t)}const kr=Object.getOwnPropertyNames,qr=Object.getOwnPropertyDescriptor,Vr=Object.defineProperty,zr=Zr(Object.hasOwnProperty),Gr=Object.is;function Jr(t,n){return t+n}function Wr(t){return t-1}function Hr(t,n){return t/n}function Kr(t){return t+1}function Qr(t,n){return t*n}function Xr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Yr}=Math;function te(t,n=0){return Yr()*(t-n)+n}function ne(t,n){return t%n}function re(t){return t.reduce(((t,n)=>t-n),0)}function ee(t){return t.reduce(((t,n)=>t+n),0)}function oe(t,n,r){return t>n&&tr}const{sign:ce}=Math;function ie(t){return 1===ce(t)}function se(t){return 0===t}const fe=Object.entries;function ae(t){if(p(t))return fe(t)}function le(t){const n=[];return Jn(t,((t,r)=>{p(t)&&n.push(r)})),n}async function he(t,n=g,r={}){return await Gn(t,(async(t,e,o,u,c)=>{const i=await n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function pe(t,n=g,r={}){return Jn(t,((t,e,o,u,c)=>{const i=n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function ge(t,n,r={}){return Jn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function de(t,n,r={}){return await Gn(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function me(t,n={}){if(t)return Jn(t,((t,r)=>{n[t]=r})),n}const we=(t,n)=>{if(t===n)return!0;const r=Q(t),e=Q(n);return r.length===e.length&&N(r,(r=>t[r]===n[r]))},ye=/[()[\]{}*+?^$|#.,/\\\s-]/g;function be(t){return t.replace(ye,"\\$&")}function ve(t,n){return n?ve(gt(t,be)):RegExp(t.join("|"))}const Ae=ot("RegExp"),Ie=ut(Ae);function Ee(t,n){if(!t)return{};if(j(n)){const r=ve(n);return ge(t,((t,n)=>!r.test(n)))}if(Ie(n))return ge(t,((t,r)=>!n.test(r)));if(cn(n))return ge(t,((t,r)=>r!==n));if(on(n)){const r=n.toString();return ge(t,((t,n)=>n!==r))}return rn(n)?ge(t,((t,r)=>!n(t,r))):fn({},t)}const je=(t,n,r={})=>{if(t)return d(n,(n=>{r[n]=t[n]})),r};function Me(t){if(!t)return;if(st(t))return Q(t).length;const n=t.length;if(p(n))return n;const r=t.size;return p(n)?r:Q(t).length}const xe=(t,n)=>{const r={};return d(t,((t,e)=>{r[t]=n[e]})),r},Oe=t=>{const n=[],r=[];return Jn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},$e=/[ _-]+/g;function Ce(t){let n="";return t.replace($e," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Se=/[ _-]+/g,Be=/[ ]+/g;function Te(t){return t.replace(/([A-Z]+)/g," $1").replace(Se," ").trim().toLowerCase().replace(Be,"-")}const _e=/[ _-]+/g,Fe=/[ ]+/g;function Re(t){return t.replace(/([A-Z]+)/g," $1").replace(_e," ").trim().toLowerCase().replace(Fe,"_")}const Ne=/[ _-]+/g;function Pe(t){return t.replace(/([A-Z]+)/g," $1").replace(Ne," ").trim().toUpperCase()}const Ue=/[ _-]+/g;function De(t){return t.replace(/([A-Z]+)/g," $1").replace(Ue," ").trim().toLowerCase()}function Le(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Ze(t,n=1){return t[t.length-n]}function ke(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function qe(t,n=1){return t.slice(0,-1*n)}function Ve(t,n=1){return t.substring(n)}function ze(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const Ge=/%(?![\da-f]{2})/gi,Je=/&/g,We=//g,Ke=/"/g;function Qe(t){return decodeURIComponent(t.replace(Ge,(()=>"%25")))}function Xe(t){return t.replace(Je,"&").replace(We,"<").replace(He,">").replace(Ke,""")}function Ye(t){return Xe(Qe(t))}const to=/\S+/g,no=/\w+/g;function ro(t){return t.match(to)||[]}function eo(t){return t.match(no)||[]}function oo(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function uo(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const co=/\w+/g;function io(t){return t[0].toUpperCase()}function so(t){return io(t)+Ve(t)}function fo(t){return io(t)+Ve(t).toLowerCase()}function ao(t){return t.replace(co,(t=>so(t)))}function lo(t){return t.replace(co,(t=>fo(t)))}function ho(t){return Er(t)?.name}function po(t){return!!p(t)&&"[object Arguments]"===t.toString()}const go=ot("Map"),mo=ut(go),wo=/Array/,yo="Array";function bo(t){if(t){const n=ho(t);if(wo.test(n)&&n!==yo)return!0}return!1}function vo(t){return!p(t)}function Ao(t,n){if(vo(t)||rn(t))return!1;if(j(t)||bo(t))return!0;const r=t.length;if(!vo(r)||!on(r)||r<0)return!1;if(n){const n=Q(t);return!!n&&Rr(n,((t,n)=>n>=0&&on(n)))}return!0}const Io=ot("BigInt"),Eo=ut(Io),jo=ot("Boolean"),Mo=ut(jo),xo=ot("ArrayBuffer"),Oo=ut(xo);function $o(t,n){return!(!t||!n)&&t instanceof n}const Co=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function So(t){if(p(t)){const n=t?.constructor?.name;return Co.test(n)}return!1}const Bo=ot("Date"),To=ut(Bo);function _o(t){return cn(t)||j(t)?!l(t):st(t)?!Me(t):!p(t)}function Fo(t){return!1===t}const Ro=ot("Float32Array"),No=ut(Ro),Po=ot("Float64Array"),Uo=ut(Po),{isInteger:Do}=Number,Lo=Do,Zo=ot("Int16Array"),ko=ut(Zo),qo=ot("Int32Array"),Vo=ut(qo),zo=ot("Int8Array"),Go=ut(zo);function Jo(t){return p(t)&&"function"==typeof t[Symbol.iterator]}function Wo(t){return!!t&&t instanceof Promise}function Ho(t){return!!t&&(Wo(t)||rr(t)||Yn(t))}function Ko(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Qo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Xo(t,n){return!vo(t)&&!vo(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Yo}=Number,tu=Yo;function nu(t,n){const r=Er(t),e=Er(n);return r===e&&r.name===e.name}function ru(t){return!0===t}const eu=ot("Uint16Array"),ou=ut(eu),uu=ot("Uint32Array"),cu=ut(uu),iu=ot("Uint8Array"),su=ut(iu),fu=ot("Uint8ClampedArray"),au=ut(fu),lu=ot("WeakMap"),hu=ut(lu),pu=void 0!==globalThis.Deno,gu=void 0!==globalThis.process&&process.versions&&process.versions.node;function du(t,n=!0){return Boolean(t)&&n}function mu(t,n=!0){return!1===Boolean(t)&&n}function wu(t,n,r,e){if(p(t)){if(rn(n))return r?wr(n,r,e):n(...e);if(st(n))return n[r]=t,n}}function yu(t,n){return Fo(ft(t,n))}const bu=JSON;function vu(t,n){if(t)return bu.parse(t,n)}const Au=bu.stringify;function Iu(t,n,r){const e=globalThis.options||r;let o;return rn(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Au(t)}\n\t\tExpected: ${Au(n)}`,e)}async function Eu(t,n,r){const e=await t;return!(rn(n)&&!1===await n(e,r))&&!yu(e,n)||Iu(e,n,r)}function ju(t,n,r){if(Ho(t)||Ho(n))return Eu(t,n,r);return!(rn(n)&&!1===n(t,r))&&!yu(t,n)||Iu(t,n,r)}function Mu(t,n,r){const e=Cr(t,(t=>rn(t)?t.bind(n):t));return r?ln(r,e):e}function xu(t){if(t){if(it(t))return nn(t);if(j(t))return s(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Ou=globalThis.structuredClone;function $u(t){return Ou(t)}async function Cu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;udu(t)))}async function Bu(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);p(e)&&r.push(e)}return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);p(u)&&e(u)}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);p(c)&&(u?o.set(r,c):o[r]=c)}return o}function Tu(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);p(u)&&o(u)}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);p(c)&&(o?e.set(r,c):e[r]=c)}return e}const _u=er(m,y,pe,he,Tu,Bu);function Fu(...t){return rr(t[0])?async function(...n){return Rr(t,(async t=>Rr(n,(async n=>t(n)))))}:function(...n){return Rr(t,(t=>Rr(n,(n=>t(n)))))}}function Ru(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=rn(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Nu(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=rn(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Pu=er(U,D,ge,de,Ru,Nu);function Uu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Du=Uu(d),Lu=Uu(F);function Zu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const ku=Zu(w),qu=Zu(R);function Vu(t,n){const r=jr(t),e=r.push||r.add;if(e&&rn(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else rn(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function zu(t,n){const r={};return d(t,((t,e)=>{r[n[e]]=t})),r}function Gu(t,n,r){return!vo(t)&&!vo(n)&&(t===n||(cn(t)?cn(n)?t.includes(n,r):Ie(n)?n.test(t):rn(n)?n(t):j(n)?N(n,(n=>Gu(t,n))):Rr(n,(n=>Gu(t,n))):j(t)?Ie(n)?N(t,(t=>t.test(n))):rn(n)?N(t,n):j(n)?N(n,(n=>Gu(t,n))):t.includes(n,r):!!st(t)&&(Ie(n)?Tr(t,(t=>t.test(n))):rn(n)?Tr(t,n):st(n)?Tr(t,((t,r)=>t===n[r])):Tr(t,(t=>Gu(t,n))))))}const Ju=Un(/\./),Wu=(t,n,r)=>(n&&!p(t[n])&&(t[n]=r),t);class Hu{list=O(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ku=O(Hu);function Qu(t,n){return Ku.set(t,n)}function Xu(){ar(setTimeout(fr,0),(t=>{Ku.remove(t)}))}function Yu(t,...n){return or(n,(n=>{or(n,((n,r)=>{if(t[r]&&(st(n)||j(n)||n.forEach))return Yu(t[r],n);t[r]=n}))})),t}class tc{static models=new Map;constructor(t,n){p(n)?(ln(this,n),this.modelName=t,tc.models.set(t,n)):ln(this,t)}delete(t){tc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),tc.models.set(t||this.modelName,this)}has(t){return tc.models.has(t||this.modelName)}get(t){return tc.models.get(t||this.modelName)}}function nc(t,n){return p(n)?O(tc,[t,n]):H(t,tc.models)}function rc(t,n){return[t,n]}function ec(t,n,r){const e=t.length,o=[];for(let u=0;uN(r,(r=>ft(t[r],n[r])));function cc(t,n,r){return n&&st(t)||on(n)&&j(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function ic(t,n,r){return on(r)&&j(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class sc{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Jn(t,(n=>{t[n]=new sc(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new sc(r),!0)})}}function fc(){return[]}function ac(){return!1}const lc=()=>({}),hc=()=>"",pc=()=>!0;async function gc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const yc=O(wc);class bc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):p(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=jr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function vc(t){return new bc(t)}async function Ac(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{const i=o.join(u,t);if((await n(i)).isDirectory()){const n=o.join(c,t.replace(u,""));await r(n,{recursive:!0}),await Ec(i,n)}else await async function(t,n,r){const u=o.join(t,r),c=o.join(n,r);await e(u,c)}(u,c,t)})),!0}function jc(t){return globalThis.__filename?__filename:u(t.url)}function Mc(t){return globalThis.__dirname?__dirname:c.dirname(u(t.url))}export{ur as Chain,Hu as Intervals,tc as Model,sc as Store,hr as Timers,wc as UniqID,bc as VirtualStorage,Jr as add,qn as after,wr as apply,ve as arrayToRegex,zu as arraysToObject,Vn as ary,ju as assert,Eu as assertAsync,ln as assign,hn as assignToClass,an as assignToObject,zn as before,Mu as bindAll,Zr as cacheNativeMethod,Xr as calcProgress,Ce as camelCase,cr as chain,i as chunk,ke as chunkString,xu as clear,s as clearArray,nn as clearBuffer,Xu as clearIntervals,dr as clearTimers,$u as clone,f as cloneArray,jr as cloneType,Su as compact,le as compactKeys,_u as compactMap,m as compactMapArray,y as compactMapAsyncArray,he as compactMapAsyncObject,pe as compactMapObject,Cu as concurrent,dt as concurrentEachArray,ec as concurrentStatus,O as construct,et as constructorName,Ec as copyFolder,gn as countBy,dn as countKey,mn as countWithoutKey,jc as currentFile,Mc as currentPath,ir as curry,sr as curryRight,yr as debounce,Wr as deduct,Vr as defProp,B as difference,Hr as divide,T as drop,_ as dropRight,or as each,d as eachArray,w as eachAsyncArray,Gn as eachAsyncObject,Jn as eachObject,F as eachRight,R as eachRightAsync,$ as ensureArray,tn as ensureBuffer,se as equalsZero,be as escapeRegex,ye as escapeRegexRegex,Rr as every,Fu as everyArg,N as everyArray,P as everyAsyncArray,Br as everyAsyncObject,Tr as everyObject,pn as extendClass,Pu as filter,U as filterArray,D as filterAsyncArray,de as filterAsyncObject,ge as filterObject,yn as findIndex,wn as findIndexCache,bn as findItem,L as first,Z as flatten,C as flattenDeep,Du as flow,ku as flowAsync,qu as flowAsyncRight,Lu as flowRight,S as forEach,Wn as forEachAsync,Vu as forMap,Qn as forOf,tr as forOfAsync,Tu as forOfCompactMap,Bu as forOfCompactMapAsync,_r as forOfEvery,Fr as forOfEveryAsync,Ru as forOfFilter,Nu as forOfFilterAsync,Mr as forOfMap,xr as forOfMapAsync,er as generateLoop,H as get,ae as getEntries,Nn as getFileExtension,Pn as getFilename,Mn as getHighest,In as getLowest,Ut as getNumberInsertIndex,qr as getPropDesc,kr as getPropNames,Er as getType,ho as getTypeName,xn as groupBy,Gu as has,tt as hasAnyKeys,Ju as hasDot,Y as hasKeys,l as hasLength,zr as hasProp,p as hasValue,Xe as htmlEntities,br as ifInvoke,Wu as ifNotAssign,wu as ifValue,Ac as inAsync,Ic as inSync,Kr as increment,On as indexBy,k as initial,qe as initialString,Le as insertInRange,q as intersection,Qu as interval,Ku as intervals,me as invert,V as invokeArray,$n as invokeCollection,Cn as invokeCollectionAsync,po as isArguments,j as isArray,Oo as isArrayBuffer,xo as isArrayBufferCall,Ao as isArrayLike,rr as isAsync,nr as isAsyncCall,Eo as isBigInt,Io as isBigIntCall,Mo as isBoolean,jo as isBooleanCall,it as isBuffer,ct as isBufferCall,$o as isChild,So as isCloneable,nt as isConstructor,rt as isConstructorFactory,ot as isConstructorNameFactory,To as isDate,Bo as isDateCall,pu as isDeno,_o as isEmpty,ft as isEqual,No as isF32,Ro as isF32Call,Uo as isF64,Po as isF64Call,Fo as isFalse,mu as isFalsy,Dn as isFileCSS,Ln as isFileHTML,Zn as isFileJS,kn as isFileJSON,Lo as isFloat,rn as isFunction,Yn as isGenerator,Xn as isGeneratorCall,ko as isI16,Zo as isI16Call,Vo as isI32,qo as isI32Call,Go as isI8,zo as isI8Call,Jo as isIterable,Ho as isKindAsync,mo as isMap,go as isMapCall,at as isMatchArray,we as isMatchObject,v as isNegative,gu as isNodejs,M as isNotArray,un as isNotNumber,sn as isNotString,h as isNull,on as isNumber,en as isNumberCall,Bt as isNumberEqual,oe as isNumberInRange,ue as isNumberNotInRange,Ko as isParent,st as isPlainObject,ie as isPositive,Qo as isPrimitive,Wo as isPromise,Ie as isRegex,Ae as isRegexCall,Xo as isRelated,tu as isSafeInt,Gr as isSame,nu as isSameType,Kn as isSet,Hn as isSetCall,cn as isString,ru as isTrue,du as isTruthy,ut as isTypeFactory,bo as isTypedArray,ou as isU16,eu as isU16Call,cu as isU32,uu as isU32Call,su as isU8,au as isU8C,fu as isU8CCall,iu as isU8Call,a as isUndefined,hu as isWeakMap,lu as isWeakMapCall,se as isZero,vu as jsonParse,Te as kebabCase,Q as keys,ht as largest,pt as last,De as lowerCase,Cr as map,gt as mapArray,mt as mapAsyncArray,Or as mapAsyncObject,$r as mapObject,wt as mapRightArray,yt as mapWhile,Yu as merge,nc as model,Qr as multiply,vr as negate,vo as noValue,fr as noop,yu as notEqual,Ar as nthArg,fn as objectAssign,fe as objectEntries,Me as objectSize,Ee as omit,Ir as once,Zt as onlyUnique,Sr as over,Nr as overEvery,rc as pair,At as partition,je as pick,Bn as pluck,Sn as pluckObject,oc as promise,uc as propertyMatch,te as randomFloat,St as randomInt,E as range,I as rangeDown,A as rangeUp,Qe as rawURLDecode,Pr as reArg,Un as regexTestFactory,ne as remainder,jt as remove,Mt as removeBy,ze as replaceList,xt as rest,Ve as restString,g as returnValue,Ot as right,Ze as rightString,Rt as sample,Ye as sanitize,cc as setKey,ic as setValue,Ft as shuffle,Pt as smallest,Re as snakeCase,_n as sortCollectionAlphabetically,Rn as sortCollectionAlphabeticallyReverse,jn as sortCollectionAscending,En as sortCollectionAscendingFilter,An as sortCollectionDescending,vn as sortCollectionDescendingFilter,vt as sortNumberAscending,Et as sortNumberDescening,Tn as sortObjectsAlphabetically,Fn as sortObjectsAlphabeticallyReverse,kt as sortUnique,Au as stringify,fc as stubArray,ac as stubFalse,lc as stubObject,hc as stubString,pc as stubTrue,bt as subtract,re as subtractAll,It as subtractReverse,ee as sumAll,Dt as take,Lt as takeRight,Ur as throttle,gr as timer,pr as timers,ar as times,gc as timesAsync,lr as timesMap,dc as timesMapAsync,_t as toArray,W as toPath,mc as toggle,ro as tokenize,oo as truncate,uo as truncateRight,Yt as unZip,Oe as unZipObject,Vt as union,yc as uniqID,qt as unique,zt as untilFalseArray,Gt as untilTrueArray,Pe as upperCase,so as upperFirst,ao as upperFirstAll,io as upperFirstLetter,fo as upperFirstOnly,lo as upperFirstOnlyAll,vc as virtualStorage,Jt as whileCompactMap,Wt as whileEachArray,Ht as whileMapArray,Kt as without,eo as words,Dr as wrap,Qt as xor,Xt as zip,xe as zipObject}; +import{readdir as t,stat as n,mkdir as r,copyFile as e}from"node:fs/promises";import o from"node:path";import{fileURLToPath as u}from"node:url";import c from"path";function i(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function s(t){return t.length=0,t}function f(t){return t.slice()}function a(t){return void 0===t}function l(t){return Boolean(t.length)}function h(t){return null===t}function p(t){return!a(t)&&!h(t)}function g(t){return t}function d(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const s=n.call(e,t,u,r,c,i,o);p(s)&&r.push(s)})):d(t,((t,u,c,i)=>{const s=n(t,u,r,c,i,e,o);p(s)&&r.push(s)})),r}async function w(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const u=await n(t,e,r,o);p(u)&&r.push(u)})),r}const{sign:b}=Math;function v(t){return-1===b(t)}function A(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function E(t,n,r=1,e=[]){return v(r)?e:t{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function T(t,n=1,r=t.length){return t.splice(n,r)}const _=(t,n=1,r=t.length)=>T(t,0,r-n);function F(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function R(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function N(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function D(t,n,r=[],e){return await w(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function L(t,n){return n?t.slice(0,n):t[0]}function Z(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat($(n))),[]);return r}function k(t){return t.slice(0,t.length-1)}function q(t,...n){return m(t,(t=>{if(N(n,(n=>n.includes(t))))return t}))}function V(t,n,r){if(!t)return;const e=t.length;if(p(r))for(let o=0;o(r=r[t],p(r)))),r}const K=Object.keys;function Q(t){if(t)return K(t)}const X=Object.hasOwn;function Y(t,...n){if(t)return N(n,(n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}}))}function tt(t,...n){if(t)return Boolean(n.find((n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}})))}function nt(t,n){return t?.constructor===n||!1}function rt(t){return n=>nt(n,t)}function et(t){return t?.constructor?.name}function ot(t){return n=>et(n)===t||!1}function ut(t){return function(n,...r){return r?t(n)&&N(r,t):t(n)}}const ct=ot("Buffer"),it=ut(ct),st=t=>!!p(t)&&"Object("===t.constructor.toString().trim().slice(9,16),ft=(t,n)=>{if(t===n)return!0;if(it(t))return t.equals(n);if(t.toString()===n.toString())if(st(t)){const r=Q(t);if(Y(n,r))return N(r,(r=>ft(t[r],n[r])))}else if(j(t)&&t.length===n.length)return N(t,((t,r)=>ft(t,n[r])));return!1};function at(t,n){return t.length===n.length&&N(t,((t,r)=>ft(n[r],t)))}const lt=Math.max;function ht(t){return lt(...t)}function pt(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function gt(t,n,r=[],e,o){return p(e)?d(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):d(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function dt(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function wt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function yt(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function It(t,n){return n-t}function Et(t){return t.sort(It)}function jt(t,n){let r=t.length;for(let e=0;er)return Ft(t);if(1===n)return[t[St(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Dt(t,n=1){return t.slice(0,n)}function Lt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Zt(t,n,r){return r.indexOf(t)===n}function kt(t,n,r){return t!==r[n-1]}function qt(t,n){return n?t.filter(kt):t.filter(Zt)}function Vt(...t){return qt(C(t))}function zt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Qt(...t){const n=O(Map),r=[];return 2===t.length?B(t[0],t[1]):(d(t,((t,r)=>{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&r.push(t.child)})),r)}function Xt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Yt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function tn(t){return it(t)&&t||p(t)&&Buffer.from(t)||Buffer.alloc(0)}function nn(t){return t.fill(0),t}const rn=t=>!!p(t)&&t instanceof Function,en=ot("Number"),on=ut(en);function un(t){return!on(t)}const cn=rt(String);function sn(t){return!cn(t)}const fn=Object.assign;function an(t,n){if(st(n))fn(t,n);else if(rn(n)){const r=n.name;r?t[r]=n:fn(t,n)}else(cn(n)||on(n))&&(t[n]=n);return t}function ln(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function dn(t,n){let r=0;return d(t,(t=>{t[n]&&r++})),r}function mn(t,n){let r=0;return d(t,(t=>{t[n]||r++})),r}function wn(t,n,r,e,o){if(t[o]===e)return!0}function yn(t,n,r="id"){const e=t.findIndex(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function bn(t,n,r="id"){const e=t.find(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function vn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function An(t,n="id",r){return t.sort(((t,e)=>vn(t,e,n,r)))}function In(t,n){return An(t,n,!1)[0]}function En(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function jn(t,n="id",r){return t.sort(((t,e)=>En(t,e,n,r)))}function Mn(t,n="id"){return jn(t,n)[0]}function xn(t,n){const r={};return d(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function On(t,n="id"){const r={};return d(t,(t=>{r[t[n]]=t})),r}function $n(t,n,r,e){return gt(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function Cn(t,n,r,e){return mt(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function Sn(t,n){if(t)return cn(n)?t[n]:gt(n,(n=>t[n]))}function Bn(t,n){return gt(t,(t=>Sn(t,n)))}function Tn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function _n(t,n="id",r){return t.sort(((t,e)=>Tn(t,e,n,r)))}function Fn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function Rn(t,n="id",r){return t.sort(((t,e)=>Fn(t,e,n,r)))}function Nn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Pn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Un(t){return n=>!!p(n)&&t.test(n)}const Dn=Un(/\.css$/),Ln=Un(/\.html$/),Zn=Un(/\.js$/),kn=Un(/\.json$/);function qn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Vn(t,n){return(...r)=>t(...r.splice(0,n))}function zn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const Gn=async(t,n,r,e)=>{if(!t)return;const o=Q(t);return p(r)?await w(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await w(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Jn(t,n,r,e){if(!t)return;const o=Q(t);return p(r)?d(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):d(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Wn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let l;const h=rr(i);if(p(c)&&i)return l=j(c)?h?n:t:st(c)||rn(c)?h?e:r:o?h?u:o:Yn(c)?u:h?e:r,l(c,i,s,f,a)}}const or=er(d,w,Jn,Gn,Qn,tr);class ur{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;or(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function cr(t){return O(ur,[t])}function ir(t,n=t.length){const r=[],e=(...o)=>{if(r.push(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function sr(t,n=t.length){const r=[],e=(...o)=>{if(r.unshift(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function fr(){}function ar(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=O(hr);function gr(t,n){return pr.set(t,n)}function dr(){ar(setTimeout(fr,0),(t=>{pr.remove(t)}))}const mr=Reflect.apply;function wr(t,n,r){if(rn(t))return mr(t,n,r)}function yr(t,n){function r(...t){!1!==r.id&&pr.remove(r.id),r.id=gr((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(pr.remove(r.id),r.id=!1)},r}function br(t,n,...r){if(rn(t))return n?t.call(n,...r):t(...r)}function vr(t){return(...n)=>!t(...n)}function Ar(t=0){return(...n)=>n[t]}const Ir=t=>{let n;return(...r)=>(p(n)||(n=t(...r)),n)};function Er(t){return t?.constructor}function jr(t,n=[]){const r=Er(t);return r===Function&&"function"===r.name?function(){}:O(r,n)}function Mr(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function xr(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function Or(t,n,r={}){if(t)return await Gn(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function $r(t,n,r={},e,o){if(t)return p(e)?Jn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Jn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Cr=er(gt,mt,$r,Or,Mr,xr);function Sr(t){return(...n)=>Cr(t,(t=>t(...n)))}async function Br(t,n){if(!t)return;return P(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Tr(t,n){if(!t)return;return N(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function _r(t,n=g){if(j(t)||Kn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function Fr(t,n=g,r){if(Yn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(j(t)||Kn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const Rr=er(N,P,Tr,Br,_r,Fr);function Nr(t){return n=>Rr(t,(t=>t(n)))}function Pr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Ur(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=gr((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{pr.remove(r.id),r.id=!1},r}function Dr(t,n){return(...r)=>n(t,...r)}const Lr=Function.prototype;function Zr(t){return Lr.call.bind(t)}const kr=Object.getOwnPropertyNames,qr=Object.getOwnPropertyDescriptor,Vr=Object.defineProperty,zr=Zr(Object.hasOwnProperty),Gr=Object.is;function Jr(t,n){return t+n}function Wr(t){return t-1}function Hr(t,n){return t/n}function Kr(t){return t+1}function Qr(t,n){return t*n}function Xr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Yr}=Math;function te(t,n=0){return Yr()*(t-n)+n}function ne(t,n){return t%n}function re(t){return t.reduce(((t,n)=>t-n),0)}function ee(t){return t.reduce(((t,n)=>t+n),0)}function oe(t,n,r){return t>n&&tr}const{sign:ce}=Math;function ie(t){return 1===ce(t)}function se(t){return 0===t}function fe(t){return!(1&~t)}function ae(t){return!(1&t)}const le=Object.entries;function he(t){if(p(t))return le(t)}function pe(t){const n=[];return Jn(t,((t,r)=>{p(t)&&n.push(r)})),n}async function ge(t,n=g,r={}){return await Gn(t,(async(t,e,o,u,c)=>{const i=await n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function de(t,n=g,r={}){return Jn(t,((t,e,o,u,c)=>{const i=n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function me(t,n,r={}){return Jn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function we(t,n,r={}){return await Gn(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function ye(t,n={}){if(t)return Jn(t,((t,r)=>{n[t]=r})),n}const be=(t,n)=>{if(t===n)return!0;const r=Q(t),e=Q(n);return r.length===e.length&&N(r,(r=>t[r]===n[r]))},ve=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Ae(t){return t.replace(ve,"\\$&")}function Ie(t,n){return n?Ie(gt(t,Ae)):RegExp(t.join("|"))}const Ee=ot("RegExp"),je=ut(Ee);function Me(t,n){if(!t)return{};if(j(n)){const r=Ie(n);return me(t,((t,n)=>!r.test(n)))}if(je(n))return me(t,((t,r)=>!n.test(r)));if(cn(n))return me(t,((t,r)=>r!==n));if(on(n)){const r=n.toString();return me(t,((t,n)=>n!==r))}return rn(n)?me(t,((t,r)=>!n(t,r))):fn({},t)}const xe=(t,n,r={})=>{if(t)return d(n,(n=>{r[n]=t[n]})),r};function Oe(t){if(!t)return;if(st(t))return Q(t).length;const n=t.length;if(p(n))return n;const r=t.size;return p(n)?r:Q(t).length}const $e=(t,n)=>{const r={};return d(t,((t,e)=>{r[t]=n[e]})),r},Ce=t=>{const n=[],r=[];return Jn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Se=/[ _-]+/g;function Be(t){let n="";return t.replace(Se," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Te=/[ _-]+/g,_e=/[ ]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Te," ").trim().toLowerCase().replace(_e,"-")}const Re=/[ _-]+/g,Ne=/[ ]+/g;function Pe(t){return t.replace(/([A-Z]+)/g," $1").replace(Re," ").trim().toLowerCase().replace(Ne,"_")}const Ue=/[ _-]+/g;function De(t){return t.replace(/([A-Z]+)/g," $1").replace(Ue," ").trim().toUpperCase()}const Le=/[ _-]+/g;function Ze(t){return t.replace(/([A-Z]+)/g," $1").replace(Le," ").trim().toLowerCase()}function ke(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function qe(t,n=1){return t[t.length-n]}function Ve(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function ze(t,n=1){return t.slice(0,-1*n)}function Ge(t,n=1){return t.substring(n)}function Je(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const We=/%(?![\da-f]{2})/gi,He=/&/g,Ke=//g,Xe=/"/g;function Ye(t){return decodeURIComponent(t.replace(We,(()=>"%25")))}function to(t){return t.replace(He,"&").replace(Ke,"<").replace(Qe,">").replace(Xe,""")}function no(t){return to(Ye(t))}const ro=/\S+/g,eo=/\w+/g;function oo(t){return t.match(ro)||[]}function uo(t){return t.match(eo)||[]}function co(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function io(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const so=/\w+/g;function fo(t){return t[0].toUpperCase()}function ao(t){return fo(t)+Ge(t)}function lo(t){return fo(t)+Ge(t).toLowerCase()}function ho(t){return t.replace(so,(t=>ao(t)))}function po(t){return t.replace(so,(t=>lo(t)))}function go(t){return Er(t)?.name}function mo(t){return!!p(t)&&"[object Arguments]"===t.toString()}const wo=ot("Map"),yo=ut(wo),bo=/Array/,vo="Array";function Ao(t){if(t){const n=go(t);if(bo.test(n)&&n!==vo)return!0}return!1}function Io(t){return!p(t)}function Eo(t,n){if(Io(t)||rn(t))return!1;if(j(t)||Ao(t))return!0;const r=t.length;if(!Io(r)||!on(r)||r<0)return!1;if(n){const n=Q(t);return!!n&&Rr(n,((t,n)=>n>=0&&on(n)))}return!0}const jo=ot("BigInt"),Mo=ut(jo),xo=ot("Boolean"),Oo=ut(xo),$o=ot("ArrayBuffer"),Co=ut($o);function So(t,n){return!(!t||!n)&&t instanceof n}const Bo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function To(t){if(p(t)){const n=t?.constructor?.name;return Bo.test(n)}return!1}const _o=ot("Date"),Fo=ut(_o);function Ro(t){return cn(t)||j(t)?!l(t):st(t)?!Oe(t):!p(t)}function No(t){return!1===t}const Po=ot("Float32Array"),Uo=ut(Po),Do=ot("Float64Array"),Lo=ut(Do),{isInteger:Zo}=Number,ko=Zo,qo=ot("Int16Array"),Vo=ut(qo),zo=ot("Int32Array"),Go=ut(zo),Jo=ot("Int8Array"),Wo=ut(Jo);function Ho(t){return p(t)&&"function"==typeof t[Symbol.iterator]}function Ko(t){return!!t&&t instanceof Promise}function Qo(t){return!!t&&(Ko(t)||rr(t)||Yn(t))}function Xo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Yo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function tu(t,n){return!Io(t)&&!Io(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:nu}=Number,ru=nu;function eu(t,n){const r=Er(t),e=Er(n);return r===e&&r.name===e.name}function ou(t){return!0===t}const uu=ot("Uint16Array"),cu=ut(uu),iu=ot("Uint32Array"),su=ut(iu),fu=ot("Uint8Array"),au=ut(fu),lu=ot("Uint8ClampedArray"),hu=ut(lu),pu=ot("WeakMap"),gu=ut(pu),du=void 0!==globalThis.Deno,mu=void 0!==globalThis.process&&process.versions&&process.versions.node;function wu(t,n=!0){return Boolean(t)&&n}function yu(t,n=!0){return!1===Boolean(t)&&n}function bu(t,n,r,e){if(p(t)){if(rn(n))return r?wr(n,r,e):n(...e);if(st(n))return n[r]=t,n}}function vu(t,n){return No(ft(t,n))}const Au=JSON;function Iu(t,n){if(t)return Au.parse(t,n)}const Eu=Au.stringify;function ju(t,n,r){const e=globalThis.options||r;let o;return rn(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Eu(t)}\n\t\tExpected: ${Eu(n)}`,e)}async function Mu(t,n,r){const e=await t;return!(rn(n)&&!1===await n(e,r))&&!vu(e,n)||ju(e,n,r)}function xu(t,n,r){if(Qo(t)||Qo(n))return Mu(t,n,r);return!(rn(n)&&!1===n(t,r))&&!vu(t,n)||ju(t,n,r)}function Ou(t,n,r){const e=Cr(t,(t=>rn(t)?t.bind(n):t));return r?ln(r,e):e}function $u(t){if(t){if(it(t))return nn(t);if(j(t))return s(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Cu=globalThis.structuredClone;function Su(t){return Cu(t)}async function Bu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;uwu(t)))}async function _u(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);p(e)&&r.push(e)}return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);p(u)&&e(u)}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);p(c)&&(u?o.set(r,c):o[r]=c)}return o}function Fu(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);p(u)&&o(u)}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);p(c)&&(o?e.set(r,c):e[r]=c)}return e}const Ru=er(m,y,de,ge,Fu,_u);function Nu(...t){return rr(t[0])?async function(...n){return Rr(t,(async t=>Rr(n,(async n=>t(n)))))}:function(...n){return Rr(t,(t=>Rr(n,(n=>t(n)))))}}function Pu(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=rn(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Uu(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=rn(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Du=er(U,D,me,we,Pu,Uu);function Lu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Zu=Lu(d),ku=Lu(F);function qu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Vu=qu(w),zu=qu(R);function Gu(t,n){const r=jr(t),e=r.push||r.add;if(e&&rn(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else rn(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Ju(t,n){const r={};return d(t,((t,e)=>{r[n[e]]=t})),r}function Wu(t,n,r){return!Io(t)&&!Io(n)&&(t===n||(cn(t)?cn(n)?t.includes(n,r):je(n)?n.test(t):rn(n)?n(t):j(n)?N(n,(n=>Wu(t,n))):Rr(n,(n=>Wu(t,n))):j(t)?je(n)?N(t,(t=>t.test(n))):rn(n)?N(t,n):j(n)?N(n,(n=>Wu(t,n))):t.includes(n,r):!!st(t)&&(je(n)?Tr(t,(t=>t.test(n))):rn(n)?Tr(t,n):st(n)?Tr(t,((t,r)=>t===n[r])):Tr(t,(t=>Wu(t,n))))))}const Hu=Un(/\./),Ku=(t,n,r)=>(n&&!p(t[n])&&(t[n]=r),t);class Qu{list=O(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Xu=O(Qu);function Yu(t,n){return Xu.set(t,n)}function tc(){ar(setTimeout(fr,0),(t=>{Xu.remove(t)}))}function nc(t,...n){return or(n,(n=>{or(n,((n,r)=>{if(t[r]&&(st(n)||j(n)||n.forEach))return nc(t[r],n);t[r]=n}))})),t}class rc{static models=new Map;constructor(t,n){p(n)?(ln(this,n),this.modelName=t,rc.models.set(t,n)):ln(this,t)}delete(t){rc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),rc.models.set(t||this.modelName,this)}has(t){return rc.models.has(t||this.modelName)}get(t){return rc.models.get(t||this.modelName)}}function ec(t,n){return p(n)?O(rc,[t,n]):H(t,rc.models)}function oc(t,n){return[t,n]}function uc(t,n,r){const e=t.length,o=[];for(let u=0;uN(r,(r=>ft(t[r],n[r])));function sc(t,n,r){return n&&st(t)||on(n)&&j(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function fc(t,n,r){return on(r)&&j(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class ac{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Jn(t,(n=>{t[n]=new ac(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new ac(r),!0)})}}function lc(){return[]}function hc(){return!1}const pc=()=>({}),gc=()=>"",dc=()=>!0;async function mc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const vc=O(bc);class Ac{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):p(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=jr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function Ic(t){return new Ac(t)}async function Ec(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{const i=o.join(u,t);if((await n(i)).isDirectory()){const n=o.join(c,t.replace(u,""));await r(n,{recursive:!0}),await Mc(i,n)}else await async function(t,n,r){const u=o.join(t,r),c=o.join(n,r);await e(u,c)}(u,c,t)})),!0}function xc(t){return globalThis.__filename?__filename:u(t.url)}function Oc(t){return globalThis.__dirname?__dirname:c.dirname(u(t.url))}export{ur as Chain,Qu as Intervals,rc as Model,ac as Store,hr as Timers,bc as UniqID,Ac as VirtualStorage,Jr as add,qn as after,wr as apply,Ie as arrayToRegex,Ju as arraysToObject,Vn as ary,xu as assert,Mu as assertAsync,ln as assign,hn as assignToClass,an as assignToObject,zn as before,Ou as bindAll,Zr as cacheNativeMethod,Xr as calcProgress,Be as camelCase,cr as chain,i as chunk,Ve as chunkString,$u as clear,s as clearArray,nn as clearBuffer,tc as clearIntervals,dr as clearTimers,Su as clone,f as cloneArray,jr as cloneType,Tu as compact,pe as compactKeys,Ru as compactMap,m as compactMapArray,y as compactMapAsyncArray,ge as compactMapAsyncObject,de as compactMapObject,Bu as concurrent,dt as concurrentEachArray,uc as concurrentStatus,O as construct,et as constructorName,Mc as copyFolder,gn as countBy,dn as countKey,mn as countWithoutKey,xc as currentFile,Oc as currentPath,ir as curry,sr as curryRight,yr as debounce,Wr as deduct,Vr as defProp,B as difference,Hr as divide,T as drop,_ as dropRight,or as each,d as eachArray,w as eachAsyncArray,Gn as eachAsyncObject,Jn as eachObject,F as eachRight,R as eachRightAsync,$ as ensureArray,tn as ensureBuffer,se as equalsZero,Ae as escapeRegex,ve as escapeRegexRegex,Rr as every,Nu as everyArg,N as everyArray,P as everyAsyncArray,Br as everyAsyncObject,Tr as everyObject,pn as extendClass,Du as filter,U as filterArray,D as filterAsyncArray,we as filterAsyncObject,me as filterObject,yn as findIndex,wn as findIndexCache,bn as findItem,L as first,Z as flatten,C as flattenDeep,Zu as flow,Vu as flowAsync,zu as flowAsyncRight,ku as flowRight,S as forEach,Wn as forEachAsync,Gu as forMap,Qn as forOf,tr as forOfAsync,Fu as forOfCompactMap,_u as forOfCompactMapAsync,_r as forOfEvery,Fr as forOfEveryAsync,Pu as forOfFilter,Uu as forOfFilterAsync,Mr as forOfMap,xr as forOfMapAsync,er as generateLoop,H as get,he as getEntries,Nn as getFileExtension,Pn as getFilename,Mn as getHighest,In as getLowest,Ut as getNumberInsertIndex,qr as getPropDesc,kr as getPropNames,Er as getType,go as getTypeName,xn as groupBy,Wu as has,tt as hasAnyKeys,Hu as hasDot,Y as hasKeys,l as hasLength,zr as hasProp,p as hasValue,to as htmlEntities,br as ifInvoke,Ku as ifNotAssign,bu as ifValue,Ec as inAsync,jc as inSync,Kr as increment,On as indexBy,k as initial,ze as initialString,ke as insertInRange,q as intersection,Yu as interval,Xu as intervals,ye as invert,V as invokeArray,$n as invokeCollection,Cn as invokeCollectionAsync,mo as isArguments,j as isArray,Co as isArrayBuffer,$o as isArrayBufferCall,Eo as isArrayLike,rr as isAsync,nr as isAsyncCall,Mo as isBigInt,jo as isBigIntCall,Oo as isBoolean,xo as isBooleanCall,it as isBuffer,ct as isBufferCall,So as isChild,To as isCloneable,nt as isConstructor,rt as isConstructorFactory,ot as isConstructorNameFactory,Fo as isDate,_o as isDateCall,du as isDeno,Ro as isEmpty,ft as isEqual,ae as isEven,Uo as isF32,Po as isF32Call,Lo as isF64,Do as isF64Call,No as isFalse,yu as isFalsy,Dn as isFileCSS,Ln as isFileHTML,Zn as isFileJS,kn as isFileJSON,ko as isFloat,rn as isFunction,Yn as isGenerator,Xn as isGeneratorCall,Vo as isI16,qo as isI16Call,Go as isI32,zo as isI32Call,Wo as isI8,Jo as isI8Call,Ho as isIterable,Qo as isKindAsync,yo as isMap,wo as isMapCall,at as isMatchArray,be as isMatchObject,v as isNegative,mu as isNodejs,M as isNotArray,un as isNotNumber,sn as isNotString,h as isNull,on as isNumber,en as isNumberCall,Bt as isNumberEqual,oe as isNumberInRange,ue as isNumberNotInRange,fe as isOdd,Xo as isParent,st as isPlainObject,ie as isPositive,Yo as isPrimitive,Ko as isPromise,je as isRegex,Ee as isRegexCall,tu as isRelated,ru as isSafeInt,Gr as isSame,eu as isSameType,Kn as isSet,Hn as isSetCall,cn as isString,ou as isTrue,wu as isTruthy,ut as isTypeFactory,Ao as isTypedArray,cu as isU16,uu as isU16Call,su as isU32,iu as isU32Call,au as isU8,hu as isU8C,lu as isU8CCall,fu as isU8Call,a as isUndefined,gu as isWeakMap,pu as isWeakMapCall,se as isZero,Iu as jsonParse,Fe as kebabCase,Q as keys,ht as largest,pt as last,Ze as lowerCase,Cr as map,gt as mapArray,mt as mapAsyncArray,Or as mapAsyncObject,$r as mapObject,wt as mapRightArray,yt as mapWhile,nc as merge,ec as model,Qr as multiply,vr as negate,Io as noValue,fr as noop,vu as notEqual,Ar as nthArg,fn as objectAssign,le as objectEntries,Oe as objectSize,Me as omit,Ir as once,Zt as onlyUnique,Sr as over,Nr as overEvery,oc as pair,At as partition,xe as pick,Bn as pluck,Sn as pluckObject,cc as promise,ic as propertyMatch,te as randomFloat,St as randomInt,E as range,I as rangeDown,A as rangeUp,Ye as rawURLDecode,Pr as reArg,Un as regexTestFactory,ne as remainder,jt as remove,Mt as removeBy,Je as replaceList,xt as rest,Ge as restString,g as returnValue,Ot as right,qe as rightString,Rt as sample,no as sanitize,sc as setKey,fc as setValue,Ft as shuffle,Pt as smallest,Pe as snakeCase,_n as sortCollectionAlphabetically,Rn as sortCollectionAlphabeticallyReverse,jn as sortCollectionAscending,En as sortCollectionAscendingFilter,An as sortCollectionDescending,vn as sortCollectionDescendingFilter,vt as sortNumberAscending,Et as sortNumberDescening,Tn as sortObjectsAlphabetically,Fn as sortObjectsAlphabeticallyReverse,kt as sortUnique,Eu as stringify,lc as stubArray,hc as stubFalse,pc as stubObject,gc as stubString,dc as stubTrue,bt as subtract,re as subtractAll,It as subtractReverse,ee as sumAll,Dt as take,Lt as takeRight,Ur as throttle,gr as timer,pr as timers,ar as times,mc as timesAsync,lr as timesMap,wc as timesMapAsync,_t as toArray,W as toPath,yc as toggle,oo as tokenize,co as truncate,io as truncateRight,Yt as unZip,Ce as unZipObject,Vt as union,vc as uniqID,qt as unique,zt as untilFalseArray,Gt as untilTrueArray,De as upperCase,ao as upperFirst,ho as upperFirstAll,fo as upperFirstLetter,lo as upperFirstOnly,po as upperFirstOnlyAll,Ic as virtualStorage,Jt as whileCompactMap,Wt as whileEachArray,Ht as whileMapArray,Kt as without,uo as words,Dr as wrap,Qt as xor,Xt as zip,$e as zipObject}; //# sourceMappingURL=index.js.map diff --git a/build/module/index.js.map b/build/module/index.js.map index 99c66fb..781a47d 100644 --- a/build/module/index.js.map +++ b/build/module/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../../source/arrays/chunk.js","../../source/arrays/clear.js","../../source/arrays/clone.js","../../source/types/isUndefined.js","../../source/utilities/hasLength.js","../../source/types/isNull.js","../../source/types/hasValue.js","../../source/utilities/returnValue.js","../../source/arrays/each.js","../../source/arrays/compactMap.js","../../source/arrays/eachAsync.js","../../source/arrays/compactMapAsync.js","../../source/numbers/isNegative.js","../../source/arrays/range.js","../../source/types/isArray.js","../../source/classes/construct.js","../../source/arrays/ensure.js","../../source/arrays/flattenDeep.js","../../source/utilities/forEach.js","../../source/arrays/difference.js","../../source/arrays/drop.js","../../source/arrays/dropRight.js","../../source/arrays/eachRight.js","../../source/arrays/eachRightAsync.js","../../source/arrays/every.js","../../source/arrays/everyAsync.js","../../source/arrays/filter.js","../../source/arrays/filterAsync.js","../../source/arrays/first.js","../../source/arrays/flatten.js","../../source/arrays/initial.js","../../source/arrays/intersect.js","../../source/arrays/invoke.js","../../source/utilities/toPath.js","../../source/utilities/get.js","../../source/objects/keys.js","../../source/objects/hasKeys.js","../../source/types/isConstructor.js","../../source/types/isTypeFactory.js","../../source/types/isBuffer.js","../../source/types/isPlainObject.js","../../source/utilities/isEqual.js","../../source/arrays/isMatch.js","../../source/arrays/largest.js","../../source/arrays/last.js","../../source/arrays/map.js","../../source/arrays/concurrentEach.js","../../source/arrays/mapAsync.js","../../source/arrays/mapRight.js","../../source/arrays/mapWhile.js","../../source/math/subtract.js","../../source/arrays/sortNumberAscending.js","../../source/arrays/partition.js","../../source/math/subtractReverse.js","../../source/arrays/sortNumberDescening.js","../../source/arrays/remove.js","../../source/arrays/rest.js","../../source/arrays/right.js","../../source/math/randomInt.js","../../source/numbers/isNumberEqual.js","../../source/internal/array.js","../../source/arrays/shuffle.js","../../source/arrays/sample.js","../../source/arrays/smallest.js","../../source/arrays/getNumberInsertIndex.js","../../source/arrays/take.js","../../source/arrays/takeRight.js","../../source/arrays/unique.js","../../source/arrays/union.js","../../source/arrays/untilFalse.js","../../source/arrays/untilTrue.js","../../source/arrays/whileCompactMap.js","../../source/arrays/whileEach.js","../../source/arrays/whileMap.js","../../source/arrays/without.js","../../source/arrays/xor.js","../../source/arrays/zip.js","../../source/buffers/ensure.js","../../source/buffers/clear.js","../../source/types/isFunction.js","../../source/types/isNumber.js","../../source/types/isString.js","../../source/objects/assign.js","../../source/classes/extendClass.js","../../source/collection/countBy.js","../../source/collection/countKey.js","../../source/collection/countWithoutKey.js","../../source/collection/findIndexCache.js","../../source/collection/findIndex.js","../../source/collection/findItem.js","../../source/collection/sortCollectionDescending.js","../../source/collection/getLowest.js","../../source/collection/sortCollectionAscending.js","../../source/collection/getHighest.js","../../source/collection/groupBy.js","../../source/collection/indexBy.js","../../source/collection/invoke.js","../../source/collection/invokeAsync.js","../../source/objects/pluckObject.js","../../source/collection/pluck.js","../../source/collection/sortCollectionAlphabetically.js","../../source/collection/sortCollectionAlphabeticallyReverse.js","../../source/files/getExtension.js","../../source/files/getFilename.js","../../source/internal/regexTestFactory.js","../../source/files/isFileCSS.js","../../source/files/isFileHTML.js","../../source/files/isFileJS.js","../../source/files/isFileJSON.js","../../source/functions/after.js","../../source/functions/ary.js","../../source/functions/before.js","../../source/objects/eachAsync.js","../../source/objects/each.js","../../source/utilities/forEachAsync.js","../../source/types/isSet.js","../../source/utilities/forOf.js","../../source/types/isGenerator.js","../../source/utilities/forOfAsync.js","../../source/types/isAsync.js","../../source/utilities/generateLoop.js","../../source/utilities/each.js","../../source/functions/chain.js","../../source/functions/curry.js","../../source/functions/curryRight.js","../../source/utilities/noop.js","../../source/utilities/times.js","../../source/utilities/timer.js","../../source/internal/apply.js","../../source/functions/debounce.js","../../source/functions/ifInvoke.js","../../source/functions/negate.js","../../source/functions/nthArg.js","../../source/functions/once.js","../../source/types/getType.js","../../source/types/cloneType.js","../../source/utilities/forOfMap.js","../../source/utilities/forOfMapAsync.js","../../source/objects/mapAsync.js","../../source/objects/map.js","../../source/utilities/map.js","../../source/functions/over.js","../../source/objects/everyAsync.js","../../source/objects/every.js","../../source/utilities/forOfEvery.js","../../source/utilities/forOfEveryAsync.js","../../source/utilities/every.js","../../source/functions/overEvery.js","../../source/functions/rearged.js","../../source/functions/throttle.js","../../source/functions/wrap.js","../../source/utilities/cacheNativeMethod.js","../../source/internal/object.js","../../source/internal/isSame.js","../../source/math/add.js","../../source/math/deduct.js","../../source/math/divide.js","../../source/math/increment.js","../../source/math/multiple.js","../../source/math/progress.js","../../source/math/randomFloat.js","../../source/math/remainder.js","../../source/math/subtractAll.js","../../source/math/sumAll.js","../../source/numbers/isNumberInRange.js","../../source/numbers/isNumberNotInRange.js","../../source/numbers/isPositive.js","../../source/numbers/isZero.js","../../source/objects/getEntries.js","../../source/objects/compactKeys.js","../../source/objects/compactMapAsync.js","../../source/objects/compactMap.js","../../source/objects/filter.js","../../source/objects/filterAsync.js","../../source/objects/invert.js","../../source/objects/isMatch.js","../../source/regexps/escapeRegex.js","../../source/regexps/arrayToRegex.js","../../source/types/isRegex.js","../../source/objects/omit.js","../../source/objects/pick.js","../../source/objects/size.js","../../source/objects/zip.js","../../source/strings/camelCase.js","../../source/strings/kebabCase.js","../../source/strings/snakeCase.js","../../source/strings/upperCase.js","../../source/strings/lowerCase.js","../../source/strings/range.js","../../source/strings/replace.js","../../source/strings/sanitize.js","../../source/strings/tokenize.js","../../source/strings/truncate.js","../../source/strings/typography.js","../../source/types/getTypeName.js","../../source/types/isArguments.js","../../source/types/isMap.js","../../source/types/isTypedArray.js","../../source/types/noValue.js","../../source/types/isArrayLike.js","../../source/types/isBigInt.js","../../source/types/isBoolean.js","../../source/types/isArrayBuffer.js","../../source/types/isChild.js","../../source/types/isCloneable.js","../../source/types/isDate.js","../../source/types/isEmpty.js","../../source/types/isFalse.js","../../source/types/isF32.js","../../source/types/isF64.js","../../source/types/isFloat.js","../../source/types/isI16.js","../../source/types/isI32.js","../../source/types/isI8.js","../../source/types/isIterable.js","../../source/types/isPromise.js","../../source/types/isKindAsync.js","../../source/types/isParent.js","../../source/types/isPrimitive.js","../../source/types/isRelated.js","../../source/types/isSafeInt.js","../../source/types/isSameType.js","../../source/types/isTrue.js","../../source/types/isU16.js","../../source/types/isU32.js","../../source/types/isU8.js","../../source/types/isU8C.js","../../source/types/isWeakMap.js","../../source/types/isDeno.js","../../source/types/isNode.js","../../source/types/isTruthy.js","../../source/types/isFalsy.js","../../source/utilities/ifValue.js","../../source/utilities/notEqual.js","../../source/utilities/json.js","../../source/utilities/assert.js","../../source/utilities/bindAll.js","../../source/utilities/clear.js","../../source/utilities/clone.js","../../source/utilities/concurrent.js","../../source/utilities/compact.js","../../source/utilities/forOfCompactMapAsync.js","../../source/utilities/forOfCompactMap.js","../../source/utilities/compactMap.js","../../source/utilities/everyArg.js","../../source/utilities/forOfFilter.js","../../source/utilities/forOfFilterAsync.js","../../source/utilities/filter.js","../../source/utilities/flow.js","../../source/utilities/flowAsync.js","../../source/utilities/forMap.js","../../source/utilities/arraysToObject.js","../../source/utilities/has.js","../../source/utilities/hasDot.js","../../source/utilities/ifNotAssign.js","../../source/utilities/interval.js","../../source/utilities/merge.js","../../source/utilities/model.js","../../source/utilities/pair.js","../../source/utilities/concurrentStatus.js","../../source/utilities/promise.js","../../source/utilities/propertyMatch.js","../../source/utilities/setKey.js","../../source/utilities/setValue.js","../../source/utilities/store.js","../../source/utilities/stubArray.js","../../source/utilities/stubFalse.js","../../source/utilities/stubObject.js","../../source/utilities/stubString.js","../../source/utilities/stubTrue.js","../../source/utilities/timesAsync.js","../../source/utilities/toggle.js","../../source/utilities/uid.js","../../source/utilities/virtualStorage.js","../../source/utilities/inAsync.js","../../source/utilities/inSync.js","../../source/filesystem/copyFolder.js","../../source/filesystem/directory.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0;index < arrayLength;index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [key, value] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = (isIterateeAsync) ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst zipedObject = {};\n\teachArray(properties, (item, key) => {\n\t\tzipedObject[item] = values[key];\n\t});\n\treturn zipedObject;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst unZippedKeys = [];\n\tconst values = [];\n\teachObject(object, (item, key) => {\n\t\tunZippedKeys.push(key);\n\t\tvalues.push(item);\n\t});\n\treturn [unZippedKeys, values];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(compactMapArray, compactMapAsyncArray,\n\tcompactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0;index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn (isEqual(on, value)) ? off : on;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import {\n\tcopyFile,\n\tmkdir,\n\treaddir,\n\tstat\n} from 'node:fs/promises';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport path from 'node:path';\nasync function copyToPath(sourceFolder, destinationFolder, file) {\n\tconst sourcePath = path.join(sourceFolder, file);\n\tconst destinationPath = path.join(destinationFolder, file);\n\tawait copyFile(sourcePath, destinationPath);\n}\nexport async function copyFolder(sourceFolder, destinationFolder) {\n\tconst files = await readdir(sourceFolder);\n\tawait eachAsyncArray(files, async (file) => {\n\t\tconst sourcePath = path.join(sourceFolder, file);\n\t\tconst filestats = await stat(sourcePath);\n\t\tif (filestats.isDirectory()) {\n\t\t\tconst folderDestination = path.join(destinationFolder, file.replace(sourceFolder, ''));\n\t\t\tawait mkdir(folderDestination, {\n\t\t\t\trecursive: true\n\t\t\t});\n\t\t\tawait copyFolder(sourcePath, folderDestination);\n\t\t} else {\n\t\t\tawait copyToPath(sourceFolder, destinationFolder, file);\n\t\t}\n\t});\n\treturn true;\n}\n\n","import { fileURLToPath } from 'node:url';\nimport path from 'path';\nexport function currentFile(importMeta) {\n\tif (globalThis.__filename) {\n\t\treturn __filename;\n\t}\n\treturn fileURLToPath(importMeta.url);\n}\nexport function currentPath(importMeta) {\n\tif (globalThis.__dirname) {\n\t\treturn __dirname;\n\t}\n\treturn path.dirname(fileURLToPath(importMeta.url));\n}\n"],"names":["chunk","array","size","chunked","index","forEach","item","key","push","clearArray","source","length","cloneArray","slice","isUndefined","undefined","hasLength","Boolean","isNull","hasValue","returnValue","eachArray","iteratee","thisBind","additionalArg","arrayLength","call","compactMapArray","results","thisCall","arrayOriginal","returned","async","eachAsyncArray","compactMapAsyncArray","result","sign","Math","isNegative","rangeUp","start","end","step","sourceArray","position","rangeDown","range","isArray","Array","isNotArray","reflectConstruct","Reflect","construct","target","argumentsList","newTarget","args","ensureArray","flattenDeep","flat","Infinity","callback","difference","sources","differencesMap","Map","differences","currentArray","parentIndex","child","childIndex","childRoot","get","count","set","drop","amount","upTo","splice","dropRight","eachRight","additionalArgument","eachRightAsync","everyArray","sourceLength","everyAsyncArray","filterArray","filterAsyncArray","first","flatten","level","i","reduce","previousValue","currentValue","concat","initial","intersection","arrays","otherItem","includes","invokeArray","regexToPath","regexCloseBracket","emptyString","toPath","replace","split","propertyString","link","objectKeys","Object","keys","hasOwn","hasKeys","properties","pathArray","lastPath","pop","initialPathObject","hasAnyKeys","find","isConstructor","constructor","isConstructorFactory","constructorName","name","isConstructorNameFactory","isTypeFactory","method","primarySource","otherSources","isBufferCall","isBuffer","isPlainObject","toString","trim","isEqual","equals","sourceProperties","isMatchArray","compareArray","mathNativeMax","max","largest","last","indexFrom","mapArray","concurrentEachArray","Promise","all","mapAsyncArray","mapRightArray","trueIndex","mapWhile","subtract","minuend","subtrahend","sortNumberAscending","numberList","sort","partition","predicate","rejected","subtractReverse","sortNumberDescening","remove","removeThese","removeBy","rest","right","floor","random","randomInt","min","isNumberEqual","arrayFrom","from","toArray","arrayLike","mapFn","thisArg","shuffle","shuffleArray","value","sample","sampleArray","used","mathNativeMin","smallest","getNumberInsertIndex","insertIndex","take","endIndex","takeRight","indexRight","onlyUnique","indexOf","sortUnique","unique","isSorted","filter","union","untilFalseArray","untilTrueArray","whileCompactMap","whileEachArray","whileMapArray","without","sourcesSet","Set","has","xor","xorMap","xored","zip","map","unZip","arraySet","ensureBuffer","Buffer","alloc","clearBuffer","fill","isFunction","Function","isNumberCall","isNumber","isNotNumber","isString","String","isNotString","objectAssign","assign","assignToObject","assignToClass","prototype","extendClass","countBy","collection","object","countKey","propertyName","countWithoutKey","findIndexCache","element","indexMatch","findIndex","id","findItem","sortCollectionDescendingFilter","previous","next","ifMatch","previousKey","nextKey","sortCollectionDescending","getLowest","sortCollectionAscendingFilter","sortCollectionAscending","getHighest","groupBy","sortedObject","indexBy","invokeCollection","property","invokeCollectionAsync","pluckObject","targets","pluck","sortObjectsAlphabetically","localeCompare","sortCollectionAlphabetically","sortObjectsAlphabeticallyReverse","sortCollectionAlphabeticallyReverse","getFileExtension","substring","lastIndexOf","getFilename","regexTestFactory","regexType","test","isFileCSS","isFileHTML","isFileJS","isFileJSON","after","callable","point","ary","before","eachAsyncObject","propertyCount","eachObject","objectKeysArray","forEachAsync","values","valuesLength","isSetCall","isSet","forOf","isGeneratorCall","isGenerator","forOfAsync","generatorArgs","isAsyncCall","isAsync","generateLoop","arrayLoop","arrayLoopAsync","objectLoop","objectLoopAsync","forOfLoop","forOfLoopAsync","argument1","argument2","argument3","isIterateeAsync","each","Chain","methods","this","addChainMethod","thisChain","methodName","setValue","done","chain","config","curry","arity","curries","curried","curryArgs","curryRight","unshift","noop","times","timesMap","Timers","list","clearTimeout","delete","time","currentThis","setTimeout","clear","timers","timer","clearTimers","applyNative","apply","thisArgument","debounce","debounced","bind","ifInvoke","negate","nthArg","once","getType","cloneType","sourceType","forOfMap","resultsObject","methodPush","add","methodPushBound","methodSet","forOfMapAsync","resultsGenerator","mapAsyncObject","thisObject","mapObject","original","over","iteratees","everyAsyncObject","everyObject","forOfEvery","forOfEveryAsync","every","overEvery","predicates","arg","reArg","indexes","throttle","throttled","shouldThrottle","wrap","wrapper","functionPrototype","cacheNativeMethod","getPropNames","getOwnPropertyNames","getPropDesc","getOwnPropertyDescriptor","defProp","defineProperty","hasProp","hasOwnProperty","isSame","is","augend","addend","deduct","divide","increment","multiply","calcProgress","total","currentAmount","randomFloat","remainder","subtractAll","a","b","sumAll","isNumberInRange","isNumberNotInRange","isPositive","isZero","objectEntries","entries","getEntries","compactKeys","compactedKeys","compactMapAsyncObject","compactMapObject","filterObject","filterAsyncObject","invert","isMatchObject","sourceKeys","targetKeys","escapeRegexRegex","escapeRegex","arrayToRegex","makeSafe","RegExp","join","isRegexCall","isRegex","omit","blacklist","blacklistRegex","numberToString","pick","whitelist","objectSize","objectLengthProperty","objectSizeProperty","zipObject","zipedObject","unZipObject","unZippedKeys","normalizeCase","camelCase","toLowerCase","toUpperCase","space","kebabCase","snakeCase","upperCase","lowerCase","insertInRange","string","text","rightString","chunkString","match","initialString","restString","replaceList","words","rawURLDecodeRegex","andRegex","lessThanRegex","moreThanRegex","doubleQuoteRegex","rawURLDecode","decodeURIComponent","htmlEntities","sanitize","tokenizeRegEx","wordsRegEx","tokenize","truncate","maxLength","stringLength","breakAll","breakAllLength","truncateDown","truncateRight","truncateUp","getWords","upperFirstLetter","upperFirst","upperFirstOnly","upperFirstAll","upperFirstOnlyAll","getTypeName","isArguments","isMapCall","isMap","typedArrayRegex","arrayConstructorName","isTypedArray","noValue","isArrayLike","strictFlag","isBigIntCall","isBigInt","isBooleanCall","isBoolean","isArrayBufferCall","isArrayBuffer","isChild","sourceChild","targetParent","constructorNames","isCloneable","isDateCall","isDate","isEmpty","isFalse","isF32Call","isF32","isF64Call","isF64","isInteger","Number","isFloat","isI16Call","isI16","isI32Call","isI32","isI8Call","isI8","isIterable","Symbol","iterator","isPromise","isKindAsync","isParent","sourceParent","targetChild","isPrimitive","type","isRelated","targetOne","targetTwo","isSafeInteger","isSafeInt","isSameType","other","otherType","isTrue","isU16Call","isU16","isU32Call","isU32","isU8Call","isU8","isU8CCall","isU8C","isWeakMapCall","isWeakMap","isDeno","globalThis","Deno","isNodejs","process","versions","node","isTruthy","returnIfTrue","isFalsy","ifValue","optional","notEqual","jsonNative","JSON","jsonParse","reviver","parse","stringify","createAssertError","expected","localOptions","options","errorTitle","title","file","Error","assertAsync","sourceArg","assert","bindAll","bindThis","targetAssign","structuredCloneSafe","structuredClone","clone","concurrent","compact","sourceKeysLength","targetObject","keyName","forOfCompactMapAsync","forOfCompactMap","compactMap","everyArg","forOfFilter","forOfFilterAsync","returnFlow","flow","flowRight","flowAsync","flowAsyncRight","forMap","cloned","methodBound","arraysToObject","search","hasDot","ifNotAssign","rootObject","equalThis","Intervals","clearInterval","setInterval","intervals","interval","clearIntervals","merge","currentSource","sourceItem","sourceKey","Model","static","modelName","modelSource","models","model","pair","concurrentStatus","queue","allSettled","promise","propertyMatch","compared","setKey","Store","data","Proxy","proxySource","console","log","stubArray","stubFalse","stubObject","stubString","stubTrue","timesAsync","timesMapAsync","toggle","on","off","UniqID","totalActive","freed","totalFree","shift","free","isActive","shouldReset","reset","uniqID","VirtualStorage","initialObject","items","getItem","hasItem","setItem","removeItem","virtualStorage","inAsync","inSync","copyFolder","sourceFolder","destinationFolder","files","readdir","sourcePath","path","stat","isDirectory","folderDestination","mkdir","recursive","destinationPath","copyFile","copyToPath","currentFile","importMeta","__filename","fileURLToPath","url","currentPath","__dirname","dirname"],"mappings":"oKAcO,SAASA,EAAMC,EAAOC,EAAO,GACnC,MAAMC,EAAU,GAChB,IAAIC,EAAQ,EAUZ,OATAH,EAAMI,SAAQ,CAACC,EAAMC,KACdA,EAAML,IACXC,EAAQK,KAAK,IACTD,GACHH,KAGFD,EAAQC,GAAOI,KAAKF,EAAK,IAEnBH,CACR,CCdO,SAASM,EAAWC,GAE1B,OADAA,EAAOC,OAAS,EACTD,CACR,CCHO,SAASE,EAAWF,GAC1B,OAAOA,EAAOG,OACf,CCJO,SAASC,EAAYJ,GAC3B,YAAkBK,IAAXL,CACR,CCAO,SAASM,EAAUN,GACzB,OAAOO,QAAQP,EAAOC,OACvB,CCFO,SAASO,EAAOR,GACtB,OAAkB,OAAXA,CACR,CCDO,SAASS,EAAST,GACxB,OAAQI,EAAYJ,KAAYQ,EAAOR,EACxC,CCRO,SAASU,EAAYV,GAC3B,OAAOA,CACR,CCYO,SAASW,EAAUX,EAAQY,EAAUC,EAAUC,GACrD,IAAKd,EACJ,OAED,MAAMe,EAAcf,EAAOC,OAC3B,GAAIQ,EAASI,GACZ,IAAK,IAAInB,EAAQ,EAAGA,EAAQqB,EAAarB,IACxCkB,EAASI,KAAKH,EAAUb,EAAON,GAAQA,EAAOM,EAAQe,EAAaD,QAGpE,IAAK,IAAIpB,EAAQ,EAAGA,EAAQqB,EAAarB,IACxCkB,EAASZ,EAAON,GAAQA,EAAOM,EAAQe,EAAaD,GAGtD,OAAOd,CACR,CCfO,SAASiB,EAAgBjB,EAAQY,EAAWF,EAAaQ,EAAU,GAAIC,EAAUL,GAgBvF,OAfIL,EAAS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K,EAAYI,EAChC,YAhBA3pB,eAA0BmpB,EAAcC,EAAmBlG,GAC1D,MAAMqG,EAAaC,EAAK/P,KAAK0P,EAAcjG,GACrC4G,EAAkBN,EAAK/P,KAAK2P,EAAmBlG,SAC/C6G,EAASR,EAAYO,EAC5B,CAaSE,CAAWb,EAAcC,EAAmBlG,EAClD,KAEK,CACR,CC3BO,SAAS+G,GAAYC,GAC3B,OAAIxI,WAAWyI,WACPA,WAEDC,EAAcF,EAAWG,IACjC,CACO,SAASC,GAAYJ,GAC3B,OAAIxI,WAAW6I,UACPA,UAEDf,EAAKgB,QAAQJ,EAAcF,EAAWG,KAC9C"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../../source/arrays/chunk.js","../../source/arrays/clear.js","../../source/arrays/clone.js","../../source/types/isUndefined.js","../../source/utilities/hasLength.js","../../source/types/isNull.js","../../source/types/hasValue.js","../../source/utilities/returnValue.js","../../source/arrays/each.js","../../source/arrays/compactMap.js","../../source/arrays/eachAsync.js","../../source/arrays/compactMapAsync.js","../../source/numbers/isNegative.js","../../source/arrays/range.js","../../source/types/isArray.js","../../source/classes/construct.js","../../source/arrays/ensure.js","../../source/arrays/flattenDeep.js","../../source/utilities/forEach.js","../../source/arrays/difference.js","../../source/arrays/drop.js","../../source/arrays/dropRight.js","../../source/arrays/eachRight.js","../../source/arrays/eachRightAsync.js","../../source/arrays/every.js","../../source/arrays/everyAsync.js","../../source/arrays/filter.js","../../source/arrays/filterAsync.js","../../source/arrays/first.js","../../source/arrays/flatten.js","../../source/arrays/initial.js","../../source/arrays/intersect.js","../../source/arrays/invoke.js","../../source/utilities/toPath.js","../../source/utilities/get.js","../../source/objects/keys.js","../../source/objects/hasKeys.js","../../source/types/isConstructor.js","../../source/types/isTypeFactory.js","../../source/types/isBuffer.js","../../source/types/isPlainObject.js","../../source/utilities/isEqual.js","../../source/arrays/isMatch.js","../../source/arrays/largest.js","../../source/arrays/last.js","../../source/arrays/map.js","../../source/arrays/concurrentEach.js","../../source/arrays/mapAsync.js","../../source/arrays/mapRight.js","../../source/arrays/mapWhile.js","../../source/math/subtract.js","../../source/arrays/sortNumberAscending.js","../../source/arrays/partition.js","../../source/math/subtractReverse.js","../../source/arrays/sortNumberDescening.js","../../source/arrays/remove.js","../../source/arrays/rest.js","../../source/arrays/right.js","../../source/math/randomInt.js","../../source/numbers/isNumberEqual.js","../../source/internal/array.js","../../source/arrays/shuffle.js","../../source/arrays/sample.js","../../source/arrays/smallest.js","../../source/arrays/getNumberInsertIndex.js","../../source/arrays/take.js","../../source/arrays/takeRight.js","../../source/arrays/unique.js","../../source/arrays/union.js","../../source/arrays/untilFalse.js","../../source/arrays/untilTrue.js","../../source/arrays/whileCompactMap.js","../../source/arrays/whileEach.js","../../source/arrays/whileMap.js","../../source/arrays/without.js","../../source/arrays/xor.js","../../source/arrays/zip.js","../../source/buffers/ensure.js","../../source/buffers/clear.js","../../source/types/isFunction.js","../../source/types/isNumber.js","../../source/types/isString.js","../../source/objects/assign.js","../../source/classes/extendClass.js","../../source/collection/countBy.js","../../source/collection/countKey.js","../../source/collection/countWithoutKey.js","../../source/collection/findIndexCache.js","../../source/collection/findIndex.js","../../source/collection/findItem.js","../../source/collection/sortCollectionDescending.js","../../source/collection/getLowest.js","../../source/collection/sortCollectionAscending.js","../../source/collection/getHighest.js","../../source/collection/groupBy.js","../../source/collection/indexBy.js","../../source/collection/invoke.js","../../source/collection/invokeAsync.js","../../source/objects/pluckObject.js","../../source/collection/pluck.js","../../source/collection/sortCollectionAlphabetically.js","../../source/collection/sortCollectionAlphabeticallyReverse.js","../../source/files/getExtension.js","../../source/files/getFilename.js","../../source/internal/regexTestFactory.js","../../source/files/isFileCSS.js","../../source/files/isFileHTML.js","../../source/files/isFileJS.js","../../source/files/isFileJSON.js","../../source/functions/after.js","../../source/functions/ary.js","../../source/functions/before.js","../../source/objects/eachAsync.js","../../source/objects/each.js","../../source/utilities/forEachAsync.js","../../source/types/isSet.js","../../source/utilities/forOf.js","../../source/types/isGenerator.js","../../source/utilities/forOfAsync.js","../../source/types/isAsync.js","../../source/utilities/generateLoop.js","../../source/utilities/each.js","../../source/functions/chain.js","../../source/functions/curry.js","../../source/functions/curryRight.js","../../source/utilities/noop.js","../../source/utilities/times.js","../../source/utilities/timer.js","../../source/internal/apply.js","../../source/functions/debounce.js","../../source/functions/ifInvoke.js","../../source/functions/negate.js","../../source/functions/nthArg.js","../../source/functions/once.js","../../source/types/getType.js","../../source/types/cloneType.js","../../source/utilities/forOfMap.js","../../source/utilities/forOfMapAsync.js","../../source/objects/mapAsync.js","../../source/objects/map.js","../../source/utilities/map.js","../../source/functions/over.js","../../source/objects/everyAsync.js","../../source/objects/every.js","../../source/utilities/forOfEvery.js","../../source/utilities/forOfEveryAsync.js","../../source/utilities/every.js","../../source/functions/overEvery.js","../../source/functions/rearged.js","../../source/functions/throttle.js","../../source/functions/wrap.js","../../source/utilities/cacheNativeMethod.js","../../source/internal/object.js","../../source/internal/isSame.js","../../source/math/add.js","../../source/math/deduct.js","../../source/math/divide.js","../../source/math/increment.js","../../source/math/multiple.js","../../source/math/progress.js","../../source/math/randomFloat.js","../../source/math/remainder.js","../../source/math/subtractAll.js","../../source/math/sumAll.js","../../source/numbers/isNumberInRange.js","../../source/numbers/isNumberNotInRange.js","../../source/numbers/isPositive.js","../../source/numbers/isZero.js","../../source/numbers/isOdd.js","../../source/numbers/isEven.js","../../source/objects/getEntries.js","../../source/objects/compactKeys.js","../../source/objects/compactMapAsync.js","../../source/objects/compactMap.js","../../source/objects/filter.js","../../source/objects/filterAsync.js","../../source/objects/invert.js","../../source/objects/isMatch.js","../../source/regexps/escapeRegex.js","../../source/regexps/arrayToRegex.js","../../source/types/isRegex.js","../../source/objects/omit.js","../../source/objects/pick.js","../../source/objects/size.js","../../source/objects/zip.js","../../source/strings/camelCase.js","../../source/strings/kebabCase.js","../../source/strings/snakeCase.js","../../source/strings/upperCase.js","../../source/strings/lowerCase.js","../../source/strings/range.js","../../source/strings/replace.js","../../source/strings/sanitize.js","../../source/strings/tokenize.js","../../source/strings/truncate.js","../../source/strings/typography.js","../../source/types/getTypeName.js","../../source/types/isArguments.js","../../source/types/isMap.js","../../source/types/isTypedArray.js","../../source/types/noValue.js","../../source/types/isArrayLike.js","../../source/types/isBigInt.js","../../source/types/isBoolean.js","../../source/types/isArrayBuffer.js","../../source/types/isChild.js","../../source/types/isCloneable.js","../../source/types/isDate.js","../../source/types/isEmpty.js","../../source/types/isFalse.js","../../source/types/isF32.js","../../source/types/isF64.js","../../source/types/isFloat.js","../../source/types/isI16.js","../../source/types/isI32.js","../../source/types/isI8.js","../../source/types/isIterable.js","../../source/types/isPromise.js","../../source/types/isKindAsync.js","../../source/types/isParent.js","../../source/types/isPrimitive.js","../../source/types/isRelated.js","../../source/types/isSafeInt.js","../../source/types/isSameType.js","../../source/types/isTrue.js","../../source/types/isU16.js","../../source/types/isU32.js","../../source/types/isU8.js","../../source/types/isU8C.js","../../source/types/isWeakMap.js","../../source/types/isDeno.js","../../source/types/isNode.js","../../source/types/isTruthy.js","../../source/types/isFalsy.js","../../source/utilities/ifValue.js","../../source/utilities/notEqual.js","../../source/utilities/json.js","../../source/utilities/assert.js","../../source/utilities/bindAll.js","../../source/utilities/clear.js","../../source/utilities/clone.js","../../source/utilities/concurrent.js","../../source/utilities/compact.js","../../source/utilities/forOfCompactMapAsync.js","../../source/utilities/forOfCompactMap.js","../../source/utilities/compactMap.js","../../source/utilities/everyArg.js","../../source/utilities/forOfFilter.js","../../source/utilities/forOfFilterAsync.js","../../source/utilities/filter.js","../../source/utilities/flow.js","../../source/utilities/flowAsync.js","../../source/utilities/forMap.js","../../source/utilities/arraysToObject.js","../../source/utilities/has.js","../../source/utilities/hasDot.js","../../source/utilities/ifNotAssign.js","../../source/utilities/interval.js","../../source/utilities/merge.js","../../source/utilities/model.js","../../source/utilities/pair.js","../../source/utilities/concurrentStatus.js","../../source/utilities/promise.js","../../source/utilities/propertyMatch.js","../../source/utilities/setKey.js","../../source/utilities/setValue.js","../../source/utilities/store.js","../../source/utilities/stubArray.js","../../source/utilities/stubFalse.js","../../source/utilities/stubObject.js","../../source/utilities/stubString.js","../../source/utilities/stubTrue.js","../../source/utilities/timesAsync.js","../../source/utilities/toggle.js","../../source/utilities/uid.js","../../source/utilities/virtualStorage.js","../../source/utilities/inAsync.js","../../source/utilities/inSync.js","../../source/filesystem/copyFolder.js","../../source/filesystem/directory.js"],"sourcesContent":["/**\n * Chunks an array according to a user defined number.\n *\n * @function chunk\n * @category Array\n * @type {Function}\n * @param {Array} array - Array to be chunked.\n * @param {Number} size - Number which determines the size of each chunk.\n * @returns {Array} - A chunked version of the source array.\n *\n * @example\n * import { chunk, assert } from '@universalweb/acid';\n * assert(chunk([1,2,3], 1), [[1],[2],[3]]);\n */\nexport function chunk(array, size = 1) {\n\tconst chunked = [];\n\tlet index = 0;\n\tarray.forEach((item, key) => {\n\t\tif (!(key % size)) {\n\t\t\tchunked.push([]);\n\t\t\tif (key) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tchunked[index].push(item);\n\t});\n\treturn chunked;\n}\n","/**\n * Clears the values out of an array.\n *\n * @function clearArray\n * @category Array\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearArray, assert } from '@universalweb/acid';\n * assert(clearArray([1,'B', 'Cat']), []);\n */\nexport function clearArray(source) {\n\tsource.length = 0;\n\treturn source;\n}\n\n","/**\n * Clone an array (uses .slice()) and assign the source arrays values to the new array.\n *\n * @function cloneArray\n * @category Array\n * @type {Function}\n * @param {Array} source - The array to be quick cloned.\n * @returns {Array} - The newly cloned array with assigned items.\n *\n * @example\n * import { cloneArray, assert } from '@universalweb/acid';\n * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);\n */\nexport function cloneArray(source) {\n\treturn source.slice();\n}\n\n","/** Checks if the value is undefined.\n *\n * @function isUndefined\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isUndefined, assert } from '@universalweb/acid';\n * assert(isUndefined(undefined), true);\n */\nexport function isUndefined(source) {\n\treturn source === undefined;\n}\n","import { isUndefined } from '../types/isUndefined.js';\n/**\n * Checks if the value has length greater than 0.\n *\n * @function hasLength\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasLength, assert } from '@universalweb/acid';\n * assert(hasLength([1]), true);\n */\nexport function hasLength(source) {\n\treturn Boolean(source.length);\n}\n","import { hasLength } from '../utilities/hasLength.js';\n/**\n * Checks if the value is null.\n *\n * @function isNull\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNull, assert } from '@universalweb/acid';\n * assert(isNull(null), true);\n */\nexport function isNull(source) {\n\treturn source === null;\n}\n","import { isNull } from './isNull.js';\nimport { isUndefined } from './isUndefined.js';\n/**\n * Checks if the value is not null or undefined.\n *\n * @function hasValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasValue, assert } from '@universalweb/acid';\n * assert(hasValue(1), true);\n */\nexport function hasValue(source) {\n\treturn !isUndefined(source) && !isNull(source);\n}\n","/**\n * A simple function which returns the value it's given.\n *\n * @function returnValue\n * @category utility\n * @param {*} source - The source object.\n * @returns {source} The source object.\n */\nexport function returnValue(source) {\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array.\n *\n * @function eachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisBind - Iteratee called with thisBind as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachArray, assert } from '@universalweb/acid';\n * const list = [];\n * eachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function eachArray(source, iteratee, thisBind, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisBind)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee.call(thisBind, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\titeratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapArray, assert } from '@universalweb/acid';\n * assert(compactMapArray([null, 2, 3], (item) => {\n * return item;\n * }), [2, 3]);\n */\nexport function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tconst returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg);\n\t\t\tif (hasValue(returned)) {\n\t\t\t\tresults.push(returned);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n}\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns source the originally given array.\n *\n * @example\n * import { eachAsyncArray, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncArray([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [1, 2, 3]);\n */\nexport async function eachAsyncArray(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tawait iteratee(source[index], index, source, arrayLength, additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.\n *\n * @function compactMapAsyncArray\n * @type {Function}\n * @category array\n * @async\n * @param {Array} source - Array to be compacted.\n * @param {Function} iteratee - Iteratee to be performed on array.\n * @returns {Array} - Array values after being put through an iterator.\n *\n * @example\n * import { compactMapAsync, assert } from '@universalweb/acid';\n * assert(await compactMapAsync([1, 2, 3, null], async (item) => {\n * return item;\n * }), [1, 2, 3]);\n */\nexport async function compactMapAsyncArray(source, iteratee = returnValue) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tconst result = await iteratee(item, index, results, arrayLength);\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isNegative\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNegative, assert } from '@universalweb/acid';\n * assert(isNegative(-1), true);\n */\nconst { sign } = Math;\nexport function isNegative(source) {\n\treturn sign(source) === -1;\n}\n","import { isNegative } from '../numbers/isNegative.js';\nexport function rangeUp(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position < end) {\n\t\tsourceArray.push(position);\n\t\tposition += step;\n\t}\n\treturn sourceArray;\n}\nexport function rangeDown(start, end, step, sourceArray) {\n\tlet position = start;\n\twhile (position > end) {\n\t\tsourceArray.push(position);\n\t\tposition -= step;\n\t}\n\treturn sourceArray;\n}\n/**\n * Create a numbered list of integers.\n *\n * @function range\n * @category array\n * @type {Function}\n * @param {Number} start - Value which determines the start of the range.\n * @param {Number} end - Value which determines the end of the range.\n * @param {Number} step - Value used to step between integers.\n * @returns {Array} - An array of integers.\n *\n * @example\n * import { range, assert } from '@universalweb/acid';\n * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n */\nexport function range(start, end, step = 1, sourceArray = []) {\n\tif (isNegative(step)) {\n\t\treturn sourceArray;\n\t}\n\tif (start < end) {\n\t\treturn rangeUp(start, end, step, sourceArray);\n\t} else {\n\t\treturn rangeDown(start, end, step, sourceArray);\n\t}\n}\n","/**\n * Checks if the value is an array. This references Array.isArray.\n *\n * @function isArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArray, assert } from '@universalweb/acid';\n * assert(isArray([]), true);\n * assert(isArray(2), false);\n */\nexport const isArray = Array.isArray;\n/**\n * Checks if the value is not an array. This references Array.isArray.\n *\n * @function isNotArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotArray, assert } from '@universalweb/acid';\n * assert(isNotArray([]), false);\n * assert(isNotArray(2), true);\n */\nexport function isNotArray(source) {\n\treturn !isArray(source);\n}\n","/**\n * A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined\n * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.\n *\n * @function construct\n * @category class\n * @param {Function} target - The target function or class.\n * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.\n * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.\n * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *\n * @example\n * import { construct, assert } from '@universalweb/acid';\n * class test {\n * \tconstructor(a) {\n * \t\treturn 1;\n * \t}\n * }\n * const newClass = construct(test, [1]);\n * assert(test, 1);\n */\nconst reflectConstruct = Reflect.construct;\nimport { isArray } from '../types/isArray.js';\nexport function construct(target, argumentsList = [], newTarget) {\n\tconst args = (isArray(argumentsList)) ? argumentsList : [argumentsList];\n\tif (newTarget) {\n\t\treturn reflectConstruct(target, args, newTarget);\n\t}\n\treturn reflectConstruct(target, args);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\n/**\n * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.\n *\n * @function ensureArray\n * @category array\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isArray, ensureArray, assert } from '@universalweb/acid';\n * assert(isArray(ensureArray('test')), ['test']);\n */\nexport function ensureArray(source) {\n\treturn (isArray(source) && source) || (hasValue(source) && [source]) || [];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array to a single level.\n *\n * @function flattenDeep\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { flattenDeep, assert } from '@universalweb/acid';\n * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n */\nexport function flattenDeep(source) {\n\treturn source.flat(Infinity);\n}\n\n","export function forEach(source, callback) {\n\tsource.forEach(callback);\n\treturn source;\n}\n","import { construct } from '../classes/construct.js';\nimport { eachArray } from './each.js';\nimport { flattenDeep } from './flattenDeep.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.\n *\n * @function difference\n * @category array\n * @type {Function}\n * @param {...Array} sources - List of arrays to be compared.\n * @returns {Array|undefined} - An array which contains the differences between the source and compare array.\n *\n * @example\n * import { difference, assert } from '@universalweb/acid';\n * assert(difference([1, 2, 3], [1, 2]), [3]);\n */\nexport function difference(...sources) {\n\tconst differencesMap = construct(Map);\n\tconst differences = [];\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = differencesMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\tdifferencesMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(differencesMap, (item) => {\n\t\tif (item.count === 1 && item.parentIndex === 0) {\n\t\t\tdifferences.push(item.child);\n\t\t}\n\t});\n\treturn differences;\n}\n\n","/**\n * Removes all items from an array after a specified index.\n *\n * @function drop\n * @category array\n * @type {Function}\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed after a user defined index.\n *\n * @example\n * import { drop, assert } from '@universalweb/acid';\n * assert(drop([1, 2, 3]), [2, 3]);\n * assert(drop([1, 2, 3], 2), [3]);\n */\nexport function drop(array, amount = 1, upTo = array.length) {\n\treturn array.splice(amount, upTo);\n}\n","import { drop } from './drop.js';\n/**\n * Removes all items from an array before a specified index.\n *\n * @function dropRight\n * @type {Function}\n * @category array\n * @param {Array} array - Source array.\n * @param {Number} amount - Amount of items to drop from the array.\n * @param {Number} [upTo = array.length] - Index to stop at.\n * @returns {Array} - An array with all values removed before a user defined index.\n *\n * @example\n * import { dropRight, assert } from '@universalweb/acid';\n * assert(dropRight([1, 2, 3]), [1, 2]);\n * assert(dropRight([1, 2, 3], 2), [1]);\n */\nexport const dropRight = (array, amount = 1, upTo = array.length) => {\n\treturn drop(array, 0, upTo - amount);\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array in reverse.\n *\n * @function eachRight\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { eachRight, assert } from '@universalweb/acid';\n * const tempList = [];\n * eachRight([1, 2, 3], (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport function eachRight(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\titeratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn source;\n}\n\n","/**\n * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.\n *\n * @function eachRightAsync\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @returns {Object|undefined} - The originally given array.\n *\n * @example\n * import { eachRightAsync, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachRightAsync([1, 2, 3], async (item) => {\n * tempList.push(item);\n * });\n * assert(tempList, [3, 2, 1]);\n */\nexport async function eachRightAsync(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1; index >= 0; index--) {\n\t\tawait iteratee(source[index], index, source, arrayLength);\n\t}\n\treturn source;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyArray, assert } from '@universalweb/acid';\n * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport function everyArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array while the iteratee returns true else the loop exits & returns false.\n *\n * @function everyAsyncArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncArray, assert } from '@universalweb/acid';\n * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), false);\n * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => {\n * return item;\n * }), true);\n */\nexport async function everyAsyncArray(source, iteratee, additionalArgument) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (await iteratee(source[index], index, source, sourceLength, additionalArgument) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterArray, assert } from '@universalweb/acid';\n * assert(filterArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport function filterArray(source, iteratee, results = [], additionalArgument) {\n\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\tif (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","import { eachAsyncArray } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncArray\n * @category array\n * @type {Function}\n * @category array\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { filterAsyncArray, assert } from '@universalweb/acid';\n * assert(filterAsyncArray([false, true, true], (item) => {\n * return item;\n * }), [true, true]);\n */\nexport async function filterAsyncArray(source, iteratee, results = [], additionalArgument) {\n\tawait eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => {\n\t\tif (await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) {\n\t\t\tresults.push(item);\n\t\t}\n\t});\n\treturn results;\n}\n\n","/**\n * Takes the first or multiple items from an array.\n *\n * @function first\n * @type {Function}\n * @category array\n * @param {Array} array - Array to extract from.\n * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { first, assert } from '@universalweb/acid';\n * assert(first([1, 2, 3]), 1);\n */\nexport function first(array, upTo) {\n\treturn (upTo) ? array.slice(0, upTo) : array[0];\n}\n\n","import { ensureArray } from './ensure.js';\n/**\n * Flattens an array up to the provided level.\n *\n * @function flatten\n * @type {Function}\n * @category array\n * @param {Array} source - Array to flatten.\n * @param {Number} [level = 1] - Number which determines how deep the array nest can be.\n * @returns {Array|undefined} - Returns an array.\n *\n * @example\n * import { flatten, assert } from '@universalweb/acid';\n * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n */\nexport function flatten(source, level = 1) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tlet sourceArray = source;\n\tfor (let i = 0; i < level; i++) {\n\t\tsourceArray = sourceArray.reduce((previousValue, currentValue) => {\n\t\t\treturn previousValue.concat(ensureArray(currentValue));\n\t\t}, []);\n\t}\n\treturn sourceArray;\n}\n\n","/**\n * Takes all but the last item in the array.\n *\n * @function initial\n * @category array\n * @type {Function}\n * @param {Array} array - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { initial, assert } from '@universalweb/acid';\n * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n */\nexport function initial(array) {\n\treturn array.slice(0, array.length - 1);\n}\n\n","import { compactMapArray } from './compactMap.js';\nimport { everyArray } from './every.js';\n// Add intersectionBy & intersectionWith\n/**\n * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory))\n * of the array and the input array(s).\n *\n * @function intersection\n * @param {Array} array - Array to compare other arrays to.\n * @param {...Array} arrays - A variable number of arrays.\n * @category array\n * @returns {Array} - The new array of unique values shared by all of the arrays.\n *\n * @example\n * import { intersection, assert } from '@universalweb/acid';\n * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n */\nexport function intersection(array, ...arrays) {\n\treturn compactMapArray(array, (item) => {\n\t\tconst shouldReturn = everyArray(arrays, (otherItem) => {\n\t\t\treturn otherItem.includes(item);\n\t\t});\n\t\tif (shouldReturn) {\n\t\t\treturn item;\n\t\t}\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Invoke each function in the given array.\n *\n * @function invokeArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} additionalArg - An object to be given each time to the iteratee.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @returns {Array|undefined} - The originally given array.\n *\n * @example\n * import { invokeArray, assert } from '@universalweb/acid';\n * function test(arg){\n * \treturn [this, arg];\n * }\n * const results = invokeArray([test], 1, test);\n * assert(results, [test, 1]);\n */\nexport function invokeArray(source, additionalArg, thisCall) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst arrayLength = source.length;\n\tif (hasValue(thisCall)) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index].call(thisCall, additionalArg);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tsource[index](additionalArg);\n\t\t}\n\t}\n\treturn source;\n}\n\n","const regexToPath = /\\.|\\[/;\nconst regexCloseBracket = /]/g;\nconst emptyString = '';\n/**\n * Breaks up string into object chain list.\n *\n * @function toPath\n * @type {Function}\n * @category utility\n * @param {String} source - String to be broken up.\n * @returns {Array} - Array used to go through object chain.\n *\n * @example\n * import { toPath, assert } from '@universalweb/acid';\n * assert(toPath('post.like[2]'), ['post', 'like', '2']);\n */\nexport function toPath(source) {\n\treturn source.replace(regexCloseBracket, emptyString).split(regexToPath);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { toPath } from './toPath.js';\n/**\n * Returns property on an object.\n *\n * @function get\n * @category utility\n * @type {Function}\n * @param {String} propertyString - String used to retrieve properties.\n * @param {Object} target - Object which has a property retrieved from it.\n * @returns {Object} - Returns property from the given object.\n *\n * @example\n * import { get, assert } from '@universalweb/acid';\n * const objectTarget = {\n * post: {\n * like: ['a','b','c']\n * }\n * };\n * assert(get('post.like[2]', objectTarget), 'c');\n */\nexport function get(propertyString, target) {\n\tif (!target) {\n\t\treturn false;\n\t}\n\tlet link = target;\n\tconst pathArray = isArray(propertyString) ? propertyString : toPath(propertyString);\n\teveryArray(pathArray, (item) => {\n\t\tlink = link[item];\n\t\treturn hasValue(link);\n\t});\n\treturn link;\n}\n\n","/**\n * Get object's keys.\n *\n * @function keys\n * @category object\n * @param {*} source - The source object to pull keys from.\n * @returns {Array} - Array of keys.\n *\n * @example\n * keys({a: 1, b: 2});\n * // => ['a', 'b']\n */\nconst objectKeys = Object.keys;\nexport function keys(source) {\n\tif (source) {\n\t\treturn objectKeys(source);\n\t}\n}\n","import { everyArray } from '../arrays/every.js';\nimport { get } from '../utilities/get.js';\nimport { keys } from './keys.js';\nimport { toPath } from '../utilities/toPath.js';\nconst hasOwn = Object.hasOwn;\n/**\n * Checks to see if an object has all of the given property names.\n *\n * @function hasKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {...String} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasKeys, assert } from '@universalweb/acid';\n * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);\n */\nexport function hasKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn everyArray(properties, (item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/**\n * Checks to see if an object has any of the given property names.\n *\n * @function hasAnyKeys\n * @category object\n * @type {Function}\n * @param {Object} source - Source object to check for keys.\n * @param {Array} properties - List of strings to check.\n * @returns {Boolean|undefined} - Returns true or false.\n *\n * @example\n * import { hasAnyKeys, assert } from '@universalweb/acid';\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true);\n * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);\n */\nexport function hasAnyKeys(source, ...properties) {\n\tif (!source) {\n\t\treturn;\n\t}\n\treturn Boolean(properties.find((item) => {\n\t\tconst pathArray = toPath(item);\n\t\tif (pathArray.length === 1) {\n\t\t\treturn hasOwn(source, item);\n\t\t} else {\n\t\t\tconst lastPath = pathArray.pop();\n\t\t\tconst initialPathObject = get(pathArray, source);\n\t\t\tif (initialPathObject) {\n\t\t\t\treturn hasOwn(initialPathObject, lastPath);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}));\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks to see if the constructor is that of a native object.\n *\n * @function isConstructor\n * @category type\n * @param {Object} target - The object to be checked.\n * @param {Object} source - The source constructor object.\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { isConstructor, assert } from '@universalweb/acid';\n * assert(isConstructor(2, Number), true);\n */\nexport function isConstructor(target, source) {\n\treturn target?.constructor === source || false;\n}\nexport function isConstructorFactory(source) {\n\treturn (target) => {\n\t\treturn isConstructor(target, source);\n\t};\n}\nexport function constructorName(source) {\n\treturn source?.constructor?.name;\n}\nexport function isConstructorNameFactory(source) {\n\treturn (target) => {\n\t\treturn constructorName(target) === source || false;\n\t};\n}\n","import { everyArray } from '../arrays/every.js';\nexport function isTypeFactory(method) {\n\treturn function(primarySource, ...otherSources) {\n\t\tif (otherSources) {\n\t\t\treturn method(primarySource) && everyArray(otherSources, method);\n\t\t}\n\t\treturn method(primarySource);\n\t};\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Buffer.\n *\n * @function isBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(Buffer.from('test')), true);\n */\nexport const isBufferCall = isConstructorNameFactory('Buffer');\nexport const isBuffer = isTypeFactory(isBufferCall);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is a plain object.\n *\n * @function isPlainObject\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPlainObject } from '@universalweb/acid';\n * isPlainObject({});\n * // => true\n */\nexport const isPlainObject = (source) => {\n\tif (hasValue(source)) {\n\t\treturn source.constructor.toString().trim()\n\t\t\t.slice(9, 16) === 'Object(';\n\t}\n\treturn false;\n};\n","import { everyArray } from '../arrays/every.js';\nimport { hasKeys } from '../objects/hasKeys.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Performs a deep comparison between two objects & determines if the value is the same using strict comparison.\n *\n * @function isEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEqual, assert } from '@universalweb/acid';\n * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);\n */\n// Add map & buffer Support - Review required for performance and support for more types\nexport const isEqual = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t} else if (isBuffer(source)) {\n\t\treturn source.equals(target);\n\t} else if (source.toString() === target.toString()) {\n\t\tif (isPlainObject(source)) {\n\t\t\tconst sourceProperties = keys(source);\n\t\t\tif (hasKeys(target, sourceProperties)) {\n\t\t\t\treturn everyArray(sourceProperties, (key) => {\n\t\t\t\t\treturn isEqual(source[key], target[key]);\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (isArray(source)) {\n\t\t\tif (source.length === target.length) {\n\t\t\t\treturn everyArray(source, (item, index) => {\n\t\t\t\t\treturn isEqual(item, target[index]);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n","import { everyArray } from './every.js';\nimport { isEqual } from '../utilities/isEqual.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchArray\n * @type {Function}\n * @category array\n * @param {Array} source - Source object.\n * @param {Array} compareArray - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMatchArray, assert } from '@universalweb/acid';\n * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n */\nexport function isMatchArray(source, compareArray) {\n\tif (source.length === compareArray.length) {\n\t\treturn everyArray(source, (item, index) => {\n\t\t\treturn isEqual(compareArray[index], item);\n\t\t});\n\t}\n\treturn false;\n}\n\n","const mathNativeMax = Math.max;\n/**\n * Plucks the largest value from an array.\n *\n * @function largest\n * @type {Function}\n * @category array\n * @param {Array} array - Array from which largest number is taken.\n * @returns {Number} - The largest number.\n *\n * @example\n * import { largest, assert } from '@universalweb/acid';\n * assert(largest([1,2,3]), 3);\n */\nexport function largest(array) {\n\treturn mathNativeMax(...array);\n}\n\n","/**\n * Extracts item(s) from an array starting from the last item in the array.\n *\n * @function last\n * @type {Function}\n * @category array\n * @param {Array} array - Array to have items extracted from.\n * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.\n * @returns {Array} - Items from the array.\n *\n * @example\n * import { last, assert } from '@universalweb/acid';\n * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);\n */\nexport function last(array, indexFrom) {\n\tconst arrayLength = array.length;\n\treturn (indexFrom) ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1];\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n *\n * @function mapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapArray, assert } from '@universalweb/acid';\n * assert(mapArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport function mapArray(source, iteratee, results = [], thisCall, additionalArg) {\n\tif (hasValue(thisCall)) {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(source, (item, index, arrayOriginal, arrayLength) => {\n\t\t\tresults[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentEachArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @returns {Promise|Array|undefined} - An array of the same calling array's type.\n *\n * @example\n * import { concurrentEachArray, has, assert } from '@universalweb/acid';\n * const results = await concurrentEachArray([1, 2, 3], async (item) => {\n * return item * 2;\n * });\n * assert(has(results, [2, 4, 6]), true);\n */\nexport async function concurrentEachArray(source, iteratee, thisBind) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst results = [];\n\tconst arrayLength = source.length;\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee.call(thisBind, source[index], index, results, arrayLength);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tresults[index] = iteratee(source[index], index, results, arrayLength);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { eachAsyncArray } from './eachAsync.js';\n/**\n * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.\n *\n * @function mapAsyncArray\n * @category array\n * @type {Function}\n * @async\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapAsyncArray, assert } from '@universalweb/acid';\n * assert(await mapAsyncArray([1, 2, 3], async (item) => {\n * return item * 2;\n * }), [2, 4, 6]);\n */\nexport async function mapAsyncArray(source, iteratee) {\n\tconst results = [];\n\tawait eachAsyncArray(source, async (item, index, arrayLength) => {\n\t\tresults[index] = await iteratee(item, index, results, arrayLength);\n\t});\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.\n *\n * @function mapRightArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array of the same calling array's type.\n *\n * @example\n * import { mapRightArray, assert } from '@universalweb/acid';\n * assert(mapRightArray([1, 2, 3], (item) => {\n * return item * 2;\n * }), [6, 4, 2]);\n */\nexport function mapRightArray(source, iteratee, results = [], additionalArgument) {\n\tlet trueIndex = 0;\n\tconst arrayLength = source.length;\n\tfor (let index = arrayLength - 1;index >= 0;index--) {\n\t\tresults[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t\ttrueIndex++;\n\t}\n\treturn results;\n}\n\n","import { eachArray } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function mapWhile\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - An array with properties that passed the test.\n *\n * @example\n * import { mapWhile, assert } from '@universalweb/acid';\n * assert(mapWhile([1, 2, 0], (item) => {\n * return Boolean(item);\n * }), [1, 2]);\n */\nexport function mapWhile(source, iteratee, results = [], additionalArgument) {\n\tconst arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tconst returned = iteratee(item, index, results, source, arrayLength, additionalArgument);\n\t\tif (returned === false) {\n\t\t\tbreak;\n\t\t}\n\t\tresults[index] = item;\n\t}\n\treturn results;\n}\n\n","/**\n * Subtracts the subtrahend (second argument) from the minuend (first argument).\n *\n * @function subtract\n * @category math\n * @type {Function}\n * @param {Number} minuend - The minuend.\n * @param {Number} subtrahend - The subtrahend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtract, assert } from '@universalweb/acid';\n * assert(subtract(3, 1), 2);\n */\nexport function subtract(minuend, subtrahend) {\n\treturn minuend - subtrahend;\n}\n","import { subtract } from '../math/subtract.js';\n/**\n * Sorts an array of numbers in ascending order. Smallest to largest.\n *\n * @function sortNumberAscending\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberAscending, assert } from '@universalweb/acid';\n * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n */\nexport function sortNumberAscending(numberList) {\n\treturn numberList.sort(subtract);\n}\n","import { compactMapArray } from './compactMap.js';\n/**\n * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.\n *\n * @function partition\n * @type {Function}\n * @category array\n * @param {Array} array - Takes an array to split.\n * @param {Function} predicate - Function run on each item in the array.\n * @returns {Array} - One array split into two arrays.\n *\n * @example\n * import { partition, assert } from '@universalweb/acid';\n * const result = partition([\n * {user: 'barney', age: 36, active: false},\n * {user: 'fred', age: 40, active: true},\n * {user: 'pebbles', age: 1, active: false}\n * ], (item) => { return item.active; });\n * assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}],\n * [{\"user\":\"barney\",\"age\":36,\"active\":false},\n * {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);\n */\nexport function partition(array, predicate) {\n\tconst rejected = [];\n\treturn [\n\t\tcompactMapArray(array, (item, index) => {\n\t\t\tif (predicate(item, index)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\trejected.push(item);\n\t\t}),\n\t\trejected\n\t];\n}\n\n","/**\n * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.\n *\n * @function subtractReverse\n * @category math\n * @type {Function}\n * @param {Number} subtrahend - The subtrahend.\n * @param {Number} minuend - The minuend.\n * @returns {Number} - Returns the difference.\n *\n * @example\n * import { subtractReverse, assert } from '@universalweb/acid';\n * assert(subtractReverse(1, 3), 2);\n */\nexport function subtractReverse(subtrahend, minuend) {\n\treturn minuend - subtrahend;\n}\n","import { subtractReverse } from '../math/subtractReverse.js';\n/**\n * Sorts an array of numbers in descending order. Largest to smallest.\n *\n * @function sortNumberDescening\n * @category array\n * @param {Array} numberList - Array of numbers.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * import { sortNumberDescening, assert } from '@universalweb/acid';\n * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n */\nexport function sortNumberDescening(numberList) {\n\treturn numberList.sort(subtractReverse);\n}\n","/**\n * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function remove\n * @category array\n * @param {Array} array - Array to be mutated.\n * @param {String|Array} removeThese - Items to remove from the array.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * remove([1, 2, 3, 3, 4, 3, 5], 1);\n * // => [2, 3, 3, 4, 3, 5]\n * @example\n * remove([3, 3, 4, 5], 3, 4);\n * // => [5]\n */\nexport function remove(array, removeThese) {\n\tlet arrayLength = array.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = array[index];\n\t\tif (removeThese.includes(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn array;\n}\n/**\n * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.\n *\n * @function removeBy\n * @category array\n * @param {Array} source - Array to be mutated.\n * @param {Function} iteratee - Function used to check object. Return true to remove the value.\n * @returns {Array} - The array this method was called on.\n *\n * @example\n * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);});\n * // => [2, 4]\n */\nexport function removeBy(source, iteratee) {\n\tlet arrayLength = source.length;\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tconst item = source[index];\n\t\tif (iteratee(item, index)) {\n\t\t\tsource.splice(index, 1);\n\t\t\tindex--;\n\t\t\tarrayLength--;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Extracts all items in array except the first and last item.\n *\n * @function rest\n * @type {Function}\n * @category array\n * @param {Array} array - Array to be sliced.\n * @returns {Array} - Returns the aggregated array.\n *\n * @example\n * rest([1, 2, 3, 4, 5]);\n * // => [2, 3, 4, 5]\n */\nexport function rest(array) {\n\treturn array.slice(1, array.length);\n}\n\n","/**\n * Get the item at the supplied index starting at the end of the array.\n *\n * @function right\n * @type {Function}\n * @category array\n * @param {Array} source - Array to be sliced.\n * @param {Number} amount - Amount from the right.\n * @returns {*} - Returns the object at the evaluated position.\n *\n * @example\n * right([1, 2, 3, 4, 5] , 1);\n * // => 4\n */\nexport function right(source, amount) {\n\treturn source[source.length - 1 - amount];\n}\n\n","const {\n\tfloor,\n\trandom\n} = Math;\n/**\n * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomInt\n * @category number\n * @type {Function}\n * @param {Number} max - The highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomInt, assert } from '@universalweb/acid';\n * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});\n */\nexport function randomInt(max, min = 0) {\n\treturn floor(random() * (max - min)) + min;\n}\n","/**\n * Checks if two numbers are the same.\n *\n * @function isNumberEqual\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} target - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberEqual, assert } from '@universalweb/acid';\n * assert(isNumberEqual(0, 0), true);\n */\nexport function isNumberEqual(source, target) {\n\treturn source === target;\n}\n","import { hasValue } from '../types/hasValue.js';\nconst arrayFrom = Array.from;\n/**\n * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.\n *\n * @function toArray\n * @category array\n * @param {*} arrayLike - Array like object.\n * @param {Function} mapFn - Function to map over the array.\n * @param {*} thisArg - MapFn's \"this\".\n * @returns {Array|undefined} - New array.\n *\n * @example\n * import { toArray, assert } from '@universalweb/acid';\n * assert(toArray(new Map([[1, 2]])), [[1, 2]]);\n */\nexport function toArray(arrayLike, mapFn, thisArg) {\n\tif (hasValue(arrayLike)) {\n\t\treturn arrayFrom(arrayLike, mapFn, thisArg);\n\t}\n}\n","import { isNumberEqual } from '../numbers/isNumberEqual.js';\nimport { randomInt } from '../math/randomInt.js';\nimport { toArray } from '../internal/array.js';\n/**\n * Shuffle an array and return a new array.\n *\n * @function shuffle\n * @category array\n * @param {Array} target - Target Array to be shuffled.\n * @param {Number} amount - The amount of times to shuffle the array.\n * @returns {Array} - An array with the shuffled results.\n *\n * @example\n * import { shuffle, assert } from '@universalweb/acid';\n * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n */\nexport function shuffle(target, amount = target.length) {\n\tif (target.length <= 1) {\n\t\treturn toArray(target);\n\t}\n\tconst shuffleArray = toArray(target);\n\tlet count = 0;\n\tlet index;\n\tlet value;\n\twhile (count < amount) {\n\t\tindex = randomInt(shuffleArray.length - 1, 0);\n\t\tvalue = shuffleArray[count];\n\t\tshuffleArray[count] = shuffleArray[index];\n\t\tshuffleArray[index] = value;\n\t\tcount++;\n\t}\n\treturn shuffleArray;\n}\n\n","import { randomInt } from '../math/randomInt.js';\nimport { shuffle } from './shuffle.js';\n/**\n * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.\n *\n * @function sample\n * @category array\n * @param {Array} source - The array to pull sample(s) from.\n * @param {Number} amount - The amount of samples to take.\n * @returns {Array} - An array of randomly pulled samples.\n *\n * @example\n * sample([1, 2, 3, 4] , 2);\n * // => [1, 3]\n */\nexport function sample(source, amount) {\n\tif (!source) {\n\t\treturn false;\n\t}\n\tconst arrayLength = source.length;\n\tif (arrayLength === amount || amount > arrayLength) {\n\t\treturn shuffle(source);\n\t}\n\tif (amount === 1) {\n\t\treturn [source[randomInt(arrayLength - 1, 0)]];\n\t}\n\tconst sampleArray = [];\n\tconst used = {};\n\tlet count = 0;\n\tlet index;\n\twhile (count < amount) {\n\t\tindex = randomInt(source.length - 1, 0);\n\t\tif (!used[index]) {\n\t\t\tsampleArray.push(source[index]);\n\t\t\tused[index] = true;\n\t\t\tcount++;\n\t\t}\n\t}\n\treturn sampleArray;\n}\n\n","const mathNativeMin = Math.min;\n/**\n * Plucks the smallest value from an array.\n *\n * @function smallest\n * @category array\n * @type {Function}\n * @param {Array} array - Array from which smallest number is taken.\n * @returns {Number} - The smallest number.\n *\n * @example\n * smallest([1,2,3]);\n * // => 1\n */\nexport function smallest(array) {\n\treturn mathNativeMin(...array);\n}\n\n","import { everyArray } from './every.js';\n/**\n * What index should the number be inserted at to keep a sorted array still sorted.\n *\n * @function getNumberInsertIndex\n * @category array\n * @type {Function}\n * @param {Array} source - Array to be checked.\n * @param {Number} target - Number to check where to be inserted.\n * @returns {Number} - The index at which to insert.\n *\n * @example\n * import { getNumberInsertIndex, assert } from '@universalweb/acid';\n * assert(getNumberInsertIndex([30, 39, 50], 40), 1);\n */\nexport function getNumberInsertIndex(source, target) {\n\tlet insertIndex = 0;\n\teveryArray(source, (item, index) => {\n\t\tinsertIndex = index;\n\t\tif (target >= item) {\n\t\t\tinsertIndex = index + 1;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn insertIndex;\n}\n","/**\n * Returns a shallow copy of the array up to an amount.\n *\n * @function take\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take from.\n * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { take, assert } from '@universalweb/acid';\n * assert(take([1,2,3], 2), [1, 2]);\n */\nexport function take(source, endIndex = 1) {\n\treturn source.slice(0, endIndex);\n}\n\n","/**\n * Returns a shallow copy of the array up to an amount starting from the right.\n *\n * @function takeRight\n * @category array\n * @type {Function}\n * @param {Array} source - The source array to take right from.\n * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * import { takeRight, assert } from '@universalweb/acid';\n * assert(takeRight([1,2,3], 2), [2, 3]);\n */\nexport function takeRight(source, indexRight = 1) {\n\tconst arrayLength = source.length;\n\treturn source.slice(arrayLength - indexRight, arrayLength);\n}\n\n","export function onlyUnique(value, index, array) {\n\treturn array.indexOf(value) === index;\n}\nexport function sortUnique(item, index, array) {\n\treturn item !== array[index - 1];\n}\n/**\n * Filters the array down to unique elements.\n *\n * @function unique\n * @category array\n * @type {Function}\n * @param {Array} source - The array to be filtered.\n * @param {Boolean} isSorted - Flag which means the array is already sorted.\n * @returns {Array} - The filtered array.\n *\n * @example\n * unique([1, 2, 2, 4]);\n * // => [1, 2, 4]\n */\nexport function unique(source, isSorted) {\n\tif (isSorted) {\n\t\treturn source.filter(sortUnique);\n\t}\n\treturn source.filter(onlyUnique);\n}\n\n","import { flattenDeep } from './flattenDeep.js';\nimport { unique } from './unique.js';\n/**\n * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.\n *\n * @function union\n * @category array\n * @type {Function}\n * @param {...Array} arrays - The arrays to be evaluated.\n * @returns {Array} - The aggregated array.\n *\n * @example\n * union([1,2,4], [1,2,3]);\n * // => [1, 2, 4, 3]\n */\nexport function union(...arrays) {\n\treturn unique(flattenDeep(arrays));\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned.\n * If and when the iteratee yields false the loop stops & false is returned.\n *\n * @function untilFalseArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are true or false if one value returns false.\n *\n * @example\n * import { untilFalseArray, assert } from '@universalweb/acid';\n * assert(untilFalseArray([true, true, false], (item) => {\n * return item;\n * }), false);\n * assert(untilFalseArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilFalseArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === false) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned.\n * If and when the iteratee yields true the loop stops & false is returned.\n *\n * @function untilTrueArray\n * @category array\n * @type {Function}\n * @param {Array} source - The array to iterate over.\n * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned.\n * @returns {Array} - Returns true if all returns are false or false if one value returns true.\n *\n * @example\n * import { untilTrueArray, assert } from '@universalweb/acid';\n * assert(untilTrueArray([true], (item) => {\n * return item;\n * }), false);\n * assert(untilTrueArray([true, true, true], (item) => {\n * return item;\n * }), true);\n */\nexport function untilTrueArray(source, iteratee) {\n\tconst sourceLength = source.length;\n\tfor (let index = 0;index < sourceLength;index++) {\n\t\tif (iteratee(source[index], index) === true) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results,\n * (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n * Re-checks the length each loop.\n *\n * @function whileCompactMap\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileCompactMap, assert } from '@universalweb/acid';\n * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n * return item;\n * }), [1, 2, 3, false]);\n */\nexport function whileCompactMap(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tconst result = results.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t\tif (hasValue(result)) {\n\t\t\tresults.push(result);\n\t\t}\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.\n *\n * @function whileEachArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileEachArray, assert } from '@universalweb/acid';\n * const list = [];\n * whileEachArray([1, 2, 3], (item, index) => {\n * list[index] = item;\n * });\n * assert(list, [1, 2, 3]);\n */\nexport function whileEachArray(source, iteratee, additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\titeratee(source[index], index, source, source.length, additionalArgument);\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.\n * Re-checks the length each loop.\n *\n * @function whileMapArray\n * @category array\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {Array} results - Array that will be used to assign results. Default value is a new empty array.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { whileMapArray, assert } from '@universalweb/acid';\n * assert(whileMapArray([1, 2, 3], (item, index, source) => {\n * if (index === 0) {\n * source.push(4);\n * }\n * return item;\n * }), [1, 2, 3, 4]);\n */\nexport function whileMapArray(source, iteratee, results = [], additionalArgument) {\n\tlet index = 0;\n\twhile (index < source.length) {\n\t\tresults.push(iteratee(source[index], index, source, source.length, additionalArgument));\n\t\tindex++;\n\t}\n\treturn source;\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Returns a copy of the array with all instances of the values removed.\n *\n * @function without\n * @type {Function}\n * @category array\n * @param {Array} target - The target array to be filtered.\n * @param {Array} sources - Items to be removed.\n * @returns {Array} - The target array filtered.\n *\n * @example\n * import { without, assert } from '@universalweb/acid';\n * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n */\nexport function without(target, sources) {\n\tif (!sources) {\n\t\treturn target;\n\t}\n\tconst sourcesSet = construct(Set, sources);\n\treturn target.filter((item) => {\n\t\treturn !sourcesSet.has(item);\n\t});\n}\n\n","import { construct } from '../classes/construct.js';\nimport { difference } from './difference.js';\nimport { eachArray } from './each.js';\nimport { forEach } from '../utilities/forEach.js';\n/**\n * Creates an array that is the symmetric difference of the provided arrays.\n *\n * @function xor\n * @category array\n * @type {Function}\n * @param {...Array} sources - The array(s) to be filtered.\n * @returns {Array|undefined} - The filtered array.\n *\n * @example\n * xor([2, 1], [2, 3, 5], [6]);\n * // => [1, 3, 5, 6]\n */\nexport function xor(...sources) {\n\tconst xorMap = construct(Map);\n\tconst xored = [];\n\tconst sourcesLength = sources.length;\n\tif (sourcesLength === 2) {\n\t\treturn difference(sources[0], sources[1]);\n\t}\n\teachArray(sources, (currentArray, parentIndex) => {\n\t\teachArray(currentArray, (child, childIndex) => {\n\t\t\tlet childRoot = xorMap.get(child);\n\t\t\tif (!childRoot) {\n\t\t\t\tchildRoot = {\n\t\t\t\t\tcount: 1,\n\t\t\t\t\tparentIndex,\n\t\t\t\t\tchild\n\t\t\t\t};\n\t\t\t\txorMap.set(child, childRoot);\n\t\t\t} else if (childRoot.parentIndex === parentIndex) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tchildRoot.count++;\n\t\t\t}\n\t\t});\n\t});\n\tforEach(xorMap, (item) => {\n\t\tif (item.count === 1) {\n\t\t\txored.push(item.child);\n\t\t}\n\t});\n\treturn xored;\n}\n\n","/**\n * Merges together the values of each of the arrays with the values at the corresponding position.\n *\n * @function zip\n * @type {Function}\n * @category array\n * @param {Array} arrays - The arrays to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nexport function zip(...arrays) {\n\treturn arrays[0].map((item, index) => {\n\t\treturn arrays.map((array) => {\n\t\t\treturn array[index];\n\t\t});\n\t});\n}\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.\n *\n * @function unZip\n * @type {Function}\n * @category array\n * @param {Array} source - The array of grouped elements to process.\n * @returns {Array} - Returns the new array of regrouped elements.\n *\n * @example\n * unZip([['a', 1, true], ['b', 2, false]]);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nexport function unZip(source) {\n\treturn source[0].map((item, index) => {\n\t\treturn source.map((arraySet) => {\n\t\t\treturn arraySet[index];\n\t\t});\n\t});\n}\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.\n *\n * @function ensureBuffer\n * @category buffer\n * @type {Function}\n * @param {*} source - Object to be checked.\n * @returns {Array} - Returns an array.\n *\n * @example\n * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid';\n * assert(isBuffer(ensureBuffer('test')), true);\n */\nexport function ensureBuffer(source) {\n\treturn (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0);\n}\n","/**\n * Clears the values out of a buffer.\n *\n * @function clearBuffer\n * @category buffer\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clearBuffer, assert } from '@universalweb/acid';\n * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));\n */\nexport function clearBuffer(source) {\n\tsource.fill(0);\n\treturn source;\n}\n\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a plain object.\n *\n * @function isFunction\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFunction } from '@universalweb/acid';\n * isFunction(() => {});\n * // => true\n */\nexport const isFunction = (source) => {\n\treturn (hasValue(source)) ? source instanceof Function : false;\n};\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a number.\n *\n * @function isNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumber, assert } from '@universalweb/acid';\n * assert(isNumber(1), true);\n */\nexport const isNumberCall = isConstructorNameFactory('Number');\nexport const isNumber = isTypeFactory(isNumberCall);\n/**\n * Checks if the value is not a number.\n *\n * @function isNotNumber\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotNumber, assert } from '@universalweb/acid';\n * assert(isNotNumber(1), false);\n */\nexport function isNotNumber(source) {\n\treturn !isNumber(source);\n}\n","import { isConstructorFactory } from './isConstructor.js';\n/**\n * Checks if the value is a string.\n *\n * @function isString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isString, assert } from '@universalweb/acid';\n * assert(isString('hello'), true);\n * assert(isString(1), false);\n */\nexport const isString = isConstructorFactory(String);\n/**\n * Checks if the value is not a string.\n *\n * @function isNotString\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNotString, assert } from '@universalweb/acid';\n * assert(isNotString(1), true);\n * assert(isNotString('hello'), false);\n */\nexport function isNotString(source) {\n\treturn !isString(source);\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nexport const objectAssign = Object.assign;\nexport function assignToObject(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget[key] = source;\n\t\t} else {\n\t\t\tobjectAssign(target, source);\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget[source] = source;\n\t}\n\treturn target;\n}\n/**\n * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.\n *\n * @function assign\n * @category object\n * @param {Object} target - The target object.\n * @param {...Object} sources - The source object(s).\n * @returns {Object} - Returns the target object.\n *\n * @example\n * import { assign, assert } from '@universalweb/acid';\n * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});\n */\nexport function assign(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToObject(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { isConstructor } from '../types/isConstructor.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from '../objects/assign.js';\nexport function assignToClass(target, source) {\n\tif (isPlainObject(source)) {\n\t\tobjectAssign(target.prototype, source);\n\t} else if (isFunction(source)) {\n\t\tconst key = source.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isConstructor(source)) {\n\t\tconst key = source.constructor?.name;\n\t\tif (key) {\n\t\t\ttarget.prototype[key] = source;\n\t\t}\n\t} else if (isString(source) || isNumber(source)) {\n\t\ttarget.prototype[source] = source;\n\t}\n\treturn target;\n}\n/**\n * The function adds a new method to a class.\n * @param {Class} target - The target parameter refers to the Class or constructor function to which you want\n * to add a new method.\n * @param {Function|Object|String|Number} sources - What you want to add to the class.\n * @returns {Class} - Returns the Class provided in the target parameter.\n *\n * @example\n * import { extendClass, assert } from '@universalweb/acid';\n * class Test {}\n * function a(){return 1;}\n * extendClass(Test, a)\n * assert((new Test()).a(), 1);\n */\nexport function extendClass(target, ...sources) {\n\tconst sourceLength = sources.length;\n\tfor (let index = 0; index < sourceLength; index++) {\n\t\tassignToClass(target, sources[index]);\n\t}\n\treturn target;\n}\n","import { chunk } from '../arrays/chunk.js';\nimport { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection through iteratee.\n *\n * @function countBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { countBy, assert } from '@universalweb/acid';\n * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});\n */\nexport function countBy(collection, iteratee) {\n\tconst object = {};\n\tlet result;\n\teachArray(collection, (item) => {\n\t\tresult = iteratee(item);\n\t\tif (!object[result]) {\n\t\t\tobject[result] = 0;\n\t\t}\n\t\tobject[result]++;\n\t});\n\treturn object;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is present in a collection.\n *\n * @function countKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countKey, assert } from '@universalweb/acid';\n * assert(countKey([{a:1}, {a:3}], 'a'), 2);\n */\nexport function countKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Count the amount of times a key is not present in a collection.\n *\n * @function countWithoutKey\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The name of the key.\n * @returns {Number} - The count.\n *\n * @example\n * import { countWithoutKey, assert } from '@universalweb/acid';\n * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);\n */\nexport function countWithoutKey(collection, propertyName) {\n\tlet count = 0;\n\teachArray(collection, (item) => {\n\t\tif (!item[propertyName]) {\n\t\t\tcount++;\n\t\t}\n\t});\n\treturn count;\n}\n","export function findIndexCache(element, index, array, indexMatch, propertyName) {\n\tif (element[propertyName] === indexMatch) {\n\t\treturn true;\n\t}\n}\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name and returns the array index of the object.\n *\n * @function findIndex\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Number} - The index of the object.\n *\n * @example\n * findIndex([{id: 1}, {id: 2}], 1);\n * // => 0\n */\nexport function findIndex(collection, id, propertyName = 'id') {\n\tconst result = collection.findIndex((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n\n","import { findIndexCache } from './findIndexCache.js';\n/**\n * Finds an object in a collection by the given id and property name.\n *\n * @function findItem\n * @type {Function}\n * @category collection\n * @param {Array} collection - Collection to be checked for an item.\n * @param {Number|string} id - The value to look for.\n * @param {String} [propertyName = 'id'] - The name of the property to compare.\n * @returns {Object} - The found object.\n *\n * @example\n * findItem([{id: 1}, {id: 2}], 1);\n * // => {id: 1}\n */\nexport function findItem(collection, id, propertyName = 'id') {\n\tconst result = collection.find((element, index) => {\n\t\treturn findIndexCache(element, index, collection, id, propertyName);\n\t});\n\treturn (result === -1) ? false : result;\n}\n","export function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn -1;\n\t} else if (!previousKey) {\n\t\treturn 1;\n\t} else if (previousKey < nextKey) {\n\t\treturn 1;\n\t} else if (previousKey > nextKey) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in descending order.\n *\n * @function sortCollectionDescending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionDescending, assert } from '@universalweb/acid';\n * const result = [{id: 1}, {id: 0}];\n * const collect = [{id: 0}, {id: 1}];\n * const prop = 'id';\n * assert(sortCollectionDescending(collect, prop), result);\n */\nexport function sortCollectionDescending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionDescendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n\n","import { sortCollectionDescending } from './sortCollectionDescending.js';\n/**\n * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.\n *\n * @function getLowest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getLowest, assert } from '@universalweb/acid';\n * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});\n */\nexport function getLowest(collection, propertyName) {\n\treturn sortCollectionDescending(collection, propertyName, false)[0];\n}\n","export function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\tif (!nextKey) {\n\t\treturn 1;\n\t} else if (!previousKey) {\n\t\treturn -1;\n\t} else if (previousKey < nextKey) {\n\t\treturn -1;\n\t} else if (previousKey > nextKey) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n/**\n * Sorts an array in place using a key in ascending order.\n *\n * @function sortCollectionAscending\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array and or a clone of the array sorted.\n *\n * @example\n * import { sortCollectionAscending, assert } from '@universalweb/acid';\n * const result = [{id: 0}, {id: 1}];\n * const collect = [{id: 1}, {id: 0}];\n * const prop = 'id';\n * assert(sortCollectionAscending(collect, prop), result);\n */\nexport function sortCollectionAscending(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortCollectionAscendingFilter(previous, next, propertyName, ifMatch);\n\t});\n}\n","import { sortCollectionAscending } from './sortCollectionAscending.js';\n/**\n * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.\n *\n * @function getHighest\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - The property name to sort by based on it's value.\n * @returns {Object} - The newest object in the collection.\n *\n * @example\n * import { getHighest, assert } from '@universalweb/acid';\n * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});\n */\nexport function getHighest(collection, propertyName = 'id') {\n\treturn sortCollectionAscending(collection, propertyName)[0];\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Creates an object composed of keys generated from the results of running each element of collection thru iteratee.\n * The order of grouped values is determined by the order they occur in collection.\n * The corresponding value of each key is an array of elements responsible for generating the key.\n *\n * @function groupBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {Function} iteratee - The iteratee to transform keys.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n */\nexport function groupBy(collection, iteratee) {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tconst results = iteratee(item);\n\t\tif (!sortedObject[results]) {\n\t\t\tsortedObject[results] = [];\n\t\t}\n\t\tsortedObject[results].push(item);\n\t});\n\treturn sortedObject;\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.\n *\n * @function indexBy\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array of objects.\n * @param {String} propertyName - The property name to index by.\n * @returns {Object} - Returns the composed aggregate object.\n *\n * @example\n * import { indexBy, assert } from '@universalweb/acid';\n * const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}};\n * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id');\n * assert(indexed, result);\n */\nexport function indexBy(collection, propertyName = 'id') {\n\tconst sortedObject = {};\n\teachArray(collection, (item) => {\n\t\tsortedObject[item[propertyName]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { mapArray } from '../arrays/map.js';\n/**\n * Invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollection\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollection, assert } from '@universalweb/acid';\n * const results = invokeCollection([{\n *\ttest(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollection(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapArray(collection, (item, index) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapArray(collection, (item, index) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { mapAsyncArray } from '../arrays/mapAsync.js';\n/**\n * Asynchronously awaits & invokes a function on the provided property name in each object in the collection.\n *\n * @function invokeCollectionAsync\n * @category collection\n * @type {Function}\n * @async\n * @param {Array} collection - Collection from which method will be taken.\n * @param {String} property - Value used to pluck method from object.\n * @param {*} value - Value to be passed to callable property.\n * @returns {Array} - Returns the results of the invoked method.\n *\n * @example\n * import { invokeCollectionAsync, assert } from '@universalweb/acid';\n * const results = await invokeCollectionAsync([{\n *\tasync test(item, index) { return [item, index];}\n * }], 'test', ['EXAMPLE']);\n * assert(results, [['EXAMPLE', 0]]);\n */\nexport function invokeCollectionAsync(collection, property, value, thisBind) {\n\tif (thisBind) {\n\t\treturn mapAsyncArray(collection, (item) => {\n\t\t\treturn item[property].call(thisBind, value);\n\t\t});\n\t}\n\treturn mapAsyncArray(collection, async (item) => {\n\t\treturn item[property](value);\n\t});\n}\n\n","import { isString } from '../types/isString.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.\n *\n * @function pluckObject\n * @category object\n * @type {Function}\n * @param {Object} source - Array used to determine what sources to be plucked.\n * @param {String|Array} targets - Property name.\n * @returns {Array|undefined} - An array of plucked sources.\n *\n * @example\n * import { pluckObject, assert } from '@universalweb/acid';\n * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);\n */\nexport function pluckObject(source, targets) {\n\tif (!source) {\n\t\treturn;\n\t} else if (isString(targets)) {\n\t\treturn source[targets];\n\t}\n\treturn mapArray(targets, (item) => {\n\t\treturn source[item];\n\t});\n}\n\n","import { mapArray } from '../arrays/map.js';\nimport { pluckObject } from '../objects/pluckObject.js';\n/**\n * Returns an array of the plucked values from the collection.\n *\n * @function pluck\n * @category collection\n * @type {Function}\n * @param {Array} collection - Array used to determine what value to be plucked.\n * @param {(String|Number|Array.)} targets - Property name.\n * @returns {Array} - An array of plucked values.\n *\n * @example\n * import { pluck, assert } from '@universalweb/acid';\n * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]);\n * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);\n */\nexport function pluck(collection, targets) {\n\treturn mapArray(collection, (item) => {\n\t\treturn pluckObject(item, targets);\n\t});\n}\n","export function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn previousKey.localeCompare(nextKey);\n}\n/**\n * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabetically\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabetically, assert } from '@universalweb/acid';\n * const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}];\n * const prop = 'letter';\n * function ifMatchSort(c, n) {\n * if (c.g < n.g) {\n * return -1;\n * }\n * if (c.g > n.g) {\n * return 1;\n\t* }\n * }\n * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n */\nexport function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabetically(previous, next, propertyName, ifMatch);\n\t});\n}\n","export function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) {\n\tconst previousKey = previous[propertyName];\n\tconst nextKey = next[propertyName];\n\tif (previousKey === nextKey && ifMatch) {\n\t\treturn ifMatch(previous, next, propertyName);\n\t}\n\treturn nextKey.localeCompare(previousKey);\n}\n/**\n * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.\n *\n * @function sortCollectionAlphabeticallyReverse\n * @category collection\n * @type {Function}\n * @param {Array} collection - Collection to be sorted.\n * @param {String} propertyName - Name of property to compare.\n * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match.\n * @returns {Array} - The sorted array.\n *\n * @example\n * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid';\n * const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}];\n * const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}];\n * const prop = 'letter';\n * assert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n */\nexport function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) {\n\treturn collection.sort((previous, next) => {\n\t\treturn sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch);\n\t});\n}\n","/**\n * Return the file extension.\n *\n * @function getFileExtension\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFileExtension, assert } from '@universalweb/acid';\n * assert(getFileExtension('test.js'),'js');\n */\nexport function getFileExtension(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('.') + 1);\n\t}\n}\n","/**\n * Return the file extension.\n *\n * @function getFilename\n * @category file\n * @param {*} source - Object to be checked.\n * @returns {String|undefined} - Returns the extension.\n *\n * @example\n * import { getFilename, assert } from '@universalweb/acid';\n * assert(getFilename('./universalweb/test.js'),'test.js');\n */\nexport function getFilename(source) {\n\tif (source) {\n\t\treturn source.substring(source.lastIndexOf('/') + 1);\n\t}\n}\n","import { hasValue } from '../types/hasValue.js';\nexport function regexTestFactory(regexType) {\n\treturn (item) => {\n\t\treturn (hasValue(item)) ? regexType.test(item) : false;\n\t};\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .css extension.\n *\n * @function isFileCSS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileCSS, assert } from '@universalweb/acid';\n * assert(isFileCSS('test.css'), true);\n */\nexport const isFileCSS = regexTestFactory(/\\.css$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .html extension.\n *\n * @function isFileHTML\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileHTML, assert } from '@universalweb/acid';\n * assert(isFileHTML('test.html'), true);\n */\nexport const isFileHTML = regexTestFactory(/\\.html$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .js extension.\n *\n * @function isFileJS\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJS, assert } from '@universalweb/acid';\n * assert(isFileJS('test.js'), true);\n */\nexport const isFileJS = regexTestFactory(/\\.js$/);\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a .json extension.\n *\n * @function isFileJSON\n * @category file\n * @param {String} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFileJSON, assert } from '@universalweb/acid';\n * assert(isFileJSON('test.json'), true);\n */\nexport const isFileJSON = regexTestFactory(/\\.json$/);\n","/**\n * Creates a function that executes callable, only after being called n times.\n *\n * @function after\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls until method is invoked.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { after, assert } from '@universalweb/acid';\n * const onlyAfter = after(1, (item) => { return item;});\n * assert(onlyAfter(1), undefined);\n * assert(onlyAfter(2), 2);\n */\nexport function after(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyAfter = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point <= 0) {\n\t\t\tvalue = callable(...args);\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyAfter;\n}\n","/**\n * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.\n *\n * @function ary\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to cap arguments for.\n * @param {Number} amount - The arity cap.\n * @returns {Object} - Returns the new capped function.\n *\n * @example\n * import { ary, assert } from '@universalweb/acid';\n * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);\n */\nexport function ary(callable, amount) {\n\treturn (...args) => {\n\t\treturn callable(...args.splice(0, amount));\n\t};\n}\n\n","/**\n * Creates a function that executes callable, only before n times.\n *\n * @function before\n * @category function\n * @type {Function}\n * @param {Number} amount - The number of calls before n.\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * import { before, assert } from '@universalweb/acid';\n * const onlyBefore = before(3, () => { return 1;});\n * assert(onlyBefore(1), 1);\n */\nexport function before(amount, callable) {\n\tlet point = amount;\n\tlet value;\n\tconst onlyBefore = (...args) => {\n\t\tif (point !== null) {\n\t\t\tpoint--;\n\t\t}\n\t\tif (point >= 1) {\n\t\t\tvalue = callable(...args);\n\t\t} else {\n\t\t\tpoint = null;\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyBefore;\n}\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Asynchronously iterates through the given object.\n *\n * @function eachAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.\n * @param {*} thisCall - Iteratee called with thisCall as this.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns source.\n *\n * @example\n * import { eachAsyncObject, assert } from '@universalweb/acid';\n * const tempList = [];\n * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => {\n * tempList[key] = item;\n * });\n * assert(tempList, {a: 1, b: 2, c: 3});\n */\nexport const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\tawait eachAsyncArray(objectKeys, (key, index, array, propertyCount) => {\n\t\t\treturn iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn source;\n};\n\n","import { eachArray } from '../arrays/each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object.\n *\n * @function eachObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - Returns the calling object.\n *\n * @example\n * import { eachObject, assert } from '@universalweb/acid';\n * assert(eachObject({a: 1, b: 2, c: 3}, (item) => {\n * console.log(item);\n * }), {a: 1, b: 2, c: 3});\n */\nexport function eachObject(source, iteratee, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\tif (hasValue(thisCall)) {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t} else {\n\t\teachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => {\n\t\t\titeratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg);\n\t\t});\n\t}\n\treturn source;\n}\n\n","export async function forEachAsync(source, callback) {\n\tconst values = [];\n\tconst properties = [];\n\tlet valuesLength = 0;\n\tsource.forEach((item, key) => {\n\t\tvalues[valuesLength] = item;\n\t\tproperties[valuesLength] = item;\n\t\tvaluesLength++;\n\t});\n\tfor (let index = 0; index < valuesLength; index++) {\n\t\tawait callback(values[index], properties[index]);\n\t}\n\treturn source;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object(s) is a Set.\n *\n * @function isSet\n * @category type\n * @param {...*} sources - Objects to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSet, assert } from '@universalweb/acid';\n * assert(isSet(new Set()), true);\n */\nexport const isSetCall = isConstructorNameFactory('Set');\nexport const isSet = isTypeFactory(isSetCall);\n","import { isSet } from '../types/isSet.js';\nexport function forOf(source, iteratee) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\titeratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tfor (const [\n\t\tkey,\n\t\tvalue\n\t] of source) {\n\t\titeratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isGenerator\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isGenerator } from '@universalweb/acid';\n * isGenerator(function* (){});\n * // => true\n */\nexport const isGeneratorCall = isConstructorNameFactory('GeneratorFunction');\nexport const isGenerator = isTypeFactory(isGeneratorCall);\n","import { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nexport async function forOfAsync(source, iteratee, generatorArgs) {\n\tif (isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tawait iteratee(value, source);\n\t\t}\n\t\treturn source;\n\t}\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tawait iteratee(item, source);\n\t\t}\n\t}\n\tfor (const [key, value] of source) {\n\t\tawait iteratee(value, key, source);\n\t}\n\treturn source;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object is an async function.\n *\n * @function isAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isAsync, assert } from '@universalweb/acid';\n * assert(isAsync(async() => {}), true);\n */\nexport const isAsyncCall = isConstructorNameFactory('AsyncFunction');\nexport const isAsync = isTypeFactory(isAsyncCall);\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isAsync } from '../types/isAsync.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) {\n\treturn (source, iteratee, argument1, argument2, argument3) => {\n\t\tlet returned;\n\t\tconst isIterateeAsync = isAsync(iteratee);\n\t\tif (!hasValue(source) || !iteratee) {\n\t\t\treturn;\n\t\t} else if (isArray(source)) {\n\t\t\treturned = isIterateeAsync ? arrayLoopAsync : arrayLoop;\n\t\t} else if (isPlainObject(source) || isFunction(source)) {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t} else if (forOfLoop) {\n\t\t\treturned = isIterateeAsync ? forOfLoopAsync : forOfLoop;\n\t\t} else if (isGenerator(source)) {\n\t\t\treturned = forOfLoopAsync;\n\t\t} else {\n\t\t\treturned = isIterateeAsync ? objectLoopAsync : objectLoop;\n\t\t}\n\t\treturn returned(source, iteratee, argument1, argument2, argument3);\n\t};\n}\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachAsyncObject } from '../objects/eachAsync.js';\nimport { eachObject } from '../objects/each.js';\nimport { forEach } from './forEach.js';\nimport { forEachAsync } from './forEachAsync.js';\nimport { forOf } from './forOf.js';\nimport { forOfAsync } from './forOfAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object.\n *\n * @function each\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - The originally given object.\n *\n * @example\n * import { each, assert } from '@universalweb/acid';\n * const list = {};\n * each({a: 1, b: 2, c: 3}, (item, key) => {\n * list[key] = item;\n * });\n * assert(list, {a: 1, b: 2, c: 3});\n */\nexport const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync);\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { each } from '../utilities/each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport class Chain {\n\tconstructor(methods) {\n\t\tthis.addChainMethod(methods);\n\t}\n\taddChainMethod(methods) {\n\t\tconst thisChain = this;\n\t\teach(methods, (method, methodName) => {\n\t\t\tthisChain[methodName] = function(...args) {\n\t\t\t\tthis.value = method.call(thisChain, thisChain.value, ...args);\n\t\t\t\treturn thisChain;\n\t\t\t};\n\t\t});\n\t}\n\tsetValue(value) {\n\t\tthis.value = value;\n\t\treturn this;\n\t}\n\tdone() {\n\t\tconst value = this.value;\n\t\tthis.value = null;\n\t\treturn value;\n\t}\n\tvalue = null;\n}\n/**\n * Creates a chainable set of functions.\n *\n * @function chain\n * @category function\n * @type {Function}\n * @param {Array|Object} config - The object to take methods from.\n * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *\n * @example\n * import { chain, assert } from '@universalweb/acid';\n * const chained = chain({\n * \ta(value, c) {\n * \t\treturn value + c;\n * \t}\n * }).setValue(2).a(1).done();\n * assert(chained, 3);\n */\nexport function chain(config) {\n\treturn construct(Chain, [config]);\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.\n *\n * @function curry\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curry, assert } from '@universalweb/acid';\n * const result = curry((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [1, 2, 3]);\n */\nexport function curry(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.push(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n\n","import { clearArray } from '../arrays/clear.js';\n/**\n * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.\n *\n * @function curryRight\n * @type {Function}\n * @param {Function} callable - The function to curry.\n * @param {Number} arity - The arity of method.\n * @returns {*} - Returns the new curried function.\n *\n * @example\n * import { curryRight, assert } from '@universalweb/acid';\n * const result = curryRight((a, b, c) => {\n * return [a, b, c];\n * })(1)(2)(3);\n * assert(result, [3, 2, 1]);\n */\nexport function curryRight(callable, arity = callable.length) {\n\tconst curries = [];\n\tconst curried = (...curryArgs) => {\n\t\tcurries.unshift(...curryArgs);\n\t\tif (curries.length === arity) {\n\t\t\tconst result = callable(...curries);\n\t\t\tclearArray(curries);\n\t\t\treturn result;\n\t\t}\n\t\treturn curried;\n\t};\n\treturn curried;\n}\n","/**\n * This method returns undefined.\n *\n * @function noop\n * @category function\n * @type {Function}\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { noop, assert } from '@universalweb/acid';\n * assert(noop(), undefined);\n */\nexport function noop() {\n\treturn;\n}\n\n","/**\n * Iterates based on the amount given invoking the iteratee with the current index as an argument.\n *\n * @function times\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { times } from '@universalweb/acid';\n * times(3, (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport function times(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\titeratee(index);\n\t}\n}\n/**\n * Iterates based on the amount given and maps the results returned by the iteratee each time to an array.\n *\n * @function timesMap\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMap } from '@universalweb/acid';\n * timesMap(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport function timesMap(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = iteratee(amount);\n\t}\n\treturn results;\n}\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Timers {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a timer that was created using the timer function.\n\t *\n\t * @param {Number} id - The id of the timer to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * import { timer, assert } from '@universalweb/acid';\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearTimeout(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a timer and add it to the list of timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setTimeout(() => {\n\t\t\tcallable();\n\t\t\tcurrentThis.remove(id);\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active timers.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { timers, assert } from '@universalweb/acid';\n\t * timers.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const timers = construct(Timers);\n/**\n * Timer wrapper.\n *\n * @function timer\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setTimeoutId ID.\n *\n * @example\n * import { timer, assert } from '@universalweb/acid';\n * timer(() => {}, 100);\n * // => 0\n */\nexport function timer(callable, time) {\n\treturn timers.set(callable, time);\n}\n/**\n * Clear all active timers.\n *\n * @function clearTimers\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * import { clearTimers, assert } from '@universalweb/acid';\n * clearTimers();\n * // => undefined\n */\nexport function clearTimers() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\ttimers.remove(index);\n\t});\n}\n","const applyNative = Reflect.apply;\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\n/**\n * Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.\n *\n * @function apply\n * @category function\n * @param {Function} target - The target function to call.\n * @param {*} thisArgument - Array like object.\n * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called.\n * @returns {*} - The result of calling the given target function with the specified this value and arguments.\n *\n * @example\n * import { apply, assert } from '@universalweb/acid';\n * assert(apply(function (a) {return a;}, undefined, [2]), 2);\n */\nexport function apply(target, thisArgument, argumentsList) {\n\tif (isFunction(target)) {\n\t\treturn applyNative(target, thisArgument, argumentsList);\n\t}\n}\n","import { timer, timers } from '../utilities/timer.js';\nimport { apply } from '../internal/apply.js';\n/**\n * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.\n *\n * @function debounce\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function} - The debounced function.\n *\n * @example\n * import { debounce, promise, assert } from '@universalweb/acid';\n * const promised = promise((a) => {\n * \t\tconst debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0);\n * });\n * assert(await promised(), 'debounced');\n */\nexport function debounce(callable, time) {\n\tfunction debounced(...args) {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t}\n\t\tdebounced.id = timer(() => {\n\t\t\tdebounced.callable(...args);\n\t\t\tdebounced.id = false;\n\t\t}, time);\n\t}\n\tdebounced.id = false;\n\tdebounced.callable = callable.bind(debounced);\n\tdebounced.clear = () => {\n\t\tif (debounced.id !== false) {\n\t\t\ttimers.remove(debounced.id);\n\t\t\tdebounced.id = false;\n\t\t}\n\t};\n\treturn debounced;\n}\n","import { isFunction } from '../types/isFunction.js';\n/**\n * Checks if the given method is a function. If it is then it invokes it with the given arguments.\n *\n * @function ifInvoke\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked if possible.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to the function.\n * @returns {*} - Returns the method invoked or undefined.\n *\n * @example\n * import { ifInvoke, assert } from '@universalweb/acid';\n * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);\n */\nexport function ifInvoke(callable, thisBind, ...args) {\n\tif (isFunction(callable)) {\n\t\tif (thisBind) {\n\t\t\treturn callable.call(thisBind, ...args);\n\t\t}\n\t\treturn callable(...args);\n\t}\n}\n\n","/**\n * Creates a function that negates the result of the predicate callable.\n *\n * @function negate\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @returns {*} - Returns the given methods result.\n *\n * @example\n * negate(() => { return false;})();\n * // => true\n */\nexport function negate(callable) {\n\treturn (...args) => {\n\t\treturn !callable(...args);\n\t};\n}\n\n","/**\n * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.\n *\n * @function nthArg\n * @category function\n * @type {Function}\n * @param {Number} [index = 0] - The index of the argument to return.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * nthArg(1)('a', 'b');\n * // => 'b'\n */\nexport function nthArg(index = 0) {\n\treturn (...args) => {\n\t\treturn args[index];\n\t};\n}\n\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.\n *\n * @function once\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be called.\n * @returns {Function} - Returns the new pass-thru function.\n *\n * @example\n * const onceOnly = once((item) => { return item;});\n * onceOnly(5);\n * onceOnly(3);\n * // => 5\n */\nexport const once = (callable) => {\n\tlet value;\n\tconst onlyOnce = (...args) => {\n\t\tif (!hasValue(value)) {\n\t\t\tvalue = callable(...args);\n\t\t}\n\t\treturn value;\n\t};\n\treturn onlyOnce;\n};\n","/**\n * Returns the constructor of an object.\n *\n * @function getType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getType, assert } from '@universalweb/acid';\n * assert(getType(1), true);\n */\nexport function getType(source) {\n\treturn source?.constructor;\n}\n","import { construct } from '../classes/construct.js';\nimport { getType } from './getType.js';\n/**\n * Returns a new empty object of the same type.\n *\n * @function cloneType\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { cloneType, assert } from '@universalweb/acid';\n * assert(cloneType([1]), []);\n */\nexport function cloneType(source, args = []) {\n\tconst sourceType = getType(source);\n\tif (sourceType === Function) {\n\t\tif (sourceType.name === 'function') {\n\t\t\treturn function() {};\n\t\t}\n\t}\n\treturn construct(sourceType, args);\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * });\n * // => {b: 2, c: 3}\n */\nexport function forOfMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { forOfCompactMapAsync, assert } from '@universalweb/acid';\n * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tresultsGenerator.push(await iteratee(item, resultsGenerator, source));\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tmethodPushBound(result);\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (methodSet) {\n\t\t\tresults.set(key, result);\n\t\t} else {\n\t\t\tresults[key] = result;\n\t\t}\n\t}\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObjectAsync\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapAsyncObject, assert } from '@universalweb/acid';\n * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport async function mapAsyncObject(source, iteratee, results = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tawait eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => {\n\t\tresults[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys);\n\t});\n\treturn results;\n}\n\n","import { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\n/**\n * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.\n *\n * @function mapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Object|Function|undefined} - An object of the same calling object's type.\n *\n * @example\n * import { mapObject, assert } from '@universalweb/acid';\n * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, b: undefined, c: 3});\n */\nexport function mapObject(source, iteratee, results = {}, thisCall, additionalArg) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (hasValue(thisCall)) {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t} else {\n\t\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\t\tresults[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg);\n\t\t});\n\t}\n\treturn results;\n}\n","import { forOfMap } from './forOfMap.js';\nimport { forOfMapAsync } from './forOfMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\nimport { mapArray } from '../arrays/map.js';\nimport { mapAsyncArray } from '../arrays/mapAsync.js';\nimport { mapAsyncObject } from '../objects/mapAsync.js';\nimport { mapObject } from '../objects/map.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.\n *\n * @function map\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @param {*} thisCall - An object to be given each time to the iteratee.\n * @param {*} additionalArg - An object to be given each time to the iteratee.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { map, assert } from '@universalweb/acid';\n * assert(map({a: 1, b: 2, c: 3}, (item) => {\n * return item * 2;\n * }), {a: 2, b: 4, c: 6});\n */\nexport const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync);\n\n","import { map } from '../utilities/map.js';\n/**\n * Creates a function that invokes iteratee with the arguments it receives and returns their results.\n *\n * @function over\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} iteratees - The list of functions to loop through.\n * @returns {Function} - Returns the new over wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n */\nexport function over(iteratees) {\n\treturn (...args) => {\n\t\treturn map(iteratees, (item) => {\n\t\t\treturn item(...args);\n\t\t});\n\t};\n}\n","import { each } from '../utilities/each.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyAsyncObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyAsyncObject, assert } from '@universalweb/acid';\n * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport async function everyAsyncObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyAsyncArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { everyArray } from '../arrays/every.js';\nimport { keys } from './keys.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function everyObject\n * @category object\n * @type {Function}\n * @param {Object} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { everyObject, assert } from '@universalweb/acid';\n * const result = everyObject({a: true, b: true, c: true}, (item) => {\n * return item;\n * });\n * assert(result, true);\n */\nexport function everyObject(source, iteratee) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tconst objectKeys = keys(source);\n\treturn everyArray(objectKeys, (key, index, original, propertyCount) => {\n\t\treturn iteratee(source[key], key, source, propertyCount, original);\n\t});\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEvery\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEvery({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport function forOfEvery(source, iteratee = returnValue) {\n\tif (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.\n *\n * @function forOfEveryAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else if (isArray(source) || isSet(source)) {\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, source);\n\t\t\tif (result === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n","import { everyArray } from '../arrays/every.js';\nimport { everyAsyncArray } from '../arrays/everyAsync.js';\nimport { everyAsyncObject } from '../objects/everyAsync.js';\nimport { everyObject } from '../objects/every.js';\nimport { forOfEvery } from './forOfEvery.js';\nimport { forOfEveryAsync } from './forOfEveryAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the given object while the iteratee returns true.\n *\n * @function every\n * @category utility\n * @type {Function}\n * @param {Object | Array | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length.\n * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *\n * @example\n * import { every, assert } from '@universalweb/acid';\n * assert(every({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), false);\n */\nexport const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync);\n","import { every } from '../utilities/every.js';\n/**\n * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.\n *\n * @function overEvery\n * @category function\n * @type {Function}\n * @param {(Array.|Object.)} predicates - The list of functions to loop through.\n * @returns {Function} - Returns the new overEvery wrapped function.\n *\n * @example\n * import { overEvery, assert } from '@universalweb/acid';\n * assert(overEvery([Boolean, isFinite])('1'), true);\n */\nexport function overEvery(predicates) {\n\treturn (arg) => {\n\t\treturn every(predicates, (predicate) => {\n\t\t\treturn predicate(arg);\n\t\t});\n\t};\n}\n\n","/**\n * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.\n *\n * @function reArg\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Array} indexes - The arranged argument indexes.\n * @returns {Function} - Returns the new function.\n *\n * @example\n * reArg((a, b, c) => {\n * return [a, b, c];\n * }, [1,2,0])(1,2,3);\n * // => [2, 3, 1]\n */\nexport function reArg(callable, indexes) {\n\treturn (...args) => {\n\t\treturn callable(...indexes.map((item) => {\n\t\t\treturn args[item];\n\t\t}));\n\t};\n}\n\n","import { timer, timers } from '../utilities/timer.js';\n/**\n * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.\n *\n * @function throttle\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Function|undefined} - The throttled function.\n *\n * @example\n * const throttled = throttle(() => { console.log('throttle'); }, 0)();\n * throttled();\n * // 'throttle'\n */\nexport function throttle(callable, time) {\n\tfunction throttled(...args) {\n\t\tif (throttled.id) {\n\t\t\tthrottled.shouldThrottle = true;\n\t\t\treturn;\n\t\t}\n\t\tthrottled.callable(...args);\n\t\tthrottled.id = timer(() => {\n\t\t\tif (throttled.shouldThrottle) {\n\t\t\t\tthrottled.callable(...args);\n\t\t\t}\n\t\t\tthrottled.id = false;\n\t\t}, time);\n\t}\n\tthrottled.id = false;\n\tthrottled.callable = callable.bind(throttled);\n\tthrottled.clear = () => {\n\t\ttimers.remove(throttled.id);\n\t\tthrottled.id = false;\n\t};\n\treturn throttled;\n}\n\n","/**\n * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.\n *\n * @function wrap\n * @category function\n * @type {Function}\n * @param {*} value - The value to wrap.\n * @param {Function} wrapper - The wrapper function.\n * @returns {Function} - The new function.\n *\n * @example\n * wrap('Lucy', (firstName, lastName) => {\n * return `My name is ${firstName} ${lastName}.`;\n * })('Diamonds');\n * // => 'My name is Lucy Diamonds.'\n */\nexport function wrap(value, wrapper) {\n\treturn (...arg) => {\n\t\treturn wrapper(value, ...arg);\n\t};\n}\n\n","const functionPrototype = Function.prototype;\n/**\n * Caches a prototype method.\n *\n * @function cacheNativeMethod\n * @category utility\n * @type {Function}\n * @param {Function} method - Prototype method.\n * @returns {Function} - Cached method.\n *\n * @example\n * import { cacheNativeMethod, assert } from '@universalweb/acid';\n * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n */\nexport function cacheNativeMethod(method) {\n\treturn functionPrototype.call.bind(method);\n}\n\n","import { cacheNativeMethod } from '../utilities/cacheNativeMethod.js';\n/**\n * Returns an array of all properties (enumerable or not) found directly upon a given object.\n *\n * @function getPropNames\n * @category object\n * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned.\n * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *\n * @example\n * import { getPropNames, assert } from '@universalweb/acid';\n * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);\n */\nexport const getPropNames = Object.getOwnPropertyNames;\n/**\n * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.\n *\n * @function getPropDesc\n * @category object\n * @param {Object} target - The target object.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *\n * @example\n * getPropDesc({ bar: 42 }, 'bar');\n * // => { configurable: true, enumerable: true, value: 42, writable: true }\n */\nexport const getPropDesc = Object.getOwnPropertyDescriptor;\n/**\n * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.\n *\n * @function defProp\n * @category object\n * @param {Object} target - The object on which to define the property.\n * @param {String} property - The name of the property whose description is to be retrieved.\n * @param {Object} descriptor - The descriptor for the property being defined or modified.\n * @returns {Object} - The object that was passed to the function.\n *\n * @example\n * defProp({}, 'key', {\n * enumerable: false,\n * configurable: false,\n * writable: false,\n * value: 'static'\n * }).key;\n * // => 'static'\n */\nexport const defProp = Object.defineProperty;\nexport const hasProp = cacheNativeMethod(Object.hasOwnProperty);\n","import { getPropNames } from './object.js';\n/**\n * Determines whether two values are the same value.\n *\n * @function isSame\n * @category object\n * @param {*} source - Value to compare to.\n * @param {*} target - A value to compare.\n * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *\n * @example\n * import { isSame, assert } from '@universalweb/acid';\n * assert(isSame('foo', 'foo'), true);\n */\nexport const isSame = Object.is;\n","/**\n * Adds two numbers.\n *\n * @function add\n * @category math\n * @type {Function}\n * @param {Number} augend - First number.\n * @param {Number} addend - Second number which is being added to another (augend).\n * @returns {Number} - Returns the sum of the arguments.\n *\n * @example\n * import { add, assert } from '@universalweb/acid';\n * assert(add(1, 1), 2);\n */\nexport function add(augend, addend) {\n\treturn augend + addend;\n}\n","/**\n * Decrements a number.\n *\n * @function deduct\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns a decremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * deduct(10);\n * // => 9\n */\nexport function deduct(source) {\n\treturn source - 1;\n}\n","/**\n * Divides two numbers.\n *\n * @function divide\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the quotient of the arguments.\n *\n * @example\n * import { divide, assert } from '@universalweb/acid';\n * assert(divide(10, 5), 2);\n */\nexport function divide(source, value) {\n\treturn source / value;\n}\n","/**\n * Increments a number.\n *\n * @function increment\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @returns {Number} - Returns an incremented version of the number.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * increment(10);\n * // => 11\n */\nexport function increment(source) {\n\treturn source + 1;\n}\n","/**\n * Multiplies two numbers.\n *\n * @function multiply\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the product of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n */\nexport function multiply(source, value) {\n\treturn source * value;\n}\n","/**\n * Calculate the progress from a given total and current amount.\n *\n * @function calcProgress\n * @category utility\n * @type {Function}\n * @param {Number} total - The total amount.\n * @param {Number} currentAmount - The current amount.\n * @returns {Number} - The progress as a percentage.\n *\n * @example\n * import { calcProgress, assert } from '@universalweb/acid';\n * assert(calcProgress(100, 1), 1);\n */\nexport function calcProgress(total, currentAmount) {\n\tif (total === 0) {\n\t\treturn false;\n\t}\n\tif (currentAmount === 0) {\n\t\treturn 0;\n\t}\n\treturn (currentAmount / total) * 100;\n}\n\n","const { random } = Math;\n/**\n * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..\n *\n * @function randomFloat\n * @category math\n * @type {Function}\n * @param {Number} max - Establishes highest possible value for the random number.\n * @param {Number} [min = 0] - Establishes lowest possible value for the random number.\n * @returns {Number} - Returns random integer between the max and min range.\n *\n * @example\n * import { randomFloat, assert } from '@universalweb/acid';\n * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;});\n * // => 9.1\n */\nexport function randomFloat(max, min = 0) {\n\treturn random() * (max - min) + min;\n}\n","/**\n * Extracts the remainder between two numbers.\n *\n * @function remainder\n * @category math\n * @type {Function}\n * @param {Number} source - First number.\n * @param {Number} value - Second number.\n * @returns {Number} - Returns the remainder of the arguments.\n *\n * @example\n * import { multiply, assert } from '@universalweb/acid';\n * assert(multiply(10, 5), 50);\n * remainder(10, 6);\n * // => 4\n */\nexport function remainder(source, value) {\n\treturn source % value;\n}\n","/**\n * Subtract all numbers in the array starting from left to right & return the difference.\n *\n * @function subtractAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns the final difference.\n *\n * @example\n * import { subtractAll, assert } from '@universalweb/acid';\n * assert(subtractAll([10, 1, 2, 3]), 5);\n */\nexport function subtractAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a - b;\n\t}, 0);\n}\n\n","/**\n * Sum all numbers in a given array.\n *\n * @function sumAll\n * @category math\n * @type {Function}\n * @param {Number[]} source - Array of numbers.\n * @returns {Number} - Returns a single number.\n *\n * @example\n * import { sumAll, assert } from '@universalweb/acid';\n * assert(sumAll([10, 1, 2, 3]), 5);\n */\nexport function sumAll(source) {\n\treturn source.reduce((a, b) => {\n\t\treturn a + b;\n\t}, 0);\n}\n\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberInRange, assert } from '@universalweb/acid';\n * assert(isNumberInRange(1, 0, 2), true);\n * assert(isNumberInRange(1, 2, 5), false);\n */\nexport function isNumberInRange(source, start, end) {\n\treturn source > start && source < end;\n}\n","/**\n * Checks if a number is within a range.\n *\n * @function isNumberNotInRange\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @param {Number} start - Beginning of range.\n * @param {Number} end - End of range.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isNumberNotInRange, assert } from '@universalweb/acid';\n * assert(isNumberNotInRange(1, 0, 2), false);\n * assert(isNumberNotInRange(1, 2, 5), true);\n */\nexport function isNumberNotInRange(source, start, end) {\n\treturn source < start || source > end;\n}\n","/**\n * Checks if a number is negative & returns true or false.\n *\n * @function isPositive\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isPositive, assert } from '@universalweb/acid';\n * assert(isPositive(1), true);\n */\nconst { sign } = Math;\nexport function isPositive(source) {\n\treturn sign(source) === 1;\n}\n","/**\n * Strictly checks if a number is zero.\n *\n * @function isZero\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isZero, assert } from '@universalweb/acid';\n * assert(isZero(0), true);\n */\nexport function isZero(source) {\n\treturn source === 0;\n}\nexport { isZero as equalsZero };\n","/**\n * Checks if a number is odd & returns true or false.\n *\n * @function isOdd\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isOdd, assert } from '@universalweb/acid';\n * assert(isOdd(1), true);\n */\nexport function isOdd(source) {\n\treturn (source & 1) === 1;\n}\n","/**\n * Checks if a number is even & returns true or false.\n *\n * @function isEven\n * @category number\n * @type {Function}\n * @param {Number} source - Number to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEven, assert } from '@universalweb/acid';\n * assert(isEven(1), true);\n */\nexport function isEven(source) {\n\treturn (source & 1) === 0;\n}\n\n","import { hasValue } from '../types/hasValue.js';\nexport const objectEntries = Object.entries;\n/**\n * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.\n *\n * @function getEntries\n * @category object\n * @param {Object} source - The source object.\n * @returns {Array|undefined} - Returns the Object.entries of the source object.\n *\n * @example\n * import { getEntries, assert } from '@universalweb/acid';\n * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);\n */\nexport function getEntries(source) {\n\tif (hasValue(source)) {\n\t\treturn objectEntries(source);\n\t}\n}\n","import { assign } from './assign.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Extracts all keys from an object whose values are not null or undefined.\n *\n * @function compactKeys\n * @category object\n * @type {Function}\n * @param {Object} object - Object from which keys are extracted.\n * @returns {Array} - Returns an array of key values.\n *\n * @example\n * import { compactKeys, assert } from '@universalweb/acid';\n * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);\n */\nexport function compactKeys(object) {\n\tconst compactedKeys = [];\n\teachObject(object, (item, key) => {\n\t\tif (hasValue(item)) {\n\t\t\tcompactedKeys.push(key);\n\t\t}\n\t});\n\treturn compactedKeys;\n}\n\n","import { eachAsyncObject } from './eachAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapAsyncObject, assert } from '@universalweb/acid';\n * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = await iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { compactMapAsyncObject } from './compactMapAsync.js';\nimport { eachObject } from './each.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { mapAsyncObject } from './mapAsync.js';\nimport { returnValue } from '../utilities/returnValue.js';\n/**\n * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMapObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { compactMapObject, assert } from '@universalweb/acid';\n * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => {\n * return item;\n * }), {a: 1, c: 3});\n */\nexport function compactMapObject(source, iteratee = returnValue, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tconst result = iteratee(item, key, results, original, propertyCount, objectKeys);\n\t\tif (hasValue(result)) {\n\t\t\tresults[key] = result;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport function filterObject(source, iteratee, results = {}) {\n\teachObject(source, (item, key, original, propertyCount, objectKeys) => {\n\t\tif (iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachAsyncObject } from './eachAsync.js';\n/**\n * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.\n *\n * @function filterAsyncObject\n * @category object\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function} [results = {}] - Object that will be used to assign results.\n * @returns {Object|Function} - An object with properties that passed the test.\n *\n * @example\n * filterAsyncObject({a: false, b: true, c: true}, (item) => {\n * return item;\n * });\n * // => {b: true, c: true}\n */\nexport async function filterAsyncObject(source, iteratee, results = {}) {\n\tawait eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => {\n\t\tif (await iteratee(item, key, results, original, propertyCount, objectKeys) === true) {\n\t\t\tresults[key] = item;\n\t\t}\n\t});\n\treturn results;\n}\n","import { eachObject } from './each.js';\nimport { hasAnyKeys } from './hasKeys.js';\n/**\n * Creates an inverted version of a given object by switching it's keys and values.\n *\n * @function invert\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be inverted.\n * @param {Array} [target = {}] - Empty object to be populated with inverted values from source.\n * @returns {Object|undefined} - Returns object with keys and values switched.\n *\n * @example\n * import { invert, assert } from '@universalweb/acid';\n * assert(invert({a:1}), {1:'a'});\n */\nexport function invert(source, target = {}) {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachObject(source, (item, key) => {\n\t\ttarget[item] = key;\n\t});\n\treturn target;\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isMatchArray } from '../arrays/isMatch.js';\nimport { keys } from './keys.js';\n/**\n * Performs a shallow strict comparison between two objects.\n *\n * @function isMatchObject\n * @type {Function}\n * @category object\n * @param {Object} source - Source object.\n * @param {Object} target - Object to compare to source.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { assert, isMatchObject } from '@universalweb/acid';\n * assert(isMatchObject({a: 1}, {a: 1}), true);\n */\nexport const isMatchObject = (source, target) => {\n\tif (source === target) {\n\t\treturn true;\n\t}\n\tconst sourceKeys = keys(source);\n\tconst targetKeys = keys(target);\n\tif (sourceKeys.length === targetKeys.length) {\n\t\treturn everyArray(sourceKeys, (key) => {\n\t\t\treturn source[key] === target[key];\n\t\t});\n\t}\n\treturn false;\n};\n\n","/**\n * Returns a regex safe special characters escaped version of a string.\n *\n * @function regexSafe\n * @category regex\n * @type {Function}\n * @param {Object} source - String to make safe.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { regexSafe, assert } from '@universalweb/acid';\n * assert(regexSafe(/.+/), '\\/\\.\\+\\/');\n */\nexport const escapeRegexRegex = /[()[\\]{}*+?^$|#.,/\\\\\\s-]/g;\nexport function escapeRegex(source) {\n\treturn source.replace(escapeRegexRegex, '\\\\$&');\n}\n","import { escapeRegex } from './escapeRegex.js';\nimport { mapArray } from '../arrays/map.js';\n/**\n * Convert array of strings to regex.\n *\n * @function arrayToRegex\n * @category regex\n * @type {Function}\n * @param {Object} source - Array of strings.\n * @returns {Object} - Returns a regex safe version of the string.\n *\n * @example\n * import { arrayToRegex, assert } from '@universalweb/acid';\n * assert(String(arrayToRegex(['a','b'])), String(/a|b/));\n */\nexport function arrayToRegex(source, makeSafe) {\n\tif (makeSafe) {\n\t\treturn arrayToRegex(mapArray(source, escapeRegex));\n\t}\n\treturn RegExp(source.join('|'));\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a RegExp.\n *\n * @function isRegex\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRegex, assert } from '@universalweb/acid';\n * assert(isRegex(/test/), true);\n */\nexport const isRegexCall = isConstructorNameFactory('RegExp');\nexport const isRegex = isTypeFactory(isRegexCall);\n","import { arrayToRegex } from '../regexps/arrayToRegex.js';\nimport { filterObject } from './filter.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { objectAssign } from './assign.js';\n/**\n * Returns a clone of the given object without the given properties.\n *\n * @function omit\n * @category object\n * @type {Function}\n * @param {Object} source - Object from which keys are extracted.\n * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object.\n * @returns {Object|undefined} - A new object with the removed.\n *\n * @example\n * import { omit, assert } from '@universalweb/acid';\n * assert(omit({a:1, b:2}, ['a']), {b:2});\n * assert(omit({a:1, b:2}, 'a'), {b:2});\n * assert(omit({1:'test', b:2}, 1), {b:2});\n */\nexport function omit(source, blacklist) {\n\tif (!source) {\n\t\treturn {};\n\t}\n\tif (isArray(blacklist)) {\n\t\tconst blacklistRegex = arrayToRegex(blacklist);\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklistRegex.test(key);\n\t\t});\n\t}\n\tif (isRegex(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist.test(key);\n\t\t});\n\t}\n\tif (isString(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== blacklist;\n\t\t});\n\t}\n\tif (isNumber(blacklist)) {\n\t\tconst numberToString = blacklist.toString();\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn key !== numberToString;\n\t\t});\n\t}\n\tif (isFunction(blacklist)) {\n\t\treturn filterObject(source, (item, key) => {\n\t\t\treturn !blacklist(item, key);\n\t\t});\n\t}\n\treturn objectAssign({}, source);\n}\n\n","import { eachArray } from '../arrays/each.js';\n/**\n * Returns a clone of the source object with the plucked properties.\n *\n * @function pick\n * @type {Function}\n * @category object\n * @param {Object} source - Object to be cloned.\n * @param {Array} whitelist - Array of property names used to determine what values to pluck.\n * @param {Object} [target = {}] - Object to be populated with plucked values.\n * @returns {Object|undefined} - A new object with plucked properties.\n *\n * @example\n * import { pick, assert } from '@universalweb/acid';\n * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});\n */\nexport const pick = (source, whitelist, target = {}) => {\n\tif (!source) {\n\t\treturn;\n\t}\n\teachArray(whitelist, (item) => {\n\t\ttarget[item] = source[item];\n\t});\n\treturn target;\n};\n\n","import { hasValue } from '../types/hasValue.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { keys } from './keys.js';\n/**\n * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.\n *\n * @function objectSize\n * @category object\n * @param {Object} source - The source object.\n * @returns {Number|undefined} - The amount of keys.\n *\n * @example\n * import { objectSize, assert } from '@universalweb/acid';\n * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);\n */\nexport function objectSize(source) {\n\tif (!source) {\n\t\treturn;\n\t}\n\tif (isPlainObject(source)) {\n\t\treturn keys(source).length;\n\t}\n\tconst objectLengthProperty = source.length;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectLengthProperty;\n\t}\n\tconst objectSizeProperty = source.size;\n\tif (hasValue(objectLengthProperty)) {\n\t\treturn objectSizeProperty;\n\t}\n\treturn keys(source).length;\n}\n","import { eachArray } from '../arrays/each.js';\nimport { eachObject } from './each.js';\n/**\n * Creates an object from two arrays, one of property identifiers and one of corresponding values.\n *\n * @function zipObject\n * @type {Function}\n * @category object\n * @param {Array} properties - The property identifiers.\n * @param {Array} values - The property values.\n * @returns {Object} - Returns the new object.\n *\n * @example\n * zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nexport const zipObject = (properties, values) => {\n\tconst source = {};\n\teachArray(properties, (item, key) => {\n\t\tsource[item] = values[key];\n\t});\n\treturn source;\n};\n/**\n * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.\n *\n * @function unZipObject\n * @type {Function}\n * @category object\n * @param {Object} object - The object to process.\n * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *\n * @example\n * unZipObject({ 'a': 1, 'b': 2 });\n * // => [['a', 'b'], [1, 2]]\n */\nexport const unZipObject = (object) => {\n\tconst objectKeys = [];\n\tconst objectValues = [];\n\teachObject(object, (item, key) => {\n\t\tobjectKeys.push(key);\n\t\tobjectValues.push(item);\n\t});\n\treturn [\n\t\tobjectKeys,\n\t\tobjectValues,\n\t];\n};\n\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into Camel case format.\n *\n * @function camelCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Camel case.\n * @returns {String} - Converted string in Camel case.\n *\n * @example\n * import { camelCase, assert } from '@universalweb/acid';\n * assert(camelCase('camel case'), 'camelCase');\n */\nexport function camelCase(source) {\n\tlet result = '';\n\tsource.replace(normalizeCase, ' ').trim()\n\t\t.split(' ')\n\t\t.forEach((item, index) => {\n\t\t\tif (index === 0) {\n\t\t\t\tresult += item.toLowerCase();\n\t\t\t} else {\n\t\t\t\tresult += item[0].toUpperCase() + item.slice(1).toLowerCase();\n\t\t\t}\n\t\t});\n\treturn result;\n}\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in Kebab case.\n *\n * @function kebabCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into Kebab case.\n * @returns {String} - Converted string in Kebab case.\n *\n * @example\n * import { kebabCase, assert } from '@universalweb/acid';\n * assert(kebabCase('kebab case'), 'kebab-case');\n */\nexport function kebabCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '-');\n}\n\n","const normalizeCase = /[ _-]+/g;\nconst space = /[ ]+/g;\n/**\n * Converts a string into single space sepperated words in snake case.\n *\n * @function snakeCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into snake case.\n * @returns {String} - Converted string in Snake case.\n *\n * @example\n * import { snakeCase, assert } from '@universalweb/acid';\n * assert(snakeCase('snake case'), 'snake_case');\n */\nexport function snakeCase(source) {\n\treturn source.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase()\n\t\t.replace(space, '_');\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in uppercase.\n *\n * @function upperCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { upperCase, assert } from '@universalweb/acid';\n * assert(upperCase('upper-case'), 'UPPER CASE');\n * assert(upperCase('upper_case'), 'UPPER CASE');\n */\nexport function upperCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toUpperCase();\n}\n","const normalizeCase = /[ _-]+/g;\n/**\n * Converts a string into single space sepperated words in lowerCase.\n *\n * @function lowerCase\n * @category string\n * @type {Function}\n * @param {String} source - String to be converted into upper case.\n * @returns {String} - Converted string in upper case.\n *\n * @example\n * import { lowerCase, assert } from '@universalweb/acid';\n * assert(lowerCase('lower-CASE'), 'lower case');\n */\nexport function lowerCase(source) {\n\treturn source\n\t\t.replace(/([A-Z]+)/g, ' $1')\n\t\t.replace(normalizeCase, ' ')\n\t\t.trim()\n\t\t.toLowerCase();\n}\n","/**\n * Inserts text into a string at a given position.\n *\n * @function insertInRange\n * @category string\n * @type {Function}\n * @param {String} string - String to insert the text into.\n * @param {Number} index - Point of insertion.\n * @param {String} text - The string to be inserted.\n * @returns {String} - The string with the text inserted at the given point.\n *\n * @example\n * import { insertInRange, assert } from '@universalweb/acid';\n * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');\n */\nexport function insertInRange(string, index, text) {\n\treturn string.slice(0, index) + text + string.slice(index, string.length);\n}\n/**\n * Plucks a letter using the index starting from the right.\n *\n * @function rightString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the letter from.\n * @param {Number} [index=1] - The starting position.\n * @returns {String} - A letter at the given index.\n *\n * @example\n * import { rightString, assert } from '@universalweb/acid';\n * assert(rightString('rightString'), 'g');\n * assert(rightString('rightString', 2), 'n');\n */\nexport function rightString(string, index = 1) {\n\treturn string[string.length - index];\n}\n/**\n * Splits up a string into chunks.\n *\n * @function chunkString\n * @category string\n * @type {Function}\n * @param {String} string - String to chunked.\n * @param {Number} [size] - The max string length per chunk.\n * @returns {Array} - An array with strings that are <= size parameter.\n *\n * @example\n * import { chunkString, assert } from '@universalweb/acid';\n * assert(chunkString('chunk', 2), ['ch', 'un', 'k']);\n */\nexport function chunkString(string, size) {\n\treturn string.match(new RegExp(`(.|[\\r\\n]){1,${size}}`, 'g'));\n}\n/**\n * Truncates everything before the index starting from the right.\n *\n * @function initialString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the initial letters from.\n * @param {Number} [index=1] - Starting point from the right.\n * @returns {String} - A string with the characters before the index starting from the right.\n *\n * @example\n * import { initialString, assert } from '@universalweb/acid';\n * assert(initialString('initialString', 2), 'initialStri');\n */\nexport function initialString(string, index = 1) {\n\treturn string.slice(0, index * -1);\n}\n/**\n * Truncates everything after a index.\n *\n * @function restString\n * @category string\n * @type {Function}\n * @param {String} string - String to extract the rest of the letters from.\n * @param {Number} [index=1] - Starting point.\n * @returns {String} - A string without the characters up-to to the index.\n *\n * @example\n * import { restString, assert } from '@universalweb/acid';\n * assert(restString('restString', 2), 'stString');\n */\nexport function restString(string, index = 1) {\n\treturn string.substring(index);\n}\n","/**\n * Replaces all occurrences of strings in an array with a value.\n *\n * @function replaceList\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @param {Array} words - Strings to replace.\n * @param {String} value - The match replacement.\n * @returns {String} - The string with the replacement.\n *\n * @example\n * import { replaceList, assert } from '@universalweb/acid';\n * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');\n */\nexport function replaceList(string, words, value) {\n\treturn string.replace(new RegExp(`\\\\b${words.join('|')}\\\\b`, 'gi'), value);\n}\n","const rawURLDecodeRegex = /%(?![\\da-f]{2})/gi;\nconst andRegex = /&/g;\nconst lessThanRegex = //g;\nconst doubleQuoteRegex = /\"/g;\n/**\n * Raw URL decoder.\n *\n * @function rawURLDecode\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Converted string into the decoded URI Component .\n *\n * @example\n * import { rawURLDecode, assert } from '@universalweb/acid';\n * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');\n */\nexport function rawURLDecode(string) {\n\treturn decodeURIComponent(string.replace(rawURLDecodeRegex, () => {\n\t\treturn '%25';\n\t}));\n}\n/**\n * Replaced sensitive characters with their matching html entity.\n *\n * @function htmlEntities\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { htmlEntities, assert } from '@universalweb/acid';\n * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function htmlEntities(string) {\n\treturn string.replace(andRegex, '&')\n\t\t.replace(lessThanRegex, '<')\n\t\t.replace(moreThanRegex, '>')\n\t\t.replace(doubleQuoteRegex, '"');\n}\n/**\n * Executes rawURLDecode followd by htmlEntities methods on a string.\n *\n * @function sanitize\n * @category string\n * @type {Function}\n * @param {String} string - String to be replaced.\n * @returns {String} - Replaced string.\n *\n * @example\n * import { sanitize, assert } from '@universalweb/acid';\n * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);\n */\nexport function sanitize(string) {\n\treturn htmlEntities(rawURLDecode(string));\n}\n\n","const tokenizeRegEx = /\\S+/g;\nconst wordsRegEx = /\\w+/g;\n/**\n * Break string by non-white space characters matches.\n *\n * @function tokenize\n * @type {Function}\n * @category string\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words without white space characters.\n *\n * @example\n * import { tokenize, assert } from '@universalweb/acid';\n * assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);\n */\nexport function tokenize(string) {\n\treturn string.match(tokenizeRegEx) || [];\n}\n/**\n * Break string into word matches.\n *\n * @function words\n * @type {Function}\n * @param {String} string - String to be broken up.\n * @returns {Array} - Array of words with word characters only.\n *\n * @example\n * import { words, assert } from '@universalweb/acid';\n * assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);\n */\nexport function words(string) {\n\treturn string.match(wordsRegEx) || [];\n}\n\n","const truncateDown = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = stringLength - maxLength;\n\tfor (; index < breakAllLength && index >= 0; index--) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.slice(0, index).trim();\n};\nconst truncateUp = (string, maxLength, stringLength) => {\n\tconst breakAll = string.split('');\n\tconst breakAllLength = breakAll.length;\n\tlet item;\n\tlet index = maxLength;\n\tfor (; index < breakAllLength && index > 0; index++) {\n\t\titem = breakAll[index];\n\t\tif (item === ' ') {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn string.substring(index, stringLength).trim();\n};\n/**\n * Truncates the string, accounting for word placement and character count.\n *\n * @function truncate\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncate, assert } from '@universalweb/acid';\n * assert(truncate('Where is Lucy?', 2), 'Where is');\n */\nexport function truncate(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateDown(string, maxLength, stringLength) : string;\n}\n/**\n * Truncates the string, accounting for word placement and character count from the right.\n *\n * @function truncateRight\n * @type {Function}\n * @category string\n * @param {String} string - String to be truncated.\n * @param {Number} maxLength - The desired max length of the string.\n * @returns {String} - The mutated string.\n *\n * @example\n * import { truncateRight, assert } from '@universalweb/acid';\n * assert(truncateRight('Where is Lucy?', 6), 'Lucy?');\n */\nexport function truncateRight(string, maxLength) {\n\tconst stringLength = string.length;\n\treturn (stringLength > maxLength) ? truncateUp(string, maxLength, stringLength) : string;\n}\n","import { restString } from './range.js';\nconst getWords = /\\w+/g;\n/**\n * Returns the first letter capitalized.\n *\n * @function upperFirstLetter\n * @type {Function}\n * @category string\n * @param {String} string - String to extract first letter from.\n * @returns {String} - An upper case letter.\n *\n * @example\n * import { upperFirstLetter, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n */\nexport function upperFirstLetter(string) {\n\treturn string[0].toUpperCase();\n}\n/**\n * Capitalizes the first letter.\n *\n * @function upperFirst\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirst, assert } from '@universalweb/acid';\n * assert(upperFirstLetter('upper'), 'U');\n * upperFirst('upper');\n * // => 'Upper'\n */\nexport function upperFirst(string) {\n\treturn upperFirstLetter(string) + restString(string);\n}\n/**\n * Capitalize first letter and lower case the rest.\n *\n * @function upperFirstOnly\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with first letter capitalized.\n *\n * @example\n * import { upperFirstOnly, assert } from '@universalweb/acid';\n * assert(upperFirstOnly('upper'), 'Upper');\n */\nexport function upperFirstOnly(string) {\n\treturn upperFirstLetter(string) + restString(string).toLowerCase();\n}\n/**\n * Capitalize all first letters.\n *\n * @function upperFirstAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstAll, assert } from '@universalweb/acid';\n * assert(upperFirstAll('uPPer'), 'UPPer');\n */\nexport function upperFirstAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirst(match);\n\t});\n}\n/**\n * Capitalize all first letters and lower case the rest.\n *\n * @function upperFirstOnlyAll\n * @type {Function}\n * @category string\n * @param {String} string - String to be mutated.\n * @returns {String} - String with all first letters capitalized.\n *\n * @example\n * import { upperFirstOnlyAll, assert } from '@universalweb/acid';\n * assert(upperFirstOnlyAll('this is'), 'This Is');\n */\nexport function upperFirstOnlyAll(string) {\n\treturn string.replace(getWords, (match) => {\n\t\treturn upperFirstOnly(match);\n\t});\n}\n","import { getType } from './getType.js';\n/**\n * Returns the constructor name of an object.\n *\n * @function getTypeName\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { getTypeName, assert } from '@universalweb/acid';\n * assert(getTypeName(1), true);\n */\nexport function getTypeName(source) {\n\treturn getType(source)?.name;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the value is an Arguments object.\n *\n * @function isArguments\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArguments, assert } from '@universalweb/acid';\n * assert(isArguments((function() { return arguments;})()), true);\n * assert(isArguments([]), false);\n */\nconst objectArguments = '[object Arguments]';\nexport function isArguments(source) {\n\treturn (hasValue(source)) ? source.toString() === objectArguments : false;\n}\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Map.\n *\n * @function isMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isMap } from '@universalweb/acid';\n * isMap(new Map());\n * // => true\n */\nexport const isMapCall = isConstructorNameFactory('Map');\nexport const isMap = isTypeFactory(isMapCall);\n","import { getTypeName } from './getTypeName.js';\n/**\n * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.\n *\n * @function isTypedArray\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isTypedArray, assert } from '@universalweb/acid';\n * assert(isTypedArray([]), false);\n * assert(isTypedArray(new Int8Array()), true);\n */\nconst typedArrayRegex = /Array/;\nconst arrayConstructorName = 'Array';\nexport function isTypedArray(source) {\n\tif (source) {\n\t\tconst constructorName = getTypeName(source);\n\t\tif (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object is null or undefined.\n *\n * @function noValue\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { noValue, assert } from '@universalweb/acid';\n * assert(noValue(null), true);\n * assert(noValue(undefined), true);\n * assert(noValue(1), false);\n * assert(noValue(0), false);\n */\nexport function noValue(source) {\n\treturn !hasValue(source);\n}\n","import { every } from '../utilities/every.js';\nimport { hasProp } from '../internal/object.js';\nimport { isArray } from './isArray.js';\nimport { isFunction } from './isFunction.js';\nimport { isMap } from './isMap.js';\nimport { isNumber } from './isNumber.js';\nimport { isTypedArray } from './isTypedArray.js';\nimport { keys } from '../objects/keys.js';\nimport { noValue } from './noValue.js';\n/**\n * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.\n *\n * @function isArrayLike\n * @category type\n * @param {*} source - Object to be checked.\n * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayLike, assert } from '@universalweb/acid';\n * assert(isArrayLike([]), true);\n * assert(isArrayLike(2), false);\n */\nexport function isArrayLike(source, strictFlag) {\n\tif (noValue(source) || isFunction(source)) {\n\t\treturn false;\n\t}\n\tif (isArray(source) || isTypedArray(source)) {\n\t\treturn true;\n\t}\n\tconst sourceLength = source.length;\n\tif (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) {\n\t\treturn false;\n\t}\n\tif (strictFlag) {\n\t\tconst indexes = keys(source);\n\t\tif (indexes) {\n\t\t\treturn every(indexes, (value, index) => {\n\t\t\t\treturn index >= 0 && isNumber(index);\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a BigInt.\n *\n * @function isBigInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBigInt, assert } from '@universalweb/acid';\n * assert(isBigInt(BigInt(123)), true);\n */\nexport const isBigIntCall = isConstructorNameFactory('BigInt');\nexport const isBigInt = isTypeFactory(isBigIntCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Boolean.\n *\n * @function isBoolean\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isBoolean } from '@universalweb/acid';\n * isBoolean(true);\n * // => true\n */\nexport const isBooleanCall = isConstructorNameFactory('Boolean');\nexport const isBoolean = isTypeFactory(isBooleanCall);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a ArrayBuffer.\n *\n * @function isArrayBuffer\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isArrayBuffer, assert } from '@universalweb/acid';\n * assert(isArrayBuffer(new ArrayBuffer()), true);\n */\nexport const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer');\nexport const isArrayBuffer = isTypeFactory(isArrayBufferCall);\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isChild\n * @category type\n * @param {*} sourceChild - Object to be checked as the child.\n * @param {*} targetParent - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isChild, construct, assert } from '@universalweb/acid';\n * class Grandparent{}\n * class Parent extends Grandparent{}\n * class Child extends Parent{}\n * const child = construct(Child);\n * assert(isChild(Child, Grandparent), true);\n * assert(isChild(Child, Parent), false);\n * assert(isChild(Parent, Grandparent), false);\n * assert(isChild(child1, child3), false);\n */\nexport function isChild(sourceChild, targetParent) {\n\tif (!sourceChild || !targetParent) {\n\t\treturn false;\n\t}\n\treturn sourceChild instanceof targetParent;\n}\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if an object or objects are a structured-cloneable type.\n *\n * @function isCloneable\n * @category type\n * @param {...*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isCloneable, assert } from '@universalweb/acid';\n * assert(isCloneable(function (){}), false);\n */\nconst constructorNames = RegExp('Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError');\nexport function isCloneable(source) {\n\tif (hasValue(source)) {\n\t\tconst constructorName = source?.constructor?.name;\n\t\treturn constructorNames.test(constructorName);\n\t}\n\treturn false;\n}\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if the value is a Date.\n *\n * @function isDate\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isDate, assert } from '@universalweb/acid';\n * assert(isDate(new Date()), true);\n */\nexport const isDateCall = isConstructorNameFactory('Date');\nexport const isDate = isTypeFactory(isDateCall);\n","import { hasLength } from '../utilities/hasLength.js';\nimport { hasValue } from './hasValue.js';\nimport { isArray } from './isArray.js';\nimport { isPlainObject } from './isPlainObject.js';\nimport { isString } from './isString.js';\nimport { objectSize } from '../objects/size.js';\n/**\n * Checks if the value is empty.\n *\n * @function isEmpty\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isEmpty, assert } from '@universalweb/acid';\n * assert(isEmpty([]), true);\n */\nexport function isEmpty(source) {\n\tif (isString(source) || isArray(source)) {\n\t\treturn !hasLength(source);\n\t} else if (isPlainObject(source)) {\n\t\treturn !objectSize(source);\n\t}\n\treturn !hasValue(source);\n}\n","/**\n * Check if a value equals false using strict comparison.\n *\n * @function isFalse\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to compare.\n * @returns {Boolean} - Returns true if the item equals false.\n *\n * @example\n * import { isFalse, assert } from '@universalweb/acid';\n * assert(isFalse(1), false);\n * assert(isFalse(true), false);\n * assert(isFalse(false), true);\n */\nexport function isFalse(source) {\n\treturn source === false;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float32Array.\n *\n * @function isF32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF32, assert } from '@universalweb/acid';\n * assert(isF32(new Float32Array()), true);\n */\nexport const isF32Call = isConstructorNameFactory('Float32Array');\nexport const isF32 = isTypeFactory(isF32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Float64Array.\n *\n * @function isF64\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isF64 } from '@universalweb/acid';\n * isF64(new Float64Array());\n * // => true\n */\nexport const isF64Call = isConstructorNameFactory('Float64Array');\nexport const isF64 = isTypeFactory(isF64Call);\n","const { isInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isFloat\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isFloat } from '@universalweb/acid';\n * isFloat(1.01);\n * // => true\n */\nexport const isFloat = isInteger;\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int16Array.\n *\n * @function isI16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI16 } from '@universalweb/acid';\n * isI16(new Int16Array());\n * // => true\n */\nexport const isI16Call = isConstructorNameFactory('Int16Array');\nexport const isI16 = isTypeFactory(isI16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int32Array.\n *\n * @function isI32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isI32, assert } from '@universalweb/acid';\n * assert(isI32(new Int32Array()), true);\n */\nexport const isI32Call = isConstructorNameFactory('Int32Array');\nexport const isI32 = isTypeFactory(isI32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Int8Array.\n *\n * @function isI8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isInt8 } from '@universalweb/acid';\n * isInt8(new Int8Array());\n * // => true\n */\nexport const isI8Call = isConstructorNameFactory('Int8Array');\nexport const isI8 = isTypeFactory(isI8Call);\n","import { hasValue } from './hasValue.js';\n/**\n * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.\n *\n * @function isIterable\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isIterable, assert } from '@universalweb/acid';\n * assert(isIterable([]), true);\n * assert(isIterable(new Int8Array()), true);\n * assert(isIterable('test'), false);\n */\nexport function isIterable(source) {\n\treturn hasValue(source) && typeof source[Symbol.iterator] === 'function';\n}\n","/**\n * Checks if an object is a promise.\n *\n * @function isPromise\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPromise } from '@universalweb/acid';\n * isPromise(new Promise(() => {}));\n * // => true\n */\nexport function isPromise(source) {\n\tif (source) {\n\t\treturn source instanceof Promise;\n\t}\n\treturn false;\n}\n","import { isAsync } from './isAsync.js';\nimport { isGenerator } from './isGenerator.js';\nimport { isPromise } from './isPromise.js';\n/**\n * Checks if an object is a kind of async object such as async function, promise, or generator.\n *\n * @function isKindAsync\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isKindAsync, assert } from '@universalweb/acid';\n * assert(isKindAsync(async() => {}), true);\n */\nexport function isKindAsync(source) {\n\tif (source) {\n\t\treturn isPromise(source) || isAsync(source) || isGenerator(source);\n\t}\n\treturn false;\n}\n","/**\n * Checks if an object is the child of another. Typically used for classes.\n *\n * @function isParent\n * @category type\n * @param {*} sourceParent - Object to be checked as the child.\n * @param {*} targetChild - Object to be checked as the parent.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isParent, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(otherClass);\n * assert(isParent(child1, parentClass), true);\n * assert(isParent(child3, parentClass), false);\n * assert(isParent(parentClass, child1), false);\n * assert(isParent(child1, child3), false);\n */\nexport function isParent(sourceParent, targetChild) {\n\tif (!sourceParent || !targetChild || !targetChild.call) {\n\t\treturn false;\n\t}\n\treturn sourceParent instanceof targetChild;\n}\n","/**\n * Checks if an object is a primitive.\n *\n * @function isPrimitive\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - True or false.\n *\n * @example\n * import { isPrimitive, assert } from '@universalweb/acid';\n * assert(isPrimitive(1), true);\n * assert(isPrimitive(() => {}), false);\n */\nexport function isPrimitive(source) {\n\tconst type = typeof value;\n\treturn source === null || source === undefined || (type !== 'object' && type !== 'function');\n}\n","import { noValue } from './noValue.js';\n/**\n * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.\n *\n * @function isRelated\n * @category type\n * @param {*} targetOne - Object to be checked.\n * @param {*} targetTwo - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isRelated, construct, assert } from '@universalweb/acid';\n * class parentClass{}\n * class otherClass{}\n * const child1 = construct(parentClass);\n * const child2 = construct(parentClass);\n * const child3 = construct(otherClass);\n * assert(isRelated(child1, child2), true);\n * assert(isRelated(child1, parentClass), true);\n * assert(isRelated(parentClass, child2), true);\n * assert(isRelated(child1, child3), false);\n */\nexport function isRelated(targetOne, targetTwo) {\n\tif (noValue(targetOne) || noValue(targetTwo)) {\n\t\treturn false;\n\t}\n\tif (targetOne.call) {\n\t\treturn targetTwo instanceof targetOne;\n\t}\n\tif (targetTwo.call) {\n\t\treturn targetOne instanceof targetTwo;\n\t}\n\treturn targetTwo.constructor === targetOne.constructor;\n}\n","const { isSafeInteger } = Number;\n/**\n * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.\n *\n * @function isSafeInt\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isSafeInt } from '@universalweb/acid';\n * isSafeInt(1.01);\n * // => true\n */\nexport const isSafeInt = isSafeInteger;\n","import { getType } from './getType.js';\nexport function isSameType(source, other) {\n\tconst sourceType = getType(source);\n\tconst otherType = getType(other);\n\tif (sourceType === otherType) {\n\t\tif (sourceType.name === otherType.name) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","/**\n * Check if a value equals true using strict comparison.\n *\n * @function isTrue\n * @category Utility\n * @type {Function}\n * @param {Boolean} source - Item to check.\n * @returns {Boolean} - Returns true if the item is true.\n *\n * @example\n * import { isTrue, assert } from '@universalweb/acid';\n * assert(isTrue(1), false);\n * assert(isTrue(true), true);\n * assert(isTrue(false), false);\n */\nexport function isTrue(source) {\n\treturn source === true;\n}\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint16Array.\n *\n * @function isU16\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU16 } from '@universalweb/acid';\n * isU16(new Uint16Array());\n * // => true\n */\nexport const isU16Call = isConstructorNameFactory('Uint16Array');\nexport const isU16 = isTypeFactory(isU16Call);\n","import { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint32Array.\n *\n * @function isU32\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU32 } from '@universalweb/acid';\n * isU32(new Uint32Array());\n * // => true\n */\nexport const isU32Call = isConstructorNameFactory('Uint32Array');\nexport const isU32 = isTypeFactory(isU32Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8Array.\n *\n * @function isU8\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8 } from '@universalweb/acid';\n * isU8(new Uint8Array());\n * // => true\n */\nexport const isU8Call = isConstructorNameFactory('Uint8Array');\nexport const isU8 = isTypeFactory(isU8Call);\n","import { isConstructorFactory, isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a Uint8ClampedArray.\n *\n * @function isU8C\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isU8C } from '@universalweb/acid';\n * isU8C(new Uint8ClampedArray());\n * // => true\n */\nexport const isU8CCall = isConstructorNameFactory('Uint8ClampedArray');\nexport const isU8C = isTypeFactory(isU8CCall);\n","import { hasValue } from './hasValue.js';\nimport { isConstructorNameFactory } from './isConstructor.js';\nimport { isTypeFactory } from './isTypeFactory.js';\n/**\n * Checks if an object or objects are a WeakMap.\n *\n * @function isWeakMap\n * @category type\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { isWeakMap } from '@universalweb/acid';\n * assert(isWeakMap(new WeakMap()), true);\n */\nexport const isWeakMapCall = isConstructorNameFactory('WeakMap');\nexport const isWeakMap = isTypeFactory(isWeakMapCall);\n","export const isDeno = typeof globalThis.Deno !== 'undefined';\n","export const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node;\n","/**\n * Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.\n *\n * @function isTruthy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isTruthy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.\n * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isTruthy, assert } from '@universalweb/acid';\n * assert(isTruthy(1), true);\n * assert(isTruthy(0), false);\n */\nexport function isTruthy(source, returnIfTrue = true) {\n\treturn Boolean(source) && returnIfTrue;\n}\n","/**\n * Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.\n *\n * @function isFalsy\n * @category type\n * @type {Function}\n * @param {*} source - Item to be isFalsy checked.\n * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.\n * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *\n * @example\n * import { isFalsy, assert } from '@universalweb/acid';\n * assert(isFalsy(0), true);\n * assert(isFalsy(1), false);\n */\nexport function isFalsy(source, returnIfTrue = true) {\n\treturn Boolean(source) === false && returnIfTrue;\n}\n","import { apply } from '../internal/apply.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * If source has a value then assign it to an object or call a function.\n *\n * @function ifValue\n * @category utility\n * @param {*} source - The source object to be hasValue checked.\n * @param {Function|Object} target - The target which is either a function or object.\n * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).\n * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function.\n * @returns {source|undefined} The source object if it passes the hasValue check.\n *\n * @example\n * import { ifValue, assert } from '@universalweb/acid';\n * assert(ifValue(1, {}, 'a'), {a:1});\n */\nexport function ifValue(source, target, optional, args) {\n\tif (hasValue(source)) {\n\t\tif (isFunction(target)) {\n\t\t\tif (optional) {\n\t\t\t\treturn apply(target, optional, args);\n\t\t\t}\n\t\t\treturn target(...args);\n\t\t} else if (isPlainObject(target)) {\n\t\t\ttarget[optional] = source;\n\t\t\treturn target;\n\t\t}\n\t}\n}\n","import { isEqual } from './isEqual.js';\nimport { isFalse } from '../types/isFalse.js';\n/**\n * Performs a deep comparison between two objects & determines if they're different using strict comparison.\n *\n * @function notEqual\n * @type {Function}\n * @category utility\n * @param {*} source - Source object.\n * @param {*} target - Object to be compared.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { notEqual, assert } from '@universalweb/acid';\n * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);\n */\nexport function notEqual(source, target) {\n\treturn isFalse(isEqual(source, target));\n}\n\n","const jsonNative = JSON;\n/**\n * Parses JSON string with safety check for undefined.\n *\n * @function jsonParse\n * @category utility\n * @type {Function}\n * @param {String} source - String to be parsed.\n * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned.\n * @returns {Object|undefined} - Returns the parsed object.\n *\n * @example\n * import { jsonParse, assert } from '@universalweb/acid';\n * assert(jsonParse('{a:1}'), {a:1});\n */\nexport function jsonParse(source, reviver) {\n\tif (source) {\n\t\treturn jsonNative.parse(source, reviver);\n\t}\n}\n/**\n * Stringify an object into a JSON string.\n *\n * @function stringify\n * @category utility\n * @type {Function}\n * @param {Object} object - Object to Stringify.\n * @returns {String} - Returns the object as a valid JSON string.\n *\n * @example\n * import { stringify, assert } from '@universalweb/acid';\n * assert(stringify({a:1}), '{a:1}');\n */\nexport const stringify = jsonNative.stringify;\n\n","import { isFunction } from '../types/isFunction.js';\nimport { isKindAsync } from '../types/isKindAsync.js';\nimport { notEqual } from './notEqual.js';\nimport { stringify } from './json.js';\nfunction createAssertError(source, expected, localOptions) {\n\tconst options = globalThis.options || localOptions;\n\tlet errorTitle;\n\tif (isFunction(options)) {\n\t\terrorTitle = `${options.name} : ${options.constructor.name}`;\n\t} else if (options) {\n\t\terrorTitle = `${options.title || options.method.name} -> ${options.file}`;\n\t}\n\treturn new Error(`Test Failed: ${errorTitle}\n\t\tResult: ${stringify(source)}\n\t\tExpected: ${stringify(expected)}`, options);\n}\nexport async function assertAsync(sourceArg, expected, options) {\n\tconst source = await sourceArg;\n\tconst expectedFunction = isFunction(expected) && await expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n/**\n * Check if source value matches the expected value.\n *\n * @function assert\n * @category utility\n * @type {Function}\n * @param {*} source - The source object to compare to.\n * @param {*} expected - The expected result that's compared to the source.\n * @param {*} options - Additional options for the Error instance & unit test information.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { assert } from '@universalweb/acid';\n * if (!assert(1,1)) {\n * \tnew Error('Assert Method Failed');\n * }\n */\nexport function assert(source, expected, options) {\n\tif (isKindAsync(source) || isKindAsync(expected)) {\n\t\treturn assertAsync(source, expected, options);\n\t}\n\tconst expectedFunction = isFunction(expected) && expected(source, options) === false;\n\tif (expectedFunction || notEqual(source, expected)) {\n\t\treturn createAssertError(source, expected, options);\n\t}\n\treturn true;\n}\n","import { assert } from './assert.js';\nimport { assign } from '../objects/assign.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { map } from './map.js';\n/**\n * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.\n *\n * @function bindAll\n * @category utility\n * @type {Function}\n * @param {Object|Function|Array} collection - The functions to bind.\n * @param {*} bindThis - Object to be bound to functions.\n * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to.\n * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *\n * @example\n * import { assert, bindAll } from '@universalweb/acid';\n * const bounded = bindAll([function () { return this;}], 'Bounded');\n * assert(bounded[0](), 'Bounded');\n */\nexport function bindAll(collection, bindThis, targetAssign) {\n\tconst results = map(collection, (item) => {\n\t\treturn isFunction(item) ? item.bind(bindThis) : item;\n\t});\n\treturn (targetAssign) ? assign(targetAssign, results) : results;\n}\n\n","import { clearArray } from '../arrays/clear.js';\nimport { clearBuffer } from '../buffers/clear.js';\nimport { isArray } from '../types/isArray.js';\nimport { isBuffer } from '../types/isBuffer.js';\n/**\n * Clears the values out of an array, buffer, and objects like Map that have a clear method.\n *\n * @function clear\n * @category utility\n * @type {Function}\n * @param {Array} source - Takes an array to be emptied.\n * @returns {Array} - The originally given array.\n *\n * @example\n * import { clear, assert } from '@universalweb/acid';\n * assert(clear(Buffer.from([1,'B', 'Cat'])), []);\n */\nexport function clear(source) {\n\tif (source) {\n\t\tif (isBuffer(source)) {\n\t\t\treturn clearBuffer(source);\n\t\t} else if (isArray(source)) {\n\t\t\treturn clearArray(source);\n\t\t} else if (source.clear) {\n\t\t\tsource.clear();\n\t\t} else if (source.length) {\n\t\t\tsource.length = 0;\n\t\t}\n\t}\n\treturn source;\n}\n\n","/**\n * Creates a structured clone of an object which is a \"structured-cloneable type\".\n *\n * @function clone\n * @category utility\n * @type {Function}\n * @param {Object} source - Any structured-cloneable type object.\n * @returns {Object} - Returns a deep clone of an object.\n *\n * @example\n * import { clone, assert } from '@universalweb/acid';\n * assert(clone({a:{b:[2]}}), {a:{b:[2]}});\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function clone(source) {\n\treturn structuredCloneSafe(source);\n}\n\n","/**\n * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.\n *\n * @function concurrent\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { concurrent, assert } from '@universalweb/acid';\n * const list = [];\n * await concurrent([async (item) => {\n * return item;\n * }, async (item) => {\n * return item;\n * }], null, 1);\n * assert(list, [1, 1]);\n */\nexport async function concurrent(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index].call(thisBind, ...args, index, results, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = source[index](...args, index, results, callable);\n\t\t}\n\t}\n\treturn Promise.all(results);\n}\n","import { isPlainObject } from '../types/isPlainObject.js';\nimport { isTruthy } from '../types/isTruthy.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.\n *\n * @function compact\n * @category Utility\n * @type {Function}\n * @param {Array|Object} source - Array or Object to be compacted.\n * @returns {Array|Object} - A new object or array containing the filtered values.\n *\n * @example\n * import { compact, assert } from '@universalweb/acid';\n * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);\n */\nexport function compact(source) {\n\tif (isPlainObject(source)) {\n\t\tconst sourceKeys = keys(source);\n\t\tconst sourceKeysLength = sourceKeys.length;\n\t\tconst targetObject = {};\n\t\tfor (let i = 0; i < sourceKeysLength; i++) {\n\t\t\tconst keyName = sourceKeys[i];\n\t\t\tconst item = source[keyName];\n\t\t\tconst isisTruthy = isTruthy(item);\n\t\t\tif (isisTruthy) {\n\t\t\t\ttargetObject[keyName] = item;\n\t\t\t}\n\t\t}\n\t\treturn targetObject;\n\t}\n\treturn source.filter((item) => {\n\t\treturn isTruthy(item);\n\t});\n}\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMapAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMapAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = await forOfCompactMapAsync(source, async (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tconst result = await iteratee(item, resultsGenerator, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tresultsGenerator.push(result);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor await (const [key, value] of source) {\n\t\tconst result = await iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function forOfCompactMap\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *\n * @example\n * import { assert,forOfCompactMap } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfCompactMap(source, (item) => {\n * return item;\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfCompactMap(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (hasValue(result)) {\n\t\t\t\tmethodPushBound(result);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n\tconst methodSet = isFunction(results.set);\n\tfor (const [key, value] of source) {\n\t\tconst result = iteratee(value, key, results, source);\n\t\tif (hasValue(result)) {\n\t\t\tif (methodSet) {\n\t\t\t\tresults.set(key, result);\n\t\t\t} else {\n\t\t\t\tresults[key] = result;\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { compactMapArray } from '../arrays/compactMap.js';\nimport { compactMapAsyncArray } from '../arrays/compactMapAsync.js';\nimport { compactMapAsyncObject } from '../objects/compactMapAsync.js';\nimport { compactMapObject } from '../objects/compactMap.js';\nimport { forOfCompactMap } from './forOfCompactMap.js';\nimport { forOfCompactMapAsync } from './forOfCompactMapAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.\n *\n * @function compactMap\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { compactMap, assert } from '@universalweb/acid';\n * assert(compactMap({a: null, b: 2, c: 3}, (item) => {\n * return item;\n * }), {b: 2, c: 3});\n */\nexport const compactMap = generateLoop(\n\tcompactMapArray,\n\tcompactMapAsyncArray,\n\tcompactMapObject,\n\tcompactMapAsyncObject,\n\tforOfCompactMap,\n\tforOfCompactMapAsync\n);\n","import { every } from './every.js';\nimport { isAsync } from '../types/isAsync.js';\nexport function everyArg(...methods) {\n\tif (isAsync(methods[0])) {\n\t\treturn async function(...args) {\n\t\t\treturn every(methods, async (method) => {\n\t\t\t\treturn every(args, async (item) => {\n\t\t\t\t\treturn method(item);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\treturn function(...args) {\n\t\treturn every(methods, (method) => {\n\t\t\treturn every(args, (item) => {\n\t\t\t\treturn method(item);\n\t\t\t});\n\t\t});\n\t};\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilter\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilter } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilter(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport function forOfFilter(source, iteratee = returnValue, resultsObject) {\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor (const [key, value] of source) {\n\t\t\tconst result = iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isGenerator } from '../types/isGenerator.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isSet } from '../types/isSet.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function forOfFilterAsync\n * @category utility\n * @type {Function}\n * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.\n * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned.\n * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *\n * @example\n * import { assert, forOfFilterAsync } from '@universalweb/acid';\n * const source = {a: undefined, b: 2, c: 3};\n * const temp = forOfFilterAsync(source, (item) => {\n * return Boolean(item);\n * });\n * assert(temp, {b: 2, c: 3});\n */\nexport async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) {\n\tif (isGenerator(source)) {\n\t\tconst resultsGenerator = [];\n\t\tfor await (const item of source(...generatorArgs)) {\n\t\t\tif (await iteratee(item, resultsGenerator, source) === true) {\n\t\t\t\tresultsGenerator.push(item);\n\t\t\t}\n\t\t}\n\t\treturn resultsGenerator;\n\t}\n\tconst results = resultsObject || cloneType(source);\n\tif (isArray(source) || isSet(source)) {\n\t\tconst methodPush = results.push || results.add;\n\t\tconst methodPushBound = methodPush && methodPush.bind(results);\n\t\tfor (const value of source) {\n\t\t\tconst result = await iteratee(value, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tmethodPushBound(value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst methodSet = isFunction(results.set);\n\t\tfor await (const [key, value] of source) {\n\t\t\tconst result = await iteratee(value, key, results, source);\n\t\t\tif (result === true) {\n\t\t\t\tif (methodSet) {\n\t\t\t\t\tresults.set(key, value);\n\t\t\t\t} else {\n\t\t\t\t\tresults[key] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n}\n","import { filterArray } from '../arrays/filter.js';\nimport { filterAsyncArray } from '../arrays/filterAsync.js';\nimport { filterAsyncObject } from '../objects/filterAsync.js';\nimport { filterObject } from '../objects/filter.js';\nimport { forOfFilter } from './forOfFilter.js';\nimport { forOfFilterAsync } from './forOfFilterAsync.js';\nimport { generateLoop } from './generateLoop.js';\n/**\n * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.\n *\n * @function filter\n * @category utility\n * @type {Function}\n * @param {Array | object | Function} source - Object that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.\n * @param {Object | Function} [results = {}] - Object that will be used to assign results.\n * @returns {Array | object | Function} - A new object of the same calling object's type.\n *\n * @example\n * import { filter, assert } from '@universalweb/acid';\n * assert(filter({a: false, b: true, c: true}, (item) => {\n * return item;\n * }), {b: true, c: true});\n */\nexport const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync);\n\n","import { eachArray } from '../arrays/each.js';\nimport { eachRight } from '../arrays/eachRight.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn (arg) => {\n\t\t\tlet value = arg;\n\t\t\tcallable(methods, (item) => {\n\t\t\t\tvalue = item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flow\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flow(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flow = returnFlow(eachArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowRight\n * @category utility\n * @type {Function}\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowRight(increment, increment, deduct)(0);\n * // => 1\n */\nexport const flowRight = returnFlow(eachRight);\n\n","import { eachAsyncArray } from '../arrays/eachAsync.js';\nimport { eachRightAsync } from '../arrays/eachRightAsync.js';\nfunction returnFlow(callable) {\n\treturn (...methods) => {\n\t\treturn async (arg) => {\n\t\t\tlet value = arg;\n\t\t\tawait callable(methods, async (item) => {\n\t\t\t\tvalue = await item(value);\n\t\t\t});\n\t\t\treturn value;\n\t\t};\n\t};\n}\n/**\n * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.\n *\n * @function flowAsync\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsync = returnFlow(eachAsyncArray);\n/**\n * This method is like flow except that it creates a function that invokes the given functions from right to left.\n *\n * @function flowAsyncRight\n * @category utility\n * @type {Function}\n * @async\n * @param {Array} collection - Methods to invoke.\n * @returns {Function} - Returns the new composite function.\n *\n * @example\n * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0);\n * // => 2\n */\nexport const flowAsyncRight = returnFlow(eachRightAsync);\n\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\nimport { isFunction } from '../types/isFunction.js';\nexport function forMap(source, callback) {\n\tconst cloned = cloneType(source);\n\tconst method = cloned.push || cloned.add;\n\tif (method && isFunction(method)) {\n\t\tconst methodBound = method.bind(cloned);\n\t\tsource.forEach((item) => {\n\t\t\tconst result = callback(item, cloned);\n\t\t\tmethodBound(result);\n\t\t});\n\t} else if (isFunction(cloned.set)) {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned.set(key, result);\n\t\t});\n\t} else {\n\t\tsource.forEach((item, key) => {\n\t\t\tconst result = callback(item, key, cloned);\n\t\t\tcloned[key] = result;\n\t\t});\n\t}\n\treturn cloned;\n}\n","import { eachArray } from '../arrays/each.js';\n/**\n * Takes all but the last item in the array.\n *\n * @function arraysToObject\n * @type {Function}\n * @category utility\n * @param {Array} source - Array to have items extracted from.\n * @param {Array} properties - Array to have items extracted from.\n * @returns {Array} - Returns a completely flattened array.\n *\n * @example\n * import { arraysToObject, assert } from '@universalweb/acid';\n * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});\n */\nexport function arraysToObject(source, properties) {\n\tconst sortedObject = {};\n\teachArray(source, (item, key) => {\n\t\tsortedObject[properties[key]] = item;\n\t});\n\treturn sortedObject;\n}\n\n","import { every } from './every.js';\nimport { everyArray } from '../arrays/every.js';\nimport { everyObject } from '../objects/every.js';\nimport { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nimport { isRegex } from '../types/isRegex.js';\nimport { isString } from '../types/isString.js';\nimport { noValue } from '../types/noValue.js';\n/**\n * Checks if an object contains something. For basic searches.\n *\n * @function has\n * @category utility\n * @param {Array|String|Object} source - Object to be checked.\n * @param {String|Array|Function|RegExp} search - Object that is being searched for.\n * @param {Number} position - Index at which to start searching.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { has, assert } from '@universalweb/acid';\n * assert(has('Hello World', 'Hello'), true);\n * assert(has(['Hello', 'World'], 'hello'), true);\n */\nexport function has(source, search, position) {\n\tif (noValue(source) || noValue(search)) {\n\t\treturn false;\n\t}\n\tif (source === search) {\n\t\treturn true;\n\t}\n\tif (isString(source)) {\n\t\tif (isString(search)) {\n\t\t\treturn source.includes(search, position);\n\t\t}\n\t\tif (isRegex(search)) {\n\t\t\treturn search.test(source);\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn search(source);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn every(search, (item) => {\n\t\t\treturn has(source, item);\n\t\t});\n\t}\n\tif (isArray(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyArray(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyArray(source, search);\n\t\t}\n\t\tif (isArray(search)) {\n\t\t\treturn everyArray(search, (item) => {\n\t\t\t\treturn has(source, item);\n\t\t\t});\n\t\t}\n\t\treturn source.includes(search, position);\n\t}\n\tif (isPlainObject(source)) {\n\t\tif (isRegex(search)) {\n\t\t\treturn everyObject(source, (item) => {\n\t\t\t\treturn item.test(search);\n\t\t\t});\n\t\t}\n\t\tif (isFunction(search)) {\n\t\t\treturn everyObject(source, search);\n\t\t}\n\t\tif (isPlainObject(search)) {\n\t\t\treturn everyObject(source, (item, key) => {\n\t\t\t\treturn item === search[key];\n\t\t\t});\n\t\t}\n\t\treturn everyObject(source, (item) => {\n\t\t\treturn has(item, search);\n\t\t});\n\t}\n\treturn false;\n}\n","import { regexTestFactory } from '../internal/regexTestFactory.js';\n/**\n * Checks if the string has a '.'.\n *\n * @function hasDot\n * @category utility\n * @param {*} source - Object to be checked.\n * @returns {Boolean} - Returns true or false.\n *\n * @example\n * import { hasDot, assert } from '@universalweb/acid';\n * assert(hasDot('test.js'), true);\n */\nexport const hasDot = regexTestFactory(/\\./);\n","import { hasValue } from '../types/hasValue.js';\n/**\n * Checks if a property on an object has a value. If not, it will assign a value.\n *\n * @function ifNotAssign\n * @category utility\n * @type {Function}\n * @param {Object} rootObject - The object to check.\n * @param {String} property - The property name which is to be checked.\n * @param {*} equalThis - The reassignment value for the property being checked.\n * @returns {Object} - Returns the provided rootObject.\n *\n * @example\n * import { ifNotAssign, assert } from '@universalweb/acid';\n * assert(ifNotAssign({}, 'a', 1), {a:1});\n */\nexport const ifNotAssign = (rootObject, property, equalThis) => {\n\tif (property && !hasValue(rootObject[property])) {\n\t\trootObject[property] = equalThis;\n\t}\n\treturn rootObject;\n};\n\n","import { construct } from '../classes/construct.js';\nimport { noop } from './noop.js';\nimport { times } from './times.js';\nexport class Intervals {\n\tlist = construct(Map);\n\tconstruct() {\n\t}\n\t/**\n\t * Remove a setInterval that was created using the intervals function.\n\t *\n\t * @param {Number} id - The id of the setInterval to remove.\n\t * @returns {undefined} - Returns nothing.\n\t *\n\t * @example\n\t * timer(() => {}, 100);\n\t * // => 0\n\t */\n\tremove(id) {\n\t\tclearInterval(id);\n\t\tthis.list.delete(id);\n\t}\n\thas(id) {\n\t\treturn this.list.has(id);\n\t}\n\tget(id) {\n\t\treturn this.list.get(id);\n\t}\n\t/**\n\t * Create a setInterval & add it to the list of interval timers.\n\t *\n\t * @type {Function}\n\t * @param {Function} callable - The function to be invoked.\n\t * @param {Number} time - The time in milliseconds.\n\t * @returns {Object} - Returns setTimeoutId ID.\n\t *\n\t * @example\n\t * timers.set(() => {}, 100);\n\t * // => 0\n\t */\n\tset(callable, time) {\n\t\tconst currentThis = this;\n\t\tconst id = setInterval(() => {\n\t\t\tcallable();\n\t\t}, time);\n\t\tthis.list.set(id, true);\n\t\treturn id;\n\t}\n\t/**\n\t * Clear all active setIntervals.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * intervals.clear();\n\t * // => undefined\n\t */\n\tclear() {\n\t\tconst currentThis = this;\n\t\tcurrentThis.list.forEach((id) => {\n\t\t\tcurrentThis.remove(id);\n\t\t});\n\t}\n}\nexport const intervals = construct(Intervals);\n/**\n * Create an interval timer.\n *\n * @function interval\n * @category function\n * @type {Function}\n * @param {Function} callable - The function to be invoked.\n * @param {Number} time - The time in milliseconds.\n * @returns {Object} - Returns setInterval ID.\n *\n * @example\n * interval(() => {}, 100);\n * // => 0\n */\nexport function interval(callable, time) {\n\treturn intervals.set(callable, time);\n}\n/**\n * Clear all active interval timers.\n *\n * @function clearIntervals\n * @category function\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * clearIntervals();\n * // => undefined\n */\nexport function clearIntervals() {\n\tconst id = setTimeout(noop, 0);\n\ttimes(id, (index) => {\n\t\tintervals.remove(index);\n\t});\n}\n","import { each } from './each.js';\nimport { isArray } from '../types/isArray.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\n/**\n * Recursively deep assign a target object with a source object. The source objects values are assigned onto the target object's matching properties.\n *\n * @function merge\n * @category utility\n * @type {Function}\n * @param {Object} target - The object which will be modified.\n * @param {Object} source - Source object to merge into the target object.\n * @returns {Object} - Returns target.\n *\n * @example\n * import { merge, assert } from '@universalweb/acid';\n * assert(merge([1,2,4],[3]), [3, 2, 4]);\n */\nconst structuredCloneSafe = globalThis.structuredClone;\nexport function merge(target, ...sources) {\n\teach(sources, (currentSource) => {\n\t\teach(currentSource, (sourceItem, sourceKey) => {\n\t\t\tif (target[sourceKey]) {\n\t\t\t\tif (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) {\n\t\t\t\t\treturn merge(target[sourceKey], sourceItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[sourceKey] = sourceItem;\n\t\t});\n\t});\n\treturn target;\n}\n\n","import { assign } from '../objects/assign.js';\nimport { construct } from '../classes/construct.js';\nimport { get } from './get.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Returns the model with the given name.\n *\n * @function Model\n * @type {Class}\n * @category utility\n * @param {String} modelName - The name of the model to return.\n * @param {*} modelSource - The value of the model to return.\n * @returns {Model} - The model with the given name.\n *\n * @example\n * import { Model, model, assert } from '@universalweb/acid';\n * const test = new Model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport class Model {\n\tstatic models = new Map();\n\tconstructor(modelName, modelSource) {\n\t\tif (hasValue(modelSource)) {\n\t\t\tassign(this, modelSource);\n\t\t\tthis.modelName = modelName;\n\t\t\tModel.models.set(modelName, modelSource);\n\t\t} else {\n\t\t\tassign(this, modelName);\n\t\t}\n\t}\n\tdelete(modelName) {\n\t\tModel.models.delete(modelName || this.modelName);\n\t}\n\tset(modelName) {\n\t\tif (modelName) {\n\t\t\tthis.modelName = modelName;\n\t\t}\n\t\tModel.models.set(modelName || this.modelName, this);\n\t}\n\thas(modelName) {\n\t\treturn Model.models.has(modelName || this.modelName);\n\t}\n\tget(modelName) {\n\t\treturn Model.models.get(modelName || this.modelName);\n\t}\n}\n/**\n * Set & Get a model.\n *\n * @function model\n * @type {Function}\n * @category utility\n * @param {String} modelName - Name of the model.\n * @param {Object} modelSource - The model object.\n * @returns {Model} - Returns the associated model.\n *\n * @example\n * import { model, assert } from '@universalweb/acid';\n * model('test', {a: 1});\n * assert(model('test'), {a: 1});\n */\nexport function model(modelName, modelSource) {\n\tif (hasValue(modelSource)) {\n\t\treturn construct(Model, [modelName, modelSource]);\n\t}\n\treturn get(modelName, Model.models);\n}\n\n","import { eachRight } from '../arrays/eachRight.js';\n/**\n * Takes the first two arguments given and returns them inside a new array.\n *\n * @function pair\n * @category utility\n * @param {*} argument1 - The source object.\n * @param {*} argument2 - The source object.\n * @returns {Array} The array which holds the pair.\n *\n * @example\n * import { pair, assert } from '@universalweb/acid';\n * assert(air(1, 2), [1, 2]);\n */\nexport function pair(argument1, argument2) {\n\treturn [argument1, argument2];\n}\n","import { hasValue } from '../types/hasValue.js';\nimport { returnValue } from './returnValue.js';\n/**\n * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.\n *\n * @function concurrentStatus\n * @category utility\n * @type {Function}\n * @param {Array} source - Array that will be looped through.\n * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length.\n * @param {*} additionalArgument - An object to be given each time to the iteratee.\n * @returns {Array} - The array from Promise.allSettled.\n *\n * @example\n * import { concurrentStatus, assert } from '@universalweb/acid';\n * const tempList = [];\n * await concurrentStatus([1, 2], async (item) => {\n * return item;\n * });\n * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);\n */\nexport function concurrentStatus(source, iteratee, additionalArgument) {\n\tconst arrayLength = source.length;\n\tconst queue = [];\n\tfor (let index = 0; index < arrayLength; index++) {\n\t\tqueue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument);\n\t}\n\treturn Promise.allSettled(queue);\n}\n\n","/**\n * A wrapper around the promise constructor.\n *\n * @function promise\n * @type {Function}\n * @category utility\n * @param {Function} callback - Function to be called back.\n * @returns {Promise} - A constructor with a callback function.).\n *\n * @example\n * promise((a) => {});\n * // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n */\nexport function promise(callback) {\n\treturn new Promise(callback);\n}\n\n","import { everyArray } from '../arrays/every.js';\nimport { isEqual } from './isEqual.js';\nimport { keys } from '../objects/keys.js';\n/**\n * Using a deep comparison it checks if properties of two objects using an array are equal.\n *\n * @function propertyMatch\n * @type {Function}\n * @category utility\n * @param {Object} source - The source object to compare.\n * @param {Object} compared - Object to be compared to source.\n * @param {Array} properties - List of properties to compare defaults to keys(source).\n * @returns {Array} - Returns an array of properties.\n *\n * @example\n * import { propertyMatch, assert } from '@universalweb/acid';\n * assert(propertyMatch({\n * a: 1,\n * b: 2\n * }, {\n * a: 1,\n * b: 2\n * }, ['a', 'b']), true);\n */\nexport const propertyMatch = (source, compared, properties = keys(source)) => {\n\treturn everyArray(properties, (property) => {\n\t\treturn isEqual(source[property], compared[property]);\n\t});\n};\n\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setKey(source, key, value) {\n\tif (key && isPlainObject(source)) {\n\t\tsource[key] = value;\n\t} else if (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.set) {\n\t\tsource.set(key, value);\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { isArray } from '../types/isArray.js';\nimport { isFunction } from '../types/isFunction.js';\nimport { isNumber } from '../types/isNumber.js';\nimport { isPlainObject } from '../types/isPlainObject.js';\nexport function setValue(source, value, key) {\n\tif (isNumber(key) && isArray(source)) {\n\t\tsource[key] = value;\n\t} else if (source.push) {\n\t\tsource.push(value);\n\t} else if (source.add) {\n\t\tsource.add(value);\n\t} else {\n\t\tsource[key] = value;\n\t}\n\treturn source;\n}\n","import { eachObject } from '../objects/each.js';\nexport class Store {\n\tsource;\n\tconstructor(source = {}) {\n\t\tthis.source = source;\n\t\tif (source === null || typeof source !== 'object') {\n\t\t\treturn source;\n\t\t}\n\t\teachObject(source, (property) => {\n\t\t\tsource[property] = new Store(source[property]);\n\t\t});\n\t\tthis.data = new Proxy(source, {\n\t\t\tget(proxySource, property) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\treturn proxySource[property];\n\t\t\t},\n\t\t\tset(proxySource, property, value) {\n\t\t\t\tconsole.log(proxySource, property, proxySource[property]);\n\t\t\t\tproxySource[property] = new Store(value);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t}\n}\n","/**\n * This method returns a new empty array.\n *\n * @function stubArray\n * @category utility\n * @type {Function}\n * @returns {Array} - Returns the new empty array.\n *\n * @example\n * import { stubArray, assert } from '@universalweb/acid';\n * assert(stubArray(), []);\n */\nexport function stubArray() {\n\treturn [];\n}\n\n","/**\n * This method returns false.\n *\n * @function stubFalse\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns false.\n *\n * @example\n * import { stubFalse, assert } from '@universalweb/acid';\n * assert(stubFalse(), false);\n */\nexport function stubFalse() {\n\treturn false;\n}\n","/**\n * This method returns a new empty object.\n *\n * @function stubObject\n * @category utility\n * @type {Function}\n * @returns {Object} - Returns the new empty object.\n *\n * @example\n * import { stubObject, assert } from '@universalweb/acid';\n * assert(stubObject(), {});\n */\nexport const stubObject = () => {\n\treturn {};\n};\n\n","/**\n * This method returns a new empty string.\n *\n * @function stubString\n * @category utility\n * @type {Function}\n * @returns {String} - Returns the new empty string.\n *\n * @example\n * import { stubString, assert } from '@universalweb/acid';\n * assert(stubString(), '');\n */\nexport const stubString = () => {\n\treturn '';\n};\n","/**\n * This method returns true.\n *\n * @function stubTrue\n * @category utility\n * @type {Function}\n * @returns {Boolean} - Returns true.\n *\n * @example\n * import { stubTrue, assert } from '@universalweb/acid';\n * assert(stubTrue(), true);\n */\nexport const stubTrue = () => {\n\treturn true;\n};\n","/**\n * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.\n *\n * @async\n * @function timesAsync\n * @category utility\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @returns {undefined} - Nothing.\n *\n * @example\n * import { timesAsync } from '@universalweb/acid';\n * await timesAsync(3, async (item) => {\n * console.log(item);\n * });\n * // 0\n * // 1\n * // 2\n * // => undefined\n */\nexport async function timesAsync(amount, iteratee) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tawait iteratee(amount);\n\t}\n}\n/**\n * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.\n *\n * @async\n * @function timesMapAsync\n * @category array\n * @type {Function}\n * @param {Number} amount - The amount of times to loop invoking the iteratee.\n * @param {Function} iteratee - Transformation function which is passed index and amount.\n * @param {Array} [results = []] - Array that will have iteratee return pushed to.\n * @returns {Array} - An array with iteratee's returned values.\n *\n * @example\n * import { timesMapAsync } from '@universalweb/acid';\n * await timesMapAsync(3, (item) => {\n * return item;\n * });\n * // => [0, 1, 2]\n */\nexport async function timesMapAsync(amount, iteratee, results = []) {\n\tfor (let index = 0; index < amount; index++) {\n\t\tresults[index] = await iteratee(amount);\n\t}\n\treturn results;\n}\n","import { isEqual } from './isEqual.js';\n/**\n * Performs a toggle between 2 values using a deep or strict comparison.\n *\n * @function toggle\n * @type {Function}\n * @category utility\n * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments.\n * @param {(string|number|Object|Array)} on - The first object to be compared to.\n * @param {(string|number|Object|Array)} off - The second object to be compared to.\n * @returns {(string|number|Object|Array)} - The opposing value to the current.\n *\n * @example\n * import { toggle } from '@universalweb/acid';\n * let toggleMe = true;\n * toggleMe = toggle(toggleMe, true, false);\n * // => false\n */\nexport function toggle(value, on = true, off = false) {\n\treturn ((isEqual(on, value)) ? off : on);\n}\n\n","import { construct } from '../classes/construct.js';\n/**\n * Unique ID Generator Module.\n *\n * @module utility/uid\n */\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @class UniqID\n * @type {Class}\n * @category utility\n * @returns {UniqID} - Returns a new instance of UniqID.\n *\n * @example\n * import { UniqID, construct, assert } from '@universalweb/acid';\n * const gen = construct(UniqID);\n * assert(gen.get(), 0);\n * assert(gen.get(), 1);\n * gen.free(0);\n * assert(gen.get(), 0);\n */\nexport class UniqID {\n\ttotalActive = 0;\n\tfreed = [];\n\ttotalFree = 0;\n\t/**\n\t * Generates a new ID or recycle one that is no longer used.\n\t *\n\t * @function get\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @returns {Number} - Returns a unique id.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t */\n\tget() {\n\t\tlet result = this.freed.shift();\n\t\tif (hasValue(result)) {\n\t\t\tthis.totalFree--;\n\t\t} else {\n\t\t\tresult = this.totalActive;\n\t\t\tthis.totalActive++;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t * Frees an UID so that it may be recycled for later use.\n\t *\n\t * @function free\n\t * @class UniqID\n\t * @category utility\n\t * @type {Function}\n\t * @param {Number} id - Number to be freed.\n\t * @returns {undefined} - Nothing is returned.\n\t *\n\t * @example\n\t * import { UniqID, construct, assert } from '@universalweb/acid';\n\t * const gen = construct(UniqID);\n\t * assert(gen.get(), 0);\n\t * gen.free(0);\n\t * assert(gen.get(), 0);\n\t */\n\tfree(id) {\n\t\tthis.freed.push(id);\n\t\tthis.totalFree++;\n\t\tconst isActive = this.totalActive > 0;\n\t\tconst shouldReset = this.totalActive === this.totalFree;\n\t\tif (isActive && shouldReset) {\n\t\t\tthis.reset();\n\t\t}\n\t}\n\treset() {\n\t\tthis.totalActive = 0;\n\t\tthis.freed.length = 0;\n\t\tthis.totalFree = 0;\n\t}\n}\n/**\n * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.\n *\n * @function uniqID\n * @category utility\n *\n * @example\n * import { uniqID, assert } from '@universalweb/acid';\n * assert(uniqID.get(), 0);\n * assert(uniqID.get(), 1);\n * uniqID.free(0);\n * assert(uniqID.get(), 0);\n */\nexport const uniqID = construct(UniqID);\n","import { cloneType } from '../types/cloneType.js';\nimport { hasValue } from '../types/hasValue.js';\n/**\n * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function VirtualStorage\n * @category utility\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { VirtualStorage } from '@universalweb/acid';\n * const myVirtualStorage = new VirtualStorage();\n * // => New VirtualStorage Object\n */\nexport class VirtualStorage {\n\tconstructor(initialObject = new Map()) {\n\t\tthis.items = initialObject;\n\t}\n\t/**\n\t * Get an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.getItem('key');\n\t * // => 'value'\n\t */\n\tgetItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.get(key);\n\t\t} else {\n\t\t\treturn this.items[key];\n\t\t}\n\t}\n\tget(...args) {\n\t\treturn this.getItem(...args);\n\t}\n\thasItem(key) {\n\t\tif (this.isMap) {\n\t\t\treturn this.items.has(key);\n\t\t} else {\n\t\t\treturn hasValue(this.items[key]);\n\t\t}\n\t}\n\thas(...args) {\n\t\treturn this.hasItem(...args);\n\t}\n\t/**\n\t * Save an item to a virtual storage object.\n\t *\n\t * @param {String} key - The key used to store the data.\n\t * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { VirtualStorage, assert } from '@universalweb/acid';\n\t * const vStorage = new VirtualStorage();\n\t * vStorage.setItem('title', 'value');\n\t * assert(vStorage.getItem('title'), 'value');\n\t */\n\tsetItem(key, value) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.set(key, value);\n\t\t} else {\n\t\t\tthis.items[key] = value;\n\t\t}\n\t\treturn this;\n\t}\n\tset(...args) {\n\t\treturn this.setItem(...args);\n\t}\n\t/**\n\t * Clears all data from the virtual storage object by replacing with a new object.\n\t *\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.clear();\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tclear() {\n\t\tif (this.isMap) {\n\t\t\tthis.items.clear();\n\t\t} else {\n\t\t\tthis.items = cloneType(this.items);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t * Remove an item from a virtual storage object.\n\t *\n\t * @param {String} key - The key used to remove data.\n\t * @returns {undefined} - Returns undefined.\n\t *\n\t * @example\n\t * import { virtualStorage } from '@universalweb/acid';\n\t * const myVirtualStorage = virtualStorage();\n\t * myVirtualStorage.setItem('key', 'value');\n\t * myVirtualStorage.removeItem('key');\n\t * myVirtualStorage.getItem('key');\n\t * // => undefined\n\t */\n\tremoveItem(key) {\n\t\tif (this.isMap) {\n\t\t\tthis.items.delete(key);\n\t\t} else {\n\t\t\tthis.items[key] = null;\n\t\t}\n\t\treturn this;\n\t}\n\tremove(...args) {\n\t\treturn this.removeItem(...args);\n\t}\n}\n/**\n * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.\n *\n * @function virtualStorage\n * @category browser\n * @type {Function}\n * @param {*} initialObject - Initial object to be used as the storage object the default being a Map.\n * @returns {*} - Returns a new VirtualStorage Object.\n *\n * @example\n * import { virtualStorage, assert } from '@universalweb/acid';\n * const vStorage = virtualStorage();\n * vStorage.setItem('title', 'value');\n * assert(vStorage.getItem('title'), 'value');\n */\nexport function virtualStorage(initialObject) {\n\treturn new VirtualStorage(initialObject);\n}\n\n","/**\n * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.\n *\n * @function inAsync\n * @type {Function}\n * @category Utility\n * @async\n * @param {Array} source - Array of async functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {Object} - The originally given array.\n *\n * @example\n * import { inAsync, assert } from '@universalweb/acid';\n * const list = [];\n * await inAsync([async (firstArgument, item, index) => {\n * list.push(index + firstArgument.a);\n * }, async (firstArgument, item, index) => {\n * list.push(index);\n * }], {a:1});\n * assert(list, [1, 1]);\n */\nexport async function inAsync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index].call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = await source[index](...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import { each } from './each.js';\n/**\n * Invoke an array of functions.\n *\n * @function inSync\n * @category Utility\n * @type {Function}\n * @param {Array} source - Array of functions that will be looped through.\n * @param {*} thisBind - Object to use as the \"this\" within the function.\n * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.\n * @returns {undefined} - Returns undefined.\n *\n * @example\n * inSync([() => {console.log(1);}, () => {console.log(2);}]);\n * // 1\n * // 2\n * // => undefined\n */\nexport function inSync(source, thisBind, ...args) {\n\tconst arrayLength = source.length;\n\tconst results = [];\n\tif (thisBind) {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable.call(thisBind, ...args, index, callable);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < arrayLength; index++) {\n\t\t\tconst callable = source[index];\n\t\t\tresults[index] = callable(...args, index, callable);\n\t\t}\n\t}\n\treturn results;\n}\n","import {\n\tcopyFile,\n\tmkdir,\n\treaddir,\n\tstat\n} from 'node:fs/promises';\nimport { eachAsyncArray } from '../arrays/eachAsync.js';\nimport path from 'node:path';\nasync function copyToPath(sourceFolder, destinationFolder, file) {\n\tconst sourcePath = path.join(sourceFolder, file);\n\tconst destinationPath = path.join(destinationFolder, file);\n\tawait copyFile(sourcePath, destinationPath);\n}\nexport async function copyFolder(sourceFolder, destinationFolder) {\n\tconst files = await readdir(sourceFolder);\n\tawait eachAsyncArray(files, async (file) => {\n\t\tconst sourcePath = path.join(sourceFolder, file);\n\t\tconst filestats = await stat(sourcePath);\n\t\tif (filestats.isDirectory()) {\n\t\t\tconst folderDestination = path.join(destinationFolder, file.replace(sourceFolder, ''));\n\t\t\tawait mkdir(folderDestination, {\n\t\t\t\trecursive: true\n\t\t\t});\n\t\t\tawait copyFolder(sourcePath, folderDestination);\n\t\t} else {\n\t\t\tawait copyToPath(sourceFolder, destinationFolder, file);\n\t\t}\n\t});\n\treturn true;\n}\n\n","import { fileURLToPath } from 'node:url';\nimport path from 'path';\nexport function currentFile(importMeta) {\n\tif (globalThis.__filename) {\n\t\treturn __filename;\n\t}\n\treturn fileURLToPath(importMeta.url);\n}\nexport function currentPath(importMeta) {\n\tif (globalThis.__dirname) {\n\t\treturn __dirname;\n\t}\n\treturn path.dirname(fileURLToPath(importMeta.url));\n}\n"],"names":["chunk","array","size","chunked","index","forEach","item","key","push","clearArray","source","length","cloneArray","slice","isUndefined","undefined","hasLength","Boolean","isNull","hasValue","returnValue","eachArray","iteratee","thisBind","additionalArg","arrayLength","call","compactMapArray","results","thisCall","arrayOriginal","returned","async","eachAsyncArray","compactMapAsyncArray","result","sign","Math","isNegative","rangeUp","start","end","step","sourceArray","position","rangeDown","range","isArray","Array","isNotArray","reflectConstruct","Reflect","construct","target","argumentsList","newTarget","args","ensureArray","flattenDeep","flat","Infinity","callback","difference","sources","differencesMap","Map","differences","currentArray","parentIndex","child","childIndex","childRoot","get","count","set","drop","amount","upTo","splice","dropRight","eachRight","additionalArgument","eachRightAsync","everyArray","sourceLength","everyAsyncArray","filterArray","filterAsyncArray","first","flatten","level","i","reduce","previousValue","currentValue","concat","initial","intersection","arrays","otherItem","includes","invokeArray","regexToPath","regexCloseBracket","emptyString","toPath","replace","split","propertyString","link","objectKeys","Object","keys","hasOwn","hasKeys","properties","pathArray","lastPath","pop","initialPathObject","hasAnyKeys","find","isConstructor","constructor","isConstructorFactory","constructorName","name","isConstructorNameFactory","isTypeFactory","method","primarySource","otherSources","isBufferCall","isBuffer","isPlainObject","toString","trim","isEqual","equals","sourceProperties","isMatchArray","compareArray","mathNativeMax","max","largest","last","indexFrom","mapArray","concurrentEachArray","Promise","all","mapAsyncArray","mapRightArray","trueIndex","mapWhile","subtract","minuend","subtrahend","sortNumberAscending","numberList","sort","partition","predicate","rejected","subtractReverse","sortNumberDescening","remove","removeThese","removeBy","rest","right","floor","random","randomInt","min","isNumberEqual","arrayFrom","from","toArray","arrayLike","mapFn","thisArg","shuffle","shuffleArray","value","sample","sampleArray","used","mathNativeMin","smallest","getNumberInsertIndex","insertIndex","take","endIndex","takeRight","indexRight","onlyUnique","indexOf","sortUnique","unique","isSorted","filter","union","untilFalseArray","untilTrueArray","whileCompactMap","whileEachArray","whileMapArray","without","sourcesSet","Set","has","xor","xorMap","xored","zip","map","unZip","arraySet","ensureBuffer","Buffer","alloc","clearBuffer","fill","isFunction","Function","isNumberCall","isNumber","isNotNumber","isString","String","isNotString","objectAssign","assign","assignToObject","assignToClass","prototype","extendClass","countBy","collection","object","countKey","propertyName","countWithoutKey","findIndexCache","element","indexMatch","findIndex","id","findItem","sortCollectionDescendingFilter","previous","next","ifMatch","previousKey","nextKey","sortCollectionDescending","getLowest","sortCollectionAscendingFilter","sortCollectionAscending","getHighest","groupBy","sortedObject","indexBy","invokeCollection","property","invokeCollectionAsync","pluckObject","targets","pluck","sortObjectsAlphabetically","localeCompare","sortCollectionAlphabetically","sortObjectsAlphabeticallyReverse","sortCollectionAlphabeticallyReverse","getFileExtension","substring","lastIndexOf","getFilename","regexTestFactory","regexType","test","isFileCSS","isFileHTML","isFileJS","isFileJSON","after","callable","point","ary","before","eachAsyncObject","propertyCount","eachObject","objectKeysArray","forEachAsync","values","valuesLength","isSetCall","isSet","forOf","isGeneratorCall","isGenerator","forOfAsync","generatorArgs","isAsyncCall","isAsync","generateLoop","arrayLoop","arrayLoopAsync","objectLoop","objectLoopAsync","forOfLoop","forOfLoopAsync","argument1","argument2","argument3","isIterateeAsync","each","Chain","methods","this","addChainMethod","thisChain","methodName","setValue","done","chain","config","curry","arity","curries","curried","curryArgs","curryRight","unshift","noop","times","timesMap","Timers","list","clearTimeout","delete","time","currentThis","setTimeout","clear","timers","timer","clearTimers","applyNative","apply","thisArgument","debounce","debounced","bind","ifInvoke","negate","nthArg","once","getType","cloneType","sourceType","forOfMap","resultsObject","methodPush","add","methodPushBound","methodSet","forOfMapAsync","resultsGenerator","mapAsyncObject","thisObject","mapObject","original","over","iteratees","everyAsyncObject","everyObject","forOfEvery","forOfEveryAsync","every","overEvery","predicates","arg","reArg","indexes","throttle","throttled","shouldThrottle","wrap","wrapper","functionPrototype","cacheNativeMethod","getPropNames","getOwnPropertyNames","getPropDesc","getOwnPropertyDescriptor","defProp","defineProperty","hasProp","hasOwnProperty","isSame","is","augend","addend","deduct","divide","increment","multiply","calcProgress","total","currentAmount","randomFloat","remainder","subtractAll","a","b","sumAll","isNumberInRange","isNumberNotInRange","isPositive","isZero","isOdd","isEven","objectEntries","entries","getEntries","compactKeys","compactedKeys","compactMapAsyncObject","compactMapObject","filterObject","filterAsyncObject","invert","isMatchObject","sourceKeys","targetKeys","escapeRegexRegex","escapeRegex","arrayToRegex","makeSafe","RegExp","join","isRegexCall","isRegex","omit","blacklist","blacklistRegex","numberToString","pick","whitelist","objectSize","objectLengthProperty","objectSizeProperty","zipObject","unZipObject","objectValues","normalizeCase","camelCase","toLowerCase","toUpperCase","space","kebabCase","snakeCase","upperCase","lowerCase","insertInRange","string","text","rightString","chunkString","match","initialString","restString","replaceList","words","rawURLDecodeRegex","andRegex","lessThanRegex","moreThanRegex","doubleQuoteRegex","rawURLDecode","decodeURIComponent","htmlEntities","sanitize","tokenizeRegEx","wordsRegEx","tokenize","truncate","maxLength","stringLength","breakAll","breakAllLength","truncateDown","truncateRight","truncateUp","getWords","upperFirstLetter","upperFirst","upperFirstOnly","upperFirstAll","upperFirstOnlyAll","getTypeName","isArguments","isMapCall","isMap","typedArrayRegex","arrayConstructorName","isTypedArray","noValue","isArrayLike","strictFlag","isBigIntCall","isBigInt","isBooleanCall","isBoolean","isArrayBufferCall","isArrayBuffer","isChild","sourceChild","targetParent","constructorNames","isCloneable","isDateCall","isDate","isEmpty","isFalse","isF32Call","isF32","isF64Call","isF64","isInteger","Number","isFloat","isI16Call","isI16","isI32Call","isI32","isI8Call","isI8","isIterable","Symbol","iterator","isPromise","isKindAsync","isParent","sourceParent","targetChild","isPrimitive","type","isRelated","targetOne","targetTwo","isSafeInteger","isSafeInt","isSameType","other","otherType","isTrue","isU16Call","isU16","isU32Call","isU32","isU8Call","isU8","isU8CCall","isU8C","isWeakMapCall","isWeakMap","isDeno","globalThis","Deno","isNodejs","process","versions","node","isTruthy","returnIfTrue","isFalsy","ifValue","optional","notEqual","jsonNative","JSON","jsonParse","reviver","parse","stringify","createAssertError","expected","localOptions","options","errorTitle","title","file","Error","assertAsync","sourceArg","assert","bindAll","bindThis","targetAssign","structuredCloneSafe","structuredClone","clone","concurrent","compact","sourceKeysLength","targetObject","keyName","forOfCompactMapAsync","forOfCompactMap","compactMap","everyArg","forOfFilter","forOfFilterAsync","returnFlow","flow","flowRight","flowAsync","flowAsyncRight","forMap","cloned","methodBound","arraysToObject","search","hasDot","ifNotAssign","rootObject","equalThis","Intervals","clearInterval","setInterval","intervals","interval","clearIntervals","merge","currentSource","sourceItem","sourceKey","Model","static","modelName","modelSource","models","model","pair","concurrentStatus","queue","allSettled","promise","propertyMatch","compared","setKey","Store","data","Proxy","proxySource","console","log","stubArray","stubFalse","stubObject","stubString","stubTrue","timesAsync","timesMapAsync","toggle","on","off","UniqID","totalActive","freed","totalFree","shift","free","isActive","shouldReset","reset","uniqID","VirtualStorage","initialObject","items","getItem","hasItem","setItem","removeItem","virtualStorage","inAsync","inSync","copyFolder","sourceFolder","destinationFolder","files","readdir","sourcePath","path","stat","isDirectory","folderDestination","mkdir","recursive","destinationPath","copyFile","copyToPath","currentFile","importMeta","__filename","fileURLToPath","url","currentPath","__dirname","dirname"],"mappings":"oKAcO,SAASA,EAAMC,EAAOC,EAAO,GACnC,MAAMC,EAAU,GAChB,IAAIC,EAAQ,EAUZ,OATAH,EAAMI,SAAQ,CAACC,EAAMC,KACdA,EAAML,IACXC,EAAQK,KAAK,IACTD,GACHH,KAGFD,EAAQC,GAAOI,KAAKF,EAAK,IAEnBH,CACR,CCdO,SAASM,EAAWC,GAE1B,OADAA,EAAOC,OAAS,EACTD,CACR,CCHO,SAASE,EAAWF,GAC1B,OAAOA,EAAOG,OACf,CCJO,SAASC,EAAYJ,GAC3B,YAAkBK,IAAXL,CACR,CCAO,SAASM,EAAUN,GACzB,OAAOO,QAAQP,EAAOC,OACvB,CCFO,SAASO,EAAOR,GACtB,OAAkB,OAAXA,CACR,CCDO,SAASS,EAAST,GACxB,OAAQI,EAAYJ,KAAYQ,EAAOR,EACxC,CCRO,SAASU,EAAYV,GAC3B,OAAOA,CACR,CCYO,SAASW,EAAUX,EAAQY,EAAUC,EAAUC,G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arB,IAAS,CACjD,MAAM2R,EAAWrR,EAAON,GACxBwB,EAAQxB,GAAS2R,KAAYvO,EAAMpD,EAAO2R,EAC1C,CAEF,OAAOnQ,CACR,CCpBOI,eAAempB,GAAWC,EAAcC,GAC9C,MAAMC,QAAcC,EAAQH,GAc5B,aAbMnpB,EAAeqpB,GAAOtpB,MAAOmjB,IAClC,MAAMqG,EAAaC,EAAK9P,KAAKyP,EAAcjG,GAE3C,UADwBuG,EAAKF,IACfG,cAAe,CAC5B,MAAMC,EAAoBH,EAAK9P,KAAK0P,EAAmBlG,EAAKze,QAAQ0kB,EAAc,WAC5ES,EAAMD,EAAmB,CAC9BE,WAAW,UAENX,GAAWK,EAAYI,EAChC,YAhBA5pB,eAA0BopB,EAAcC,EAAmBlG,GAC1D,MAAMqG,EAAaC,EAAK9P,KAAKyP,EAAcjG,GACrC4G,EAAkBN,EAAK9P,KAAK0P,EAAmBlG,SAC/C6G,EAASR,EAAYO,EAC5B,CAaSE,CAAWb,EAAcC,EAAmBlG,EAClD,KAEK,CACR,CC3BO,SAAS+G,GAAYC,GAC3B,OAAIxI,WAAWyI,WACPA,WAEDC,EAAcF,EAAWG,IACjC,CACO,SAASC,GAAYJ,GAC3B,OAAIxI,WAAW6I,UACPA,UAEDf,EAAKgB,QAAQJ,EAAcF,EAAWG,KAC9C"} \ No newline at end of file diff --git a/docs/basic.es.js b/docs/basic.es.js index 2344234..181af9e 100644 --- a/docs/basic.es.js +++ b/docs/basic.es.js @@ -1,2 +1,2 @@ -function t(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function n(t){return t.length=0,t}function r(t){return t.slice()}function e(t){return void 0===t}function o(t){return Boolean(t.length)}function u(t){return null===t}function c(t){return!e(t)&&!u(t)}function i(t){return t}function s(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const f=n.call(e,t,u,r,i,s,o);c(f)&&r.push(f)})):s(t,((t,u,i,s)=>{const f=n(t,u,r,i,s,e,o);c(f)&&r.push(f)})),r}async function l(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const u=await n(t,e,r,o);c(u)&&r.push(u)})),r}const{sign:h}=Math;function g(t){return-1===h(t)}function p(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function m(t,n,r=1,e=[]){return g(r)?e:t{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function x(t,n=1,r=t.length){return t.splice(n,r)}const O=(t,n=1,r=t.length)=>x(t,0,r-n);function $(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function j(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function C(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function F(t,n,r=[],e){return await l(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function R(t,n){return n?t.slice(0,n):t[0]}function N(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat(A(n))),[]);return r}function T(t){return t.slice(0,t.length-1)}function P(t,...n){return f(t,(t=>{if(C(n,(n=>n.includes(t))))return t}))}function U(t,n,r){if(!t)return;const e=t.length;if(c(r))for(let o=0;o(r=r[t],c(r)))),r}const q=Object.keys;function V(t){if(t)return q(t)}const z=Object.hasOwn;function G(t,...n){if(t)return C(n,(n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}}))}function J(t,...n){if(t)return Boolean(n.find((n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}})))}function W(t,n){return t?.constructor===n||!1}function H(t){return n=>W(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...r){return r?t(n)&&C(r,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!c(t)&&"Object("===t.constructor.toString().trim().slice(9,16),rt=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const r=V(t);if(G(n,r))return C(r,(r=>rt(t[r],n[r])))}else if(w(t)&&t.length===n.length)return C(t,((t,r)=>rt(t,n[r])));return!1};function et(t,n){return t.length===n.length&&C(t,((t,r)=>rt(n[r],t)))}const ot=Math.max;function ut(t){return ot(...t)}function ct(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function it(t,n,r=[],e,o){return c(e)?s(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):s(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function st(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function lt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function at(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function dt(t,n){return n-t}function mt(t){return t.sort(dt)}function wt(t,n){let r=t.length;for(let e=0;er)return $t(t);if(1===n)return[t[Et(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Ft(t,n=1){return t.slice(0,n)}function Rt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Nt(t,n,r){return r.indexOf(t)===n}function Tt(t,n,r){return t!==r[n-1]}function Pt(t,n){return n?t.filter(Tt):t.filter(Nt)}function Ut(...t){return Pt(I(t))}function Lt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Vt(...t){const n=v(Map),r=[];return 2===t.length?M(t[0],t[1]):(s(t,((t,r)=>{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&r.push(t.child)})),r)}function zt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Gt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Jt(t){return tt(t)&&t||c(t)&&Buffer.from(t)||Buffer.alloc(0)}function Wt(t){return t.fill(0),t}const Ht=t=>!!c(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=H(String);function tn(t){return!Yt(t)}const nn=Object.assign;function rn(t,n){if(nt(n))nn(t,n);else if(Ht(n)){const r=n.name;r?t[r]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function en(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function sn(t,n){let r=0;return s(t,(t=>{t[n]&&r++})),r}function fn(t,n){let r=0;return s(t,(t=>{t[n]||r++})),r}function ln(t,n,r,e,o){if(t[o]===e)return!0}function an(t,n,r="id"){const e=t.findIndex(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function hn(t,n,r="id"){const e=t.find(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function gn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function pn(t,n="id",r){return t.sort(((t,e)=>gn(t,e,n,r)))}function dn(t,n){return pn(t,n,!1)[0]}function mn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function wn(t,n="id",r){return t.sort(((t,e)=>mn(t,e,n,r)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const r={};return s(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function vn(t,n="id"){const r={};return s(t,(t=>{r[t[n]]=t})),r}function An(t,n,r,e){return it(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function In(t,n,r,e){return ft(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function Mn(t,n){return it(t,(t=>En(t,n)))}function xn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function On(t,n="id",r){return t.sort(((t,e)=>xn(t,e,n,r)))}function $n(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function jn(t,n="id",r){return t.sort(((t,e)=>$n(t,e,n,r)))}function Cn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Sn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Bn(t){return n=>!!c(n)&&t.test(n)}const Fn=Bn(/\.css$/),Rn=Bn(/\.html$/),Nn=Bn(/\.js$/),Tn=Bn(/\.json$/);function Pn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Un(t,n){return(...r)=>t(...r.splice(0,n))}function Ln(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const _n=async(t,n,r,e)=>{if(!t)return;const o=V(t);return c(r)?await l(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await l(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Dn(t,n,r,e){if(!t)return;const o=V(t);return c(r)?s(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):s(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Zn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let h;const g=Hn(s);if(c(i)&&s)return h=w(i)?g?n:t:nt(i)||Ht(i)?g?e:r:o?g?u:o:Gn(i)?u:g?e:r,h(i,s,f,l,a)}}const Qn=Kn(s,l,Dn,_n,Vn,Jn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function tr(t,r=t.length){const e=[],o=(...u)=>{if(e.push(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function nr(t,r=t.length){const e=[],o=(...u)=>{if(e.unshift(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function rr(){}function er(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const cr=v(ur);function ir(t,n){return cr.set(t,n)}function sr(){er(setTimeout(rr,0),(t=>{cr.remove(t)}))}const fr=Reflect.apply;function lr(t,n,r){if(Ht(t))return fr(t,n,r)}function ar(t,n){function r(...t){!1!==r.id&&cr.remove(r.id),r.id=ir((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(cr.remove(r.id),r.id=!1)},r}function hr(t,n,...r){if(Ht(t))return n?t.call(n,...r):t(...r)}function gr(t){return(...n)=>!t(...n)}function pr(t=0){return(...n)=>n[t]}const dr=t=>{let n;return(...r)=>(c(n)||(n=t(...r)),n)};function mr(t){return t?.constructor}function wr(t,n=[]){const r=mr(t);return r===Function&&"function"===r.name?function(){}:v(r,n)}function yr(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=Ht(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function br(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=Ht(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function vr(t,n,r={}){if(t)return await _n(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function Ar(t,n,r={},e,o){if(t)return c(e)?Dn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Dn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Ir=Kn(it,ft,Ar,vr,yr,br);function Er(t){return(...n)=>Ir(t,(t=>t(...n)))}async function Mr(t,n){if(!t)return;return S(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function xr(t,n){if(!t)return;return C(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Or(t,n=i){if(w(t)||qn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function $r(t,n=i,r){if(Gn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(w(t)||qn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const jr=Kn(C,S,xr,Mr,Or,$r);function Cr(t){return n=>jr(t,(t=>t(n)))}function Sr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Br(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=ir((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{cr.remove(r.id),r.id=!1},r}function Fr(t,n){return(...r)=>n(t,...r)}const Rr=Function.prototype;function Nr(t){return Rr.call.bind(t)}const Tr=Object.getOwnPropertyNames,Pr=Object.getOwnPropertyDescriptor,Ur=Object.defineProperty,Lr=Nr(Object.hasOwnProperty),_r=Object.is;function Dr(t,n){return t+n}function Zr(t){return t-1}function kr(t,n){return t/n}function qr(t){return t+1}function Vr(t,n){return t*n}function zr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Gr}=Math;function Jr(t,n=0){return Gr()*(t-n)+n}function Wr(t,n){return t%n}function Hr(t){return t.reduce(((t,n)=>t-n),0)}function Kr(t){return t.reduce(((t,n)=>t+n),0)}function Qr(t,n,r){return t>n&&tr}const{sign:Yr}=Math;function te(t){return 1===Yr(t)}function ne(t){return 0===t}const re=Object.entries;function ee(t){if(c(t))return re(t)}function oe(t){const n=[];return Dn(t,((t,r)=>{c(t)&&n.push(r)})),n}async function ue(t,n=i,r={}){return await _n(t,(async(t,e,o,u,i)=>{const s=await n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function ce(t,n=i,r={}){return Dn(t,((t,e,o,u,i)=>{const s=n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function ie(t,n,r={}){return Dn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function se(t,n,r={}){return await _n(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function fe(t,n={}){if(t)return Dn(t,((t,r)=>{n[t]=r})),n}const le=(t,n)=>{if(t===n)return!0;const r=V(t),e=V(n);return r.length===e.length&&C(r,(r=>t[r]===n[r]))},ae=/[()[\]{}*+?^$|#.,/\\\s-]/g;function he(t){return t.replace(ae,"\\$&")}function ge(t,n){return n?ge(it(t,he)):RegExp(t.join("|"))}const pe=Q("RegExp"),de=X(pe);function me(t,n){if(!t)return{};if(w(n)){const r=ge(n);return ie(t,((t,n)=>!r.test(n)))}if(de(n))return ie(t,((t,r)=>!n.test(r)));if(Yt(n))return ie(t,((t,r)=>r!==n));if(Qt(n)){const r=n.toString();return ie(t,((t,n)=>n!==r))}return Ht(n)?ie(t,((t,r)=>!n(t,r))):nn({},t)}const we=(t,n,r={})=>{if(t)return s(n,(n=>{r[n]=t[n]})),r};function ye(t){if(!t)return;if(nt(t))return V(t).length;const n=t.length;if(c(n))return n;const r=t.size;return c(n)?r:V(t).length}const be=(t,n)=>{const r={};return s(t,((t,e)=>{r[t]=n[e]})),r},ve=t=>{const n=[],r=[];return Dn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Ae=/[ _-]+/g;function Ie(t){let n="";return t.replace(Ae," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Ee=/[ _-]+/g,Me=/[ ]+/g;function xe(t){return t.replace(/([A-Z]+)/g," $1").replace(Ee," ").trim().toLowerCase().replace(Me,"-")}const Oe=/[ _-]+/g,$e=/[ ]+/g;function je(t){return t.replace(/([A-Z]+)/g," $1").replace(Oe," ").trim().toLowerCase().replace($e,"_")}const Ce=/[ _-]+/g;function Se(t){return t.replace(/([A-Z]+)/g," $1").replace(Ce," ").trim().toUpperCase()}const Be=/[ _-]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Be," ").trim().toLowerCase()}function Re(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Ne(t,n=1){return t[t.length-n]}function Te(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Pe(t,n=1){return t.slice(0,-1*n)}function Ue(t,n=1){return t.substring(n)}function Le(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const _e=/%(?![\da-f]{2})/gi,De=/&/g,Ze=//g,qe=/"/g;function Ve(t){return decodeURIComponent(t.replace(_e,(()=>"%25")))}function ze(t){return t.replace(De,"&").replace(Ze,"<").replace(ke,">").replace(qe,""")}function Ge(t){return ze(Ve(t))}const Je=/\S+/g,We=/\w+/g;function He(t){return t.match(Je)||[]}function Ke(t){return t.match(We)||[]}function Qe(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function Xe(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const Ye=/\w+/g;function to(t){return t[0].toUpperCase()}function no(t){return to(t)+Ue(t)}function ro(t){return to(t)+Ue(t).toLowerCase()}function eo(t){return t.replace(Ye,(t=>no(t)))}function oo(t){return t.replace(Ye,(t=>ro(t)))}function uo(t){return mr(t)?.name}function co(t){return!!c(t)&&"[object Arguments]"===t.toString()}const io=Q("Map"),so=X(io),fo=/Array/,lo="Array";function ao(t){if(t){const n=uo(t);if(fo.test(n)&&n!==lo)return!0}return!1}function ho(t){return!c(t)}function go(t,n){if(ho(t)||Ht(t))return!1;if(w(t)||ao(t))return!0;const r=t.length;if(!ho(r)||!Qt(r)||r<0)return!1;if(n){const n=V(t);return!!n&&jr(n,((t,n)=>n>=0&&Qt(n)))}return!0}const po=Q("BigInt"),mo=X(po),wo=Q("Boolean"),yo=X(wo),bo=Q("ArrayBuffer"),vo=X(bo);function Ao(t,n){return!(!t||!n)&&t instanceof n}const Io=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function Eo(t){if(c(t)){const n=t?.constructor?.name;return Io.test(n)}return!1}const Mo=Q("Date"),xo=X(Mo);function Oo(t){return Yt(t)||w(t)?!o(t):nt(t)?!ye(t):!c(t)}function $o(t){return!1===t}const jo=Q("Float32Array"),Co=X(jo),So=Q("Float64Array"),Bo=X(So),{isInteger:Fo}=Number,Ro=Fo,No=Q("Int16Array"),To=X(No),Po=Q("Int32Array"),Uo=X(Po),Lo=Q("Int8Array"),_o=X(Lo);function Do(t){return c(t)&&"function"==typeof t[Symbol.iterator]}function Zo(t){return!!t&&t instanceof Promise}function ko(t){return!!t&&(Zo(t)||Hn(t)||Gn(t))}function qo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Vo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function zo(t,n){return!ho(t)&&!ho(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Go}=Number,Jo=Go;function Wo(t,n){const r=mr(t),e=mr(n);return r===e&&r.name===e.name}function Ho(t){return!0===t}const Ko=Q("Uint16Array"),Qo=X(Ko),Xo=Q("Uint32Array"),Yo=X(Xo),tu=Q("Uint8Array"),nu=X(tu),ru=Q("Uint8ClampedArray"),eu=X(ru),ou=Q("WeakMap"),uu=X(ou),cu=void 0!==globalThis.Deno,iu=void 0!==globalThis.process&&process.versions&&process.versions.node;function su(t,n=!0){return Boolean(t)&&n}function fu(t,n=!0){return!1===Boolean(t)&&n}function lu(t,n,r,e){if(c(t)){if(Ht(n))return r?lr(n,r,e):n(...e);if(nt(n))return n[r]=t,n}}function au(t,n){return $o(rt(t,n))}const hu=JSON;function gu(t,n){if(t)return hu.parse(t,n)}const pu=hu.stringify;function du(t,n,r){const e=globalThis.options||r;let o;return Ht(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${pu(t)}\n\t\tExpected: ${pu(n)}`,e)}async function mu(t,n,r){const e=await t;return!(Ht(n)&&!1===await n(e,r))&&!au(e,n)||du(e,n,r)}function wu(t,n,r){if(ko(t)||ko(n))return mu(t,n,r);return!(Ht(n)&&!1===n(t,r))&&!au(t,n)||du(t,n,r)}function yu(t,n,r){const e=Ir(t,(t=>Ht(t)?t.bind(n):t));return r?en(r,e):e}function bu(t){if(t){if(tt(t))return Wt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const vu=globalThis.structuredClone;function Au(t){return vu(t)}async function Iu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;usu(t)))}async function Mu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);c(e)&&r.push(e)}return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);c(u)&&e(u)}return o}const u=Ht(o.set);for await(const[r,e]of t){const i=await n(e,r,o,t);c(i)&&(u?o.set(r,i):o[r]=i)}return o}function xu(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);c(u)&&o(u)}return e}const o=Ht(e.set);for(const[r,u]of t){const i=n(u,r,e,t);c(i)&&(o?e.set(r,i):e[r]=i)}return e}const Ou=Kn(f,a,ce,ue,xu,Mu);function $u(...t){return Hn(t[0])?async function(...n){return jr(t,(async t=>jr(n,(async n=>t(n)))))}:function(...n){return jr(t,(t=>jr(n,(n=>t(n)))))}}function ju(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=Ht(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Cu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=Ht(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Su=Kn(B,F,ie,se,ju,Cu);function Bu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Fu=Bu(s),Ru=Bu($);function Nu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Tu=Nu(l),Pu=Nu(j);function Uu(t,n){const r=wr(t),e=r.push||r.add;if(e&&Ht(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else Ht(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Lu(t,n){const r={};return s(t,((t,e)=>{r[n[e]]=t})),r}function _u(t,n,r){return!ho(t)&&!ho(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,r):de(n)?n.test(t):Ht(n)?n(t):w(n)?C(n,(n=>_u(t,n))):jr(n,(n=>_u(t,n))):w(t)?de(n)?C(t,(t=>t.test(n))):Ht(n)?C(t,n):w(n)?C(n,(n=>_u(t,n))):t.includes(n,r):!!nt(t)&&(de(n)?xr(t,(t=>t.test(n))):Ht(n)?xr(t,n):nt(n)?xr(t,((t,r)=>t===n[r])):xr(t,(t=>_u(t,n))))))}const Du=Bn(/\./),Zu=(t,n,r)=>(n&&!c(t[n])&&(t[n]=r),t);class ku{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const qu=v(ku);function Vu(t,n){return qu.set(t,n)}function zu(){er(setTimeout(rr,0),(t=>{qu.remove(t)}))}function Gu(t,...n){return Qn(n,(n=>{Qn(n,((n,r)=>{if(t[r]&&(nt(n)||w(n)||n.forEach))return Gu(t[r],n);t[r]=n}))})),t}class Ju{static models=new Map;constructor(t,n){c(n)?(en(this,n),this.modelName=t,Ju.models.set(t,n)):en(this,t)}delete(t){Ju.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Ju.models.set(t||this.modelName,this)}has(t){return Ju.models.has(t||this.modelName)}get(t){return Ju.models.get(t||this.modelName)}}function Wu(t,n){return c(n)?v(Ju,[t,n]):k(t,Ju.models)}function Hu(t,n){return[t,n]}function Ku(t,n,r){const e=t.length,o=[];for(let u=0;uC(r,(r=>rt(t[r],n[r])));function Yu(t,n,r){return n&&nt(t)||Qt(n)&&w(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function tc(t,n,r){return Qt(r)&&w(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class nc{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Dn(t,(n=>{t[n]=new nc(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new nc(r),!0)})}}function rc(){return[]}function ec(){return!1}const oc=()=>({}),uc=()=>"",cc=()=>!0;async function ic(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const ac=v(lc);class hc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):c(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=wr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function gc(t){return new hc(t)}async function pc(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function n(t){return t.length=0,t}function r(t){return t.slice()}function e(t){return void 0===t}function o(t){return Boolean(t.length)}function u(t){return null===t}function c(t){return!e(t)&&!u(t)}function i(t){return t}function s(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const f=n.call(e,t,u,r,i,s,o);c(f)&&r.push(f)})):s(t,((t,u,i,s)=>{const f=n(t,u,r,i,s,e,o);c(f)&&r.push(f)})),r}async function l(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const u=await n(t,e,r,o);c(u)&&r.push(u)})),r}const{sign:h}=Math;function g(t){return-1===h(t)}function p(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function m(t,n,r=1,e=[]){return g(r)?e:t{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function x(t,n=1,r=t.length){return t.splice(n,r)}const O=(t,n=1,r=t.length)=>x(t,0,r-n);function $(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function j(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function C(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function F(t,n,r=[],e){return await l(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function R(t,n){return n?t.slice(0,n):t[0]}function N(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat(A(n))),[]);return r}function T(t){return t.slice(0,t.length-1)}function P(t,...n){return f(t,(t=>{if(C(n,(n=>n.includes(t))))return t}))}function U(t,n,r){if(!t)return;const e=t.length;if(c(r))for(let o=0;o(r=r[t],c(r)))),r}const q=Object.keys;function V(t){if(t)return q(t)}const z=Object.hasOwn;function G(t,...n){if(t)return C(n,(n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}}))}function J(t,...n){if(t)return Boolean(n.find((n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}})))}function W(t,n){return t?.constructor===n||!1}function H(t){return n=>W(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...r){return r?t(n)&&C(r,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!c(t)&&"Object("===t.constructor.toString().trim().slice(9,16),rt=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const r=V(t);if(G(n,r))return C(r,(r=>rt(t[r],n[r])))}else if(w(t)&&t.length===n.length)return C(t,((t,r)=>rt(t,n[r])));return!1};function et(t,n){return t.length===n.length&&C(t,((t,r)=>rt(n[r],t)))}const ot=Math.max;function ut(t){return ot(...t)}function ct(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function it(t,n,r=[],e,o){return c(e)?s(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):s(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function st(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function lt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function at(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function dt(t,n){return n-t}function mt(t){return t.sort(dt)}function wt(t,n){let r=t.length;for(let e=0;er)return $t(t);if(1===n)return[t[Et(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Ft(t,n=1){return t.slice(0,n)}function Rt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Nt(t,n,r){return r.indexOf(t)===n}function Tt(t,n,r){return t!==r[n-1]}function Pt(t,n){return n?t.filter(Tt):t.filter(Nt)}function Ut(...t){return Pt(I(t))}function Lt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Vt(...t){const n=v(Map),r=[];return 2===t.length?M(t[0],t[1]):(s(t,((t,r)=>{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&r.push(t.child)})),r)}function zt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Gt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Jt(t){return tt(t)&&t||c(t)&&Buffer.from(t)||Buffer.alloc(0)}function Wt(t){return t.fill(0),t}const Ht=t=>!!c(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=H(String);function tn(t){return!Yt(t)}const nn=Object.assign;function rn(t,n){if(nt(n))nn(t,n);else if(Ht(n)){const r=n.name;r?t[r]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function en(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function sn(t,n){let r=0;return s(t,(t=>{t[n]&&r++})),r}function fn(t,n){let r=0;return s(t,(t=>{t[n]||r++})),r}function ln(t,n,r,e,o){if(t[o]===e)return!0}function an(t,n,r="id"){const e=t.findIndex(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function hn(t,n,r="id"){const e=t.find(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function gn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function pn(t,n="id",r){return t.sort(((t,e)=>gn(t,e,n,r)))}function dn(t,n){return pn(t,n,!1)[0]}function mn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function wn(t,n="id",r){return t.sort(((t,e)=>mn(t,e,n,r)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const r={};return s(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function vn(t,n="id"){const r={};return s(t,(t=>{r[t[n]]=t})),r}function An(t,n,r,e){return it(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function In(t,n,r,e){return ft(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function Mn(t,n){return it(t,(t=>En(t,n)))}function xn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function On(t,n="id",r){return t.sort(((t,e)=>xn(t,e,n,r)))}function $n(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function jn(t,n="id",r){return t.sort(((t,e)=>$n(t,e,n,r)))}function Cn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Sn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Bn(t){return n=>!!c(n)&&t.test(n)}const Fn=Bn(/\.css$/),Rn=Bn(/\.html$/),Nn=Bn(/\.js$/),Tn=Bn(/\.json$/);function Pn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Un(t,n){return(...r)=>t(...r.splice(0,n))}function Ln(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const _n=async(t,n,r,e)=>{if(!t)return;const o=V(t);return c(r)?await l(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await l(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Dn(t,n,r,e){if(!t)return;const o=V(t);return c(r)?s(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):s(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Zn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let h;const g=Hn(s);if(c(i)&&s)return h=w(i)?g?n:t:nt(i)||Ht(i)?g?e:r:o?g?u:o:Gn(i)?u:g?e:r,h(i,s,f,l,a)}}const Qn=Kn(s,l,Dn,_n,Vn,Jn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function tr(t,r=t.length){const e=[],o=(...u)=>{if(e.push(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function nr(t,r=t.length){const e=[],o=(...u)=>{if(e.unshift(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function rr(){}function er(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const cr=v(ur);function ir(t,n){return cr.set(t,n)}function sr(){er(setTimeout(rr,0),(t=>{cr.remove(t)}))}const fr=Reflect.apply;function lr(t,n,r){if(Ht(t))return fr(t,n,r)}function ar(t,n){function r(...t){!1!==r.id&&cr.remove(r.id),r.id=ir((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(cr.remove(r.id),r.id=!1)},r}function hr(t,n,...r){if(Ht(t))return n?t.call(n,...r):t(...r)}function gr(t){return(...n)=>!t(...n)}function pr(t=0){return(...n)=>n[t]}const dr=t=>{let n;return(...r)=>(c(n)||(n=t(...r)),n)};function mr(t){return t?.constructor}function wr(t,n=[]){const r=mr(t);return r===Function&&"function"===r.name?function(){}:v(r,n)}function yr(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=Ht(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function br(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=Ht(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function vr(t,n,r={}){if(t)return await _n(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function Ar(t,n,r={},e,o){if(t)return c(e)?Dn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Dn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Ir=Kn(it,ft,Ar,vr,yr,br);function Er(t){return(...n)=>Ir(t,(t=>t(...n)))}async function Mr(t,n){if(!t)return;return S(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function xr(t,n){if(!t)return;return C(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Or(t,n=i){if(w(t)||qn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function $r(t,n=i,r){if(Gn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(w(t)||qn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const jr=Kn(C,S,xr,Mr,Or,$r);function Cr(t){return n=>jr(t,(t=>t(n)))}function Sr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Br(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=ir((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{cr.remove(r.id),r.id=!1},r}function Fr(t,n){return(...r)=>n(t,...r)}const Rr=Function.prototype;function Nr(t){return Rr.call.bind(t)}const Tr=Object.getOwnPropertyNames,Pr=Object.getOwnPropertyDescriptor,Ur=Object.defineProperty,Lr=Nr(Object.hasOwnProperty),_r=Object.is;function Dr(t,n){return t+n}function Zr(t){return t-1}function kr(t,n){return t/n}function qr(t){return t+1}function Vr(t,n){return t*n}function zr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Gr}=Math;function Jr(t,n=0){return Gr()*(t-n)+n}function Wr(t,n){return t%n}function Hr(t){return t.reduce(((t,n)=>t-n),0)}function Kr(t){return t.reduce(((t,n)=>t+n),0)}function Qr(t,n,r){return t>n&&tr}const{sign:Yr}=Math;function te(t){return 1===Yr(t)}function ne(t){return 0===t}function re(t){return!(1&~t)}function ee(t){return!(1&t)}const oe=Object.entries;function ue(t){if(c(t))return oe(t)}function ce(t){const n=[];return Dn(t,((t,r)=>{c(t)&&n.push(r)})),n}async function ie(t,n=i,r={}){return await _n(t,(async(t,e,o,u,i)=>{const s=await n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function se(t,n=i,r={}){return Dn(t,((t,e,o,u,i)=>{const s=n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function fe(t,n,r={}){return Dn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function le(t,n,r={}){return await _n(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function ae(t,n={}){if(t)return Dn(t,((t,r)=>{n[t]=r})),n}const he=(t,n)=>{if(t===n)return!0;const r=V(t),e=V(n);return r.length===e.length&&C(r,(r=>t[r]===n[r]))},ge=/[()[\]{}*+?^$|#.,/\\\s-]/g;function pe(t){return t.replace(ge,"\\$&")}function de(t,n){return n?de(it(t,pe)):RegExp(t.join("|"))}const me=Q("RegExp"),we=X(me);function ye(t,n){if(!t)return{};if(w(n)){const r=de(n);return fe(t,((t,n)=>!r.test(n)))}if(we(n))return fe(t,((t,r)=>!n.test(r)));if(Yt(n))return fe(t,((t,r)=>r!==n));if(Qt(n)){const r=n.toString();return fe(t,((t,n)=>n!==r))}return Ht(n)?fe(t,((t,r)=>!n(t,r))):nn({},t)}const be=(t,n,r={})=>{if(t)return s(n,(n=>{r[n]=t[n]})),r};function ve(t){if(!t)return;if(nt(t))return V(t).length;const n=t.length;if(c(n))return n;const r=t.size;return c(n)?r:V(t).length}const Ae=(t,n)=>{const r={};return s(t,((t,e)=>{r[t]=n[e]})),r},Ie=t=>{const n=[],r=[];return Dn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Ee=/[ _-]+/g;function Me(t){let n="";return t.replace(Ee," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const xe=/[ _-]+/g,Oe=/[ ]+/g;function $e(t){return t.replace(/([A-Z]+)/g," $1").replace(xe," ").trim().toLowerCase().replace(Oe,"-")}const je=/[ _-]+/g,Ce=/[ ]+/g;function Se(t){return t.replace(/([A-Z]+)/g," $1").replace(je," ").trim().toLowerCase().replace(Ce,"_")}const Be=/[ _-]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Be," ").trim().toUpperCase()}const Re=/[ _-]+/g;function Ne(t){return t.replace(/([A-Z]+)/g," $1").replace(Re," ").trim().toLowerCase()}function Te(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Pe(t,n=1){return t[t.length-n]}function Ue(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Le(t,n=1){return t.slice(0,-1*n)}function _e(t,n=1){return t.substring(n)}function De(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const Ze=/%(?![\da-f]{2})/gi,ke=/&/g,qe=//g,ze=/"/g;function Ge(t){return decodeURIComponent(t.replace(Ze,(()=>"%25")))}function Je(t){return t.replace(ke,"&").replace(qe,"<").replace(Ve,">").replace(ze,""")}function We(t){return Je(Ge(t))}const He=/\S+/g,Ke=/\w+/g;function Qe(t){return t.match(He)||[]}function Xe(t){return t.match(Ke)||[]}function Ye(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function to(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const no=/\w+/g;function ro(t){return t[0].toUpperCase()}function eo(t){return ro(t)+_e(t)}function oo(t){return ro(t)+_e(t).toLowerCase()}function uo(t){return t.replace(no,(t=>eo(t)))}function co(t){return t.replace(no,(t=>oo(t)))}function io(t){return mr(t)?.name}function so(t){return!!c(t)&&"[object Arguments]"===t.toString()}const fo=Q("Map"),lo=X(fo),ao=/Array/,ho="Array";function go(t){if(t){const n=io(t);if(ao.test(n)&&n!==ho)return!0}return!1}function po(t){return!c(t)}function mo(t,n){if(po(t)||Ht(t))return!1;if(w(t)||go(t))return!0;const r=t.length;if(!po(r)||!Qt(r)||r<0)return!1;if(n){const n=V(t);return!!n&&jr(n,((t,n)=>n>=0&&Qt(n)))}return!0}const wo=Q("BigInt"),yo=X(wo),bo=Q("Boolean"),vo=X(bo),Ao=Q("ArrayBuffer"),Io=X(Ao);function Eo(t,n){return!(!t||!n)&&t instanceof n}const Mo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function xo(t){if(c(t)){const n=t?.constructor?.name;return Mo.test(n)}return!1}const Oo=Q("Date"),$o=X(Oo);function jo(t){return Yt(t)||w(t)?!o(t):nt(t)?!ve(t):!c(t)}function Co(t){return!1===t}const So=Q("Float32Array"),Bo=X(So),Fo=Q("Float64Array"),Ro=X(Fo),{isInteger:No}=Number,To=No,Po=Q("Int16Array"),Uo=X(Po),Lo=Q("Int32Array"),_o=X(Lo),Do=Q("Int8Array"),Zo=X(Do);function ko(t){return c(t)&&"function"==typeof t[Symbol.iterator]}function qo(t){return!!t&&t instanceof Promise}function Vo(t){return!!t&&(qo(t)||Hn(t)||Gn(t))}function zo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Go(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Jo(t,n){return!po(t)&&!po(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Wo}=Number,Ho=Wo;function Ko(t,n){const r=mr(t),e=mr(n);return r===e&&r.name===e.name}function Qo(t){return!0===t}const Xo=Q("Uint16Array"),Yo=X(Xo),tu=Q("Uint32Array"),nu=X(tu),ru=Q("Uint8Array"),eu=X(ru),ou=Q("Uint8ClampedArray"),uu=X(ou),cu=Q("WeakMap"),iu=X(cu),su=void 0!==globalThis.Deno,fu=void 0!==globalThis.process&&process.versions&&process.versions.node;function lu(t,n=!0){return Boolean(t)&&n}function au(t,n=!0){return!1===Boolean(t)&&n}function hu(t,n,r,e){if(c(t)){if(Ht(n))return r?lr(n,r,e):n(...e);if(nt(n))return n[r]=t,n}}function gu(t,n){return Co(rt(t,n))}const pu=JSON;function du(t,n){if(t)return pu.parse(t,n)}const mu=pu.stringify;function wu(t,n,r){const e=globalThis.options||r;let o;return Ht(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${mu(t)}\n\t\tExpected: ${mu(n)}`,e)}async function yu(t,n,r){const e=await t;return!(Ht(n)&&!1===await n(e,r))&&!gu(e,n)||wu(e,n,r)}function bu(t,n,r){if(Vo(t)||Vo(n))return yu(t,n,r);return!(Ht(n)&&!1===n(t,r))&&!gu(t,n)||wu(t,n,r)}function vu(t,n,r){const e=Ir(t,(t=>Ht(t)?t.bind(n):t));return r?en(r,e):e}function Au(t){if(t){if(tt(t))return Wt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Iu=globalThis.structuredClone;function Eu(t){return Iu(t)}async function Mu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;ulu(t)))}async function Ou(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);c(e)&&r.push(e)}return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);c(u)&&e(u)}return o}const u=Ht(o.set);for await(const[r,e]of t){const i=await n(e,r,o,t);c(i)&&(u?o.set(r,i):o[r]=i)}return o}function $u(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);c(u)&&o(u)}return e}const o=Ht(e.set);for(const[r,u]of t){const i=n(u,r,e,t);c(i)&&(o?e.set(r,i):e[r]=i)}return e}const ju=Kn(f,a,se,ie,$u,Ou);function Cu(...t){return Hn(t[0])?async function(...n){return jr(t,(async t=>jr(n,(async n=>t(n)))))}:function(...n){return jr(t,(t=>jr(n,(n=>t(n)))))}}function Su(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=Ht(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Bu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=Ht(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Fu=Kn(B,F,fe,le,Su,Bu);function Ru(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Nu=Ru(s),Tu=Ru($);function Pu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Uu=Pu(l),Lu=Pu(j);function _u(t,n){const r=wr(t),e=r.push||r.add;if(e&&Ht(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else Ht(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Du(t,n){const r={};return s(t,((t,e)=>{r[n[e]]=t})),r}function Zu(t,n,r){return!po(t)&&!po(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,r):we(n)?n.test(t):Ht(n)?n(t):w(n)?C(n,(n=>Zu(t,n))):jr(n,(n=>Zu(t,n))):w(t)?we(n)?C(t,(t=>t.test(n))):Ht(n)?C(t,n):w(n)?C(n,(n=>Zu(t,n))):t.includes(n,r):!!nt(t)&&(we(n)?xr(t,(t=>t.test(n))):Ht(n)?xr(t,n):nt(n)?xr(t,((t,r)=>t===n[r])):xr(t,(t=>Zu(t,n))))))}const ku=Bn(/\./),qu=(t,n,r)=>(n&&!c(t[n])&&(t[n]=r),t);class Vu{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const zu=v(Vu);function Gu(t,n){return zu.set(t,n)}function Ju(){er(setTimeout(rr,0),(t=>{zu.remove(t)}))}function Wu(t,...n){return Qn(n,(n=>{Qn(n,((n,r)=>{if(t[r]&&(nt(n)||w(n)||n.forEach))return Wu(t[r],n);t[r]=n}))})),t}class Hu{static models=new Map;constructor(t,n){c(n)?(en(this,n),this.modelName=t,Hu.models.set(t,n)):en(this,t)}delete(t){Hu.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Hu.models.set(t||this.modelName,this)}has(t){return Hu.models.has(t||this.modelName)}get(t){return Hu.models.get(t||this.modelName)}}function Ku(t,n){return c(n)?v(Hu,[t,n]):k(t,Hu.models)}function Qu(t,n){return[t,n]}function Xu(t,n,r){const e=t.length,o=[];for(let u=0;uC(r,(r=>rt(t[r],n[r])));function nc(t,n,r){return n&&nt(t)||Qt(n)&&w(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function rc(t,n,r){return Qt(r)&&w(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class ec{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Dn(t,(n=>{t[n]=new ec(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new ec(r),!0)})}}function oc(){return[]}function uc(){return!1}const cc=()=>({}),ic=()=>"",sc=()=>!0;async function fc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const gc=v(hc);class pc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):c(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=wr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function dc(t){return new pc(t)}async function mc(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:l}=Math;function h(t){return-1===l(t)}function p(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const y=Array.isArray;const d=Reflect.construct;function m(t,n=[],e){const r=y(n)?n:[n];return e?d(t,r,e):d(t,r)}function A(t){return y(t)&&t||i(t)&&[t]||[]}function b(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=m(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function O(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function I(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function M(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function E(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const S=/\.|\[/,x=/]/g,R="";function N(t){return t.replace(x,R).split(S)}function T(t,n){if(!n)return!1;let e=n;return M(y(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function U(t){if(t)return B(t)}const P=Object.hasOwn;function k(t,...n){if(t)return M(n,(n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}}))}function $(t,n){return t?.constructor===n||!1}function D(t){return n=>$(n,t)}function L(t){return t?.constructor?.name}function q(t){return n=>L(n)===t||!1}function V(t){return function(n,...e){return e?t(n)&&M(e,t):t(n)}}const Z=q("Buffer"),K=V(Z),z=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),_=(t,n)=>{if(t===n)return!0;if(K(t))return t.equals(n);if(t.toString()===n.toString())if(z(t)){const e=U(t);if(k(n,e))return M(e,(e=>_(t[e],n[e])))}else if(y(t)&&t.length===n.length)return M(t,((t,e)=>_(t,n[e])));return!1};const W=Math.max;function G(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function J(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function H(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,ft=q("Number"),lt=V(ft);const ht=D(String);const pt=Object.assign;function gt(t,n){if(z(n))pt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:pt(t,n)}else(ht(n)||lt(n))&&(t[n]=n);return t}function yt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function bt(t,n="id",e){return t.sort(((t,r)=>At(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:G(n,(n=>t[n]))}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Mt(t){return n=>!!i(n)&&t.test(n)}const jt=Mt(/\.css$/),Ft=Mt(/\.html$/),Et=Mt(/\.js$/),St=Mt(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=U(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Rt(t,n,e,r){if(!t)return;const o=U(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Tt=V(Nt);function Bt(t,n){if(Tt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Ut=q("GeneratorFunction"),Pt=V(Ut);async function kt(t,n,e){if(Tt(t)){for(const e of t)await n(e,t);return t}if(Pt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const $t=q("AsyncFunction"),Dt=V($t);function Lt(t,n,e,r,o,c){return(s,u,a,f,l)=>{let h;const p=Dt(u);if(i(s)&&u)return h=y(s)?p?n:t:z(s)||at(s)?p?r:e:o?p?c:o:Pt(s)?c:p?r:e,h(s,u,a,f,l)}}const qt=Lt(s,a,Rt,xt,Bt,kt);class Vt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Zt(){}function Kt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const _t=m(zt);function Wt(t,n){return _t.set(t,n)}const Gt=Reflect.apply;function Jt(t,n,e){if(at(t))return Gt(t,n,e)}function Ht(t){return t?.constructor}function Qt(t,n=[]){const e=Ht(t);return e===Function&&"function"===e.name?function(){}:m(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Rt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Rt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Lt(G,J,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return j(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return M(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(y(t)||Tt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if(Pt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(y(t)||Tt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Lt(M,j,on,rn,cn,sn);const an=Function.prototype;function fn(t){return an.call.bind(t)}const ln=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,pn=Object.defineProperty,gn=fn(Object.hasOwnProperty),yn=Object.is;const{random:dn}=Math;const{sign:mn}=Math;function An(t){return 0===t}const bn=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Rt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Rt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function On(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const In=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Mn(t){return t.replace(In,"\\$&")}function jn(t,n){return n?jn(G(t,Mn)):RegExp(t.join("|"))}const Fn=q("RegExp"),En=V(Fn);function Sn(t){if(!t)return;if(z(t))return U(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:U(t).length}const xn=/[ _-]+/g;const Rn=/[ _-]+/g,Nn=/[ ]+/g;const Tn=/[ _-]+/g,Bn=/[ ]+/g;const Un=/[ _-]+/g;const Pn=/[ _-]+/g;function kn(t,n=1){return t.substring(n)}const $n=/%(?![\da-f]{2})/gi,Dn=/&/g,Ln=//g,Vn=/"/g;function Zn(t){return decodeURIComponent(t.replace($n,(()=>"%25")))}function Kn(t){return t.replace(Dn,"&").replace(Ln,"<").replace(qn,">").replace(Vn,""")}const zn=/\S+/g,_n=/\w+/g;const Wn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+kn(t)}function Hn(t){return Gn(t)+kn(t).toLowerCase()}function Qn(t){return Ht(t)?.name}const Xn=q("Map"),Yn=V(Xn),te=/Array/,ne="Array";function ee(t){if(t){const n=Qn(t);if(te.test(n)&&n!==ne)return!0}return!1}function re(t){return!i(t)}const oe=q("BigInt"),ie=V(oe),ce=q("Boolean"),se=V(ce),ue=q("ArrayBuffer"),ae=V(ue);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const le=q("Date"),he=V(le);function pe(t){return!1===t}const ge=q("Float32Array"),ye=V(ge),de=q("Float64Array"),me=V(de),{isInteger:Ae}=Number,be=Ae,we=q("Int16Array"),ve=V(we),Ce=q("Int32Array"),Oe=V(Ce),Ie=q("Int8Array"),Me=V(Ie);function je(t){return!!t&&t instanceof Promise}function Fe(t){return!!t&&(je(t)||Dt(t)||Pt(t))}const{isSafeInteger:Ee}=Number,Se=Ee;const xe=q("Uint16Array"),Re=V(xe),Ne=q("Uint32Array"),Te=V(Ne),Be=q("Uint8Array"),Ue=V(Be),Pe=q("Uint8ClampedArray"),ke=V(Pe),$e=q("WeakMap"),De=V($e),Le=void 0!==globalThis.Deno,qe=void 0!==globalThis.process&&process.versions&&process.versions.node;function Ve(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(_(t,n))}const Ke=JSON;const ze=Ke.stringify;function _e(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${ze(t)}\n\t\tExpected: ${ze(n)}`,r)}async function We(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||_e(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function He(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Qe=Lt(u,f,vn,wn,He,Je);function Xe(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function Ye(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const tr=Lt(F,E,Cn,On,Xe,Ye);function nr(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const er=nr(s),rr=nr(O);function or(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ir=or(a),cr=or(I);const sr=Mt(/\./);class ur{list=m(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ar=m(ur);class fr{static models=new Map;constructor(t,n){i(n)?(yt(this,n),this.modelName=t,fr.models.set(t,n)):yt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}class lr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Rt(t,(n=>{t[n]=new lr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new lr(e),!0)})}}class hr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const pr=m(hr);class gr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=Vt,t.Intervals=ur,t.Model=fr,t.Store=lr,t.Timers=zt,t.UniqID=hr,t.VirtualStorage=gr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Jt,t.arrayToRegex=jn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Fe(t)||Fe(n)?We(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||_e(t,n,e)},t.assertAsync=We,t.assign=yt,t.assignToClass=dt,t.assignToObject=gt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?yt(e,r):r},t.cacheNativeMethod=fn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(xn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return m(Vt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(K(t))return ut(t);if(y(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Kt(setTimeout(Zt,0),(t=>{ar.remove(t)}))},t.clearTimers=function(){Kt(setTimeout(Zt,0),(t=>{_t.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.compact=function(t){if(z(t)){const n=U(t),e=n.length,r={};for(let o=0;oVe(t)))},t.compactKeys=function(t){const n=[];return Rt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Qe,t.compactMapArray=u,t.compactMapAsyncArray=f,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&_t.remove(e.id),e.id=Wt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(_t.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=pn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Rt,t.eachRight=O,t.eachRightAsync=I,t.ensureArray=A,t.ensureBuffer=function(t){return K(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=An,t.escapeRegex=Mn,t.escapeRegexRegex=In,t.every=un,t.everyArg=function(...t){return Dt(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=M,t.everyAsyncArray=j,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rmt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=mt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>mt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e},t.flattenDeep=b,t.flow=er,t.flowAsync=ir,t.flowAsyncRight=cr,t.flowRight=rr,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=He,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Xe,t.forOfFilterAsync=Ye,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Lt,t.get=T,t.getEntries=function(t){if(i(t))return bn(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return bt(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return M(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=ln,t.getType=Ht,t.getTypeName=Qn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!re(n)&&!re(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):En(e)?e.test(n):at(e)?e(n):y(e)?M(e,(e=>t(n,e))):un(e,(e=>t(n,e))):y(n)?En(e)?M(n,(t=>t.test(e))):at(e)?M(n,e):y(e)?M(e,(e=>t(n,e))):n.includes(e,r):!!z(n)&&(En(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):z(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}})))},t.hasDot=sr,t.hasKeys=k,t.hasLength=r,t.hasProp=gn,t.hasValue=i,t.htmlEntities=Kn,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Jt(n,e,r):n(...r);if(z(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(M(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return ar.set(t,n)},t.intervals=ar,t.invert=function(t,n={}){if(t)return Rt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return J(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=y,t.isArrayBuffer=ae,t.isArrayBufferCall=ue,t.isArrayLike=function(t,n){if(re(t)||at(t))return!1;if(y(t)||ee(t))return!0;const e=t.length;if(!re(e)||!lt(e)||e<0)return!1;if(n){const n=U(t);return!!n&&un(n,((t,n)=>n>=0&<(n)))}return!0},t.isAsync=Dt,t.isAsyncCall=$t,t.isBigInt=ie,t.isBigIntCall=oe,t.isBoolean=se,t.isBooleanCall=ce,t.isBuffer=K,t.isBufferCall=Z,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=$,t.isConstructorFactory=D,t.isConstructorNameFactory=q,t.isDate=he,t.isDateCall=le,t.isDeno=Le,t.isEmpty=function(t){return ht(t)||y(t)?!r(t):z(t)?!Sn(t):!i(t)},t.isEqual=_,t.isF32=ye,t.isF32Call=ge,t.isF64=me,t.isF64Call=de,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=jt,t.isFileHTML=Ft,t.isFileJS=Et,t.isFileJSON=St,t.isFloat=be,t.isFunction=at,t.isGenerator=Pt,t.isGeneratorCall=Ut,t.isI16=ve,t.isI16Call=we,t.isI32=Oe,t.isI32Call=Ce,t.isI8=Me,t.isI8Call=Ie,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Fe,t.isMap=Yn,t.isMapCall=Xn,t.isMatchArray=function(t,n){return t.length===n.length&&M(t,((t,e)=>_(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=U(t),r=U(n);return e.length===r.length&&M(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodejs=qe,t.isNotArray=function(t){return!y(t)},t.isNotNumber=function(t){return!lt(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=lt,t.isNumberCall=ft,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=z,t.isPositive=function(t){return 1===mn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=je,t.isRegex=En,t.isRegexCall=Fn,t.isRelated=function(t,n){return!re(t)&&!re(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Se,t.isSame=yn,t.isSameType=function(t,n){const e=Ht(t),r=Ht(n);return e===r&&e.name===r.name},t.isSet=Tt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=Ve,t.isTypeFactory=V,t.isTypedArray=ee,t.isU16=Re,t.isU16Call=xe,t.isU32=Te,t.isU32Call=Ne,t.isU8=Ue,t.isU8C=ke,t.isU8CCall=Pe,t.isU8Call=Be,t.isUndefined=e,t.isWeakMap=De,t.isWeakMapCall=$e,t.isZero=An,t.jsonParse=function(t,n){if(t)return Ke.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Rn," ").trim().toLowerCase().replace(Nn,"-")},t.keys=U,t.largest=function(t){return W(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase()},t.map=en,t.mapArray=G,t.mapAsyncArray=J,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(z(e)||y(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?m(fr,[t,n]):T(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=re,t.noop=Zt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=pt,t.objectEntries=bn,t.objectSize=Sn,t.omit=function(t,n){if(!t)return{};if(y(n)){const e=jn(n);return Cn(t,((t,n)=>!e.test(n)))}if(En(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(lt(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):pt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return G(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=U(t))=>M(e,(e=>_(t[e],n[e]))),t.randomFloat=function(t,n=0){return dn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Mt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cOt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=bt,t.sortCollectionDescendingFilter=At,t.sortNumberAscending=function(t){return t.sort(H)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=Ot,t.sortObjectsAlphabeticallyReverse=It,t.sortUnique=ct,t.stringify=ze,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=H,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Wt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{_t.remove(e.id),e.id=!1},e},t.timer=Wt,t.timers=_t,t.times=Kt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Rt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(b(t))},t.uniqID=pr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Hn,t.upperFirstOnlyAll=function(t){return t.replace(Wn,(t=>Hn(t)))},t.virtualStorage=function(t){return new gr(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(_n)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=m(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e}})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:l}=Math;function h(t){return-1===l(t)}function p(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const y=Array.isArray;const d=Reflect.construct;function m(t,n=[],e){const r=y(n)?n:[n];return e?d(t,r,e):d(t,r)}function A(t){return y(t)&&t||i(t)&&[t]||[]}function b(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=m(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function O(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function I(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function M(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function E(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const S=/\.|\[/,x=/]/g,R="";function N(t){return t.replace(x,R).split(S)}function T(t,n){if(!n)return!1;let e=n;return M(y(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function U(t){if(t)return B(t)}const P=Object.hasOwn;function k(t,...n){if(t)return M(n,(n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}}))}function $(t,n){return t?.constructor===n||!1}function D(t){return n=>$(n,t)}function L(t){return t?.constructor?.name}function q(t){return n=>L(n)===t||!1}function V(t){return function(n,...e){return e?t(n)&&M(e,t):t(n)}}const Z=q("Buffer"),K=V(Z),z=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),_=(t,n)=>{if(t===n)return!0;if(K(t))return t.equals(n);if(t.toString()===n.toString())if(z(t)){const e=U(t);if(k(n,e))return M(e,(e=>_(t[e],n[e])))}else if(y(t)&&t.length===n.length)return M(t,((t,e)=>_(t,n[e])));return!1};const W=Math.max;function G(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function J(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function H(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,ft=q("Number"),lt=V(ft);const ht=D(String);const pt=Object.assign;function gt(t,n){if(z(n))pt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:pt(t,n)}else(ht(n)||lt(n))&&(t[n]=n);return t}function yt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function bt(t,n="id",e){return t.sort(((t,r)=>At(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:G(n,(n=>t[n]))}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Mt(t){return n=>!!i(n)&&t.test(n)}const jt=Mt(/\.css$/),Ft=Mt(/\.html$/),Et=Mt(/\.js$/),St=Mt(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=U(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Rt(t,n,e,r){if(!t)return;const o=U(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Tt=V(Nt);function Bt(t,n){if(Tt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Ut=q("GeneratorFunction"),Pt=V(Ut);async function kt(t,n,e){if(Tt(t)){for(const e of t)await n(e,t);return t}if(Pt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const $t=q("AsyncFunction"),Dt=V($t);function Lt(t,n,e,r,o,c){return(s,u,a,f,l)=>{let h;const p=Dt(u);if(i(s)&&u)return h=y(s)?p?n:t:z(s)||at(s)?p?r:e:o?p?c:o:Pt(s)?c:p?r:e,h(s,u,a,f,l)}}const qt=Lt(s,a,Rt,xt,Bt,kt);class Vt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Zt(){}function Kt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const _t=m(zt);function Wt(t,n){return _t.set(t,n)}const Gt=Reflect.apply;function Jt(t,n,e){if(at(t))return Gt(t,n,e)}function Ht(t){return t?.constructor}function Qt(t,n=[]){const e=Ht(t);return e===Function&&"function"===e.name?function(){}:m(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Rt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Rt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Lt(G,J,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return j(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return M(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(y(t)||Tt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if(Pt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(y(t)||Tt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Lt(M,j,on,rn,cn,sn);const an=Function.prototype;function fn(t){return an.call.bind(t)}const ln=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,pn=Object.defineProperty,gn=fn(Object.hasOwnProperty),yn=Object.is;const{random:dn}=Math;const{sign:mn}=Math;function An(t){return 0===t}const bn=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Rt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Rt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function On(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const In=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Mn(t){return t.replace(In,"\\$&")}function jn(t,n){return n?jn(G(t,Mn)):RegExp(t.join("|"))}const Fn=q("RegExp"),En=V(Fn);function Sn(t){if(!t)return;if(z(t))return U(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:U(t).length}const xn=/[ _-]+/g;const Rn=/[ _-]+/g,Nn=/[ ]+/g;const Tn=/[ _-]+/g,Bn=/[ ]+/g;const Un=/[ _-]+/g;const Pn=/[ _-]+/g;function kn(t,n=1){return t.substring(n)}const $n=/%(?![\da-f]{2})/gi,Dn=/&/g,Ln=//g,Vn=/"/g;function Zn(t){return decodeURIComponent(t.replace($n,(()=>"%25")))}function Kn(t){return t.replace(Dn,"&").replace(Ln,"<").replace(qn,">").replace(Vn,""")}const zn=/\S+/g,_n=/\w+/g;const Wn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+kn(t)}function Hn(t){return Gn(t)+kn(t).toLowerCase()}function Qn(t){return Ht(t)?.name}const Xn=q("Map"),Yn=V(Xn),te=/Array/,ne="Array";function ee(t){if(t){const n=Qn(t);if(te.test(n)&&n!==ne)return!0}return!1}function re(t){return!i(t)}const oe=q("BigInt"),ie=V(oe),ce=q("Boolean"),se=V(ce),ue=q("ArrayBuffer"),ae=V(ue);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const le=q("Date"),he=V(le);function pe(t){return!1===t}const ge=q("Float32Array"),ye=V(ge),de=q("Float64Array"),me=V(de),{isInteger:Ae}=Number,be=Ae,we=q("Int16Array"),ve=V(we),Ce=q("Int32Array"),Oe=V(Ce),Ie=q("Int8Array"),Me=V(Ie);function je(t){return!!t&&t instanceof Promise}function Fe(t){return!!t&&(je(t)||Dt(t)||Pt(t))}const{isSafeInteger:Ee}=Number,Se=Ee;const xe=q("Uint16Array"),Re=V(xe),Ne=q("Uint32Array"),Te=V(Ne),Be=q("Uint8Array"),Ue=V(Be),Pe=q("Uint8ClampedArray"),ke=V(Pe),$e=q("WeakMap"),De=V($e),Le=void 0!==globalThis.Deno,qe=void 0!==globalThis.process&&process.versions&&process.versions.node;function Ve(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(_(t,n))}const Ke=JSON;const ze=Ke.stringify;function _e(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${ze(t)}\n\t\tExpected: ${ze(n)}`,r)}async function We(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||_e(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function He(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Qe=Lt(u,f,vn,wn,He,Je);function Xe(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function Ye(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const tr=Lt(F,E,Cn,On,Xe,Ye);function nr(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const er=nr(s),rr=nr(O);function or(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ir=or(a),cr=or(I);const sr=Mt(/\./);class ur{list=m(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ar=m(ur);class fr{static models=new Map;constructor(t,n){i(n)?(yt(this,n),this.modelName=t,fr.models.set(t,n)):yt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}class lr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Rt(t,(n=>{t[n]=new lr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new lr(e),!0)})}}class hr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const pr=m(hr);class gr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=Vt,t.Intervals=ur,t.Model=fr,t.Store=lr,t.Timers=zt,t.UniqID=hr,t.VirtualStorage=gr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Jt,t.arrayToRegex=jn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Fe(t)||Fe(n)?We(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||_e(t,n,e)},t.assertAsync=We,t.assign=yt,t.assignToClass=dt,t.assignToObject=gt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?yt(e,r):r},t.cacheNativeMethod=fn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(xn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return m(Vt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(K(t))return ut(t);if(y(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Kt(setTimeout(Zt,0),(t=>{ar.remove(t)}))},t.clearTimers=function(){Kt(setTimeout(Zt,0),(t=>{_t.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.compact=function(t){if(z(t)){const n=U(t),e=n.length,r={};for(let o=0;oVe(t)))},t.compactKeys=function(t){const n=[];return Rt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Qe,t.compactMapArray=u,t.compactMapAsyncArray=f,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&_t.remove(e.id),e.id=Wt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(_t.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=pn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Rt,t.eachRight=O,t.eachRightAsync=I,t.ensureArray=A,t.ensureBuffer=function(t){return K(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=An,t.escapeRegex=Mn,t.escapeRegexRegex=In,t.every=un,t.everyArg=function(...t){return Dt(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=M,t.everyAsyncArray=j,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rmt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=mt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>mt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e},t.flattenDeep=b,t.flow=er,t.flowAsync=ir,t.flowAsyncRight=cr,t.flowRight=rr,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=He,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Xe,t.forOfFilterAsync=Ye,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Lt,t.get=T,t.getEntries=function(t){if(i(t))return bn(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return bt(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return M(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=ln,t.getType=Ht,t.getTypeName=Qn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!re(n)&&!re(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):En(e)?e.test(n):at(e)?e(n):y(e)?M(e,(e=>t(n,e))):un(e,(e=>t(n,e))):y(n)?En(e)?M(n,(t=>t.test(e))):at(e)?M(n,e):y(e)?M(e,(e=>t(n,e))):n.includes(e,r):!!z(n)&&(En(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):z(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}})))},t.hasDot=sr,t.hasKeys=k,t.hasLength=r,t.hasProp=gn,t.hasValue=i,t.htmlEntities=Kn,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Jt(n,e,r):n(...r);if(z(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(M(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return ar.set(t,n)},t.intervals=ar,t.invert=function(t,n={}){if(t)return Rt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return J(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=y,t.isArrayBuffer=ae,t.isArrayBufferCall=ue,t.isArrayLike=function(t,n){if(re(t)||at(t))return!1;if(y(t)||ee(t))return!0;const e=t.length;if(!re(e)||!lt(e)||e<0)return!1;if(n){const n=U(t);return!!n&&un(n,((t,n)=>n>=0&<(n)))}return!0},t.isAsync=Dt,t.isAsyncCall=$t,t.isBigInt=ie,t.isBigIntCall=oe,t.isBoolean=se,t.isBooleanCall=ce,t.isBuffer=K,t.isBufferCall=Z,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=$,t.isConstructorFactory=D,t.isConstructorNameFactory=q,t.isDate=he,t.isDateCall=le,t.isDeno=Le,t.isEmpty=function(t){return ht(t)||y(t)?!r(t):z(t)?!Sn(t):!i(t)},t.isEqual=_,t.isEven=function(t){return!(1&t)},t.isF32=ye,t.isF32Call=ge,t.isF64=me,t.isF64Call=de,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=jt,t.isFileHTML=Ft,t.isFileJS=Et,t.isFileJSON=St,t.isFloat=be,t.isFunction=at,t.isGenerator=Pt,t.isGeneratorCall=Ut,t.isI16=ve,t.isI16Call=we,t.isI32=Oe,t.isI32Call=Ce,t.isI8=Me,t.isI8Call=Ie,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Fe,t.isMap=Yn,t.isMapCall=Xn,t.isMatchArray=function(t,n){return t.length===n.length&&M(t,((t,e)=>_(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=U(t),r=U(n);return e.length===r.length&&M(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodejs=qe,t.isNotArray=function(t){return!y(t)},t.isNotNumber=function(t){return!lt(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=lt,t.isNumberCall=ft,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=z,t.isPositive=function(t){return 1===mn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=je,t.isRegex=En,t.isRegexCall=Fn,t.isRelated=function(t,n){return!re(t)&&!re(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Se,t.isSame=yn,t.isSameType=function(t,n){const e=Ht(t),r=Ht(n);return e===r&&e.name===r.name},t.isSet=Tt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=Ve,t.isTypeFactory=V,t.isTypedArray=ee,t.isU16=Re,t.isU16Call=xe,t.isU32=Te,t.isU32Call=Ne,t.isU8=Ue,t.isU8C=ke,t.isU8CCall=Pe,t.isU8Call=Be,t.isUndefined=e,t.isWeakMap=De,t.isWeakMapCall=$e,t.isZero=An,t.jsonParse=function(t,n){if(t)return Ke.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Rn," ").trim().toLowerCase().replace(Nn,"-")},t.keys=U,t.largest=function(t){return W(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase()},t.map=en,t.mapArray=G,t.mapAsyncArray=J,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(z(e)||y(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?m(fr,[t,n]):T(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=re,t.noop=Zt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=pt,t.objectEntries=bn,t.objectSize=Sn,t.omit=function(t,n){if(!t)return{};if(y(n)){const e=jn(n);return Cn(t,((t,n)=>!e.test(n)))}if(En(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(lt(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):pt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return G(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=U(t))=>M(e,(e=>_(t[e],n[e]))),t.randomFloat=function(t,n=0){return dn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Mt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cOt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=bt,t.sortCollectionDescendingFilter=At,t.sortNumberAscending=function(t){return t.sort(H)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=Ot,t.sortObjectsAlphabeticallyReverse=It,t.sortUnique=ct,t.stringify=ze,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=H,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Wt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{_t.remove(e.id),e.id=!1},e},t.timer=Wt,t.timers=_t,t.times=Kt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Rt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(b(t))},t.uniqID=pr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Hn,t.upperFirstOnlyAll=function(t){return t.replace(Wn,(t=>Hn(t)))},t.virtualStorage=function(t){return new gr(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(_n)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=m(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e}})); //# sourceMappingURL=basic.js.map diff --git a/docs/browser.bundle.es.js b/docs/browser.bundle.es.js index 4dc24d0..ba0d395 100644 --- a/docs/browser.bundle.es.js +++ b/docs/browser.bundle.es.js @@ -869,7 +869,7 @@ function get(propertyString, target) { return false; } let link = target; - const pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString); + const pathArray = isArray(propertyString) ? propertyString : toPath(propertyString); everyArray(pathArray, (item) => { link = link[item]; return hasValue(link); @@ -1279,7 +1279,7 @@ function mapRightArray(source, iteratee, results = [], additionalArgument) { */ function mapWhile(source, iteratee, results = [], additionalArgument) { const arrayLength = source.length; - for (let index = 0;index < arrayLength;index++) { + for (let index = 0; index < arrayLength; index++) { const item = source[index]; const returned = iteratee(item, index, results, source, arrayLength, additionalArgument); if (returned === false) { @@ -2953,7 +2953,10 @@ function forOf(source, iteratee) { } return source; } - for (const [key, value] of source) { + for (const [ + key, + value + ] of source) { iteratee(value, key, source); } return source; @@ -3015,15 +3018,15 @@ function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, fo if (!hasValue(source) || !iteratee) { return; } else if (isArray(source)) { - returned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop; + returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; } else if (isPlainObject(source) || isFunction(source)) { - returned = (isIterateeAsync) ? objectLoopAsync : objectLoop; + returned = isIterateeAsync ? objectLoopAsync : objectLoop; } else if (forOfLoop) { - returned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop; + returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; } else if (isGenerator(source)) { returned = forOfLoopAsync; } else { - returned = (isIterateeAsync) ? objectLoopAsync : objectLoop; + returned = isIterateeAsync ? objectLoopAsync : objectLoop; } return returned(source, iteratee, argument1, argument2, argument3); }; @@ -4307,6 +4310,40 @@ function isZero(source) { return source === 0; } +/** + * Checks if a number is odd & returns true or false. + * + * @function isOdd + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isOdd, assert } from '@universalweb/acid'; + * assert(isOdd(1), true); + */ +function isOdd(source) { + return (source & 1) === 1; +} + +/** + * Checks if a number is even & returns true or false. + * + * @function isEven + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEven, assert } from '@universalweb/acid'; + * assert(isEven(1), true); + */ +function isEven(source) { + return (source & 1) === 0; +} + const objectEntries = Object.entries; /** * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error. @@ -4680,11 +4717,11 @@ function objectSize(source) { * // => { 'a': 1, 'b': 2 } */ const zipObject = (properties, values) => { - const zipedObject = {}; + const source = {}; eachArray(properties, (item, key) => { - zipedObject[item] = values[key]; + source[item] = values[key]; }); - return zipedObject; + return source; }; /** * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. @@ -4700,13 +4737,16 @@ const zipObject = (properties, values) => { * // => [['a', 'b'], [1, 2]] */ const unZipObject = (object) => { - const unZippedKeys = []; - const values = []; + const objectKeys = []; + const objectValues = []; eachObject(object, (item, key) => { - unZippedKeys.push(key); - values.push(item); + objectKeys.push(key); + objectValues.push(item); }); - return [unZippedKeys, values]; + return [ + objectKeys, + objectValues, + ]; }; const normalizeCase$4 = /[ _-]+/g; @@ -6246,8 +6286,14 @@ function forOfCompactMap(source, iteratee = returnValue, resultsObject) { * return item; * }), {b: 2, c: 3}); */ -const compactMap = generateLoop(compactMapArray, compactMapAsyncArray, - compactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync); +const compactMap = generateLoop( + compactMapArray, + compactMapAsyncArray, + compactMapObject, + compactMapAsyncObject, + forOfCompactMap, + forOfCompactMapAsync +); function everyArg(...methods) { if (isAsync(methods[0])) { @@ -6841,7 +6887,7 @@ function pair(argument1, argument2) { function concurrentStatus(source, iteratee, additionalArgument) { const arrayLength = source.length; const queue = []; - for (let index = 0;index < arrayLength; index++) { + for (let index = 0; index < arrayLength; index++) { queue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument); } return Promise.allSettled(queue); @@ -7095,7 +7141,7 @@ async function timesMapAsync(amount, iteratee, results = []) { * // => false */ function toggle(value, on = true, off = false) { - return (isEqual(on, value)) ? off : on; + return ((isEqual(on, value)) ? off : on); } /** @@ -8004,5 +8050,5 @@ function isNodeList(source) { return (hasValue(source)) ? source.toString() === objectNodeList : false; } -export { BrowserStorage, Chain, Intervals, Model, Store, Timers, UniqID, VirtualStorage, add, after, append, apply, arrayToRegex, arraysToObject, ary, assert, assertAsync, assign, assignToClass, assignToObject, before, bindAll, browserStorage, cacheNativeMethod, calcProgress, camelCase, chain, chunk, chunkString, clear, clearArray, clearBuffer, clearIntervals, clearTimers, clone, cloneArray, cloneType, cnsl, cnslTheme, compact, compactKeys, compactMap, compactMapArray, compactMapAsyncArray, compactMapAsyncObject, compactMapObject, concurrent, concurrentEachArray, concurrentStatus, construct, constructorName, countBy, countKey, countWithoutKey, createFragment, curry, curryRight, debounce, deduct, defProp, difference, divide, drop, dropRight, each, eachArray, eachAsyncArray, eachAsyncObject, eachObject, eachRight, eachRightAsync, ensureArray, ensureBuffer, isZero as equalsZero, escapeRegex, escapeRegexRegex, eventAdd, eventRemove, every, everyArg, everyArray, everyAsyncArray, everyAsyncObject, everyObject, extendClass, filter, filterArray, filterAsyncArray, filterAsyncObject, filterObject, findIndex, findIndexCache, findItem, first, flatten, flattenDeep, flow, flowAsync, flowAsyncRight, flowRight, forEach, forEachAsync, forMap, forOf, forOfAsync, forOfCompactMap, forOfCompactMapAsync, forOfEvery, forOfEveryAsync, forOfFilter, forOfFilterAsync, forOfMap, forOfMapAsync, generateLoop, get, getByClass, getById, getByTag, getEntries, getFileExtension, getFilename, getHighest, getLowest, getNumberInsertIndex, getPropDesc, getPropNames, getType, getTypeName, groupBy, has, hasAnyKeys, hasDot, hasKeys, hasLength, hasLocal, hasProp, hasValue, htmlEntities, ifInvoke, ifNotAssign, ifValue, importjs, inAsync, inSync, increment, indexBy, info, initial, initialString, insertInRange, intersection, interval, intervals, invert, invokeArray, invokeCollection, invokeCollectionAsync, isAgent, isArguments, isArray, isArrayBuffer, isArrayBufferCall, isArrayLike, isAsync, isAsyncCall, isBigInt, isBigIntCall, isBoolean, isBooleanCall, isBuffer, isBufferCall, isChild, isCloneable, isConstructor, isConstructorFactory, isConstructorNameFactory, isDate, isDateCall, isDeno, isDocumentReady, isDom, isEmpty, isEnter, isEqual, isF32, isF32Call, isF64, isF64Call, isFalse, isFalsy, isFileCSS, isFileHTML, isFileJS, isFileJSON, isFloat, isFunction, isGenerator, isGeneratorCall, isHTMLCollection, isI16, isI16Call, isI32, isI32Call, isI8, isI8Call, isIterable, isKindAsync, isMap, isMapCall, isMatchArray, isMatchObject, isNegative, isNodeList, isNodejs, isNotArray, isNotNumber, isNotString, isNull, isNumber, isNumberCall, isNumberEqual, isNumberInRange, isNumberNotInRange, isParent, isPlainObject, isPositive, isPrimitive, isPromise, isRegex, isRegexCall, isRelated, isSafeInt, isSame, isSameType, isSet, isSetCall, isString, isTrue, isTruthy, isTypeFactory, isTypedArray, isU16, isU16Call, isU32, isU32Call, isU8, isU8C, isU8CCall, isU8Call, isUndefined, isWeakMap, isWeakMapCall, isZero, jsonParse, kebabCase, keys, largest, last, lowerCase, map, mapArray, mapAsyncArray, mapAsyncObject, mapObject, mapRightArray, mapWhile, merge, model, multiply, negate, noValue, nodeAttribute, noop, notEqual, nthArg, objectAssign, objectEntries, objectSize, omit, once, onlyUnique, over, overEvery, pair, partition, pick, pluck, pluckObject, promise, propertyMatch, querySelector, querySelectorAll, randomFloat, randomInt, range, rangeDown, rangeUp, rawURLDecode, reArg, regexTestFactory, remainder, remove, removeBy, replaceList, rest, restString, returnValue, right, rightString, sample, sanitize, saveDimensions, selector, setKey, setValue, shuffle, smallest, snakeCase, sortCollectionAlphabetically, sortCollectionAlphabeticallyReverse, sortCollectionAscending, sortCollectionAscendingFilter, sortCollectionDescending, sortCollectionDescendingFilter, sortNumberAscending, sortNumberDescening, sortObjectsAlphabetically, sortObjectsAlphabeticallyReverse, sortUnique, stringify, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, subtractAll, subtractReverse, sumAll, take, takeRight, themes, throttle, timer, timers, times, timesAsync, timesMap, timesMapAsync, toArray, toPath, toggle, tokenize, truncate, truncateRight, unZip, unZipObject, union, uniqID, unique, untilFalseArray, untilTrueArray, updateDimensions, upperCase, upperFirst, upperFirstAll, upperFirstLetter, upperFirstOnly, upperFirstOnlyAll, virtualStorage, whileCompactMap, whileEachArray, whileMapArray, without, words, wrap, xor, zip, zipObject }; +export { BrowserStorage, Chain, Intervals, Model, Store, Timers, UniqID, VirtualStorage, add, after, append, apply, arrayToRegex, arraysToObject, ary, assert, assertAsync, assign, assignToClass, assignToObject, before, bindAll, browserStorage, cacheNativeMethod, calcProgress, camelCase, chain, chunk, chunkString, clear, clearArray, clearBuffer, clearIntervals, clearTimers, clone, cloneArray, cloneType, cnsl, cnslTheme, compact, compactKeys, compactMap, compactMapArray, compactMapAsyncArray, compactMapAsyncObject, compactMapObject, concurrent, concurrentEachArray, concurrentStatus, construct, constructorName, countBy, countKey, countWithoutKey, createFragment, curry, curryRight, debounce, deduct, defProp, difference, divide, drop, dropRight, each, eachArray, eachAsyncArray, eachAsyncObject, eachObject, eachRight, eachRightAsync, ensureArray, ensureBuffer, isZero as equalsZero, escapeRegex, escapeRegexRegex, eventAdd, eventRemove, every, everyArg, everyArray, everyAsyncArray, everyAsyncObject, everyObject, extendClass, filter, filterArray, filterAsyncArray, filterAsyncObject, filterObject, findIndex, findIndexCache, findItem, first, flatten, flattenDeep, flow, flowAsync, flowAsyncRight, flowRight, forEach, forEachAsync, forMap, forOf, forOfAsync, forOfCompactMap, forOfCompactMapAsync, forOfEvery, forOfEveryAsync, forOfFilter, forOfFilterAsync, forOfMap, forOfMapAsync, generateLoop, get, getByClass, getById, getByTag, getEntries, getFileExtension, getFilename, getHighest, getLowest, getNumberInsertIndex, getPropDesc, getPropNames, getType, getTypeName, groupBy, has, hasAnyKeys, hasDot, hasKeys, hasLength, hasLocal, hasProp, hasValue, htmlEntities, ifInvoke, ifNotAssign, ifValue, importjs, inAsync, inSync, increment, indexBy, info, initial, initialString, insertInRange, intersection, interval, intervals, invert, invokeArray, invokeCollection, invokeCollectionAsync, isAgent, isArguments, isArray, isArrayBuffer, isArrayBufferCall, isArrayLike, isAsync, isAsyncCall, isBigInt, isBigIntCall, isBoolean, isBooleanCall, isBuffer, isBufferCall, isChild, isCloneable, isConstructor, isConstructorFactory, isConstructorNameFactory, isDate, isDateCall, isDeno, isDocumentReady, isDom, isEmpty, isEnter, isEqual, isEven, isF32, isF32Call, isF64, isF64Call, isFalse, isFalsy, isFileCSS, isFileHTML, isFileJS, isFileJSON, isFloat, isFunction, isGenerator, isGeneratorCall, isHTMLCollection, isI16, isI16Call, isI32, isI32Call, isI8, isI8Call, isIterable, isKindAsync, isMap, isMapCall, isMatchArray, isMatchObject, isNegative, isNodeList, isNodejs, isNotArray, isNotNumber, isNotString, isNull, isNumber, isNumberCall, isNumberEqual, isNumberInRange, isNumberNotInRange, isOdd, isParent, isPlainObject, isPositive, isPrimitive, isPromise, isRegex, isRegexCall, isRelated, isSafeInt, isSame, isSameType, isSet, isSetCall, isString, isTrue, isTruthy, isTypeFactory, isTypedArray, isU16, isU16Call, isU32, isU32Call, isU8, isU8C, isU8CCall, isU8Call, isUndefined, isWeakMap, isWeakMapCall, isZero, jsonParse, kebabCase, keys, largest, last, lowerCase, map, mapArray, mapAsyncArray, mapAsyncObject, mapObject, mapRightArray, mapWhile, merge, model, multiply, negate, noValue, nodeAttribute, noop, notEqual, nthArg, objectAssign, objectEntries, objectSize, omit, once, onlyUnique, over, overEvery, pair, partition, pick, pluck, pluckObject, promise, propertyMatch, querySelector, querySelectorAll, randomFloat, randomInt, range, rangeDown, rangeUp, rawURLDecode, reArg, regexTestFactory, remainder, remove, removeBy, replaceList, rest, restString, returnValue, right, rightString, sample, sanitize, saveDimensions, selector, setKey, setValue, shuffle, smallest, snakeCase, sortCollectionAlphabetically, sortCollectionAlphabeticallyReverse, sortCollectionAscending, sortCollectionAscendingFilter, sortCollectionDescending, sortCollectionDescendingFilter, sortNumberAscending, sortNumberDescening, sortObjectsAlphabetically, sortObjectsAlphabeticallyReverse, sortUnique, stringify, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, subtractAll, subtractReverse, sumAll, take, takeRight, themes, throttle, timer, timers, times, timesAsync, timesMap, timesMapAsync, toArray, toPath, toggle, tokenize, truncate, truncateRight, unZip, unZipObject, union, uniqID, unique, untilFalseArray, untilTrueArray, updateDimensions, upperCase, upperFirst, upperFirstAll, upperFirstLetter, upperFirstOnly, upperFirstOnlyAll, virtualStorage, whileCompactMap, whileEachArray, whileMapArray, without, words, wrap, xor, zip, zipObject }; //# sourceMappingURL=bundle.js.map diff --git a/docs/browser.bundle.js b/docs/browser.bundle.js index 023cdc2..72685d8 100644 --- a/docs/browser.bundle.js +++ b/docs/browser.bundle.js @@ -1,8410 +1,8830 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' - ? factory(exports) - : typeof define === 'function' && define.amd - ? define(['exports'], factory) - : ((global = typeof globalThis !== 'undefined' ? globalThis : global || self), factory((global.$ = {}))); + typeof exports === "object" && typeof module !== "undefined" + ? factory(exports) + : typeof define === "function" && define.amd + ? define(["exports"], factory) + : ((global = + typeof globalThis !== "undefined" ? globalThis : global || self), + factory((global.$ = {}))); })(this, function (exports) { - 'use strict'; - - /** - * Chunks an array according to a user defined number. - * - * @function chunk - * @category Array - * @type {Function} - * @param {Array} array - Array to be chunked. - * @param {Number} size - Number which determines the size of each chunk. - * @returns {Array} - A chunked version of the source array. - * - * @example - * import { chunk, assert } from '@universalweb/acid'; - * assert(chunk([1,2,3], 1), [[1],[2],[3]]); - */ - function chunk(array, size = 1) { - const chunked = []; - let index = 0; - array.forEach((item, key) => { - if (!(key % size)) { - chunked.push([]); - if (key) { - index++; - } - } - chunked[index].push(item); - }); - return chunked; - } - - /** - * Clears the values out of an array. - * - * @function clearArray - * @category Array - * @type {Function} - * @param {Array} source - Takes an array to be emptied. - * @returns {Array} - The originally given array. - * - * @example - * import { clearArray, assert } from '@universalweb/acid'; - * assert(clearArray([1,'B', 'Cat']), []); - */ - function clearArray(source) { - source.length = 0; - return source; - } - - /** - * Clone an array (uses .slice()) and assign the source arrays values to the new array. - * - * @function cloneArray - * @category Array - * @type {Function} - * @param {Array} source - The array to be quick cloned. - * @returns {Array} - The newly cloned array with assigned items. - * - * @example - * import { cloneArray, assert } from '@universalweb/acid'; - * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']); - */ - function cloneArray(source) { - return source.slice(); - } - - /** Checks if the value is undefined. - * - * @function isUndefined - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isUndefined, assert } from '@universalweb/acid'; - * assert(isUndefined(undefined), true); - */ - function isUndefined(source) { - return source === undefined; - } - - /** - * Checks if the value has length greater than 0. - * - * @function hasLength - * @category utility - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { hasLength, assert } from '@universalweb/acid'; - * assert(hasLength([1]), true); - */ - function hasLength(source) { - return Boolean(source.length); - } - - /** - * Checks if the value is null. - * - * @function isNull - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNull, assert } from '@universalweb/acid'; - * assert(isNull(null), true); - */ - function isNull(source) { - return source === null; - } - - /** - * Checks if the value is not null or undefined. - * - * @function hasValue - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { hasValue, assert } from '@universalweb/acid'; - * assert(hasValue(1), true); - */ - function hasValue(source) { - return !isUndefined(source) && !isNull(source); - } - - /** - * A simple function which returns the value it's given. - * - * @function returnValue - * @category utility - * @param {*} source - The source object. - * @returns {source} The source object. - */ - function returnValue(source) { - return source; - } - - /** - * Iterates through the given array. - * - * @function eachArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. - * @param {*} thisBind - Iteratee called with thisBind as this. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array|undefined} - The originally given array. - * - * @example - * import { eachArray, assert } from '@universalweb/acid'; - * const list = []; - * eachArray([1, 2, 3], (item, index) => { - * list[index] = item; - * }); - * assert(list, [1, 2, 3]); - */ - function eachArray(source, iteratee, thisBind, additionalArg) { - if (!source) { - return; - } - const arrayLength = source.length; - if (hasValue(thisBind)) { - for (let index = 0; index < arrayLength; index++) { - iteratee.call(thisBind, source[index], index, source, arrayLength, additionalArg); - } - } else { - for (let index = 0; index < arrayLength; index++) { - iteratee(source[index], index, source, arrayLength, additionalArg); - } - } - return source; - } - - /** - * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. - * - * @function compactMapArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array} - An array with mapped properties that are not null or undefined. - * - * @example - * import { compactMapArray, assert } from '@universalweb/acid'; - * assert(compactMapArray([null, 2, 3], (item) => { - * return item; - * }), [2, 3]); - */ - function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) { - if (hasValue(thisCall)) { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - const returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg); - if (hasValue(returned)) { - results.push(returned); - } - }); - } else { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - const returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg); - if (hasValue(returned)) { - results.push(returned); - } - }); - } - return results; - } - - /** - * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order. - * - * @function eachAsyncArray - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. - * @param {*} thisCall - Iteratee called with thisCall as this. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array|undefined} - Returns source the originally given array. - * - * @example - * import { eachAsyncArray, assert } from '@universalweb/acid'; - * const tempList = []; - * await eachAsyncArray([1, 2, 3], async (item) => { - * tempList.push(item); - * }); - * assert(tempList, [1, 2, 3]); - */ - async function eachAsyncArray(source, iteratee, thisCall, additionalArg) { - if (!source) { - return; - } - const arrayLength = source.length; - if (hasValue(thisCall)) { - for (let index = 0; index < arrayLength; index++) { - await iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg); - } - } else { - for (let index = 0; index < arrayLength; index++) { - await iteratee(source[index], index, source, arrayLength, additionalArg); - } - } - return source; - } - - /** - * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. - * - * @function compactMapAsyncArray - * @type {Function} - * @category array - * @async - * @param {Array} source - Array to be compacted. - * @param {Function} iteratee - Iteratee to be performed on array. - * @returns {Array} - Array values after being put through an iterator. - * - * @example - * import { compactMapAsync, assert } from '@universalweb/acid'; - * assert(await compactMapAsync([1, 2, 3, null], async (item) => { - * return item; - * }), [1, 2, 3]); - */ - async function compactMapAsyncArray(source, iteratee = returnValue) { - const results = []; - await eachAsyncArray(source, async (item, index, arrayLength) => { - const result = await iteratee(item, index, results, arrayLength); - if (hasValue(result)) { - results.push(result); - } - }); - return results; - } - - /** - * Checks if a number is negative & returns true or false. - * - * @function isNegative - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNegative, assert } from '@universalweb/acid'; - * assert(isNegative(-1), true); - */ - const { sign: sign$1 } = Math; - function isNegative(source) { - return sign$1(source) === -1; - } - - function rangeUp(start, end, step, sourceArray) { - let position = start; - while (position < end) { - sourceArray.push(position); - position += step; - } - return sourceArray; - } - function rangeDown(start, end, step, sourceArray) { - let position = start; - while (position > end) { - sourceArray.push(position); - position -= step; - } - return sourceArray; - } - /** - * Create a numbered list of integers. - * - * @function range - * @category array - * @type {Function} - * @param {Number} start - Value which determines the start of the range. - * @param {Number} end - Value which determines the end of the range. - * @param {Number} step - Value used to step between integers. - * @returns {Array} - An array of integers. - * - * @example - * import { range, assert } from '@universalweb/acid'; - * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]); - */ - function range(start, end, step = 1, sourceArray = []) { - if (isNegative(step)) { - return sourceArray; - } - if (start < end) { - return rangeUp(start, end, step, sourceArray); - } else { - return rangeDown(start, end, step, sourceArray); - } - } - - /** - * Checks if the value is an array. This references Array.isArray. - * - * @function isArray - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArray, assert } from '@universalweb/acid'; - * assert(isArray([]), true); - * assert(isArray(2), false); - */ - const isArray = Array.isArray; - /** - * Checks if the value is not an array. This references Array.isArray. - * - * @function isNotArray - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNotArray, assert } from '@universalweb/acid'; - * assert(isNotArray([]), false); - * assert(isNotArray(2), true); - */ - function isNotArray(source) { - return !isArray(source); - } - - /** - * A function which acts like the "new" operator and can pass arguments. This is a safe version of the original which will error if given undefined - * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects. - * - * @function construct - * @category class - * @param {Function} target - The target function or class. - * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array. - * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target. - * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList. - * - * @example - * import { construct, assert } from '@universalweb/acid'; - * class test { - * constructor(a) { - * return 1; - * } - * } - * const newClass = construct(test, [1]); - * assert(test, 1); - */ - const reflectConstruct = Reflect.construct; - function construct(target, argumentsList = [], newTarget) { - const args = isArray(argumentsList) ? argumentsList : [argumentsList]; - if (newTarget) { - return reflectConstruct(target, args, newTarget); - } - return reflectConstruct(target, args); - } - - /** - * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned. - * - * @function ensureArray - * @category array - * @type {Function} - * @param {*} source - Object to be checked. - * @returns {Array} - Returns an array. - * - * @example - * import { isArray, ensureArray, assert } from '@universalweb/acid'; - * assert(isArray(ensureArray('test')), ['test']); - */ - function ensureArray(source) { - return (isArray(source) && source) || (hasValue(source) && [source]) || []; - } - - /** - * Flattens an array to a single level. - * - * @function flattenDeep - * @type {Function} - * @category array - * @param {Array} source - Array to flatten. - * @returns {Array} - Returns a completely flattened array. - * - * @example - * import { flattenDeep, assert } from '@universalweb/acid'; - * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]); - */ - function flattenDeep(source) { - return source.flat(Infinity); - } - - function forEach(source, callback) { - source.forEach(callback); - return source; - } - - /** - * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences. - * - * @function difference - * @category array - * @type {Function} - * @param {...Array} sources - List of arrays to be compared. - * @returns {Array|undefined} - An array which contains the differences between the source and compare array. - * - * @example - * import { difference, assert } from '@universalweb/acid'; - * assert(difference([1, 2, 3], [1, 2]), [3]); - */ - function difference(...sources) { - const differencesMap = construct(Map); - const differences = []; - eachArray(sources, (currentArray, parentIndex) => { - eachArray(currentArray, (child, childIndex) => { - let childRoot = differencesMap.get(child); - if (!childRoot) { - childRoot = { - count: 1, - parentIndex, - child - }; - differencesMap.set(child, childRoot); - } else if (childRoot.parentIndex === parentIndex) { - return; - } else { - childRoot.count++; - } - }); - }); - forEach(differencesMap, (item) => { - if (item.count === 1 && item.parentIndex === 0) { - differences.push(item.child); - } - }); - return differences; - } - - /** - * Removes all items from an array after a specified index. - * - * @function drop - * @category array - * @type {Function} - * @param {Array} array - Source array. - * @param {Number} amount - Amount of items to drop from the array. - * @param {Number} [upTo = array.length] - Index to stop at. - * @returns {Array} - An array with all values removed after a user defined index. - * - * @example - * import { drop, assert } from '@universalweb/acid'; - * assert(drop([1, 2, 3]), [2, 3]); - * assert(drop([1, 2, 3], 2), [3]); - */ - function drop(array, amount = 1, upTo = array.length) { - return array.splice(amount, upTo); - } - - /** - * Removes all items from an array before a specified index. - * - * @function dropRight - * @type {Function} - * @category array - * @param {Array} array - Source array. - * @param {Number} amount - Amount of items to drop from the array. - * @param {Number} [upTo = array.length] - Index to stop at. - * @returns {Array} - An array with all values removed before a user defined index. - * - * @example - * import { dropRight, assert } from '@universalweb/acid'; - * assert(dropRight([1, 2, 3]), [1, 2]); - * assert(dropRight([1, 2, 3], 2), [1]); - */ - const dropRight = (array, amount = 1, upTo = array.length) => { - return drop(array, 0, upTo - amount); - }; - - /** - * Iterates through the given array in reverse. - * - * @function eachRight - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array|undefined} - The originally given array. - * - * @example - * import { eachRight, assert } from '@universalweb/acid'; - * const tempList = []; - * eachRight([1, 2, 3], (item) => { - * tempList.push(item); - * }); - * assert(tempList, [3, 2, 1]); - */ - function eachRight(source, iteratee, additionalArgument) { - if (!source) { - return; - } - const arrayLength = source.length; - for (let index = arrayLength - 1; index >= 0; index--) { - iteratee(source[index], index, source, arrayLength, additionalArgument); - } - return source; - } - - /** - * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order. - * - * @function eachRightAsync - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @returns {Object|undefined} - The originally given array. - * - * @example - * import { eachRightAsync, assert } from '@universalweb/acid'; - * const tempList = []; - * await eachRightAsync([1, 2, 3], async (item) => { - * tempList.push(item); - * }); - * assert(tempList, [3, 2, 1]); - */ - async function eachRightAsync(source, iteratee) { - if (!source) { - return; - } - const arrayLength = source.length; - for (let index = arrayLength - 1; index >= 0; index--) { - await iteratee(source[index], index, source, arrayLength); - } - return source; - } - - /** - * Iterates through the given array while the iteratee returns true else the loop exits & returns false. - * - * @function everyArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. - * - * @example - * import { everyArray, assert } from '@universalweb/acid'; - * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), false); - * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), true); - */ - function everyArray(source, iteratee, additionalArgument) { - if (!source) { - return; - } - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) { - return false; - } - } - return true; - } - - /** - * Iterates through the given array while the iteratee returns true else the loop exits & returns false. - * - * @function everyAsyncArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. - * - * @example - * import { everyAsyncArray, assert } from '@universalweb/acid'; - * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), false); - * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), true); - */ - async function everyAsyncArray(source, iteratee, additionalArgument) { - if (!source) { - return; - } - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if ((await iteratee(source[index], index, source, sourceLength, additionalArgument)) === false) { - return false; - } - } - return true; - } - - /** - * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. - * - * @function filterArray - * @category array - * @type {Function} - * @category array - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array with properties that passed the test. - * - * @example - * import { filterArray, assert } from '@universalweb/acid'; - * assert(filterArray([false, true, true], (item) => { - * return item; - * }), [true, true]); - */ - function filterArray(source, iteratee, results = [], additionalArgument) { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - if (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) { - results.push(item); - } - }); - return results; - } - - /** - * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. - * - * @function filterAsyncArray - * @category array - * @type {Function} - * @category array - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array with properties that passed the test. - * - * @example - * import { filterAsyncArray, assert } from '@universalweb/acid'; - * assert(filterAsyncArray([false, true, true], (item) => { - * return item; - * }), [true, true]); - */ - async function filterAsyncArray(source, iteratee, results = [], additionalArgument) { - await eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => { - if ((await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument)) === true) { - results.push(item); - } - }); - return results; - } - - /** - * Takes the first or multiple items from an array. - * - * @function first - * @type {Function} - * @category array - * @param {Array} array - Array to extract from. - * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array. - * @returns {Array} - Returns an array. - * - * @example - * import { first, assert } from '@universalweb/acid'; - * assert(first([1, 2, 3]), 1); - */ - function first(array, upTo) { - return upTo ? array.slice(0, upTo) : array[0]; - } - - /** - * Flattens an array up to the provided level. - * - * @function flatten - * @type {Function} - * @category array - * @param {Array} source - Array to flatten. - * @param {Number} [level = 1] - Number which determines how deep the array nest can be. - * @returns {Array|undefined} - Returns an array. - * - * @example - * import { flatten, assert } from '@universalweb/acid'; - * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]); - */ - function flatten(source, level = 1) { - if (!source) { - return; - } - let sourceArray = source; - for (let i = 0; i < level; i++) { - sourceArray = sourceArray.reduce((previousValue, currentValue) => { - return previousValue.concat(ensureArray(currentValue)); - }, []); - } - return sourceArray; - } - - /** - * Takes all but the last item in the array. - * - * @function initial - * @category array - * @type {Function} - * @param {Array} array - Array to have items extracted from. - * @returns {Array} - Returns a completely flattened array. - * - * @example - * import { initial, assert } from '@universalweb/acid'; - * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]); - */ - function initial(array) { - return array.slice(0, array.length - 1); - } - - // Add intersectionBy & intersectionWith - /** - * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory)) - * of the array and the input array(s). - * - * @function intersection - * @param {Array} array - Array to compare other arrays to. - * @param {...Array} arrays - A variable number of arrays. - * @category array - * @returns {Array} - The new array of unique values shared by all of the arrays. - * - * @example - * import { intersection, assert } from '@universalweb/acid'; - * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]); - */ - function intersection(array, ...arrays) { - return compactMapArray(array, (item) => { - const shouldReturn = everyArray(arrays, (otherItem) => { - return otherItem.includes(item); - }); - if (shouldReturn) { - return item; - } - }); - } - - /** - * Invoke each function in the given array. - * - * @function invokeArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} additionalArg - An object to be given each time to the iteratee. - * @param {*} thisCall - Iteratee called with thisCall as this. - * @returns {Array|undefined} - The originally given array. - * - * @example - * import { invokeArray, assert } from '@universalweb/acid'; - * function test(arg){ - * return [this, arg]; - * } - * const results = invokeArray([test], 1, test); - * assert(results, [test, 1]); - */ - function invokeArray(source, additionalArg, thisCall) { - if (!source) { - return; - } - const arrayLength = source.length; - if (hasValue(thisCall)) { - for (let index = 0; index < arrayLength; index++) { - source[index].call(thisCall, additionalArg); - } - } else { - for (let index = 0; index < arrayLength; index++) { - source[index](additionalArg); - } - } - return source; - } - - const regexToPath = /\.|\[/; - const regexCloseBracket = /]/g; - const emptyString = ''; - /** - * Breaks up string into object chain list. - * - * @function toPath - * @type {Function} - * @category utility - * @param {String} source - String to be broken up. - * @returns {Array} - Array used to go through object chain. - * - * @example - * import { toPath, assert } from '@universalweb/acid'; - * assert(toPath('post.like[2]'), ['post', 'like', '2']); - */ - function toPath(source) { - return source.replace(regexCloseBracket, emptyString).split(regexToPath); - } - - /** - * Returns property on an object. - * - * @function get - * @category utility - * @type {Function} - * @param {String} propertyString - String used to retrieve properties. - * @param {Object} target - Object which has a property retrieved from it. - * @returns {Object} - Returns property from the given object. - * - * @example - * import { get, assert } from '@universalweb/acid'; - * const objectTarget = { - * post: { - * like: ['a','b','c'] - * } - * }; - * assert(get('post.like[2]', objectTarget), 'c'); - */ - function get(propertyString, target) { - if (!target) { - return false; - } - let link = target; - const pathArray = isArray(propertyString) ? propertyString : toPath(propertyString); - everyArray(pathArray, (item) => { - link = link[item]; - return hasValue(link); - }); - return link; - } - - /** - * Get object's keys. - * - * @function keys - * @category object - * @param {*} source - The source object to pull keys from. - * @returns {Array} - Array of keys. - * - * @example - * keys({a: 1, b: 2}); - * // => ['a', 'b'] - */ - const objectKeys = Object.keys; - function keys(source) { - if (source) { - return objectKeys(source); - } - } - - const hasOwn = Object.hasOwn; - /** - * Checks to see if an object has all of the given property names. - * - * @function hasKeys - * @category object - * @type {Function} - * @param {Object} source - Source object to check for keys. - * @param {...String} properties - List of strings to check. - * @returns {Boolean|undefined} - Returns true or false. - * - * @example - * import { hasKeys, assert } from '@universalweb/acid'; - * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true); - */ - function hasKeys(source, ...properties) { - if (!source) { - return; - } - return everyArray(properties, (item) => { - const pathArray = toPath(item); - if (pathArray.length === 1) { - return hasOwn(source, item); - } else { - const lastPath = pathArray.pop(); - const initialPathObject = get(pathArray, source); - if (initialPathObject) { - return hasOwn(initialPathObject, lastPath); - } - return false; - } - }); - } - /** - * Checks to see if an object has any of the given property names. - * - * @function hasAnyKeys - * @category object - * @type {Function} - * @param {Object} source - Source object to check for keys. - * @param {Array} properties - List of strings to check. - * @returns {Boolean|undefined} - Returns true or false. - * - * @example - * import { hasAnyKeys, assert } from '@universalweb/acid'; - * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true); - * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false); - */ - function hasAnyKeys(source, ...properties) { - if (!source) { - return; - } - return Boolean( - properties.find((item) => { - const pathArray = toPath(item); - if (pathArray.length === 1) { - return hasOwn(source, item); - } else { - const lastPath = pathArray.pop(); - const initialPathObject = get(pathArray, source); - if (initialPathObject) { - return hasOwn(initialPathObject, lastPath); - } - return false; - } - }) - ); - } - - /** - * Checks to see if the constructor is that of a native object. - * - * @function isConstructor - * @category type - * @param {Object} target - The object to be checked. - * @param {Object} source - The source constructor object. - * @returns {Object} - Returns the target object. - * - * @example - * import { isConstructor, assert } from '@universalweb/acid'; - * assert(isConstructor(2, Number), true); - */ - function isConstructor(target, source) { - return target?.constructor === source || false; - } - function isConstructorFactory(source) { - return (target) => { - return isConstructor(target, source); - }; - } - function constructorName(source) { - return source?.constructor?.name; - } - function isConstructorNameFactory(source) { - return (target) => { - return constructorName(target) === source || false; - }; - } - - function isTypeFactory(method) { - return function (primarySource, ...otherSources) { - if (otherSources) { - return method(primarySource) && everyArray(otherSources, method); - } - return method(primarySource); - }; - } - - /** - * Checks if an object or objects are a Buffer. - * - * @function isBuffer - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isBuffer, assert } from '@universalweb/acid'; - * assert(isBuffer(Buffer.from('test')), true); - */ - const isBufferCall = isConstructorNameFactory('Buffer'); - const isBuffer = isTypeFactory(isBufferCall); - - /** - * Checks if the value is a plain object. - * - * @function isPlainObject - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isPlainObject } from '@universalweb/acid'; - * isPlainObject({}); - * // => true - */ - const isPlainObject = (source) => { - if (hasValue(source)) { - return source.constructor.toString().trim().slice(9, 16) === 'Object('; - } - return false; - }; - - /** - * Performs a deep comparison between two objects & determines if the value is the same using strict comparison. - * - * @function isEqual - * @type {Function} - * @category utility - * @param {*} source - Source object. - * @param {*} target - Object to be compared. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isEqual, assert } from '@universalweb/acid'; - * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true); - */ - // Add map & buffer Support - Review required for performance and support for more types - const isEqual = (source, target) => { - if (source === target) { - return true; - } else if (isBuffer(source)) { - return source.equals(target); - } else if (source.toString() === target.toString()) { - if (isPlainObject(source)) { - const sourceProperties = keys(source); - if (hasKeys(target, sourceProperties)) { - return everyArray(sourceProperties, (key) => { - return isEqual(source[key], target[key]); - }); - } - } else if (isArray(source)) { - if (source.length === target.length) { - return everyArray(source, (item, index) => { - return isEqual(item, target[index]); - }); - } - } - } - return false; - }; - - /** - * Performs a shallow strict comparison between two objects. - * - * @function isMatchArray - * @type {Function} - * @category array - * @param {Array} source - Source object. - * @param {Array} compareArray - Object to compare to source. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isMatchArray, assert } from '@universalweb/acid'; - * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true); - */ - function isMatchArray(source, compareArray) { - if (source.length === compareArray.length) { - return everyArray(source, (item, index) => { - return isEqual(compareArray[index], item); - }); - } - return false; - } - - const mathNativeMax = Math.max; - /** - * Plucks the largest value from an array. - * - * @function largest - * @type {Function} - * @category array - * @param {Array} array - Array from which largest number is taken. - * @returns {Number} - The largest number. - * - * @example - * import { largest, assert } from '@universalweb/acid'; - * assert(largest([1,2,3]), 3); - */ - function largest(array) { - return mathNativeMax(...array); - } - - /** - * Extracts item(s) from an array starting from the last item in the array. - * - * @function last - * @type {Function} - * @category array - * @param {Array} array - Array to have items extracted from. - * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array. - * @returns {Array} - Items from the array. - * - * @example - * import { last, assert } from '@universalweb/acid'; - * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]); - */ - function last(array, indexFrom) { - const arrayLength = array.length; - return indexFrom ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1]; - } - - /** - * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. - * - * @function mapArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array} - An array of the same calling array's type. - * - * @example - * import { mapArray, assert } from '@universalweb/acid'; - * assert(mapArray([1, 2, 3], (item) => { - * return item * 2; - * }), [2, 4, 6]); - */ - function mapArray(source, iteratee, results = [], thisCall, additionalArg) { - if (hasValue(thisCall)) { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - results[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg); - }); - } else { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - results[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg); - }); - } - return results; - } - - /** - * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee. - * - * @function concurrentEachArray - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {*} thisBind - Object to use as the "this" within the function. - * @returns {Promise|Array|undefined} - An array of the same calling array's type. - * - * @example - * import { concurrentEachArray, has, assert } from '@universalweb/acid'; - * const results = await concurrentEachArray([1, 2, 3], async (item) => { - * return item * 2; - * }); - * assert(has(results, [2, 4, 6]), true); - */ - async function concurrentEachArray(source, iteratee, thisBind) { - if (!source) { - return; - } - const results = []; - const arrayLength = source.length; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - results[index] = iteratee.call(thisBind, source[index], index, results, arrayLength); - } - } else { - for (let index = 0; index < arrayLength; index++) { - results[index] = iteratee(source[index], index, results, arrayLength); - } - } - return Promise.all(results); - } - - /** - * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray. - * - * @function mapAsyncArray - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @returns {Array} - An array of the same calling array's type. - * - * @example - * import { mapAsyncArray, assert } from '@universalweb/acid'; - * assert(await mapAsyncArray([1, 2, 3], async (item) => { - * return item * 2; - * }), [2, 4, 6]); - */ - async function mapAsyncArray(source, iteratee) { - const results = []; - await eachAsyncArray(source, async (item, index, arrayLength) => { - results[index] = await iteratee(item, index, results, arrayLength); - }); - return results; - } - - /** - * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse. - * - * @function mapRightArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array of the same calling array's type. - * - * @example - * import { mapRightArray, assert } from '@universalweb/acid'; - * assert(mapRightArray([1, 2, 3], (item) => { - * return item * 2; - * }), [6, 4, 2]); - */ - function mapRightArray(source, iteratee, results = [], additionalArgument) { - let trueIndex = 0; - const arrayLength = source.length; - for (let index = arrayLength - 1; index >= 0; index--) { - results[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument); - trueIndex++; - } - return results; - } - - /** - * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee. - * - * @function mapWhile - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array with properties that passed the test. - * - * @example - * import { mapWhile, assert } from '@universalweb/acid'; - * assert(mapWhile([1, 2, 0], (item) => { - * return Boolean(item); - * }), [1, 2]); - */ - function mapWhile(source, iteratee, results = [], additionalArgument) { - const arrayLength = source.length; - for (let index = 0; index < arrayLength; index++) { - const item = source[index]; - const returned = iteratee(item, index, results, source, arrayLength, additionalArgument); - if (returned === false) { - break; - } - results[index] = item; - } - return results; - } - - /** - * Subtracts the subtrahend (second argument) from the minuend (first argument). - * - * @function subtract - * @category math - * @type {Function} - * @param {Number} minuend - The minuend. - * @param {Number} subtrahend - The subtrahend. - * @returns {Number} - Returns the difference. - * - * @example - * import { subtract, assert } from '@universalweb/acid'; - * assert(subtract(3, 1), 2); - */ - function subtract(minuend, subtrahend) { - return minuend - subtrahend; - } - - /** - * Sorts an array of numbers in ascending order. Smallest to largest. - * - * @function sortNumberAscending - * @category array - * @param {Array} numberList - Array of numbers. - * @returns {Array} - The array this method was called on. - * - * @example - * import { sortNumberAscending, assert } from '@universalweb/acid'; - * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]); - */ - function sortNumberAscending(numberList) { - return numberList.sort(subtract); - } - - /** - * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. - * - * @function partition - * @type {Function} - * @category array - * @param {Array} array - Takes an array to split. - * @param {Function} predicate - Function run on each item in the array. - * @returns {Array} - One array split into two arrays. - * - * @example - * import { partition, assert } from '@universalweb/acid'; - * const result = partition([ - * {user: 'barney', age: 36, active: false}, - * {user: 'fred', age: 40, active: true}, - * {user: 'pebbles', age: 1, active: false} - * ], (item) => { return item.active; }); - * assert(result, [{"user":"fred","age":40,"active":true}], - * [{"user":"barney","age":36,"active":false}, - * {"user":"pebbles","age":1,"active":false}]); - */ - function partition(array, predicate) { - const rejected = []; - return [ - compactMapArray(array, (item, index) => { - if (predicate(item, index)) { - return item; - } - rejected.push(item); - }), - rejected - ]; - } - - /** - * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function. - * - * @function subtractReverse - * @category math - * @type {Function} - * @param {Number} subtrahend - The subtrahend. - * @param {Number} minuend - The minuend. - * @returns {Number} - Returns the difference. - * - * @example - * import { subtractReverse, assert } from '@universalweb/acid'; - * assert(subtractReverse(1, 3), 2); - */ - function subtractReverse(subtrahend, minuend) { - return minuend - subtrahend; - } - - /** - * Sorts an array of numbers in descending order. Largest to smallest. - * - * @function sortNumberDescening - * @category array - * @param {Array} numberList - Array of numbers. - * @returns {Array} - The array this method was called on. - * - * @example - * import { sortNumberDescening, assert } from '@universalweb/acid'; - * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]); - */ - function sortNumberDescening(numberList) { - return numberList.sort(subtractReverse); - } - - /** - * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation. - * - * @function remove - * @category array - * @param {Array} array - Array to be mutated. - * @param {String|Array} removeThese - Items to remove from the array. - * @returns {Array} - The array this method was called on. - * - * @example - * remove([1, 2, 3, 3, 4, 3, 5], 1); - * // => [2, 3, 3, 4, 3, 5] - * @example - * remove([3, 3, 4, 5], 3, 4); - * // => [5] - */ - function remove(array, removeThese) { - let arrayLength = array.length; - for (let index = 0; index < arrayLength; index++) { - const item = array[index]; - if (removeThese.includes(item)) { - array.splice(index, 1); - index--; - arrayLength--; - } - } - return array; - } - /** - * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation. - * - * @function removeBy - * @category array - * @param {Array} source - Array to be mutated. - * @param {Function} iteratee - Function used to check object. Return true to remove the value. - * @returns {Array} - The array this method was called on. - * - * @example - * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);}); - * // => [2, 4] - */ - function removeBy(source, iteratee) { - let arrayLength = source.length; - for (let index = 0; index < arrayLength; index++) { - const item = source[index]; - if (iteratee(item, index)) { - source.splice(index, 1); - index--; - arrayLength--; - } - } - return source; - } - - /** - * Extracts all items in array except the first and last item. - * - * @function rest - * @type {Function} - * @category array - * @param {Array} array - Array to be sliced. - * @returns {Array} - Returns the aggregated array. - * - * @example - * rest([1, 2, 3, 4, 5]); - * // => [2, 3, 4, 5] - */ - function rest(array) { - return array.slice(1, array.length); - } - - /** - * Get the item at the supplied index starting at the end of the array. - * - * @function right - * @type {Function} - * @category array - * @param {Array} source - Array to be sliced. - * @param {Number} amount - Amount from the right. - * @returns {*} - Returns the object at the evaluated position. - * - * @example - * right([1, 2, 3, 4, 5] , 1); - * // => 4 - */ - function right(source, amount) { - return source[source.length - 1 - amount]; - } - - const { floor, random: random$1 } = Math; - /** - * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption.. - * - * @function randomInt - * @category number - * @type {Function} - * @param {Number} max - The highest possible value for the random number. - * @param {Number} [min = 0] - Establishes lowest possible value for the random number. - * @returns {Number} - Returns random integer between the max and min range. - * - * @example - * import { randomInt, assert } from '@universalweb/acid'; - * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;}); - */ - function randomInt(max, min = 0) { - return floor(random$1() * (max - min)) + min; - } - - /** - * Checks if two numbers are the same. - * - * @function isNumberEqual - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @param {Number} target - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumberEqual, assert } from '@universalweb/acid'; - * assert(isNumberEqual(0, 0), true); - */ - function isNumberEqual(source, target) { - return source === target; - } - - const arrayFrom = Array.from; - /** - * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check. - * - * @function toArray - * @category array - * @param {*} arrayLike - Array like object. - * @param {Function} mapFn - Function to map over the array. - * @param {*} thisArg - MapFn's "this". - * @returns {Array|undefined} - New array. - * - * @example - * import { toArray, assert } from '@universalweb/acid'; - * assert(toArray(new Map([[1, 2]])), [[1, 2]]); - */ - function toArray(arrayLike, mapFn, thisArg) { - if (hasValue(arrayLike)) { - return arrayFrom(arrayLike, mapFn, thisArg); - } - } - - /** - * Shuffle an array and return a new array. - * - * @function shuffle - * @category array - * @param {Array} target - Target Array to be shuffled. - * @param {Number} amount - The amount of times to shuffle the array. - * @returns {Array} - An array with the shuffled results. - * - * @example - * import { shuffle, assert } from '@universalweb/acid'; - * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]); - */ - function shuffle(target, amount = target.length) { - if (target.length <= 1) { - return toArray(target); - } - const shuffleArray = toArray(target); - let count = 0; - let index; - let value; - while (count < amount) { - index = randomInt(shuffleArray.length - 1, 0); - value = shuffleArray[count]; - shuffleArray[count] = shuffleArray[index]; - shuffleArray[index] = value; - count++; - } - return shuffleArray; - } - - /** - * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned. - * - * @function sample - * @category array - * @param {Array} source - The array to pull sample(s) from. - * @param {Number} amount - The amount of samples to take. - * @returns {Array} - An array of randomly pulled samples. - * - * @example - * sample([1, 2, 3, 4] , 2); - * // => [1, 3] - */ - function sample(source, amount) { - if (!source) { - return false; - } - const arrayLength = source.length; - if (arrayLength === amount || amount > arrayLength) { - return shuffle(source); - } - if (amount === 1) { - return [source[randomInt(arrayLength - 1, 0)]]; - } - const sampleArray = []; - const used = {}; - let count = 0; - let index; - while (count < amount) { - index = randomInt(source.length - 1, 0); - if (!used[index]) { - sampleArray.push(source[index]); - used[index] = true; - count++; - } - } - return sampleArray; - } - - const mathNativeMin = Math.min; - /** - * Plucks the smallest value from an array. - * - * @function smallest - * @category array - * @type {Function} - * @param {Array} array - Array from which smallest number is taken. - * @returns {Number} - The smallest number. - * - * @example - * smallest([1,2,3]); - * // => 1 - */ - function smallest(array) { - return mathNativeMin(...array); - } - - /** - * What index should the number be inserted at to keep a sorted array still sorted. - * - * @function getNumberInsertIndex - * @category array - * @type {Function} - * @param {Array} source - Array to be checked. - * @param {Number} target - Number to check where to be inserted. - * @returns {Number} - The index at which to insert. - * - * @example - * import { getNumberInsertIndex, assert } from '@universalweb/acid'; - * assert(getNumberInsertIndex([30, 39, 50], 40), 1); - */ - function getNumberInsertIndex(source, target) { - let insertIndex = 0; - everyArray(source, (item, index) => { - insertIndex = index; - if (target >= item) { - insertIndex = index + 1; - return true; - } else { - return false; - } - }); - return insertIndex; - } - - /** - * Returns a shallow copy of the array up to an amount. - * - * @function take - * @category array - * @type {Function} - * @param {Array} source - The source array to take from. - * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction. - * @returns {Array} - The aggregated array. - * - * @example - * import { take, assert } from '@universalweb/acid'; - * assert(take([1,2,3], 2), [1, 2]); - */ - function take(source, endIndex = 1) { - return source.slice(0, endIndex); - } - - /** - * Returns a shallow copy of the array up to an amount starting from the right. - * - * @function takeRight - * @category array - * @type {Function} - * @param {Array} source - The source array to take right from. - * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction. - * @returns {Array} - The aggregated array. - * - * @example - * import { takeRight, assert } from '@universalweb/acid'; - * assert(takeRight([1,2,3], 2), [2, 3]); - */ - function takeRight(source, indexRight = 1) { - const arrayLength = source.length; - return source.slice(arrayLength - indexRight, arrayLength); - } - - function onlyUnique(value, index, array) { - return array.indexOf(value) === index; - } - function sortUnique(item, index, array) { - return item !== array[index - 1]; - } - /** - * Filters the array down to unique elements. - * - * @function unique - * @category array - * @type {Function} - * @param {Array} source - The array to be filtered. - * @param {Boolean} isSorted - Flag which means the array is already sorted. - * @returns {Array} - The filtered array. - * - * @example - * unique([1, 2, 2, 4]); - * // => [1, 2, 4] - */ - function unique(source, isSorted) { - if (isSorted) { - return source.filter(sortUnique); - } - return source.filter(onlyUnique); - } - - /** - * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays. - * - * @function union - * @category array - * @type {Function} - * @param {...Array} arrays - The arrays to be evaluated. - * @returns {Array} - The aggregated array. - * - * @example - * union([1,2,4], [1,2,3]); - * // => [1, 2, 4, 3] - */ - function union(...arrays) { - return unique(flattenDeep(arrays)); - } - - /** - * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned. - * If and when the iteratee yields false the loop stops & false is returned. - * - * @function untilFalseArray - * @category array - * @type {Function} - * @param {Array} source - The array to iterate over. - * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. - * @returns {Array} - Returns true if all returns are true or false if one value returns false. - * - * @example - * import { untilFalseArray, assert } from '@universalweb/acid'; - * assert(untilFalseArray([true, true, false], (item) => { - * return item; - * }), false); - * assert(untilFalseArray([true, true, true], (item) => { - * return item; - * }), true); - */ - function untilFalseArray(source, iteratee) { - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if (iteratee(source[index], index) === false) { - return false; - } - } - return true; - } - - /** - * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned. - * If and when the iteratee yields true the loop stops & false is returned. - * - * @function untilTrueArray - * @category array - * @type {Function} - * @param {Array} source - The array to iterate over. - * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. - * @returns {Array} - Returns true if all returns are false or false if one value returns true. - * - * @example - * import { untilTrueArray, assert } from '@universalweb/acid'; - * assert(untilTrueArray([true], (item) => { - * return item; - * }), false); - * assert(untilTrueArray([true, true, true], (item) => { - * return item; - * }), true); - */ - function untilTrueArray(source, iteratee) { - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if (iteratee(source[index], index) === true) { - return false; - } - } - return true; - } - - /** - * Iterates through the calling object and creates a new object based on the calling object's type with the results, - * (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * Re-checks the length each loop. - * - * @function whileCompactMap - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The originally given array. - * - * @example - * import { whileCompactMap, assert } from '@universalweb/acid'; - * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => { - * return item; - * }), [1, 2, 3, false]); - */ - function whileCompactMap(source, iteratee, results = [], additionalArgument) { - let index = 0; - while (index < source.length) { - const result = results.push(iteratee(source[index], index, source, source.length, additionalArgument)); - index++; - if (hasValue(result)) { - results.push(result); - } - } - return source; - } - - /** - * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over. - * - * @function whileEachArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The originally given array. - * - * @example - * import { whileEachArray, assert } from '@universalweb/acid'; - * const list = []; - * whileEachArray([1, 2, 3], (item, index) => { - * list[index] = item; - * }); - * assert(list, [1, 2, 3]); - */ - function whileEachArray(source, iteratee, additionalArgument) { - let index = 0; - while (index < source.length) { - iteratee(source[index], index, source, source.length, additionalArgument); - index++; - } - return source; - } - - /** - * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. - * Re-checks the length each loop. - * - * @function whileMapArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The originally given array. - * - * @example - * import { whileMapArray, assert } from '@universalweb/acid'; - * assert(whileMapArray([1, 2, 3], (item, index, source) => { - * if (index === 0) { - * source.push(4); - * } - * return item; - * }), [1, 2, 3, 4]); - */ - function whileMapArray(source, iteratee, results = [], additionalArgument) { - let index = 0; - while (index < source.length) { - results.push(iteratee(source[index], index, source, source.length, additionalArgument)); - index++; - } - return source; - } - - /** - * Returns a copy of the array with all instances of the values removed. - * - * @function without - * @type {Function} - * @category array - * @param {Array} target - The target array to be filtered. - * @param {Array} sources - Items to be removed. - * @returns {Array} - The target array filtered. - * - * @example - * import { without, assert } from '@universalweb/acid'; - * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]); - */ - function without(target, sources) { - if (!sources) { - return target; - } - const sourcesSet = construct(Set, sources); - return target.filter((item) => { - return !sourcesSet.has(item); - }); - } - - /** - * Creates an array that is the symmetric difference of the provided arrays. - * - * @function xor - * @category array - * @type {Function} - * @param {...Array} sources - The array(s) to be filtered. - * @returns {Array|undefined} - The filtered array. - * - * @example - * xor([2, 1], [2, 3, 5], [6]); - * // => [1, 3, 5, 6] - */ - function xor(...sources) { - const xorMap = construct(Map); - const xored = []; - const sourcesLength = sources.length; - if (sourcesLength === 2) { - return difference(sources[0], sources[1]); - } - eachArray(sources, (currentArray, parentIndex) => { - eachArray(currentArray, (child, childIndex) => { - let childRoot = xorMap.get(child); - if (!childRoot) { - childRoot = { - count: 1, - parentIndex, - child - }; - xorMap.set(child, childRoot); - } else if (childRoot.parentIndex === parentIndex) { - return; - } else { - childRoot.count++; - } - }); - }); - forEach(xorMap, (item) => { - if (item.count === 1) { - xored.push(item.child); - } - }); - return xored; - } - - /** - * Merges together the values of each of the arrays with the values at the corresponding position. - * - * @function zip - * @type {Function} - * @category array - * @param {Array} arrays - The arrays to process. - * @returns {Array} - Returns the new array of regrouped elements. - * - * @example - * zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] - */ - function zip(...arrays) { - return arrays[0].map((item, index) => { - return arrays.map((array) => { - return array[index]; - }); - }); - } - /** - * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration. - * - * @function unZip - * @type {Function} - * @category array - * @param {Array} source - The array of grouped elements to process. - * @returns {Array} - Returns the new array of regrouped elements. - * - * @example - * unZip([['a', 1, true], ['b', 2, false]]); - * // => [['a', 'b'], [1, 2], [true, false]] - */ - function unZip(source) { - return source[0].map((item, index) => { - return source.map((arraySet) => { - return arraySet[index]; - }); - }); - } - - /** - * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer. - * - * @function ensureBuffer - * @category buffer - * @type {Function} - * @param {*} source - Object to be checked. - * @returns {Array} - Returns an array. - * - * @example - * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid'; - * assert(isBuffer(ensureBuffer('test')), true); - */ - function ensureBuffer(source) { - return (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0); - } - - /** - * Clears the values out of a buffer. - * - * @function clearBuffer - * @category buffer - * @type {Function} - * @param {Array} source - Takes an array to be emptied. - * @returns {Array} - The originally given array. - * - * @example - * import { clearBuffer, assert } from '@universalweb/acid'; - * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([])); - */ - function clearBuffer(source) { - source.fill(0); - return source; - } - - /** - * Checks if an object or objects are a plain object. - * - * @function isFunction - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFunction } from '@universalweb/acid'; - * isFunction(() => {}); - * // => true - */ - const isFunction = (source) => { - return hasValue(source) ? source instanceof Function : false; - }; - - /** - * Checks if the value is a number. - * - * @function isNumber - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumber, assert } from '@universalweb/acid'; - * assert(isNumber(1), true); - */ - const isNumberCall = isConstructorNameFactory('Number'); - const isNumber = isTypeFactory(isNumberCall); - /** - * Checks if the value is not a number. - * - * @function isNotNumber - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNotNumber, assert } from '@universalweb/acid'; - * assert(isNotNumber(1), false); - */ - function isNotNumber(source) { - return !isNumber(source); - } - - /** - * Checks if the value is a string. - * - * @function isString - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isString, assert } from '@universalweb/acid'; - * assert(isString('hello'), true); - * assert(isString(1), false); - */ - const isString = isConstructorFactory(String); - /** - * Checks if the value is not a string. - * - * @function isNotString - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNotString, assert } from '@universalweb/acid'; - * assert(isNotString(1), true); - * assert(isNotString('hello'), false); - */ - function isNotString(source) { - return !isString(source); - } - - const objectAssign = Object.assign; - function assignToObject(target, source) { - if (isPlainObject(source)) { - objectAssign(target, source); - } else if (isFunction(source)) { - const key = source.name; - if (key) { - target[key] = source; - } else { - objectAssign(target, source); - } - } else if (isString(source) || isNumber(source)) { - target[source] = source; - } - return target; - } - /** - * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module. - * - * @function assign - * @category object - * @param {Object} target - The target object. - * @param {...Object} sources - The source object(s). - * @returns {Object} - Returns the target object. - * - * @example - * import { assign, assert } from '@universalweb/acid'; - * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5}); - */ - function assign(target, ...sources) { - const sourceLength = sources.length; - for (let index = 0; index < sourceLength; index++) { - assignToObject(target, sources[index]); - } - return target; - } - - function assignToClass(target, source) { - if (isPlainObject(source)) { - objectAssign(target.prototype, source); - } else if (isFunction(source)) { - const key = source.name; - if (key) { - target.prototype[key] = source; - } - } else if (isConstructor(source)) { - const key = source.constructor?.name; - if (key) { - target.prototype[key] = source; - } - } else if (isString(source) || isNumber(source)) { - target.prototype[source] = source; - } - return target; - } - /** - * The function adds a new method to a class. - * @param {Class} target - The target parameter refers to the Class or constructor function to which you want - * to add a new method. - * @param {Function|Object|String|Number} sources - What you want to add to the class. - * @returns {Class} - Returns the Class provided in the target parameter. - * - * @example - * import { extendClass, assert } from '@universalweb/acid'; - * class Test {} - * function a(){return 1;} - * extendClass(Test, a) - * assert((new Test()).a(), 1); - */ - function extendClass(target, ...sources) { - const sourceLength = sources.length; - for (let index = 0; index < sourceLength; index++) { - assignToClass(target, sources[index]); - } - return target; - } - - /** - * Creates an object composed of keys generated from the results of running each element of collection through iteratee. - * - * @function countBy - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {Function} iteratee - The iteratee to transform keys. - * @returns {Object} - Returns the composed aggregate object. - * - * @example - * import { countBy, assert } from '@universalweb/acid'; - * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2}); - */ - function countBy(collection, iteratee) { - const object = {}; - let result; - eachArray(collection, (item) => { - result = iteratee(item); - if (!object[result]) { - object[result] = 0; - } - object[result]++; - }); - return object; - } - - /** - * Count the amount of times a key is present in a collection. - * - * @function countKey - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {Function} propertyName - The name of the key. - * @returns {Number} - The count. - * - * @example - * import { countKey, assert } from '@universalweb/acid'; - * assert(countKey([{a:1}, {a:3}], 'a'), 2); - */ - function countKey(collection, propertyName) { - let count = 0; - eachArray(collection, (item) => { - if (item[propertyName]) { - count++; - } - }); - return count; - } - - /** - * Count the amount of times a key is not present in a collection. - * - * @function countWithoutKey - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {String} propertyName - The name of the key. - * @returns {Number} - The count. - * - * @example - * import { countWithoutKey, assert } from '@universalweb/acid'; - * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2); - */ - function countWithoutKey(collection, propertyName) { - let count = 0; - eachArray(collection, (item) => { - if (!item[propertyName]) { - count++; - } - }); - return count; - } - - function findIndexCache(element, index, array, indexMatch, propertyName) { - if (element[propertyName] === indexMatch) { - return true; - } - } - - /** - * Finds an object in a collection by the given id and property name and returns the array index of the object. - * - * @function findIndex - * @type {Function} - * @category collection - * @param {Array} collection - Collection to be checked for an item. - * @param {Number|string} id - The value to look for. - * @param {String} [propertyName = 'id'] - The name of the property to compare. - * @returns {Number} - The index of the object. - * - * @example - * findIndex([{id: 1}, {id: 2}], 1); - * // => 0 - */ - function findIndex(collection, id, propertyName = 'id') { - const result = collection.findIndex((element, index) => { - return findIndexCache(element, index, collection, id, propertyName); - }); - return result === -1 ? false : result; - } - - /** - * Finds an object in a collection by the given id and property name. - * - * @function findItem - * @type {Function} - * @category collection - * @param {Array} collection - Collection to be checked for an item. - * @param {Number|string} id - The value to look for. - * @param {String} [propertyName = 'id'] - The name of the property to compare. - * @returns {Object} - The found object. - * - * @example - * findItem([{id: 1}, {id: 2}], 1); - * // => {id: 1} - */ - function findItem(collection, id, propertyName = 'id') { - const result = collection.find((element, index) => { - return findIndexCache(element, index, collection, id, propertyName); - }); - return result === -1 ? false : result; - } - - function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - if (!nextKey) { - return -1; - } else if (!previousKey) { - return 1; - } else if (previousKey < nextKey) { - return 1; - } else if (previousKey > nextKey) { - return -1; - } - return 0; - } - /** - * Sorts an array in place using a key in descending order. - * - * @function sortCollectionDescending - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array and or a clone of the array sorted. - * - * @example - * import { sortCollectionDescending, assert } from '@universalweb/acid'; - * const result = [{id: 1}, {id: 0}]; - * const collect = [{id: 0}, {id: 1}]; - * const prop = 'id'; - * assert(sortCollectionDescending(collect, prop), result); - */ - function sortCollectionDescending(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortCollectionDescendingFilter(previous, next, propertyName, ifMatch); - }); - } - - /** - * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array. - * - * @function getLowest - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @returns {Object} - The newest object in the collection. - * - * @example - * import { getLowest, assert } from '@universalweb/acid'; - * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1}); - */ - function getLowest(collection, propertyName) { - return sortCollectionDescending(collection, propertyName, false)[0]; - } - - function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - if (!nextKey) { - return 1; - } else if (!previousKey) { - return -1; - } else if (previousKey < nextKey) { - return -1; - } else if (previousKey > nextKey) { - return 1; - } - return 0; - } - /** - * Sorts an array in place using a key in ascending order. - * - * @function sortCollectionAscending - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array and or a clone of the array sorted. - * - * @example - * import { sortCollectionAscending, assert } from '@universalweb/acid'; - * const result = [{id: 0}, {id: 1}]; - * const collect = [{id: 1}, {id: 0}]; - * const prop = 'id'; - * assert(sortCollectionAscending(collect, prop), result); - */ - function sortCollectionAscending(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortCollectionAscendingFilter(previous, next, propertyName, ifMatch); - }); - } - - /** - * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array. - * - * @function getHighest - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @returns {Object} - The newest object in the collection. - * - * @example - * import { getHighest, assert } from '@universalweb/acid'; - * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0}); - */ - function getHighest(collection, propertyName = 'id') { - return sortCollectionAscending(collection, propertyName)[0]; - } - - /** - * Creates an object composed of keys generated from the results of running each element of collection thru iteratee. - * The order of grouped values is determined by the order they occur in collection. - * The corresponding value of each key is an array of elements responsible for generating the key. - * - * @function groupBy - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {Function} iteratee - The iteratee to transform keys. - * @returns {Object} - Returns the composed aggregate object. - * - * @example - * groupBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': [4.2], '6': [6.1, 6.3] } - */ - function groupBy(collection, iteratee) { - const sortedObject = {}; - eachArray(collection, (item) => { - const results = iteratee(item); - if (!sortedObject[results]) { - sortedObject[results] = []; - } - sortedObject[results].push(item); - }); - return sortedObject; - } - - /** - * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique. - * - * @function indexBy - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {String} propertyName - The property name to index by. - * @returns {Object} - Returns the composed aggregate object. - * - * @example - * import { indexBy, assert } from '@universalweb/acid'; - * const result = { "0": {name: 'test', id: 0}, "1": {name: 'test2', id: 1}}; - * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id'); - * assert(indexed, result); - */ - function indexBy(collection, propertyName = 'id') { - const sortedObject = {}; - eachArray(collection, (item) => { - sortedObject[item[propertyName]] = item; - }); - return sortedObject; - } - - /** - * Invokes a function on the provided property name in each object in the collection. - * - * @function invokeCollection - * @category collection - * @type {Function} - * @param {Array} collection - Collection from which method will be taken. - * @param {String} property - Value used to pluck method from object. - * @param {*} value - Value to be passed to callable property. - * @returns {Array} - Returns the results of the invoked method. - * - * @example - * import { invokeCollection, assert } from '@universalweb/acid'; - * const results = invokeCollection([{ - * test(item, index) { return [item, index];} - * }], 'test', ['EXAMPLE']); - * assert(results, [['EXAMPLE', 0]]); - */ - function invokeCollection(collection, property, value, thisBind) { - if (thisBind) { - return mapArray(collection, (item, index) => { - return item[property].call(thisBind, value); - }); - } - return mapArray(collection, (item, index) => { - return item[property](value); - }); - } - - /** - * Asynchronously awaits & invokes a function on the provided property name in each object in the collection. - * - * @function invokeCollectionAsync - * @category collection - * @type {Function} - * @async - * @param {Array} collection - Collection from which method will be taken. - * @param {String} property - Value used to pluck method from object. - * @param {*} value - Value to be passed to callable property. - * @returns {Array} - Returns the results of the invoked method. - * - * @example - * import { invokeCollectionAsync, assert } from '@universalweb/acid'; - * const results = await invokeCollectionAsync([{ - * async test(item, index) { return [item, index];} - * }], 'test', ['EXAMPLE']); - * assert(results, [['EXAMPLE', 0]]); - */ - function invokeCollectionAsync(collection, property, value, thisBind) { - if (thisBind) { - return mapAsyncArray(collection, (item) => { - return item[property].call(thisBind, value); - }); - } - return mapAsyncArray(collection, async (item) => { - return item[property](value); - }); - } - - /** - * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array. - * - * @function pluckObject - * @category object - * @type {Function} - * @param {Object} source - Array used to determine what sources to be plucked. - * @param {String|Array} targets - Property name. - * @returns {Array|undefined} - An array of plucked sources. - * - * @example - * import { pluckObject, assert } from '@universalweb/acid'; - * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]); - */ - function pluckObject(source, targets) { - if (!source) { - return; - } else if (isString(targets)) { - return source[targets]; - } - return mapArray(targets, (item) => { - return source[item]; - }); - } - - /** - * Returns an array of the plucked values from the collection. - * - * @function pluck - * @category collection - * @type {Function} - * @param {Array} collection - Array used to determine what value to be plucked. - * @param {(String|Number|Array.)} targets - Property name. - * @returns {Array} - An array of plucked values. - * - * @example - * import { pluck, assert } from '@universalweb/acid'; - * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]); - * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]); - */ - function pluck(collection, targets) { - return mapArray(collection, (item) => { - return pluckObject(item, targets); - }); - } - - function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - return previousKey.localeCompare(nextKey); - } - /** - * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array. - * - * @function sortCollectionAlphabetically - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - Name of property to compare. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array. - * - * @example - * import { sortCollectionAlphabetically, assert } from '@universalweb/acid'; - * const result = [{"letter":"a"},{"letter":"c", g: 0},{"letter":"c", g: 2}, {letter:'f'}]; - * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c", g: 2}, {letter:'c', g: 0}]; - * const prop = 'letter'; - * function ifMatchSort(c, n) { - * if (c.g < n.g) { - * return -1; - * } - * if (c.g > n.g) { - * return 1; - * } - * } - * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result); - */ - function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortObjectsAlphabetically(previous, next, propertyName, ifMatch); - }); - } - - function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - return nextKey.localeCompare(previousKey); - } - /** - * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array. - * - * @function sortCollectionAlphabeticallyReverse - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - Name of property to compare. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array. - * - * @example - * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid'; - * const result = [{letter:'f'},{"letter":"c"}, {"letter":"a"}]; - * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c"}]; - * const prop = 'letter'; - * assert(sortCollectionAlphabeticallyReverse(collect, prop), result); - */ - function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch); - }); - } - - /** - * Return the file extension. - * - * @function getFileExtension - * @category file - * @param {*} source - Object to be checked. - * @returns {String|undefined} - Returns the extension. - * - * @example - * import { getFileExtension, assert } from '@universalweb/acid'; - * assert(getFileExtension('test.js'),'js'); - */ - function getFileExtension(source) { - if (source) { - return source.substring(source.lastIndexOf('.') + 1); - } - } - - /** - * Return the file extension. - * - * @function getFilename - * @category file - * @param {*} source - Object to be checked. - * @returns {String|undefined} - Returns the extension. - * - * @example - * import { getFilename, assert } from '@universalweb/acid'; - * assert(getFilename('./universalweb/test.js'),'test.js'); - */ - function getFilename(source) { - if (source) { - return source.substring(source.lastIndexOf('/') + 1); - } - } - - function regexTestFactory(regexType) { - return (item) => { - return hasValue(item) ? regexType.test(item) : false; - }; - } - - /** - * Checks if the string has a .css extension. - * - * @function isFileCSS - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileCSS, assert } from '@universalweb/acid'; - * assert(isFileCSS('test.css'), true); - */ - const isFileCSS = regexTestFactory(/\.css$/); - - /** - * Checks if the string has a .html extension. - * - * @function isFileHTML - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileHTML, assert } from '@universalweb/acid'; - * assert(isFileHTML('test.html'), true); - */ - const isFileHTML = regexTestFactory(/\.html$/); - - /** - * Checks if the string has a .js extension. - * - * @function isFileJS - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileJS, assert } from '@universalweb/acid'; - * assert(isFileJS('test.js'), true); - */ - const isFileJS = regexTestFactory(/\.js$/); - - /** - * Checks if the string has a .json extension. - * - * @function isFileJSON - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileJSON, assert } from '@universalweb/acid'; - * assert(isFileJSON('test.json'), true); - */ - const isFileJSON = regexTestFactory(/\.json$/); - - /** - * Creates a function that executes callable, only after being called n times. - * - * @function after - * @category function - * @type {Function} - * @param {Number} amount - The number of calls until method is invoked. - * @param {Function} callable - The function to be called. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * import { after, assert } from '@universalweb/acid'; - * const onlyAfter = after(1, (item) => { return item;}); - * assert(onlyAfter(1), undefined); - * assert(onlyAfter(2), 2); - */ - function after(amount, callable) { - let point = amount; - let value; - const onlyAfter = (...args) => { - if (point !== null) { - point--; - } - if (point <= 0) { - value = callable(...args); - point = null; - } - return value; - }; - return onlyAfter; - } - - /** - * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments. - * - * @function ary - * @category function - * @type {Function} - * @param {Function} callable - The function to cap arguments for. - * @param {Number} amount - The arity cap. - * @returns {Object} - Returns the new capped function. - * - * @example - * import { ary, assert } from '@universalweb/acid'; - * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]); - */ - function ary(callable, amount) { - return (...args) => { - return callable(...args.splice(0, amount)); - }; - } - - /** - * Creates a function that executes callable, only before n times. - * - * @function before - * @category function - * @type {Function} - * @param {Number} amount - The number of calls before n. - * @param {Function} callable - The function to be called. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * import { before, assert } from '@universalweb/acid'; - * const onlyBefore = before(3, () => { return 1;}); - * assert(onlyBefore(1), 1); - */ - function before(amount, callable) { - let point = amount; - let value; - const onlyBefore = (...args) => { - if (point !== null) { - point--; - } - if (point >= 1) { - value = callable(...args); - } else { - point = null; - } - return value; - }; - return onlyBefore; - } - - /** - * Asynchronously iterates through the given object. - * - * @function eachAsyncObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg. - * @param {*} thisCall - Iteratee called with thisCall as this. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Object|Function|undefined} - Returns source. - * - * @example - * import { eachAsyncObject, assert } from '@universalweb/acid'; - * const tempList = []; - * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => { - * tempList[key] = item; - * }); - * assert(tempList, {a: 1, b: 2, c: 3}); - */ - const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => { - if (!source) { - return; - } - const objectKeys = keys(source); - if (hasValue(thisCall)) { - await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { - return iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg); - }); - } else { - await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { - return iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg); - }); - } - return source; - }; - - /** - * Iterates through the given object. - * - * @function eachObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Object|Function|undefined} - Returns the calling object. - * - * @example - * import { eachObject, assert } from '@universalweb/acid'; - * assert(eachObject({a: 1, b: 2, c: 3}, (item) => { - * console.log(item); - * }), {a: 1, b: 2, c: 3}); - */ - function eachObject(source, iteratee, thisCall, additionalArg) { - if (!source) { - return; - } - const objectKeys = keys(source); - if (hasValue(thisCall)) { - eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { - iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg); - }); - } else { - eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { - iteratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg); - }); - } - return source; - } - - async function forEachAsync(source, callback) { - const values = []; - const properties = []; - let valuesLength = 0; - source.forEach((item, key) => { - values[valuesLength] = item; - properties[valuesLength] = item; - valuesLength++; - }); - for (let index = 0; index < valuesLength; index++) { - await callback(values[index], properties[index]); - } - return source; - } - - /** - * Checks if an object(s) is a Set. - * - * @function isSet - * @category type - * @param {...*} sources - Objects to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isSet, assert } from '@universalweb/acid'; - * assert(isSet(new Set()), true); - */ - const isSetCall = isConstructorNameFactory('Set'); - const isSet = isTypeFactory(isSetCall); - - function forOf(source, iteratee) { - if (isSet(source)) { - for (const value of source) { - iteratee(value, source); - } - return source; - } - for (const [key, value] of source) { - iteratee(value, key, source); - } - return source; - } - - /** - * Checks if an object or objects are a Int16Array. - * - * @function isGenerator - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isGenerator } from '@universalweb/acid'; - * isGenerator(function* (){}); - * // => true - */ - const isGeneratorCall = isConstructorNameFactory('GeneratorFunction'); - const isGenerator = isTypeFactory(isGeneratorCall); - - async function forOfAsync(source, iteratee, generatorArgs) { - if (isSet(source)) { - for (const value of source) { - await iteratee(value, source); - } - return source; - } - if (isGenerator(source)) { - for await (const item of source(...generatorArgs)) { - await iteratee(item, source); - } - } - for (const [key, value] of source) { - await iteratee(value, key, source); - } - return source; - } - - /** - * Checks if an object is an async function. - * - * @function isAsync - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isAsync, assert } from '@universalweb/acid'; - * assert(isAsync(async() => {}), true); - */ - const isAsyncCall = isConstructorNameFactory('AsyncFunction'); - const isAsync = isTypeFactory(isAsyncCall); - - function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) { - return (source, iteratee, argument1, argument2, argument3) => { - let returned; - const isIterateeAsync = isAsync(iteratee); - if (!hasValue(source) || !iteratee) { - return; - } else if (isArray(source)) { - returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; - } else if (isPlainObject(source) || isFunction(source)) { - returned = isIterateeAsync ? objectLoopAsync : objectLoop; - } else if (forOfLoop) { - returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; - } else if (isGenerator(source)) { - returned = forOfLoopAsync; - } else { - returned = isIterateeAsync ? objectLoopAsync : objectLoop; - } - return returned(source, iteratee, argument1, argument2, argument3); - }; - } - - /** - * Iterates through the given object. - * - * @function each - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array | object | Function} - The originally given object. - * - * @example - * import { each, assert } from '@universalweb/acid'; - * const list = {}; - * each({a: 1, b: 2, c: 3}, (item, key) => { - * list[key] = item; - * }); - * assert(list, {a: 1, b: 2, c: 3}); - */ - const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync); - - class Chain { - constructor(methods) { - this.addChainMethod(methods); - } - addChainMethod(methods) { - const thisChain = this; - each(methods, (method, methodName) => { - thisChain[methodName] = function (...args) { - this.value = method.call(thisChain, thisChain.value, ...args); - return thisChain; - }; - }); - } - setValue(value) { - this.value = value; - return this; - } - done() { - const value = this.value; - this.value = null; - return value; - } - value = null; - } - /** - * Creates a chainable set of functions. - * - * @function chain - * @category function - * @type {Function} - * @param {Array|Object} config - The object to take methods from. - * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining. - * - * @example - * import { chain, assert } from '@universalweb/acid'; - * const chained = chain({ - * a(value, c) { - * return value + c; - * } - * }).setValue(2).a(1).done(); - * assert(chained, 3); - */ - function chain(config) { - return construct(Chain, [config]); - } - - /** - * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient. - * - * @function curry - * @category function - * @type {Function} - * @param {Function} callable - The function to curry. - * @param {Number} arity - The arity of method. - * @returns {*} - Returns the new curried function. - * - * @example - * import { curry, assert } from '@universalweb/acid'; - * const result = curry((a, b, c) => { - * return [a, b, c]; - * })(1)(2)(3); - * assert(result, [1, 2, 3]); - */ - function curry(callable, arity = callable.length) { - const curries = []; - const curried = (...curryArgs) => { - curries.push(...curryArgs); - if (curries.length === arity) { - const result = callable(...curries); - clearArray(curries); - return result; - } - return curried; - }; - return curried; - } - - /** - * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order. - * - * @function curryRight - * @type {Function} - * @param {Function} callable - The function to curry. - * @param {Number} arity - The arity of method. - * @returns {*} - Returns the new curried function. - * - * @example - * import { curryRight, assert } from '@universalweb/acid'; - * const result = curryRight((a, b, c) => { - * return [a, b, c]; - * })(1)(2)(3); - * assert(result, [3, 2, 1]); - */ - function curryRight(callable, arity = callable.length) { - const curries = []; - const curried = (...curryArgs) => { - curries.unshift(...curryArgs); - if (curries.length === arity) { - const result = callable(...curries); - clearArray(curries); - return result; - } - return curried; - }; - return curried; - } - - /** - * This method returns undefined. - * - * @function noop - * @category function - * @type {Function} - * @returns {undefined} - Returns undefined. - * - * @example - * import { noop, assert } from '@universalweb/acid'; - * assert(noop(), undefined); - */ - function noop() { - return; - } - - /** - * Iterates based on the amount given invoking the iteratee with the current index as an argument. - * - * @function times - * @category utility - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @returns {undefined} - Nothing. - * - * @example - * import { times } from '@universalweb/acid'; - * times(3, (item) => { - * console.log(item); - * }); - * // 0 - * // 1 - * // 2 - * // => undefined - */ - function times(amount, iteratee) { - for (let index = 0; index < amount; index++) { - iteratee(index); - } - } - /** - * Iterates based on the amount given and maps the results returned by the iteratee each time to an array. - * - * @function timesMap - * @category utility - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @param {Array} [results = []] - Array that will have iteratee return pushed to. - * @returns {Array} - An array with iteratee's returned values. - * - * @example - * import { timesMap } from '@universalweb/acid'; - * timesMap(3, (item) => { - * return item; - * }); - * // => [0, 1, 2] - */ - function timesMap(amount, iteratee, results = []) { - for (let index = 0; index < amount; index++) { - results[index] = iteratee(amount); - } - return results; - } - - class Timers { - list = construct(Map); - construct() {} - /** - * Remove a timer that was created using the timer function. - * - * @param {Number} id - The id of the timer to remove. - * @returns {undefined} - Returns nothing. - * - * @example - * import { timer, assert } from '@universalweb/acid'; - * timer(() => {}, 100); - * // => 0 - */ - remove(id) { - clearTimeout(id); - this.list.delete(id); - } - has(id) { - return this.list.has(id); - } - get(id) { - return this.list.get(id); - } - /** - * Create a timer and add it to the list of timers. - * - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setTimeoutId ID. - * - * @example - * import { timers, assert } from '@universalweb/acid'; - * timers.set(() => {}, 100); - * // => 0 - */ - set(callable, time) { - const currentThis = this; - const id = setTimeout(() => { - callable(); - currentThis.remove(id); - }, time); - this.list.set(id, true); - return id; - } - /** - * Clear all active timers. - * - * @returns {undefined} - Returns undefined. - * - * @example - * import { timers, assert } from '@universalweb/acid'; - * timers.clear(); - * // => undefined - */ - clear() { - const currentThis = this; - currentThis.list.forEach((id) => { - currentThis.remove(id); - }); - } - } - const timers = construct(Timers); - /** - * Timer wrapper. - * - * @function timer - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setTimeoutId ID. - * - * @example - * import { timer, assert } from '@universalweb/acid'; - * timer(() => {}, 100); - * // => 0 - */ - function timer(callable, time) { - return timers.set(callable, time); - } - /** - * Clear all active timers. - * - * @function clearTimers - * @category function - * @returns {undefined} - Returns undefined. - * - * @example - * import { clearTimers, assert } from '@universalweb/acid'; - * clearTimers(); - * // => undefined - */ - function clearTimers() { - const id = setTimeout(noop, 0); - times(id, (index) => { - timers.remove(index); - }); - } - - const applyNative = Reflect.apply; - /** - * Calls a target function with an optional "this" and optional arguments as specified. Same as Reflect.apply but with a function check. - * - * @function apply - * @category function - * @param {Function} target - The target function to call. - * @param {*} thisArgument - Array like object. - * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called. - * @returns {*} - The result of calling the given target function with the specified this value and arguments. - * - * @example - * import { apply, assert } from '@universalweb/acid'; - * assert(apply(function (a) {return a;}, undefined, [2]), 2); - */ - function apply(target, thisArgument, argumentsList) { - if (isFunction(target)) { - return applyNative(target, thisArgument, argumentsList); - } - } - - /** - * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer. - * - * @function debounce - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Function} - The debounced function. - * - * @example - * import { debounce, promise, assert } from '@universalweb/acid'; - * const promised = promise((a) => { - * const debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0); - * }); - * assert(await promised(), 'debounced'); - */ - function debounce(callable, time) { - function debounced(...args) { - if (debounced.id !== false) { - timers.remove(debounced.id); - } - debounced.id = timer(() => { - debounced.callable(...args); - debounced.id = false; - }, time); - } - debounced.id = false; - debounced.callable = callable.bind(debounced); - debounced.clear = () => { - if (debounced.id !== false) { - timers.remove(debounced.id); - debounced.id = false; - } - }; - return debounced; - } - - /** - * Checks if the given method is a function. If it is then it invokes it with the given arguments. - * - * @function ifInvoke - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked if possible. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args - Arguments to pass to the function. - * @returns {*} - Returns the method invoked or undefined. - * - * @example - * import { ifInvoke, assert } from '@universalweb/acid'; - * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]); - */ - function ifInvoke(callable, thisBind, ...args) { - if (isFunction(callable)) { - if (thisBind) { - return callable.call(thisBind, ...args); - } - return callable(...args); - } - } - - /** - * Creates a function that negates the result of the predicate callable. - * - * @function negate - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @returns {*} - Returns the given methods result. - * - * @example - * negate(() => { return false;})(); - * // => true - */ - function negate(callable) { - return (...args) => { - return !callable(...args); - }; - } - - /** - * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned. - * - * @function nthArg - * @category function - * @type {Function} - * @param {Number} [index = 0] - The index of the argument to return. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * nthArg(1)('a', 'b'); - * // => 'b' - */ - function nthArg(index = 0) { - return (...args) => { - return args[index]; - }; - } - - /** - * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function. - * - * @function once - * @category function - * @type {Function} - * @param {Function} callable - The function to be called. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * const onceOnly = once((item) => { return item;}); - * onceOnly(5); - * onceOnly(3); - * // => 5 - */ - const once = (callable) => { - let value; - const onlyOnce = (...args) => { - if (!hasValue(value)) { - value = callable(...args); - } - return value; - }; - return onlyOnce; - }; - - /** - * Returns the constructor of an object. - * - * @function getType - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { getType, assert } from '@universalweb/acid'; - * assert(getType(1), true); - */ - function getType(source) { - return source?.constructor; - } - - /** - * Returns a new empty object of the same type. - * - * @function cloneType - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { cloneType, assert } from '@universalweb/acid'; - * assert(cloneType([1]), []); - */ - function cloneType(source, args = []) { - const sourceType = getType(source); - if (sourceType === Function) { - if (sourceType.name === 'function') { - return function () {}; - } - } - return construct(sourceType, args); - } - - /** - * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object. - * - * @function forOfCompactMap - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => { - * return item; - * }); - * // => {b: 2, c: 3} - */ - function forOfMap(source, iteratee = returnValue, resultsObject) { - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = iteratee(value, results, source); - methodPushBound(result); - } - return results; - } - const methodSet = isFunction(results.set); - for (const [key, value] of source) { - const result = iteratee(value, key, results, source); - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - return results; - } - - /** - * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function forOfCompactMapAsync - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * import { forOfCompactMapAsync, assert } from '@universalweb/acid'; - * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => { - * return item; - * }), {b: 2, c: 3}); - */ - async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) { - if (isGenerator(source)) { - const resultsGenerator = []; - for await (const item of source(...generatorArgs)) { - resultsGenerator.push(await iteratee(item, resultsGenerator, source)); - } - return resultsGenerator; - } - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = await iteratee(value, results, source); - methodPushBound(result); - } - return results; - } - const methodSet = isFunction(results.set); - for await (const [key, value] of source) { - const result = await iteratee(value, key, results, source); - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - return results; - } - - /** - * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. - * - * @function mapObjectAsync - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function|undefined} - An object of the same calling object's type. - * - * @example - * import { mapAsyncObject, assert } from '@universalweb/acid'; - * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, b: undefined, c: 3}); - */ - async function mapAsyncObject(source, iteratee, results = {}) { - if (!source) { - return; - } - await eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => { - results[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys); - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. - * - * @function mapObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Object|Function|undefined} - An object of the same calling object's type. - * - * @example - * import { mapObject, assert } from '@universalweb/acid'; - * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, b: undefined, c: 3}); - */ - function mapObject(source, iteratee, results = {}, thisCall, additionalArg) { - if (!source) { - return; - } - if (hasValue(thisCall)) { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - results[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg); - }); - } else { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - results[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg); - }); - } - return results; - } - - /** - * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object. - * - * @function map - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {Object | Function} [results = {}] - Object that will be used to assign results. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array | object | Function} - A new object of the same calling object's type. - * - * @example - * import { map, assert } from '@universalweb/acid'; - * assert(map({a: 1, b: 2, c: 3}, (item) => { - * return item * 2; - * }), {a: 2, b: 4, c: 6}); - */ - const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync); - - /** - * Creates a function that invokes iteratee with the arguments it receives and returns their results. - * - * @function over - * @category function - * @type {Function} - * @param {(Array.|Object.)} iteratees - The list of functions to loop through. - * @returns {Function} - Returns the new over wrapped function. - * - * @example - * import { overEvery, assert } from '@universalweb/acid'; - * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]); - */ - function over(iteratees) { - return (...args) => { - return map(iteratees, (item) => { - return item(...args); - }); - }; - } - - /** - * Iterates through the given object while the iteratee returns true. - * - * @function everyAsyncObject - * @category object - * @type {Function} - * @param {Object} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { everyAsyncObject, assert } from '@universalweb/acid'; - * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => { - * return item; - * }); - * assert(result, true); - */ - async function everyAsyncObject(source, iteratee) { - if (!source) { - return; - } - const objectKeys = keys(source); - return everyAsyncArray(objectKeys, (key, index, original, propertyCount) => { - return iteratee(source[key], key, source, propertyCount, original); - }); - } - - /** - * Iterates through the given object while the iteratee returns true. - * - * @function everyObject - * @category object - * @type {Function} - * @param {Object} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { everyObject, assert } from '@universalweb/acid'; - * const result = everyObject({a: true, b: true, c: true}, (item) => { - * return item; - * }); - * assert(result, true); - */ - function everyObject(source, iteratee) { - if (!source) { - return; - } - const objectKeys = keys(source); - return everyArray(objectKeys, (key, index, original, propertyCount) => { - return iteratee(source[key], key, source, propertyCount, original); - }); - } - - /** - * Iterates (for of) through the given object while the iteratee returns true using a for of loop. - * - * @function forOfEvery - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { every, assert } from '@universalweb/acid'; - * assert(forOfEvery({a: false, b: true, c: true}, (item) => { - * return item; - * }), false); - */ - function forOfEvery(source, iteratee = returnValue) { - if (isArray(source) || isSet(source)) { - for (const value of source) { - const result = iteratee(value, source); - if (result === false) { - return false; - } - } - } else { - for (const [key, value] of source) { - const result = iteratee(value, key, source); - if (result === false) { - return false; - } - } - } - return true; - } - - /** - * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop. - * - * @function forOfEveryAsync - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { every, assert } from '@universalweb/acid'; - * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => { - * return item; - * }), false); - */ - async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) { - if (isGenerator(source)) { - for await (const item of source(...generatorArgs)) { - const result = await iteratee(item, source); - if (result === false) { - return false; - } - } - } else if (isArray(source) || isSet(source)) { - for (const value of source) { - const result = await iteratee(value, source); - if (result === false) { - return false; - } - } - } else { - for (const [key, value] of source) { - const result = await iteratee(value, key, source); - if (result === false) { - return false; - } - } - } - return true; - } - - /** - * Iterates through the given object while the iteratee returns true. - * - * @function every - * @category utility - * @type {Function} - * @param {Object | Array | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { every, assert } from '@universalweb/acid'; - * assert(every({a: false, b: true, c: true}, (item) => { - * return item; - * }), false); - */ - const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync); - - /** - * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives. - * - * @function overEvery - * @category function - * @type {Function} - * @param {(Array.|Object.)} predicates - The list of functions to loop through. - * @returns {Function} - Returns the new overEvery wrapped function. - * - * @example - * import { overEvery, assert } from '@universalweb/acid'; - * assert(overEvery([Boolean, isFinite])('1'), true); - */ - function overEvery(predicates) { - return (arg) => { - return every(predicates, (predicate) => { - return predicate(arg); - }); - }; - } - - /** - * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on. - * - * @function reArg - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Array} indexes - The arranged argument indexes. - * @returns {Function} - Returns the new function. - * - * @example - * reArg((a, b, c) => { - * return [a, b, c]; - * }, [1,2,0])(1,2,3); - * // => [2, 3, 1] - */ - function reArg(callable, indexes) { - return (...args) => { - return callable( - ...indexes.map((item) => { - return args[item]; - }) - ); - }; - } - - /** - * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer. - * - * @function throttle - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Function|undefined} - The throttled function. - * - * @example - * const throttled = throttle(() => { console.log('throttle'); }, 0)(); - * throttled(); - * // 'throttle' - */ - function throttle(callable, time) { - function throttled(...args) { - if (throttled.id) { - throttled.shouldThrottle = true; - return; - } - throttled.callable(...args); - throttled.id = timer(() => { - if (throttled.shouldThrottle) { - throttled.callable(...args); - } - throttled.id = false; - }, time); - } - throttled.id = false; - throttled.callable = callable.bind(throttled); - throttled.clear = () => { - timers.remove(throttled.id); - throttled.id = false; - }; - return throttled; - } - - /** - * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function. - * - * @function wrap - * @category function - * @type {Function} - * @param {*} value - The value to wrap. - * @param {Function} wrapper - The wrapper function. - * @returns {Function} - The new function. - * - * @example - * wrap('Lucy', (firstName, lastName) => { - * return `My name is ${firstName} ${lastName}.`; - * })('Diamonds'); - * // => 'My name is Lucy Diamonds.' - */ - function wrap(value, wrapper) { - return (...arg) => { - return wrapper(value, ...arg); - }; - } - - const functionPrototype = Function.prototype; - /** - * Caches a prototype method. - * - * @function cacheNativeMethod - * @category utility - * @type {Function} - * @param {Function} method - Prototype method. - * @returns {Function} - Cached method. - * - * @example - * import { cacheNativeMethod, assert } from '@universalweb/acid'; - * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1); - */ - function cacheNativeMethod(method) { - return functionPrototype.call.bind(method); - } - - /** - * Returns an array of all properties (enumerable or not) found directly upon a given object. - * - * @function getPropNames - * @category object - * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned. - * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object. - * - * @example - * import { getPropNames, assert } from '@universalweb/acid'; - * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']); - */ - const getPropNames = Object.getOwnPropertyNames; - /** - * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object. - * - * @function getPropDesc - * @category object - * @param {Object} target - The target object. - * @param {String} property - The name of the property whose description is to be retrieved. - * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise. - * - * @example - * getPropDesc({ bar: 42 }, 'bar'); - * // => { configurable: true, enumerable: true, value: 42, writable: true } - */ - const getPropDesc = Object.getOwnPropertyDescriptor; - /** - * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object. - * - * @function defProp - * @category object - * @param {Object} target - The object on which to define the property. - * @param {String} property - The name of the property whose description is to be retrieved. - * @param {Object} descriptor - The descriptor for the property being defined or modified. - * @returns {Object} - The object that was passed to the function. - * - * @example - * defProp({}, 'key', { - * enumerable: false, - * configurable: false, - * writable: false, - * value: 'static' - * }).key; - * // => 'static' - */ - const defProp = Object.defineProperty; - const hasProp = cacheNativeMethod(Object.hasOwnProperty); - - /** - * Determines whether two values are the same value. - * - * @function isSame - * @category object - * @param {*} source - Value to compare to. - * @param {*} target - A value to compare. - * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value. - * - * @example - * import { isSame, assert } from '@universalweb/acid'; - * assert(isSame('foo', 'foo'), true); - */ - const isSame = Object.is; - - /** - * Adds two numbers. - * - * @function add - * @category math - * @type {Function} - * @param {Number} augend - First number. - * @param {Number} addend - Second number which is being added to another (augend). - * @returns {Number} - Returns the sum of the arguments. - * - * @example - * import { add, assert } from '@universalweb/acid'; - * assert(add(1, 1), 2); - */ - function add(augend, addend) { - return augend + addend; - } - - /** - * Decrements a number. - * - * @function deduct - * @category math - * @type {Function} - * @param {Number} source - First number. - * @returns {Number} - Returns a decremented version of the number. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - * deduct(10); - * // => 9 - */ - function deduct(source) { - return source - 1; - } - - /** - * Divides two numbers. - * - * @function divide - * @category math - * @type {Function} - * @param {Number} source - First number. - * @param {Number} value - Second number. - * @returns {Number} - Returns the quotient of the arguments. - * - * @example - * import { divide, assert } from '@universalweb/acid'; - * assert(divide(10, 5), 2); - */ - function divide(source, value) { - return source / value; - } - - /** - * Increments a number. - * - * @function increment - * @category math - * @type {Function} - * @param {Number} source - First number. - * @returns {Number} - Returns an incremented version of the number. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - * increment(10); - * // => 11 - */ - function increment(source) { - return source + 1; - } - - /** - * Multiplies two numbers. - * - * @function multiply - * @category math - * @type {Function} - * @param {Number} source - First number. - * @param {Number} value - Second number. - * @returns {Number} - Returns the product of the arguments. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - */ - function multiply(source, value) { - return source * value; - } - - /** - * Calculate the progress from a given total and current amount. - * - * @function calcProgress - * @category utility - * @type {Function} - * @param {Number} total - The total amount. - * @param {Number} currentAmount - The current amount. - * @returns {Number} - The progress as a percentage. - * - * @example - * import { calcProgress, assert } from '@universalweb/acid'; - * assert(calcProgress(100, 1), 1); - */ - function calcProgress(total, currentAmount) { - if (total === 0) { - return false; - } - if (currentAmount === 0) { - return 0; - } - return (currentAmount / total) * 100; - } - - const { random } = Math; - /** - * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption.. - * - * @function randomFloat - * @category math - * @type {Function} - * @param {Number} max - Establishes highest possible value for the random number. - * @param {Number} [min = 0] - Establishes lowest possible value for the random number. - * @returns {Number} - Returns random integer between the max and min range. - * - * @example - * import { randomFloat, assert } from '@universalweb/acid'; - * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;}); - * // => 9.1 - */ - function randomFloat(max, min = 0) { - return random() * (max - min) + min; - } - - /** - * Extracts the remainder between two numbers. - * - * @function remainder - * @category math - * @type {Function} - * @param {Number} source - First number. - * @param {Number} value - Second number. - * @returns {Number} - Returns the remainder of the arguments. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - * remainder(10, 6); - * // => 4 - */ - function remainder(source, value) { - return source % value; - } - - /** - * Subtract all numbers in the array starting from left to right & return the difference. - * - * @function subtractAll - * @category math - * @type {Function} - * @param {Number[]} source - Array of numbers. - * @returns {Number} - Returns the final difference. - * - * @example - * import { subtractAll, assert } from '@universalweb/acid'; - * assert(subtractAll([10, 1, 2, 3]), 5); - */ - function subtractAll(source) { - return source.reduce((a, b) => { - return a - b; - }, 0); - } - - /** - * Sum all numbers in a given array. - * - * @function sumAll - * @category math - * @type {Function} - * @param {Number[]} source - Array of numbers. - * @returns {Number} - Returns a single number. - * - * @example - * import { sumAll, assert } from '@universalweb/acid'; - * assert(sumAll([10, 1, 2, 3]), 5); - */ - function sumAll(source) { - return source.reduce((a, b) => { - return a + b; - }, 0); - } - - /** - * Checks if a number is within a range. - * - * @function isNumberInRange - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @param {Number} start - Beginning of range. - * @param {Number} end - End of range. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumberInRange, assert } from '@universalweb/acid'; - * assert(isNumberInRange(1, 0, 2), true); - * assert(isNumberInRange(1, 2, 5), false); - */ - function isNumberInRange(source, start, end) { - return source > start && source < end; - } - - /** - * Checks if a number is within a range. - * - * @function isNumberNotInRange - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @param {Number} start - Beginning of range. - * @param {Number} end - End of range. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumberNotInRange, assert } from '@universalweb/acid'; - * assert(isNumberNotInRange(1, 0, 2), false); - * assert(isNumberNotInRange(1, 2, 5), true); - */ - function isNumberNotInRange(source, start, end) { - return source < start || source > end; - } - - /** - * Checks if a number is negative & returns true or false. - * - * @function isPositive - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isPositive, assert } from '@universalweb/acid'; - * assert(isPositive(1), true); - */ - const { sign } = Math; - function isPositive(source) { - return sign(source) === 1; - } - - /** - * Strictly checks if a number is zero. - * - * @function isZero - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isZero, assert } from '@universalweb/acid'; - * assert(isZero(0), true); - */ - function isZero(source) { - return source === 0; - } - - const objectEntries = Object.entries; - /** - * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error. - * - * @function getEntries - * @category object - * @param {Object} source - The source object. - * @returns {Array|undefined} - Returns the Object.entries of the source object. - * - * @example - * import { getEntries, assert } from '@universalweb/acid'; - * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]); - */ - function getEntries(source) { - if (hasValue(source)) { - return objectEntries(source); - } - } - - /** - * Extracts all keys from an object whose values are not null or undefined. - * - * @function compactKeys - * @category object - * @type {Function} - * @param {Object} object - Object from which keys are extracted. - * @returns {Array} - Returns an array of key values. - * - * @example - * import { compactKeys, assert } from '@universalweb/acid'; - * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']); - */ - function compactKeys(object) { - const compactedKeys = []; - eachObject(object, (item, key) => { - if (hasValue(item)) { - compactedKeys.push(key); - } - }); - return compactedKeys; - } - - /** - * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function compactMapAsyncObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with mapped properties that are not null or undefined. - * - * @example - * import { compactMapAsyncObject, assert } from '@universalweb/acid'; - * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, c: 3}); - */ - async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) { - await eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => { - const result = await iteratee(item, key, results, original, propertyCount, objectKeys); - if (hasValue(result)) { - results[key] = result; - } - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function compactMapObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with mapped properties that are not null or undefined. - * - * @example - * import { compactMapObject, assert } from '@universalweb/acid'; - * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, c: 3}); - */ - function compactMapObject(source, iteratee = returnValue, results = {}) { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - const result = iteratee(item, key, results, original, propertyCount, objectKeys); - if (hasValue(result)) { - results[key] = result; - } - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. - * - * @function filterObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with properties that passed the test. - * - * @example - * filterObject({a: false, b: true, c: true}, (item) => { - * return item; - * }); - * // => {b: true, c: true} - */ - function filterObject(source, iteratee, results = {}) { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - if (iteratee(item, key, results, original, propertyCount, objectKeys) === true) { - results[key] = item; - } - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. - * - * @function filterAsyncObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with properties that passed the test. - * - * @example - * filterAsyncObject({a: false, b: true, c: true}, (item) => { - * return item; - * }); - * // => {b: true, c: true} - */ - async function filterAsyncObject(source, iteratee, results = {}) { - await eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => { - if ((await iteratee(item, key, results, original, propertyCount, objectKeys)) === true) { - results[key] = item; - } - }); - return results; - } - - /** - * Creates an inverted version of a given object by switching it's keys and values. - * - * @function invert - * @type {Function} - * @category object - * @param {Object} source - Object to be inverted. - * @param {Array} [target = {}] - Empty object to be populated with inverted values from source. - * @returns {Object|undefined} - Returns object with keys and values switched. - * - * @example - * import { invert, assert } from '@universalweb/acid'; - * assert(invert({a:1}), {1:'a'}); - */ - function invert(source, target = {}) { - if (!source) { - return; - } - eachObject(source, (item, key) => { - target[item] = key; - }); - return target; - } - - /** - * Performs a shallow strict comparison between two objects. - * - * @function isMatchObject - * @type {Function} - * @category object - * @param {Object} source - Source object. - * @param {Object} target - Object to compare to source. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { assert, isMatchObject } from '@universalweb/acid'; - * assert(isMatchObject({a: 1}, {a: 1}), true); - */ - const isMatchObject = (source, target) => { - if (source === target) { - return true; - } - const sourceKeys = keys(source); - const targetKeys = keys(target); - if (sourceKeys.length === targetKeys.length) { - return everyArray(sourceKeys, (key) => { - return source[key] === target[key]; - }); - } - return false; - }; - - /** - * Returns a regex safe special characters escaped version of a string. - * - * @function regexSafe - * @category regex - * @type {Function} - * @param {Object} source - String to make safe. - * @returns {Object} - Returns a regex safe version of the string. - * - * @example - * import { regexSafe, assert } from '@universalweb/acid'; - * assert(regexSafe(/.+/), '\/\.\+\/'); - */ - const escapeRegexRegex = /[()[\]{}*+?^$|#.,/\\\s-]/g; - function escapeRegex(source) { - return source.replace(escapeRegexRegex, '\\$&'); - } - - /** - * Convert array of strings to regex. - * - * @function arrayToRegex - * @category regex - * @type {Function} - * @param {Object} source - Array of strings. - * @returns {Object} - Returns a regex safe version of the string. - * - * @example - * import { arrayToRegex, assert } from '@universalweb/acid'; - * assert(String(arrayToRegex(['a','b'])), String(/a|b/)); - */ - function arrayToRegex(source, makeSafe) { - if (makeSafe) { - return arrayToRegex(mapArray(source, escapeRegex)); - } - return RegExp(source.join('|')); - } - - /** - * Checks if the value is a RegExp. - * - * @function isRegex - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isRegex, assert } from '@universalweb/acid'; - * assert(isRegex(/test/), true); - */ - const isRegexCall = isConstructorNameFactory('RegExp'); - const isRegex = isTypeFactory(isRegexCall); - - /** - * Returns a clone of the given object without the given properties. - * - * @function omit - * @category object - * @type {Function} - * @param {Object} source - Object from which keys are extracted. - * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object. - * @returns {Object|undefined} - A new object with the removed. - * - * @example - * import { omit, assert } from '@universalweb/acid'; - * assert(omit({a:1, b:2}, ['a']), {b:2}); - * assert(omit({a:1, b:2}, 'a'), {b:2}); - * assert(omit({1:'test', b:2}, 1), {b:2}); - */ - function omit(source, blacklist) { - if (!source) { - return {}; - } - if (isArray(blacklist)) { - const blacklistRegex = arrayToRegex(blacklist); - return filterObject(source, (item, key) => { - return !blacklistRegex.test(key); - }); - } - if (isRegex(blacklist)) { - return filterObject(source, (item, key) => { - return !blacklist.test(key); - }); - } - if (isString(blacklist)) { - return filterObject(source, (item, key) => { - return key !== blacklist; - }); - } - if (isNumber(blacklist)) { - const numberToString = blacklist.toString(); - return filterObject(source, (item, key) => { - return key !== numberToString; - }); - } - if (isFunction(blacklist)) { - return filterObject(source, (item, key) => { - return !blacklist(item, key); - }); - } - return objectAssign({}, source); - } - - /** - * Returns a clone of the source object with the plucked properties. - * - * @function pick - * @type {Function} - * @category object - * @param {Object} source - Object to be cloned. - * @param {Array} whitelist - Array of property names used to determine what values to pluck. - * @param {Object} [target = {}] - Object to be populated with plucked values. - * @returns {Object|undefined} - A new object with plucked properties. - * - * @example - * import { pick, assert } from '@universalweb/acid'; - * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2}); - */ - const pick = (source, whitelist, target = {}) => { - if (!source) { - return; - } - eachArray(whitelist, (item) => { - target[item] = source[item]; - }); - return target; - }; - - /** - * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object. - * - * @function objectSize - * @category object - * @param {Object} source - The source object. - * @returns {Number|undefined} - The amount of keys. - * - * @example - * import { objectSize, assert } from '@universalweb/acid'; - * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3); - */ - function objectSize(source) { - if (!source) { - return; - } - if (isPlainObject(source)) { - return keys(source).length; - } - const objectLengthProperty = source.length; - if (hasValue(objectLengthProperty)) { - return objectLengthProperty; - } - const objectSizeProperty = source.size; - if (hasValue(objectLengthProperty)) { - return objectSizeProperty; - } - return keys(source).length; - } - - /** - * Creates an object from two arrays, one of property identifiers and one of corresponding values. - * - * @function zipObject - * @type {Function} - * @category object - * @param {Array} properties - The property identifiers. - * @param {Array} values - The property values. - * @returns {Object} - Returns the new object. - * - * @example - * zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ - const zipObject = (properties, values) => { - const zipedObject = {}; - eachArray(properties, (item, key) => { - zipedObject[item] = values[key]; - }); - return zipedObject; - }; - /** - * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. - * - * @function unZipObject - * @type {Function} - * @category object - * @param {Object} object - The object to process. - * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array. - * - * @example - * unZipObject({ 'a': 1, 'b': 2 }); - * // => [['a', 'b'], [1, 2]] - */ - const unZipObject = (object) => { - const unZippedKeys = []; - const values = []; - eachObject(object, (item, key) => { - unZippedKeys.push(key); - values.push(item); - }); - return [unZippedKeys, values]; - }; - - const normalizeCase$4 = /[ _-]+/g; - /** - * Converts a string into Camel case format. - * - * @function camelCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into Camel case. - * @returns {String} - Converted string in Camel case. - * - * @example - * import { camelCase, assert } from '@universalweb/acid'; - * assert(camelCase('camel case'), 'camelCase'); - */ - function camelCase(source) { - let result = ''; - source - .replace(normalizeCase$4, ' ') - .trim() - .split(' ') - .forEach((item, index) => { - if (index === 0) { - result += item.toLowerCase(); - } else { - result += item[0].toUpperCase() + item.slice(1).toLowerCase(); - } - }); - return result; - } - - const normalizeCase$3 = /[ _-]+/g; - const space$1 = /[ ]+/g; - /** - * Converts a string into single space sepperated words in Kebab case. - * - * @function kebabCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into Kebab case. - * @returns {String} - Converted string in Kebab case. - * - * @example - * import { kebabCase, assert } from '@universalweb/acid'; - * assert(kebabCase('kebab case'), 'kebab-case'); - */ - function kebabCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase$3, ' ') - .trim() - .toLowerCase() - .replace(space$1, '-'); - } - - const normalizeCase$2 = /[ _-]+/g; - const space = /[ ]+/g; - /** - * Converts a string into single space sepperated words in snake case. - * - * @function snakeCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into snake case. - * @returns {String} - Converted string in Snake case. - * - * @example - * import { snakeCase, assert } from '@universalweb/acid'; - * assert(snakeCase('snake case'), 'snake_case'); - */ - function snakeCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase$2, ' ') - .trim() - .toLowerCase() - .replace(space, '_'); - } - - const normalizeCase$1 = /[ _-]+/g; - /** - * Converts a string into single space sepperated words in uppercase. - * - * @function upperCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into upper case. - * @returns {String} - Converted string in upper case. - * - * @example - * import { upperCase, assert } from '@universalweb/acid'; - * assert(upperCase('upper-case'), 'UPPER CASE'); - * assert(upperCase('upper_case'), 'UPPER CASE'); - */ - function upperCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase$1, ' ') - .trim() - .toUpperCase(); - } - - const normalizeCase = /[ _-]+/g; - /** - * Converts a string into single space sepperated words in lowerCase. - * - * @function lowerCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into upper case. - * @returns {String} - Converted string in upper case. - * - * @example - * import { lowerCase, assert } from '@universalweb/acid'; - * assert(lowerCase('lower-CASE'), 'lower case'); - */ - function lowerCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase, ' ') - .trim() - .toLowerCase(); - } - - /** - * Inserts text into a string at a given position. - * - * @function insertInRange - * @category string - * @type {Function} - * @param {String} string - String to insert the text into. - * @param {Number} index - Point of insertion. - * @param {String} text - The string to be inserted. - * @returns {String} - The string with the text inserted at the given point. - * - * @example - * import { insertInRange, assert } from '@universalweb/acid'; - * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.'); - */ - function insertInRange(string, index, text) { - return string.slice(0, index) + text + string.slice(index, string.length); - } - /** - * Plucks a letter using the index starting from the right. - * - * @function rightString - * @category string - * @type {Function} - * @param {String} string - String to extract the letter from. - * @param {Number} [index=1] - The starting position. - * @returns {String} - A letter at the given index. - * - * @example - * import { rightString, assert } from '@universalweb/acid'; - * assert(rightString('rightString'), 'g'); - * assert(rightString('rightString', 2), 'n'); - */ - function rightString(string, index = 1) { - return string[string.length - index]; - } - /** - * Splits up a string into chunks. - * - * @function chunkString - * @category string - * @type {Function} - * @param {String} string - String to chunked. - * @param {Number} [size] - The max string length per chunk. - * @returns {Array} - An array with strings that are <= size parameter. - * - * @example - * import { chunkString, assert } from '@universalweb/acid'; - * assert(chunkString('chunk', 2), ['ch', 'un', 'k']); - */ - function chunkString(string, size) { - return string.match(new RegExp(`(.|[\r\n]){1,${size}}`, 'g')); - } - /** - * Truncates everything before the index starting from the right. - * - * @function initialString - * @category string - * @type {Function} - * @param {String} string - String to extract the initial letters from. - * @param {Number} [index=1] - Starting point from the right. - * @returns {String} - A string with the characters before the index starting from the right. - * - * @example - * import { initialString, assert } from '@universalweb/acid'; - * assert(initialString('initialString', 2), 'initialStri'); - */ - function initialString(string, index = 1) { - return string.slice(0, index * -1); - } - /** - * Truncates everything after a index. - * - * @function restString - * @category string - * @type {Function} - * @param {String} string - String to extract the rest of the letters from. - * @param {Number} [index=1] - Starting point. - * @returns {String} - A string without the characters up-to to the index. - * - * @example - * import { restString, assert } from '@universalweb/acid'; - * assert(restString('restString', 2), 'stString'); - */ - function restString(string, index = 1) { - return string.substring(index); - } - - /** - * Replaces all occurrences of strings in an array with a value. - * - * @function replaceList - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @param {Array} words - Strings to replace. - * @param {String} value - The match replacement. - * @returns {String} - The string with the replacement. - * - * @example - * import { replaceList, assert } from '@universalweb/acid'; - * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.'); - */ - function replaceList(string, words, value) { - return string.replace(new RegExp(`\\b${words.join('|')}\\b`, 'gi'), value); - } - - const rawURLDecodeRegex = /%(?![\da-f]{2})/gi; - const andRegex = /&/g; - const lessThanRegex = //g; - const doubleQuoteRegex = /"/g; - /** - * Raw URL decoder. - * - * @function rawURLDecode - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @returns {String} - Converted string into the decoded URI Component . - * - * @example - * import { rawURLDecode, assert } from '@universalweb/acid'; - * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.'); - */ - function rawURLDecode(string) { - return decodeURIComponent( - string.replace(rawURLDecodeRegex, () => { - return '%25'; - }) - ); - } - /** - * Replaced sensitive characters with their matching html entity. - * - * @function htmlEntities - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @returns {String} - Replaced string. - * - * @example - * import { htmlEntities, assert } from '@universalweb/acid'; - * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`); - */ - function htmlEntities(string) { - return string.replace(andRegex, '&').replace(lessThanRegex, '<').replace(moreThanRegex, '>').replace(doubleQuoteRegex, '"'); - } - /** - * Executes rawURLDecode followd by htmlEntities methods on a string. - * - * @function sanitize - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @returns {String} - Replaced string. - * - * @example - * import { sanitize, assert } from '@universalweb/acid'; - * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`); - */ - function sanitize(string) { - return htmlEntities(rawURLDecode(string)); - } - - const tokenizeRegEx = /\S+/g; - const wordsRegEx = /\w+/g; - /** - * Break string by non-white space characters matches. - * - * @function tokenize - * @type {Function} - * @category string - * @param {String} string - String to be broken up. - * @returns {Array} - Array of words without white space characters. - * - * @example - * import { tokenize, assert } from '@universalweb/acid'; - * assert(tokenize('I am Lucy!'), ["I", "am", "Acid!"]); - */ - function tokenize(string) { - return string.match(tokenizeRegEx) || []; - } - /** - * Break string into word matches. - * - * @function words - * @type {Function} - * @param {String} string - String to be broken up. - * @returns {Array} - Array of words with word characters only. - * - * @example - * import { words, assert } from '@universalweb/acid'; - * assert(words('I am Acid!'), ["I", "am", "Acid"]); - */ - function words(string) { - return string.match(wordsRegEx) || []; - } - - const truncateDown = (string, maxLength, stringLength) => { - const breakAll = string.split(''); - const breakAllLength = breakAll.length; - let item; - let index = stringLength - maxLength; - for (; index < breakAllLength && index >= 0; index--) { - item = breakAll[index]; - if (item === ' ') { - break; - } - } - return string.slice(0, index).trim(); - }; - const truncateUp = (string, maxLength, stringLength) => { - const breakAll = string.split(''); - const breakAllLength = breakAll.length; - let item; - let index = maxLength; - for (; index < breakAllLength && index > 0; index++) { - item = breakAll[index]; - if (item === ' ') { - break; - } - } - return string.substring(index, stringLength).trim(); - }; - /** - * Truncates the string, accounting for word placement and character count. - * - * @function truncate - * @type {Function} - * @category string - * @param {String} string - String to be truncated. - * @param {Number} maxLength - The desired max length of the string. - * @returns {String} - The mutated string. - * - * @example - * import { truncate, assert } from '@universalweb/acid'; - * assert(truncate('Where is Lucy?', 2), 'Where is'); - */ - function truncate(string, maxLength) { - const stringLength = string.length; - return stringLength > maxLength ? truncateDown(string, maxLength, stringLength) : string; - } - /** - * Truncates the string, accounting for word placement and character count from the right. - * - * @function truncateRight - * @type {Function} - * @category string - * @param {String} string - String to be truncated. - * @param {Number} maxLength - The desired max length of the string. - * @returns {String} - The mutated string. - * - * @example - * import { truncateRight, assert } from '@universalweb/acid'; - * assert(truncateRight('Where is Lucy?', 6), 'Lucy?'); - */ - function truncateRight(string, maxLength) { - const stringLength = string.length; - return stringLength > maxLength ? truncateUp(string, maxLength, stringLength) : string; - } - - const getWords = /\w+/g; - /** - * Returns the first letter capitalized. - * - * @function upperFirstLetter - * @type {Function} - * @category string - * @param {String} string - String to extract first letter from. - * @returns {String} - An upper case letter. - * - * @example - * import { upperFirstLetter, assert } from '@universalweb/acid'; - * assert(upperFirstLetter('upper'), 'U'); - */ - function upperFirstLetter(string) { - return string[0].toUpperCase(); - } - /** - * Capitalizes the first letter. - * - * @function upperFirst - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with first letter capitalized. - * - * @example - * import { upperFirst, assert } from '@universalweb/acid'; - * assert(upperFirstLetter('upper'), 'U'); - * upperFirst('upper'); - * // => 'Upper' - */ - function upperFirst(string) { - return upperFirstLetter(string) + restString(string); - } - /** - * Capitalize first letter and lower case the rest. - * - * @function upperFirstOnly - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with first letter capitalized. - * - * @example - * import { upperFirstOnly, assert } from '@universalweb/acid'; - * assert(upperFirstOnly('upper'), 'Upper'); - */ - function upperFirstOnly(string) { - return upperFirstLetter(string) + restString(string).toLowerCase(); - } - /** - * Capitalize all first letters. - * - * @function upperFirstAll - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with all first letters capitalized. - * - * @example - * import { upperFirstAll, assert } from '@universalweb/acid'; - * assert(upperFirstAll('uPPer'), 'UPPer'); - */ - function upperFirstAll(string) { - return string.replace(getWords, (match) => { - return upperFirst(match); - }); - } - /** - * Capitalize all first letters and lower case the rest. - * - * @function upperFirstOnlyAll - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with all first letters capitalized. - * - * @example - * import { upperFirstOnlyAll, assert } from '@universalweb/acid'; - * assert(upperFirstOnlyAll('this is'), 'This Is'); - */ - function upperFirstOnlyAll(string) { - return string.replace(getWords, (match) => { - return upperFirstOnly(match); - }); - } - - /** - * Returns the constructor name of an object. - * - * @function getTypeName - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { getTypeName, assert } from '@universalweb/acid'; - * assert(getTypeName(1), true); - */ - function getTypeName(source) { - return getType(source)?.name; - } - - /** - * Checks if the value is an Arguments object. - * - * @function isArguments - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArguments, assert } from '@universalweb/acid'; - * assert(isArguments((function() { return arguments;})()), true); - * assert(isArguments([]), false); - */ - const objectArguments = '[object Arguments]'; - function isArguments(source) { - return hasValue(source) ? source.toString() === objectArguments : false; - } - - /** - * Checks if an object or objects are a Map. - * - * @function isMap - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isMap } from '@universalweb/acid'; - * isMap(new Map()); - * // => true - */ - const isMapCall = isConstructorNameFactory('Map'); - const isMap = isTypeFactory(isMapCall); - - /** - * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer. - * - * @function isTypedArray - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isTypedArray, assert } from '@universalweb/acid'; - * assert(isTypedArray([]), false); - * assert(isTypedArray(new Int8Array()), true); - */ - const typedArrayRegex = /Array/; - const arrayConstructorName = 'Array'; - function isTypedArray(source) { - if (source) { - const constructorName = getTypeName(source); - if (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) { - return true; - } - } - return false; - } - - /** - * Checks if an object is null or undefined. - * - * @function noValue - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { noValue, assert } from '@universalweb/acid'; - * assert(noValue(null), true); - * assert(noValue(undefined), true); - * assert(noValue(1), false); - * assert(noValue(0), false); - */ - function noValue(source) { - return !hasValue(source); - } - - /** - * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property. - * - * @function isArrayLike - * @category type - * @param {*} source - Object to be checked. - * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArrayLike, assert } from '@universalweb/acid'; - * assert(isArrayLike([]), true); - * assert(isArrayLike(2), false); - */ - function isArrayLike(source, strictFlag) { - if (noValue(source) || isFunction(source)) { - return false; - } - if (isArray(source) || isTypedArray(source)) { - return true; - } - const sourceLength = source.length; - if (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) { - return false; - } - if (strictFlag) { - const indexes = keys(source); - if (indexes) { - return every(indexes, (value, index) => { - return index >= 0 && isNumber(index); - }); - } - return false; - } - return true; - } - - /** - * Checks if an object or objects are a BigInt. - * - * @function isBigInt - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isBigInt, assert } from '@universalweb/acid'; - * assert(isBigInt(BigInt(123)), true); - */ - const isBigIntCall = isConstructorNameFactory('BigInt'); - const isBigInt = isTypeFactory(isBigIntCall); - - /** - * Checks if the value is a Boolean. - * - * @function isBoolean - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isBoolean } from '@universalweb/acid'; - * isBoolean(true); - * // => true - */ - const isBooleanCall = isConstructorNameFactory('Boolean'); - const isBoolean = isTypeFactory(isBooleanCall); - - /** - * Checks if an object or objects are a ArrayBuffer. - * - * @function isArrayBuffer - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArrayBuffer, assert } from '@universalweb/acid'; - * assert(isArrayBuffer(new ArrayBuffer()), true); - */ - const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer'); - const isArrayBuffer = isTypeFactory(isArrayBufferCall); - - /** - * Checks if an object is the child of another. Typically used for classes. - * - * @function isChild - * @category type - * @param {*} sourceChild - Object to be checked as the child. - * @param {*} targetParent - Object to be checked as the parent. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isChild, construct, assert } from '@universalweb/acid'; - * class Grandparent{} - * class Parent extends Grandparent{} - * class Child extends Parent{} - * const child = construct(Child); - * assert(isChild(Child, Grandparent), true); - * assert(isChild(Child, Parent), false); - * assert(isChild(Parent, Grandparent), false); - * assert(isChild(child1, child3), false); - */ - function isChild(sourceChild, targetParent) { - if (!sourceChild || !targetParent) { - return false; - } - return sourceChild instanceof targetParent; - } - - /** - * Checks if an object or objects are a structured-cloneable type. - * - * @function isCloneable - * @category type - * @param {...*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isCloneable, assert } from '@universalweb/acid'; - * assert(isCloneable(function (){}), false); - */ - const constructorNames = RegExp( - 'Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError' - ); - function isCloneable(source) { - if (hasValue(source)) { - const constructorName = source?.constructor?.name; - return constructorNames.test(constructorName); - } - return false; - } - - /** - * Checks if the value is a Date. - * - * @function isDate - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isDate, assert } from '@universalweb/acid'; - * assert(isDate(new Date()), true); - */ - const isDateCall = isConstructorNameFactory('Date'); - const isDate = isTypeFactory(isDateCall); - - /** - * Checks if the value is empty. - * - * @function isEmpty - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isEmpty, assert } from '@universalweb/acid'; - * assert(isEmpty([]), true); - */ - function isEmpty(source) { - if (isString(source) || isArray(source)) { - return !hasLength(source); - } else if (isPlainObject(source)) { - return !objectSize(source); - } - return !hasValue(source); - } - - /** - * Check if a value equals false using strict comparison. - * - * @function isFalse - * @category Utility - * @type {Function} - * @param {Boolean} source - Item to compare. - * @returns {Boolean} - Returns true if the item equals false. - * - * @example - * import { isFalse, assert } from '@universalweb/acid'; - * assert(isFalse(1), false); - * assert(isFalse(true), false); - * assert(isFalse(false), true); - */ - function isFalse(source) { - return source === false; - } - - /** - * Checks if an object or objects are a Float32Array. - * - * @function isF32 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isF32, assert } from '@universalweb/acid'; - * assert(isF32(new Float32Array()), true); - */ - const isF32Call = isConstructorNameFactory('Float32Array'); - const isF32 = isTypeFactory(isF32Call); - - /** - * Checks if an object or objects are a Float64Array. - * - * @function isF64 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isF64 } from '@universalweb/acid'; - * isF64(new Float64Array()); - * // => true - */ - const isF64Call = isConstructorNameFactory('Float64Array'); - const isF64 = isTypeFactory(isF64Call); - - const { isInteger } = Number; - /** - * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. - * - * @function isFloat - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFloat } from '@universalweb/acid'; - * isFloat(1.01); - * // => true - */ - const isFloat = isInteger; - - /** - * Checks if an object or objects are a Int16Array. - * - * @function isI16 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isI16 } from '@universalweb/acid'; - * isI16(new Int16Array()); - * // => true - */ - const isI16Call = isConstructorNameFactory('Int16Array'); - const isI16 = isTypeFactory(isI16Call); - - /** - * Checks if an object or objects are a Int32Array. - * - * @function isI32 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isI32, assert } from '@universalweb/acid'; - * assert(isI32(new Int32Array()), true); - */ - const isI32Call = isConstructorNameFactory('Int32Array'); - const isI32 = isTypeFactory(isI32Call); - - /** - * Checks if an object or objects are a Int8Array. - * - * @function isI8 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isInt8 } from '@universalweb/acid'; - * isInt8(new Int8Array()); - * // => true - */ - const isI8Call = isConstructorNameFactory('Int8Array'); - const isI8 = isTypeFactory(isI8Call); - - /** - * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments. - * - * @function isIterable - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isIterable, assert } from '@universalweb/acid'; - * assert(isIterable([]), true); - * assert(isIterable(new Int8Array()), true); - * assert(isIterable('test'), false); - */ - function isIterable(source) { - return hasValue(source) && typeof source[Symbol.iterator] === 'function'; - } - - /** - * Checks if an object is a promise. - * - * @function isPromise - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isPromise } from '@universalweb/acid'; - * isPromise(new Promise(() => {})); - * // => true - */ - function isPromise(source) { - if (source) { - return source instanceof Promise; - } - return false; - } - - /** - * Checks if an object is a kind of async object such as async function, promise, or generator. - * - * @function isKindAsync - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isKindAsync, assert } from '@universalweb/acid'; - * assert(isKindAsync(async() => {}), true); - */ - function isKindAsync(source) { - if (source) { - return isPromise(source) || isAsync(source) || isGenerator(source); - } - return false; - } - - /** - * Checks if an object is the child of another. Typically used for classes. - * - * @function isParent - * @category type - * @param {*} sourceParent - Object to be checked as the child. - * @param {*} targetChild - Object to be checked as the parent. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isParent, construct, assert } from '@universalweb/acid'; - * class parentClass{} - * class otherClass{} - * const child1 = construct(parentClass); - * const child2 = construct(otherClass); - * assert(isParent(child1, parentClass), true); - * assert(isParent(child3, parentClass), false); - * assert(isParent(parentClass, child1), false); - * assert(isParent(child1, child3), false); - */ - function isParent(sourceParent, targetChild) { - if (!sourceParent || !targetChild || !targetChild.call) { - return false; - } - return sourceParent instanceof targetChild; - } - - /** - * Checks if an object is a primitive. - * - * @function isPrimitive - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isPrimitive, assert } from '@universalweb/acid'; - * assert(isPrimitive(1), true); - * assert(isPrimitive(() => {}), false); - */ - function isPrimitive(source) { - const type = typeof value; - return source === null || source === undefined || (type !== 'object' && type !== 'function'); - } - - /** - * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways. - * - * @function isRelated - * @category type - * @param {*} targetOne - Object to be checked. - * @param {*} targetTwo - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isRelated, construct, assert } from '@universalweb/acid'; - * class parentClass{} - * class otherClass{} - * const child1 = construct(parentClass); - * const child2 = construct(parentClass); - * const child3 = construct(otherClass); - * assert(isRelated(child1, child2), true); - * assert(isRelated(child1, parentClass), true); - * assert(isRelated(parentClass, child2), true); - * assert(isRelated(child1, child3), false); - */ - function isRelated(targetOne, targetTwo) { - if (noValue(targetOne) || noValue(targetTwo)) { - return false; - } - if (targetOne.call) { - return targetTwo instanceof targetOne; - } - if (targetTwo.call) { - return targetOne instanceof targetTwo; - } - return targetTwo.constructor === targetOne.constructor; - } - - const { isSafeInteger } = Number; - /** - * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. - * - * @function isSafeInt - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isSafeInt } from '@universalweb/acid'; - * isSafeInt(1.01); - * // => true - */ - const isSafeInt = isSafeInteger; - - function isSameType(source, other) { - const sourceType = getType(source); - const otherType = getType(other); - if (sourceType === otherType) { - if (sourceType.name === otherType.name) { - return true; - } - } - return false; - } - - /** - * Check if a value equals true using strict comparison. - * - * @function isTrue - * @category Utility - * @type {Function} - * @param {Boolean} source - Item to check. - * @returns {Boolean} - Returns true if the item is true. - * - * @example - * import { isTrue, assert } from '@universalweb/acid'; - * assert(isTrue(1), false); - * assert(isTrue(true), true); - * assert(isTrue(false), false); - */ - function isTrue(source) { - return source === true; - } - - /** - * Checks if an object or objects are a Uint16Array. - * - * @function isU16 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU16 } from '@universalweb/acid'; - * isU16(new Uint16Array()); - * // => true - */ - const isU16Call = isConstructorNameFactory('Uint16Array'); - const isU16 = isTypeFactory(isU16Call); - - /** - * Checks if an object or objects are a Uint32Array. - * - * @function isU32 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU32 } from '@universalweb/acid'; - * isU32(new Uint32Array()); - * // => true - */ - const isU32Call = isConstructorNameFactory('Uint32Array'); - const isU32 = isTypeFactory(isU32Call); - - /** - * Checks if an object or objects are a Uint8Array. - * - * @function isU8 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU8 } from '@universalweb/acid'; - * isU8(new Uint8Array()); - * // => true - */ - const isU8Call = isConstructorNameFactory('Uint8Array'); - const isU8 = isTypeFactory(isU8Call); - - /** - * Checks if an object or objects are a Uint8ClampedArray. - * - * @function isU8C - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU8C } from '@universalweb/acid'; - * isU8C(new Uint8ClampedArray()); - * // => true - */ - const isU8CCall = isConstructorNameFactory('Uint8ClampedArray'); - const isU8C = isTypeFactory(isU8CCall); - - /** - * Checks if an object or objects are a WeakMap. - * - * @function isWeakMap - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isWeakMap } from '@universalweb/acid'; - * assert(isWeakMap(new WeakMap()), true); - */ - const isWeakMapCall = isConstructorNameFactory('WeakMap'); - const isWeakMap = isTypeFactory(isWeakMapCall); - - const isDeno = typeof globalThis.Deno !== 'undefined'; - - const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node; - - /** - * Check if a value is isTruthy which is anything but false, null, 0, "", undefined, and NaN. - * - * @function isTruthy - * @category type - * @type {Function} - * @param {*} source - Item to be isTruthy checked. - * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy. - * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false. - * - * @example - * import { isTruthy, assert } from '@universalweb/acid'; - * assert(isTruthy(1), true); - * assert(isTruthy(0), false); - */ - function isTruthy(source, returnIfTrue = true) { - return Boolean(source) && returnIfTrue; - } - - /** - * Check if a value is isFalsy which are false, null, 0, "", undefined, and NaN. - * - * @function isFalsy - * @category type - * @type {Function} - * @param {*} source - Item to be isFalsy checked. - * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy. - * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false. - * - * @example - * import { isFalsy, assert } from '@universalweb/acid'; - * assert(isFalsy(0), true); - * assert(isFalsy(1), false); - */ - function isFalsy(source, returnIfTrue = true) { - return Boolean(source) === false && returnIfTrue; - } - - /** - * If source has a value then assign it to an object or call a function. - * - * @function ifValue - * @category utility - * @param {*} source - The source object to be hasValue checked. - * @param {Function|Object} target - The target which is either a function or object. - * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target). - * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function. - * @returns {source|undefined} The source object if it passes the hasValue check. - * - * @example - * import { ifValue, assert } from '@universalweb/acid'; - * assert(ifValue(1, {}, 'a'), {a:1}); - */ - function ifValue(source, target, optional, args) { - if (hasValue(source)) { - if (isFunction(target)) { - if (optional) { - return apply(target, optional, args); - } - return target(...args); - } else if (isPlainObject(target)) { - target[optional] = source; - return target; - } - } - } - - /** - * Performs a deep comparison between two objects & determines if they're different using strict comparison. - * - * @function notEqual - * @type {Function} - * @category utility - * @param {*} source - Source object. - * @param {*} target - Object to be compared. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { notEqual, assert } from '@universalweb/acid'; - * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true); - */ - function notEqual(source, target) { - return isFalse(isEqual(source, target)); - } - - const jsonNative = JSON; - /** - * Parses JSON string with safety check for undefined. - * - * @function jsonParse - * @category utility - * @type {Function} - * @param {String} source - String to be parsed. - * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned. - * @returns {Object|undefined} - Returns the parsed object. - * - * @example - * import { jsonParse, assert } from '@universalweb/acid'; - * assert(jsonParse('{a:1}'), {a:1}); - */ - function jsonParse(source, reviver) { - if (source) { - return jsonNative.parse(source, reviver); - } - } - /** - * Stringify an object into a JSON string. - * - * @function stringify - * @category utility - * @type {Function} - * @param {Object} object - Object to Stringify. - * @returns {String} - Returns the object as a valid JSON string. - * - * @example - * import { stringify, assert } from '@universalweb/acid'; - * assert(stringify({a:1}), '{a:1}'); - */ - const stringify = jsonNative.stringify; - - function createAssertError(source, expected, localOptions) { - const options = globalThis.options || localOptions; - let errorTitle; - if (isFunction(options)) { - errorTitle = `${options.name} : ${options.constructor.name}`; - } else if (options) { - errorTitle = `${options.title || options.method.name} -> ${options.file}`; - } - return new Error( - `Test Failed: ${errorTitle} + "use strict"; + + /** + * Chunks an array according to a user defined number. + * + * @function chunk + * @category Array + * @type {Function} + * @param {Array} array - Array to be chunked. + * @param {Number} size - Number which determines the size of each chunk. + * @returns {Array} - A chunked version of the source array. + * + * @example + * import { chunk, assert } from '@universalweb/acid'; + * assert(chunk([1,2,3], 1), [[1],[2],[3]]); + */ + function chunk(array, size = 1) { + const chunked = []; + let index = 0; + array.forEach((item, key) => { + if (!(key % size)) { + chunked.push([]); + if (key) { + index++; + } + } + chunked[index].push(item); + }); + return chunked; + } + + /** + * Clears the values out of an array. + * + * @function clearArray + * @category Array + * @type {Function} + * @param {Array} source - Takes an array to be emptied. + * @returns {Array} - The originally given array. + * + * @example + * import { clearArray, assert } from '@universalweb/acid'; + * assert(clearArray([1,'B', 'Cat']), []); + */ + function clearArray(source) { + source.length = 0; + return source; + } + + /** + * Clone an array (uses .slice()) and assign the source arrays values to the new array. + * + * @function cloneArray + * @category Array + * @type {Function} + * @param {Array} source - The array to be quick cloned. + * @returns {Array} - The newly cloned array with assigned items. + * + * @example + * import { cloneArray, assert } from '@universalweb/acid'; + * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']); + */ + function cloneArray(source) { + return source.slice(); + } + + /** Checks if the value is undefined. + * + * @function isUndefined + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isUndefined, assert } from '@universalweb/acid'; + * assert(isUndefined(undefined), true); + */ + function isUndefined(source) { + return source === undefined; + } + + /** + * Checks if the value has length greater than 0. + * + * @function hasLength + * @category utility + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { hasLength, assert } from '@universalweb/acid'; + * assert(hasLength([1]), true); + */ + function hasLength(source) { + return Boolean(source.length); + } + + /** + * Checks if the value is null. + * + * @function isNull + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNull, assert } from '@universalweb/acid'; + * assert(isNull(null), true); + */ + function isNull(source) { + return source === null; + } + + /** + * Checks if the value is not null or undefined. + * + * @function hasValue + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { hasValue, assert } from '@universalweb/acid'; + * assert(hasValue(1), true); + */ + function hasValue(source) { + return !isUndefined(source) && !isNull(source); + } + + /** + * A simple function which returns the value it's given. + * + * @function returnValue + * @category utility + * @param {*} source - The source object. + * @returns {source} The source object. + */ + function returnValue(source) { + return source; + } + + /** + * Iterates through the given array. + * + * @function eachArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. + * @param {*} thisBind - Iteratee called with thisBind as this. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array|undefined} - The originally given array. + * + * @example + * import { eachArray, assert } from '@universalweb/acid'; + * const list = []; + * eachArray([1, 2, 3], (item, index) => { + * list[index] = item; + * }); + * assert(list, [1, 2, 3]); + */ + function eachArray(source, iteratee, thisBind, additionalArg) { + if (!source) { + return; + } + const arrayLength = source.length; + if (hasValue(thisBind)) { + for (let index = 0; index < arrayLength; index++) { + iteratee.call( + thisBind, + source[index], + index, + source, + arrayLength, + additionalArg, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + iteratee(source[index], index, source, arrayLength, additionalArg); + } + } + return source; + } + + /** + * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. + * + * @function compactMapArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array} - An array with mapped properties that are not null or undefined. + * + * @example + * import { compactMapArray, assert } from '@universalweb/acid'; + * assert(compactMapArray([null, 2, 3], (item) => { + * return item; + * }), [2, 3]); + */ + function compactMapArray( + source, + iteratee = returnValue, + results = [], + thisCall, + additionalArg, + ) { + if (hasValue(thisCall)) { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + const returned = iteratee.call( + thisCall, + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArg, + ); + if (hasValue(returned)) { + results.push(returned); + } + }); + } else { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + const returned = iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + thisCall, + additionalArg, + ); + if (hasValue(returned)) { + results.push(returned); + } + }); + } + return results; + } + + /** + * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order. + * + * @function eachAsyncArray + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. + * @param {*} thisCall - Iteratee called with thisCall as this. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array|undefined} - Returns source the originally given array. + * + * @example + * import { eachAsyncArray, assert } from '@universalweb/acid'; + * const tempList = []; + * await eachAsyncArray([1, 2, 3], async (item) => { + * tempList.push(item); + * }); + * assert(tempList, [1, 2, 3]); + */ + async function eachAsyncArray(source, iteratee, thisCall, additionalArg) { + if (!source) { + return; + } + const arrayLength = source.length; + if (hasValue(thisCall)) { + for (let index = 0; index < arrayLength; index++) { + await iteratee.call( + thisCall, + source[index], + index, + source, + arrayLength, + additionalArg, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + await iteratee( + source[index], + index, + source, + arrayLength, + additionalArg, + ); + } + } + return source; + } + + /** + * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. + * + * @function compactMapAsyncArray + * @type {Function} + * @category array + * @async + * @param {Array} source - Array to be compacted. + * @param {Function} iteratee - Iteratee to be performed on array. + * @returns {Array} - Array values after being put through an iterator. + * + * @example + * import { compactMapAsync, assert } from '@universalweb/acid'; + * assert(await compactMapAsync([1, 2, 3, null], async (item) => { + * return item; + * }), [1, 2, 3]); + */ + async function compactMapAsyncArray(source, iteratee = returnValue) { + const results = []; + await eachAsyncArray(source, async (item, index, arrayLength) => { + const result = await iteratee(item, index, results, arrayLength); + if (hasValue(result)) { + results.push(result); + } + }); + return results; + } + + /** + * Checks if a number is negative & returns true or false. + * + * @function isNegative + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNegative, assert } from '@universalweb/acid'; + * assert(isNegative(-1), true); + */ + const { sign: sign$1 } = Math; + function isNegative(source) { + return sign$1(source) === -1; + } + + function rangeUp(start, end, step, sourceArray) { + let position = start; + while (position < end) { + sourceArray.push(position); + position += step; + } + return sourceArray; + } + function rangeDown(start, end, step, sourceArray) { + let position = start; + while (position > end) { + sourceArray.push(position); + position -= step; + } + return sourceArray; + } + /** + * Create a numbered list of integers. + * + * @function range + * @category array + * @type {Function} + * @param {Number} start - Value which determines the start of the range. + * @param {Number} end - Value which determines the end of the range. + * @param {Number} step - Value used to step between integers. + * @returns {Array} - An array of integers. + * + * @example + * import { range, assert } from '@universalweb/acid'; + * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]); + */ + function range(start, end, step = 1, sourceArray = []) { + if (isNegative(step)) { + return sourceArray; + } + if (start < end) { + return rangeUp(start, end, step, sourceArray); + } else { + return rangeDown(start, end, step, sourceArray); + } + } + + /** + * Checks if the value is an array. This references Array.isArray. + * + * @function isArray + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArray, assert } from '@universalweb/acid'; + * assert(isArray([]), true); + * assert(isArray(2), false); + */ + const isArray = Array.isArray; + /** + * Checks if the value is not an array. This references Array.isArray. + * + * @function isNotArray + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNotArray, assert } from '@universalweb/acid'; + * assert(isNotArray([]), false); + * assert(isNotArray(2), true); + */ + function isNotArray(source) { + return !isArray(source); + } + + /** + * A function which acts like the "new" operator and can pass arguments. This is a safe version of the original which will error if given undefined + * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects. + * + * @function construct + * @category class + * @param {Function} target - The target function or class. + * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array. + * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target. + * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList. + * + * @example + * import { construct, assert } from '@universalweb/acid'; + * class test { + * constructor(a) { + * return 1; + * } + * } + * const newClass = construct(test, [1]); + * assert(test, 1); + */ + const reflectConstruct = Reflect.construct; + function construct(target, argumentsList = [], newTarget) { + const args = isArray(argumentsList) ? argumentsList : [argumentsList]; + if (newTarget) { + return reflectConstruct(target, args, newTarget); + } + return reflectConstruct(target, args); + } + + /** + * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned. + * + * @function ensureArray + * @category array + * @type {Function} + * @param {*} source - Object to be checked. + * @returns {Array} - Returns an array. + * + * @example + * import { isArray, ensureArray, assert } from '@universalweb/acid'; + * assert(isArray(ensureArray('test')), ['test']); + */ + function ensureArray(source) { + return (isArray(source) && source) || (hasValue(source) && [source]) || []; + } + + /** + * Flattens an array to a single level. + * + * @function flattenDeep + * @type {Function} + * @category array + * @param {Array} source - Array to flatten. + * @returns {Array} - Returns a completely flattened array. + * + * @example + * import { flattenDeep, assert } from '@universalweb/acid'; + * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]); + */ + function flattenDeep(source) { + return source.flat(Infinity); + } + + function forEach(source, callback) { + source.forEach(callback); + return source; + } + + /** + * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences. + * + * @function difference + * @category array + * @type {Function} + * @param {...Array} sources - List of arrays to be compared. + * @returns {Array|undefined} - An array which contains the differences between the source and compare array. + * + * @example + * import { difference, assert } from '@universalweb/acid'; + * assert(difference([1, 2, 3], [1, 2]), [3]); + */ + function difference(...sources) { + const differencesMap = construct(Map); + const differences = []; + eachArray(sources, (currentArray, parentIndex) => { + eachArray(currentArray, (child, childIndex) => { + let childRoot = differencesMap.get(child); + if (!childRoot) { + childRoot = { + count: 1, + parentIndex, + child, + }; + differencesMap.set(child, childRoot); + } else if (childRoot.parentIndex === parentIndex) { + return; + } else { + childRoot.count++; + } + }); + }); + forEach(differencesMap, (item) => { + if (item.count === 1 && item.parentIndex === 0) { + differences.push(item.child); + } + }); + return differences; + } + + /** + * Removes all items from an array after a specified index. + * + * @function drop + * @category array + * @type {Function} + * @param {Array} array - Source array. + * @param {Number} amount - Amount of items to drop from the array. + * @param {Number} [upTo = array.length] - Index to stop at. + * @returns {Array} - An array with all values removed after a user defined index. + * + * @example + * import { drop, assert } from '@universalweb/acid'; + * assert(drop([1, 2, 3]), [2, 3]); + * assert(drop([1, 2, 3], 2), [3]); + */ + function drop(array, amount = 1, upTo = array.length) { + return array.splice(amount, upTo); + } + + /** + * Removes all items from an array before a specified index. + * + * @function dropRight + * @type {Function} + * @category array + * @param {Array} array - Source array. + * @param {Number} amount - Amount of items to drop from the array. + * @param {Number} [upTo = array.length] - Index to stop at. + * @returns {Array} - An array with all values removed before a user defined index. + * + * @example + * import { dropRight, assert } from '@universalweb/acid'; + * assert(dropRight([1, 2, 3]), [1, 2]); + * assert(dropRight([1, 2, 3], 2), [1]); + */ + const dropRight = (array, amount = 1, upTo = array.length) => { + return drop(array, 0, upTo - amount); + }; + + /** + * Iterates through the given array in reverse. + * + * @function eachRight + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array|undefined} - The originally given array. + * + * @example + * import { eachRight, assert } from '@universalweb/acid'; + * const tempList = []; + * eachRight([1, 2, 3], (item) => { + * tempList.push(item); + * }); + * assert(tempList, [3, 2, 1]); + */ + function eachRight(source, iteratee, additionalArgument) { + if (!source) { + return; + } + const arrayLength = source.length; + for (let index = arrayLength - 1; index >= 0; index--) { + iteratee(source[index], index, source, arrayLength, additionalArgument); + } + return source; + } + + /** + * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order. + * + * @function eachRightAsync + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @returns {Object|undefined} - The originally given array. + * + * @example + * import { eachRightAsync, assert } from '@universalweb/acid'; + * const tempList = []; + * await eachRightAsync([1, 2, 3], async (item) => { + * tempList.push(item); + * }); + * assert(tempList, [3, 2, 1]); + */ + async function eachRightAsync(source, iteratee) { + if (!source) { + return; + } + const arrayLength = source.length; + for (let index = arrayLength - 1; index >= 0; index--) { + await iteratee(source[index], index, source, arrayLength); + } + return source; + } + + /** + * Iterates through the given array while the iteratee returns true else the loop exits & returns false. + * + * @function everyArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. + * + * @example + * import { everyArray, assert } from '@universalweb/acid'; + * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), false); + * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), true); + */ + function everyArray(source, iteratee, additionalArgument) { + if (!source) { + return; + } + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if ( + iteratee( + source[index], + index, + source, + sourceLength, + additionalArgument, + ) === false + ) { + return false; + } + } + return true; + } + + /** + * Iterates through the given array while the iteratee returns true else the loop exits & returns false. + * + * @function everyAsyncArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. + * + * @example + * import { everyAsyncArray, assert } from '@universalweb/acid'; + * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), false); + * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), true); + */ + async function everyAsyncArray(source, iteratee, additionalArgument) { + if (!source) { + return; + } + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if ( + (await iteratee( + source[index], + index, + source, + sourceLength, + additionalArgument, + )) === false + ) { + return false; + } + } + return true; + } + + /** + * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. + * + * @function filterArray + * @category array + * @type {Function} + * @category array + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array with properties that passed the test. + * + * @example + * import { filterArray, assert } from '@universalweb/acid'; + * assert(filterArray([false, true, true], (item) => { + * return item; + * }), [true, true]); + */ + function filterArray(source, iteratee, results = [], additionalArgument) { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + if ( + iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArgument, + ) === true + ) { + results.push(item); + } + }); + return results; + } + + /** + * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. + * + * @function filterAsyncArray + * @category array + * @type {Function} + * @category array + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array with properties that passed the test. + * + * @example + * import { filterAsyncArray, assert } from '@universalweb/acid'; + * assert(filterAsyncArray([false, true, true], (item) => { + * return item; + * }), [true, true]); + */ + async function filterAsyncArray( + source, + iteratee, + results = [], + additionalArgument, + ) { + await eachAsyncArray( + source, + async (item, index, arrayOriginal, arrayLength) => { + if ( + (await iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArgument, + )) === true + ) { + results.push(item); + } + }, + ); + return results; + } + + /** + * Takes the first or multiple items from an array. + * + * @function first + * @type {Function} + * @category array + * @param {Array} array - Array to extract from. + * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array. + * @returns {Array} - Returns an array. + * + * @example + * import { first, assert } from '@universalweb/acid'; + * assert(first([1, 2, 3]), 1); + */ + function first(array, upTo) { + return upTo ? array.slice(0, upTo) : array[0]; + } + + /** + * Flattens an array up to the provided level. + * + * @function flatten + * @type {Function} + * @category array + * @param {Array} source - Array to flatten. + * @param {Number} [level = 1] - Number which determines how deep the array nest can be. + * @returns {Array|undefined} - Returns an array. + * + * @example + * import { flatten, assert } from '@universalweb/acid'; + * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]); + */ + function flatten(source, level = 1) { + if (!source) { + return; + } + let sourceArray = source; + for (let i = 0; i < level; i++) { + sourceArray = sourceArray.reduce((previousValue, currentValue) => { + return previousValue.concat(ensureArray(currentValue)); + }, []); + } + return sourceArray; + } + + /** + * Takes all but the last item in the array. + * + * @function initial + * @category array + * @type {Function} + * @param {Array} array - Array to have items extracted from. + * @returns {Array} - Returns a completely flattened array. + * + * @example + * import { initial, assert } from '@universalweb/acid'; + * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]); + */ + function initial(array) { + return array.slice(0, array.length - 1); + } + + // Add intersectionBy & intersectionWith + /** + * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory)) + * of the array and the input array(s). + * + * @function intersection + * @param {Array} array - Array to compare other arrays to. + * @param {...Array} arrays - A variable number of arrays. + * @category array + * @returns {Array} - The new array of unique values shared by all of the arrays. + * + * @example + * import { intersection, assert } from '@universalweb/acid'; + * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]); + */ + function intersection(array, ...arrays) { + return compactMapArray(array, (item) => { + const shouldReturn = everyArray(arrays, (otherItem) => { + return otherItem.includes(item); + }); + if (shouldReturn) { + return item; + } + }); + } + + /** + * Invoke each function in the given array. + * + * @function invokeArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} additionalArg - An object to be given each time to the iteratee. + * @param {*} thisCall - Iteratee called with thisCall as this. + * @returns {Array|undefined} - The originally given array. + * + * @example + * import { invokeArray, assert } from '@universalweb/acid'; + * function test(arg){ + * return [this, arg]; + * } + * const results = invokeArray([test], 1, test); + * assert(results, [test, 1]); + */ + function invokeArray(source, additionalArg, thisCall) { + if (!source) { + return; + } + const arrayLength = source.length; + if (hasValue(thisCall)) { + for (let index = 0; index < arrayLength; index++) { + source[index].call(thisCall, additionalArg); + } + } else { + for (let index = 0; index < arrayLength; index++) { + source[index](additionalArg); + } + } + return source; + } + + const regexToPath = /\.|\[/; + const regexCloseBracket = /]/g; + const emptyString = ""; + /** + * Breaks up string into object chain list. + * + * @function toPath + * @type {Function} + * @category utility + * @param {String} source - String to be broken up. + * @returns {Array} - Array used to go through object chain. + * + * @example + * import { toPath, assert } from '@universalweb/acid'; + * assert(toPath('post.like[2]'), ['post', 'like', '2']); + */ + function toPath(source) { + return source.replace(regexCloseBracket, emptyString).split(regexToPath); + } + + /** + * Returns property on an object. + * + * @function get + * @category utility + * @type {Function} + * @param {String} propertyString - String used to retrieve properties. + * @param {Object} target - Object which has a property retrieved from it. + * @returns {Object} - Returns property from the given object. + * + * @example + * import { get, assert } from '@universalweb/acid'; + * const objectTarget = { + * post: { + * like: ['a','b','c'] + * } + * }; + * assert(get('post.like[2]', objectTarget), 'c'); + */ + function get(propertyString, target) { + if (!target) { + return false; + } + let link = target; + const pathArray = isArray(propertyString) + ? propertyString + : toPath(propertyString); + everyArray(pathArray, (item) => { + link = link[item]; + return hasValue(link); + }); + return link; + } + + /** + * Get object's keys. + * + * @function keys + * @category object + * @param {*} source - The source object to pull keys from. + * @returns {Array} - Array of keys. + * + * @example + * keys({a: 1, b: 2}); + * // => ['a', 'b'] + */ + const objectKeys = Object.keys; + function keys(source) { + if (source) { + return objectKeys(source); + } + } + + const hasOwn = Object.hasOwn; + /** + * Checks to see if an object has all of the given property names. + * + * @function hasKeys + * @category object + * @type {Function} + * @param {Object} source - Source object to check for keys. + * @param {...String} properties - List of strings to check. + * @returns {Boolean|undefined} - Returns true or false. + * + * @example + * import { hasKeys, assert } from '@universalweb/acid'; + * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true); + */ + function hasKeys(source, ...properties) { + if (!source) { + return; + } + return everyArray(properties, (item) => { + const pathArray = toPath(item); + if (pathArray.length === 1) { + return hasOwn(source, item); + } else { + const lastPath = pathArray.pop(); + const initialPathObject = get(pathArray, source); + if (initialPathObject) { + return hasOwn(initialPathObject, lastPath); + } + return false; + } + }); + } + /** + * Checks to see if an object has any of the given property names. + * + * @function hasAnyKeys + * @category object + * @type {Function} + * @param {Object} source - Source object to check for keys. + * @param {Array} properties - List of strings to check. + * @returns {Boolean|undefined} - Returns true or false. + * + * @example + * import { hasAnyKeys, assert } from '@universalweb/acid'; + * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true); + * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false); + */ + function hasAnyKeys(source, ...properties) { + if (!source) { + return; + } + return Boolean( + properties.find((item) => { + const pathArray = toPath(item); + if (pathArray.length === 1) { + return hasOwn(source, item); + } else { + const lastPath = pathArray.pop(); + const initialPathObject = get(pathArray, source); + if (initialPathObject) { + return hasOwn(initialPathObject, lastPath); + } + return false; + } + }), + ); + } + + /** + * Checks to see if the constructor is that of a native object. + * + * @function isConstructor + * @category type + * @param {Object} target - The object to be checked. + * @param {Object} source - The source constructor object. + * @returns {Object} - Returns the target object. + * + * @example + * import { isConstructor, assert } from '@universalweb/acid'; + * assert(isConstructor(2, Number), true); + */ + function isConstructor(target, source) { + return target?.constructor === source || false; + } + function isConstructorFactory(source) { + return (target) => { + return isConstructor(target, source); + }; + } + function constructorName(source) { + return source?.constructor?.name; + } + function isConstructorNameFactory(source) { + return (target) => { + return constructorName(target) === source || false; + }; + } + + function isTypeFactory(method) { + return function (primarySource, ...otherSources) { + if (otherSources) { + return method(primarySource) && everyArray(otherSources, method); + } + return method(primarySource); + }; + } + + /** + * Checks if an object or objects are a Buffer. + * + * @function isBuffer + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isBuffer, assert } from '@universalweb/acid'; + * assert(isBuffer(Buffer.from('test')), true); + */ + const isBufferCall = isConstructorNameFactory("Buffer"); + const isBuffer = isTypeFactory(isBufferCall); + + /** + * Checks if the value is a plain object. + * + * @function isPlainObject + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isPlainObject } from '@universalweb/acid'; + * isPlainObject({}); + * // => true + */ + const isPlainObject = (source) => { + if (hasValue(source)) { + return source.constructor.toString().trim().slice(9, 16) === "Object("; + } + return false; + }; + + /** + * Performs a deep comparison between two objects & determines if the value is the same using strict comparison. + * + * @function isEqual + * @type {Function} + * @category utility + * @param {*} source - Source object. + * @param {*} target - Object to be compared. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEqual, assert } from '@universalweb/acid'; + * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true); + */ + // Add map & buffer Support - Review required for performance and support for more types + const isEqual = (source, target) => { + if (source === target) { + return true; + } else if (isBuffer(source)) { + return source.equals(target); + } else if (source.toString() === target.toString()) { + if (isPlainObject(source)) { + const sourceProperties = keys(source); + if (hasKeys(target, sourceProperties)) { + return everyArray(sourceProperties, (key) => { + return isEqual(source[key], target[key]); + }); + } + } else if (isArray(source)) { + if (source.length === target.length) { + return everyArray(source, (item, index) => { + return isEqual(item, target[index]); + }); + } + } + } + return false; + }; + + /** + * Performs a shallow strict comparison between two objects. + * + * @function isMatchArray + * @type {Function} + * @category array + * @param {Array} source - Source object. + * @param {Array} compareArray - Object to compare to source. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isMatchArray, assert } from '@universalweb/acid'; + * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true); + */ + function isMatchArray(source, compareArray) { + if (source.length === compareArray.length) { + return everyArray(source, (item, index) => { + return isEqual(compareArray[index], item); + }); + } + return false; + } + + const mathNativeMax = Math.max; + /** + * Plucks the largest value from an array. + * + * @function largest + * @type {Function} + * @category array + * @param {Array} array - Array from which largest number is taken. + * @returns {Number} - The largest number. + * + * @example + * import { largest, assert } from '@universalweb/acid'; + * assert(largest([1,2,3]), 3); + */ + function largest(array) { + return mathNativeMax(...array); + } + + /** + * Extracts item(s) from an array starting from the last item in the array. + * + * @function last + * @type {Function} + * @category array + * @param {Array} array - Array to have items extracted from. + * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array. + * @returns {Array} - Items from the array. + * + * @example + * import { last, assert } from '@universalweb/acid'; + * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]); + */ + function last(array, indexFrom) { + const arrayLength = array.length; + return indexFrom + ? array.slice(arrayLength - indexFrom, arrayLength) + : array[arrayLength - 1]; + } + + /** + * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. + * + * @function mapArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array} - An array of the same calling array's type. + * + * @example + * import { mapArray, assert } from '@universalweb/acid'; + * assert(mapArray([1, 2, 3], (item) => { + * return item * 2; + * }), [2, 4, 6]); + */ + function mapArray(source, iteratee, results = [], thisCall, additionalArg) { + if (hasValue(thisCall)) { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + results[index] = iteratee.call( + thisCall, + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArg, + ); + }); + } else { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + results[index] = iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArg, + ); + }); + } + return results; + } + + /** + * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee. + * + * @function concurrentEachArray + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {*} thisBind - Object to use as the "this" within the function. + * @returns {Promise|Array|undefined} - An array of the same calling array's type. + * + * @example + * import { concurrentEachArray, has, assert } from '@universalweb/acid'; + * const results = await concurrentEachArray([1, 2, 3], async (item) => { + * return item * 2; + * }); + * assert(has(results, [2, 4, 6]), true); + */ + async function concurrentEachArray(source, iteratee, thisBind) { + if (!source) { + return; + } + const results = []; + const arrayLength = source.length; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + results[index] = iteratee.call( + thisBind, + source[index], + index, + results, + arrayLength, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + results[index] = iteratee(source[index], index, results, arrayLength); + } + } + return Promise.all(results); + } + + /** + * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray. + * + * @function mapAsyncArray + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @returns {Array} - An array of the same calling array's type. + * + * @example + * import { mapAsyncArray, assert } from '@universalweb/acid'; + * assert(await mapAsyncArray([1, 2, 3], async (item) => { + * return item * 2; + * }), [2, 4, 6]); + */ + async function mapAsyncArray(source, iteratee) { + const results = []; + await eachAsyncArray(source, async (item, index, arrayLength) => { + results[index] = await iteratee(item, index, results, arrayLength); + }); + return results; + } + + /** + * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse. + * + * @function mapRightArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array of the same calling array's type. + * + * @example + * import { mapRightArray, assert } from '@universalweb/acid'; + * assert(mapRightArray([1, 2, 3], (item) => { + * return item * 2; + * }), [6, 4, 2]); + */ + function mapRightArray(source, iteratee, results = [], additionalArgument) { + let trueIndex = 0; + const arrayLength = source.length; + for (let index = arrayLength - 1; index >= 0; index--) { + results[trueIndex] = iteratee( + source[index], + index, + source, + arrayLength, + additionalArgument, + ); + trueIndex++; + } + return results; + } + + /** + * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee. + * + * @function mapWhile + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array with properties that passed the test. + * + * @example + * import { mapWhile, assert } from '@universalweb/acid'; + * assert(mapWhile([1, 2, 0], (item) => { + * return Boolean(item); + * }), [1, 2]); + */ + function mapWhile(source, iteratee, results = [], additionalArgument) { + const arrayLength = source.length; + for (let index = 0; index < arrayLength; index++) { + const item = source[index]; + const returned = iteratee( + item, + index, + results, + source, + arrayLength, + additionalArgument, + ); + if (returned === false) { + break; + } + results[index] = item; + } + return results; + } + + /** + * Subtracts the subtrahend (second argument) from the minuend (first argument). + * + * @function subtract + * @category math + * @type {Function} + * @param {Number} minuend - The minuend. + * @param {Number} subtrahend - The subtrahend. + * @returns {Number} - Returns the difference. + * + * @example + * import { subtract, assert } from '@universalweb/acid'; + * assert(subtract(3, 1), 2); + */ + function subtract(minuend, subtrahend) { + return minuend - subtrahend; + } + + /** + * Sorts an array of numbers in ascending order. Smallest to largest. + * + * @function sortNumberAscending + * @category array + * @param {Array} numberList - Array of numbers. + * @returns {Array} - The array this method was called on. + * + * @example + * import { sortNumberAscending, assert } from '@universalweb/acid'; + * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]); + */ + function sortNumberAscending(numberList) { + return numberList.sort(subtract); + } + + /** + * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. + * + * @function partition + * @type {Function} + * @category array + * @param {Array} array - Takes an array to split. + * @param {Function} predicate - Function run on each item in the array. + * @returns {Array} - One array split into two arrays. + * + * @example + * import { partition, assert } from '@universalweb/acid'; + * const result = partition([ + * {user: 'barney', age: 36, active: false}, + * {user: 'fred', age: 40, active: true}, + * {user: 'pebbles', age: 1, active: false} + * ], (item) => { return item.active; }); + * assert(result, [{"user":"fred","age":40,"active":true}], + * [{"user":"barney","age":36,"active":false}, + * {"user":"pebbles","age":1,"active":false}]); + */ + function partition(array, predicate) { + const rejected = []; + return [ + compactMapArray(array, (item, index) => { + if (predicate(item, index)) { + return item; + } + rejected.push(item); + }), + rejected, + ]; + } + + /** + * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function. + * + * @function subtractReverse + * @category math + * @type {Function} + * @param {Number} subtrahend - The subtrahend. + * @param {Number} minuend - The minuend. + * @returns {Number} - Returns the difference. + * + * @example + * import { subtractReverse, assert } from '@universalweb/acid'; + * assert(subtractReverse(1, 3), 2); + */ + function subtractReverse(subtrahend, minuend) { + return minuend - subtrahend; + } + + /** + * Sorts an array of numbers in descending order. Largest to smallest. + * + * @function sortNumberDescening + * @category array + * @param {Array} numberList - Array of numbers. + * @returns {Array} - The array this method was called on. + * + * @example + * import { sortNumberDescening, assert } from '@universalweb/acid'; + * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]); + */ + function sortNumberDescening(numberList) { + return numberList.sort(subtractReverse); + } + + /** + * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation. + * + * @function remove + * @category array + * @param {Array} array - Array to be mutated. + * @param {String|Array} removeThese - Items to remove from the array. + * @returns {Array} - The array this method was called on. + * + * @example + * remove([1, 2, 3, 3, 4, 3, 5], 1); + * // => [2, 3, 3, 4, 3, 5] + * @example + * remove([3, 3, 4, 5], 3, 4); + * // => [5] + */ + function remove(array, removeThese) { + let arrayLength = array.length; + for (let index = 0; index < arrayLength; index++) { + const item = array[index]; + if (removeThese.includes(item)) { + array.splice(index, 1); + index--; + arrayLength--; + } + } + return array; + } + /** + * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation. + * + * @function removeBy + * @category array + * @param {Array} source - Array to be mutated. + * @param {Function} iteratee - Function used to check object. Return true to remove the value. + * @returns {Array} - The array this method was called on. + * + * @example + * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);}); + * // => [2, 4] + */ + function removeBy(source, iteratee) { + let arrayLength = source.length; + for (let index = 0; index < arrayLength; index++) { + const item = source[index]; + if (iteratee(item, index)) { + source.splice(index, 1); + index--; + arrayLength--; + } + } + return source; + } + + /** + * Extracts all items in array except the first and last item. + * + * @function rest + * @type {Function} + * @category array + * @param {Array} array - Array to be sliced. + * @returns {Array} - Returns the aggregated array. + * + * @example + * rest([1, 2, 3, 4, 5]); + * // => [2, 3, 4, 5] + */ + function rest(array) { + return array.slice(1, array.length); + } + + /** + * Get the item at the supplied index starting at the end of the array. + * + * @function right + * @type {Function} + * @category array + * @param {Array} source - Array to be sliced. + * @param {Number} amount - Amount from the right. + * @returns {*} - Returns the object at the evaluated position. + * + * @example + * right([1, 2, 3, 4, 5] , 1); + * // => 4 + */ + function right(source, amount) { + return source[source.length - 1 - amount]; + } + + const { floor, random: random$1 } = Math; + /** + * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption.. + * + * @function randomInt + * @category number + * @type {Function} + * @param {Number} max - The highest possible value for the random number. + * @param {Number} [min = 0] - Establishes lowest possible value for the random number. + * @returns {Number} - Returns random integer between the max and min range. + * + * @example + * import { randomInt, assert } from '@universalweb/acid'; + * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;}); + */ + function randomInt(max, min = 0) { + return floor(random$1() * (max - min)) + min; + } + + /** + * Checks if two numbers are the same. + * + * @function isNumberEqual + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @param {Number} target - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumberEqual, assert } from '@universalweb/acid'; + * assert(isNumberEqual(0, 0), true); + */ + function isNumberEqual(source, target) { + return source === target; + } + + const arrayFrom = Array.from; + /** + * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check. + * + * @function toArray + * @category array + * @param {*} arrayLike - Array like object. + * @param {Function} mapFn - Function to map over the array. + * @param {*} thisArg - MapFn's "this". + * @returns {Array|undefined} - New array. + * + * @example + * import { toArray, assert } from '@universalweb/acid'; + * assert(toArray(new Map([[1, 2]])), [[1, 2]]); + */ + function toArray(arrayLike, mapFn, thisArg) { + if (hasValue(arrayLike)) { + return arrayFrom(arrayLike, mapFn, thisArg); + } + } + + /** + * Shuffle an array and return a new array. + * + * @function shuffle + * @category array + * @param {Array} target - Target Array to be shuffled. + * @param {Number} amount - The amount of times to shuffle the array. + * @returns {Array} - An array with the shuffled results. + * + * @example + * import { shuffle, assert } from '@universalweb/acid'; + * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]); + */ + function shuffle(target, amount = target.length) { + if (target.length <= 1) { + return toArray(target); + } + const shuffleArray = toArray(target); + let count = 0; + let index; + let value; + while (count < amount) { + index = randomInt(shuffleArray.length - 1, 0); + value = shuffleArray[count]; + shuffleArray[count] = shuffleArray[index]; + shuffleArray[index] = value; + count++; + } + return shuffleArray; + } + + /** + * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned. + * + * @function sample + * @category array + * @param {Array} source - The array to pull sample(s) from. + * @param {Number} amount - The amount of samples to take. + * @returns {Array} - An array of randomly pulled samples. + * + * @example + * sample([1, 2, 3, 4] , 2); + * // => [1, 3] + */ + function sample(source, amount) { + if (!source) { + return false; + } + const arrayLength = source.length; + if (arrayLength === amount || amount > arrayLength) { + return shuffle(source); + } + if (amount === 1) { + return [source[randomInt(arrayLength - 1, 0)]]; + } + const sampleArray = []; + const used = {}; + let count = 0; + let index; + while (count < amount) { + index = randomInt(source.length - 1, 0); + if (!used[index]) { + sampleArray.push(source[index]); + used[index] = true; + count++; + } + } + return sampleArray; + } + + const mathNativeMin = Math.min; + /** + * Plucks the smallest value from an array. + * + * @function smallest + * @category array + * @type {Function} + * @param {Array} array - Array from which smallest number is taken. + * @returns {Number} - The smallest number. + * + * @example + * smallest([1,2,3]); + * // => 1 + */ + function smallest(array) { + return mathNativeMin(...array); + } + + /** + * What index should the number be inserted at to keep a sorted array still sorted. + * + * @function getNumberInsertIndex + * @category array + * @type {Function} + * @param {Array} source - Array to be checked. + * @param {Number} target - Number to check where to be inserted. + * @returns {Number} - The index at which to insert. + * + * @example + * import { getNumberInsertIndex, assert } from '@universalweb/acid'; + * assert(getNumberInsertIndex([30, 39, 50], 40), 1); + */ + function getNumberInsertIndex(source, target) { + let insertIndex = 0; + everyArray(source, (item, index) => { + insertIndex = index; + if (target >= item) { + insertIndex = index + 1; + return true; + } else { + return false; + } + }); + return insertIndex; + } + + /** + * Returns a shallow copy of the array up to an amount. + * + * @function take + * @category array + * @type {Function} + * @param {Array} source - The source array to take from. + * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction. + * @returns {Array} - The aggregated array. + * + * @example + * import { take, assert } from '@universalweb/acid'; + * assert(take([1,2,3], 2), [1, 2]); + */ + function take(source, endIndex = 1) { + return source.slice(0, endIndex); + } + + /** + * Returns a shallow copy of the array up to an amount starting from the right. + * + * @function takeRight + * @category array + * @type {Function} + * @param {Array} source - The source array to take right from. + * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction. + * @returns {Array} - The aggregated array. + * + * @example + * import { takeRight, assert } from '@universalweb/acid'; + * assert(takeRight([1,2,3], 2), [2, 3]); + */ + function takeRight(source, indexRight = 1) { + const arrayLength = source.length; + return source.slice(arrayLength - indexRight, arrayLength); + } + + function onlyUnique(value, index, array) { + return array.indexOf(value) === index; + } + function sortUnique(item, index, array) { + return item !== array[index - 1]; + } + /** + * Filters the array down to unique elements. + * + * @function unique + * @category array + * @type {Function} + * @param {Array} source - The array to be filtered. + * @param {Boolean} isSorted - Flag which means the array is already sorted. + * @returns {Array} - The filtered array. + * + * @example + * unique([1, 2, 2, 4]); + * // => [1, 2, 4] + */ + function unique(source, isSorted) { + if (isSorted) { + return source.filter(sortUnique); + } + return source.filter(onlyUnique); + } + + /** + * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays. + * + * @function union + * @category array + * @type {Function} + * @param {...Array} arrays - The arrays to be evaluated. + * @returns {Array} - The aggregated array. + * + * @example + * union([1,2,4], [1,2,3]); + * // => [1, 2, 4, 3] + */ + function union(...arrays) { + return unique(flattenDeep(arrays)); + } + + /** + * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned. + * If and when the iteratee yields false the loop stops & false is returned. + * + * @function untilFalseArray + * @category array + * @type {Function} + * @param {Array} source - The array to iterate over. + * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. + * @returns {Array} - Returns true if all returns are true or false if one value returns false. + * + * @example + * import { untilFalseArray, assert } from '@universalweb/acid'; + * assert(untilFalseArray([true, true, false], (item) => { + * return item; + * }), false); + * assert(untilFalseArray([true, true, true], (item) => { + * return item; + * }), true); + */ + function untilFalseArray(source, iteratee) { + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if (iteratee(source[index], index) === false) { + return false; + } + } + return true; + } + + /** + * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned. + * If and when the iteratee yields true the loop stops & false is returned. + * + * @function untilTrueArray + * @category array + * @type {Function} + * @param {Array} source - The array to iterate over. + * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. + * @returns {Array} - Returns true if all returns are false or false if one value returns true. + * + * @example + * import { untilTrueArray, assert } from '@universalweb/acid'; + * assert(untilTrueArray([true], (item) => { + * return item; + * }), false); + * assert(untilTrueArray([true, true, true], (item) => { + * return item; + * }), true); + */ + function untilTrueArray(source, iteratee) { + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if (iteratee(source[index], index) === true) { + return false; + } + } + return true; + } + + /** + * Iterates through the calling object and creates a new object based on the calling object's type with the results, + * (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * Re-checks the length each loop. + * + * @function whileCompactMap + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The originally given array. + * + * @example + * import { whileCompactMap, assert } from '@universalweb/acid'; + * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => { + * return item; + * }), [1, 2, 3, false]); + */ + function whileCompactMap(source, iteratee, results = [], additionalArgument) { + let index = 0; + while (index < source.length) { + const result = results.push( + iteratee( + source[index], + index, + source, + source.length, + additionalArgument, + ), + ); + index++; + if (hasValue(result)) { + results.push(result); + } + } + return source; + } + + /** + * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over. + * + * @function whileEachArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The originally given array. + * + * @example + * import { whileEachArray, assert } from '@universalweb/acid'; + * const list = []; + * whileEachArray([1, 2, 3], (item, index) => { + * list[index] = item; + * }); + * assert(list, [1, 2, 3]); + */ + function whileEachArray(source, iteratee, additionalArgument) { + let index = 0; + while (index < source.length) { + iteratee(source[index], index, source, source.length, additionalArgument); + index++; + } + return source; + } + + /** + * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. + * Re-checks the length each loop. + * + * @function whileMapArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The originally given array. + * + * @example + * import { whileMapArray, assert } from '@universalweb/acid'; + * assert(whileMapArray([1, 2, 3], (item, index, source) => { + * if (index === 0) { + * source.push(4); + * } + * return item; + * }), [1, 2, 3, 4]); + */ + function whileMapArray(source, iteratee, results = [], additionalArgument) { + let index = 0; + while (index < source.length) { + results.push( + iteratee( + source[index], + index, + source, + source.length, + additionalArgument, + ), + ); + index++; + } + return source; + } + + /** + * Returns a copy of the array with all instances of the values removed. + * + * @function without + * @type {Function} + * @category array + * @param {Array} target - The target array to be filtered. + * @param {Array} sources - Items to be removed. + * @returns {Array} - The target array filtered. + * + * @example + * import { without, assert } from '@universalweb/acid'; + * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]); + */ + function without(target, sources) { + if (!sources) { + return target; + } + const sourcesSet = construct(Set, sources); + return target.filter((item) => { + return !sourcesSet.has(item); + }); + } + + /** + * Creates an array that is the symmetric difference of the provided arrays. + * + * @function xor + * @category array + * @type {Function} + * @param {...Array} sources - The array(s) to be filtered. + * @returns {Array|undefined} - The filtered array. + * + * @example + * xor([2, 1], [2, 3, 5], [6]); + * // => [1, 3, 5, 6] + */ + function xor(...sources) { + const xorMap = construct(Map); + const xored = []; + const sourcesLength = sources.length; + if (sourcesLength === 2) { + return difference(sources[0], sources[1]); + } + eachArray(sources, (currentArray, parentIndex) => { + eachArray(currentArray, (child, childIndex) => { + let childRoot = xorMap.get(child); + if (!childRoot) { + childRoot = { + count: 1, + parentIndex, + child, + }; + xorMap.set(child, childRoot); + } else if (childRoot.parentIndex === parentIndex) { + return; + } else { + childRoot.count++; + } + }); + }); + forEach(xorMap, (item) => { + if (item.count === 1) { + xored.push(item.child); + } + }); + return xored; + } + + /** + * Merges together the values of each of the arrays with the values at the corresponding position. + * + * @function zip + * @type {Function} + * @category array + * @param {Array} arrays - The arrays to process. + * @returns {Array} - Returns the new array of regrouped elements. + * + * @example + * zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + function zip(...arrays) { + return arrays[0].map((item, index) => { + return arrays.map((array) => { + return array[index]; + }); + }); + } + /** + * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration. + * + * @function unZip + * @type {Function} + * @category array + * @param {Array} source - The array of grouped elements to process. + * @returns {Array} - Returns the new array of regrouped elements. + * + * @example + * unZip([['a', 1, true], ['b', 2, false]]); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unZip(source) { + return source[0].map((item, index) => { + return source.map((arraySet) => { + return arraySet[index]; + }); + }); + } + + /** + * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer. + * + * @function ensureBuffer + * @category buffer + * @type {Function} + * @param {*} source - Object to be checked. + * @returns {Array} - Returns an array. + * + * @example + * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid'; + * assert(isBuffer(ensureBuffer('test')), true); + */ + function ensureBuffer(source) { + return ( + (isBuffer(source) && source) || + (hasValue(source) && Buffer.from(source)) || + Buffer.alloc(0) + ); + } + + /** + * Clears the values out of a buffer. + * + * @function clearBuffer + * @category buffer + * @type {Function} + * @param {Array} source - Takes an array to be emptied. + * @returns {Array} - The originally given array. + * + * @example + * import { clearBuffer, assert } from '@universalweb/acid'; + * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([])); + */ + function clearBuffer(source) { + source.fill(0); + return source; + } + + /** + * Checks if an object or objects are a plain object. + * + * @function isFunction + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFunction } from '@universalweb/acid'; + * isFunction(() => {}); + * // => true + */ + const isFunction = (source) => { + return hasValue(source) ? source instanceof Function : false; + }; + + /** + * Checks if the value is a number. + * + * @function isNumber + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumber, assert } from '@universalweb/acid'; + * assert(isNumber(1), true); + */ + const isNumberCall = isConstructorNameFactory("Number"); + const isNumber = isTypeFactory(isNumberCall); + /** + * Checks if the value is not a number. + * + * @function isNotNumber + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNotNumber, assert } from '@universalweb/acid'; + * assert(isNotNumber(1), false); + */ + function isNotNumber(source) { + return !isNumber(source); + } + + /** + * Checks if the value is a string. + * + * @function isString + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isString, assert } from '@universalweb/acid'; + * assert(isString('hello'), true); + * assert(isString(1), false); + */ + const isString = isConstructorFactory(String); + /** + * Checks if the value is not a string. + * + * @function isNotString + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNotString, assert } from '@universalweb/acid'; + * assert(isNotString(1), true); + * assert(isNotString('hello'), false); + */ + function isNotString(source) { + return !isString(source); + } + + const objectAssign = Object.assign; + function assignToObject(target, source) { + if (isPlainObject(source)) { + objectAssign(target, source); + } else if (isFunction(source)) { + const key = source.name; + if (key) { + target[key] = source; + } else { + objectAssign(target, source); + } + } else if (isString(source) || isNumber(source)) { + target[source] = source; + } + return target; + } + /** + * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module. + * + * @function assign + * @category object + * @param {Object} target - The target object. + * @param {...Object} sources - The source object(s). + * @returns {Object} - Returns the target object. + * + * @example + * import { assign, assert } from '@universalweb/acid'; + * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5}); + */ + function assign(target, ...sources) { + const sourceLength = sources.length; + for (let index = 0; index < sourceLength; index++) { + assignToObject(target, sources[index]); + } + return target; + } + + function assignToClass(target, source) { + if (isPlainObject(source)) { + objectAssign(target.prototype, source); + } else if (isFunction(source)) { + const key = source.name; + if (key) { + target.prototype[key] = source; + } + } else if (isConstructor(source)) { + const key = source.constructor?.name; + if (key) { + target.prototype[key] = source; + } + } else if (isString(source) || isNumber(source)) { + target.prototype[source] = source; + } + return target; + } + /** + * The function adds a new method to a class. + * @param {Class} target - The target parameter refers to the Class or constructor function to which you want + * to add a new method. + * @param {Function|Object|String|Number} sources - What you want to add to the class. + * @returns {Class} - Returns the Class provided in the target parameter. + * + * @example + * import { extendClass, assert } from '@universalweb/acid'; + * class Test {} + * function a(){return 1;} + * extendClass(Test, a) + * assert((new Test()).a(), 1); + */ + function extendClass(target, ...sources) { + const sourceLength = sources.length; + for (let index = 0; index < sourceLength; index++) { + assignToClass(target, sources[index]); + } + return target; + } + + /** + * Creates an object composed of keys generated from the results of running each element of collection through iteratee. + * + * @function countBy + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {Function} iteratee - The iteratee to transform keys. + * @returns {Object} - Returns the composed aggregate object. + * + * @example + * import { countBy, assert } from '@universalweb/acid'; + * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2}); + */ + function countBy(collection, iteratee) { + const object = {}; + let result; + eachArray(collection, (item) => { + result = iteratee(item); + if (!object[result]) { + object[result] = 0; + } + object[result]++; + }); + return object; + } + + /** + * Count the amount of times a key is present in a collection. + * + * @function countKey + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {Function} propertyName - The name of the key. + * @returns {Number} - The count. + * + * @example + * import { countKey, assert } from '@universalweb/acid'; + * assert(countKey([{a:1}, {a:3}], 'a'), 2); + */ + function countKey(collection, propertyName) { + let count = 0; + eachArray(collection, (item) => { + if (item[propertyName]) { + count++; + } + }); + return count; + } + + /** + * Count the amount of times a key is not present in a collection. + * + * @function countWithoutKey + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {String} propertyName - The name of the key. + * @returns {Number} - The count. + * + * @example + * import { countWithoutKey, assert } from '@universalweb/acid'; + * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2); + */ + function countWithoutKey(collection, propertyName) { + let count = 0; + eachArray(collection, (item) => { + if (!item[propertyName]) { + count++; + } + }); + return count; + } + + function findIndexCache(element, index, array, indexMatch, propertyName) { + if (element[propertyName] === indexMatch) { + return true; + } + } + + /** + * Finds an object in a collection by the given id and property name and returns the array index of the object. + * + * @function findIndex + * @type {Function} + * @category collection + * @param {Array} collection - Collection to be checked for an item. + * @param {Number|string} id - The value to look for. + * @param {String} [propertyName = 'id'] - The name of the property to compare. + * @returns {Number} - The index of the object. + * + * @example + * findIndex([{id: 1}, {id: 2}], 1); + * // => 0 + */ + function findIndex(collection, id, propertyName = "id") { + const result = collection.findIndex((element, index) => { + return findIndexCache(element, index, collection, id, propertyName); + }); + return result === -1 ? false : result; + } + + /** + * Finds an object in a collection by the given id and property name. + * + * @function findItem + * @type {Function} + * @category collection + * @param {Array} collection - Collection to be checked for an item. + * @param {Number|string} id - The value to look for. + * @param {String} [propertyName = 'id'] - The name of the property to compare. + * @returns {Object} - The found object. + * + * @example + * findItem([{id: 1}, {id: 2}], 1); + * // => {id: 1} + */ + function findItem(collection, id, propertyName = "id") { + const result = collection.find((element, index) => { + return findIndexCache(element, index, collection, id, propertyName); + }); + return result === -1 ? false : result; + } + + function sortCollectionDescendingFilter( + previous, + next, + propertyName, + ifMatch, + ) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + if (!nextKey) { + return -1; + } else if (!previousKey) { + return 1; + } else if (previousKey < nextKey) { + return 1; + } else if (previousKey > nextKey) { + return -1; + } + return 0; + } + /** + * Sorts an array in place using a key in descending order. + * + * @function sortCollectionDescending + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array and or a clone of the array sorted. + * + * @example + * import { sortCollectionDescending, assert } from '@universalweb/acid'; + * const result = [{id: 1}, {id: 0}]; + * const collect = [{id: 0}, {id: 1}]; + * const prop = 'id'; + * assert(sortCollectionDescending(collect, prop), result); + */ + function sortCollectionDescending(collection, propertyName = "id", ifMatch) { + return collection.sort((previous, next) => { + return sortCollectionDescendingFilter( + previous, + next, + propertyName, + ifMatch, + ); + }); + } + + /** + * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array. + * + * @function getLowest + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @returns {Object} - The newest object in the collection. + * + * @example + * import { getLowest, assert } from '@universalweb/acid'; + * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1}); + */ + function getLowest(collection, propertyName) { + return sortCollectionDescending(collection, propertyName, false)[0]; + } + + function sortCollectionAscendingFilter( + previous, + next, + propertyName, + ifMatch, + ) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + if (!nextKey) { + return 1; + } else if (!previousKey) { + return -1; + } else if (previousKey < nextKey) { + return -1; + } else if (previousKey > nextKey) { + return 1; + } + return 0; + } + /** + * Sorts an array in place using a key in ascending order. + * + * @function sortCollectionAscending + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array and or a clone of the array sorted. + * + * @example + * import { sortCollectionAscending, assert } from '@universalweb/acid'; + * const result = [{id: 0}, {id: 1}]; + * const collect = [{id: 1}, {id: 0}]; + * const prop = 'id'; + * assert(sortCollectionAscending(collect, prop), result); + */ + function sortCollectionAscending(collection, propertyName = "id", ifMatch) { + return collection.sort((previous, next) => { + return sortCollectionAscendingFilter( + previous, + next, + propertyName, + ifMatch, + ); + }); + } + + /** + * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array. + * + * @function getHighest + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @returns {Object} - The newest object in the collection. + * + * @example + * import { getHighest, assert } from '@universalweb/acid'; + * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0}); + */ + function getHighest(collection, propertyName = "id") { + return sortCollectionAscending(collection, propertyName)[0]; + } + + /** + * Creates an object composed of keys generated from the results of running each element of collection thru iteratee. + * The order of grouped values is determined by the order they occur in collection. + * The corresponding value of each key is an array of elements responsible for generating the key. + * + * @function groupBy + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {Function} iteratee - The iteratee to transform keys. + * @returns {Object} - Returns the composed aggregate object. + * + * @example + * groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + */ + function groupBy(collection, iteratee) { + const sortedObject = {}; + eachArray(collection, (item) => { + const results = iteratee(item); + if (!sortedObject[results]) { + sortedObject[results] = []; + } + sortedObject[results].push(item); + }); + return sortedObject; + } + + /** + * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique. + * + * @function indexBy + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {String} propertyName - The property name to index by. + * @returns {Object} - Returns the composed aggregate object. + * + * @example + * import { indexBy, assert } from '@universalweb/acid'; + * const result = { "0": {name: 'test', id: 0}, "1": {name: 'test2', id: 1}}; + * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id'); + * assert(indexed, result); + */ + function indexBy(collection, propertyName = "id") { + const sortedObject = {}; + eachArray(collection, (item) => { + sortedObject[item[propertyName]] = item; + }); + return sortedObject; + } + + /** + * Invokes a function on the provided property name in each object in the collection. + * + * @function invokeCollection + * @category collection + * @type {Function} + * @param {Array} collection - Collection from which method will be taken. + * @param {String} property - Value used to pluck method from object. + * @param {*} value - Value to be passed to callable property. + * @returns {Array} - Returns the results of the invoked method. + * + * @example + * import { invokeCollection, assert } from '@universalweb/acid'; + * const results = invokeCollection([{ + * test(item, index) { return [item, index];} + * }], 'test', ['EXAMPLE']); + * assert(results, [['EXAMPLE', 0]]); + */ + function invokeCollection(collection, property, value, thisBind) { + if (thisBind) { + return mapArray(collection, (item, index) => { + return item[property].call(thisBind, value); + }); + } + return mapArray(collection, (item, index) => { + return item[property](value); + }); + } + + /** + * Asynchronously awaits & invokes a function on the provided property name in each object in the collection. + * + * @function invokeCollectionAsync + * @category collection + * @type {Function} + * @async + * @param {Array} collection - Collection from which method will be taken. + * @param {String} property - Value used to pluck method from object. + * @param {*} value - Value to be passed to callable property. + * @returns {Array} - Returns the results of the invoked method. + * + * @example + * import { invokeCollectionAsync, assert } from '@universalweb/acid'; + * const results = await invokeCollectionAsync([{ + * async test(item, index) { return [item, index];} + * }], 'test', ['EXAMPLE']); + * assert(results, [['EXAMPLE', 0]]); + */ + function invokeCollectionAsync(collection, property, value, thisBind) { + if (thisBind) { + return mapAsyncArray(collection, (item) => { + return item[property].call(thisBind, value); + }); + } + return mapAsyncArray(collection, async (item) => { + return item[property](value); + }); + } + + /** + * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array. + * + * @function pluckObject + * @category object + * @type {Function} + * @param {Object} source - Array used to determine what sources to be plucked. + * @param {String|Array} targets - Property name. + * @returns {Array|undefined} - An array of plucked sources. + * + * @example + * import { pluckObject, assert } from '@universalweb/acid'; + * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]); + */ + function pluckObject(source, targets) { + if (!source) { + return; + } else if (isString(targets)) { + return source[targets]; + } + return mapArray(targets, (item) => { + return source[item]; + }); + } + + /** + * Returns an array of the plucked values from the collection. + * + * @function pluck + * @category collection + * @type {Function} + * @param {Array} collection - Array used to determine what value to be plucked. + * @param {(String|Number|Array.)} targets - Property name. + * @returns {Array} - An array of plucked values. + * + * @example + * import { pluck, assert } from '@universalweb/acid'; + * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]); + * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]); + */ + function pluck(collection, targets) { + return mapArray(collection, (item) => { + return pluckObject(item, targets); + }); + } + + function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + return previousKey.localeCompare(nextKey); + } + /** + * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array. + * + * @function sortCollectionAlphabetically + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - Name of property to compare. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array. + * + * @example + * import { sortCollectionAlphabetically, assert } from '@universalweb/acid'; + * const result = [{"letter":"a"},{"letter":"c", g: 0},{"letter":"c", g: 2}, {letter:'f'}]; + * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c", g: 2}, {letter:'c', g: 0}]; + * const prop = 'letter'; + * function ifMatchSort(c, n) { + * if (c.g < n.g) { + * return -1; + * } + * if (c.g > n.g) { + * return 1; + * } + * } + * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result); + */ + function sortCollectionAlphabetically( + collection, + propertyName = "id", + ifMatch, + ) { + return collection.sort((previous, next) => { + return sortObjectsAlphabetically(previous, next, propertyName, ifMatch); + }); + } + + function sortObjectsAlphabeticallyReverse( + previous, + next, + propertyName, + ifMatch, + ) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + return nextKey.localeCompare(previousKey); + } + /** + * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array. + * + * @function sortCollectionAlphabeticallyReverse + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - Name of property to compare. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array. + * + * @example + * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid'; + * const result = [{letter:'f'},{"letter":"c"}, {"letter":"a"}]; + * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c"}]; + * const prop = 'letter'; + * assert(sortCollectionAlphabeticallyReverse(collect, prop), result); + */ + function sortCollectionAlphabeticallyReverse( + collection, + propertyName = "id", + ifMatch, + ) { + return collection.sort((previous, next) => { + return sortObjectsAlphabeticallyReverse( + previous, + next, + propertyName, + ifMatch, + ); + }); + } + + /** + * Return the file extension. + * + * @function getFileExtension + * @category file + * @param {*} source - Object to be checked. + * @returns {String|undefined} - Returns the extension. + * + * @example + * import { getFileExtension, assert } from '@universalweb/acid'; + * assert(getFileExtension('test.js'),'js'); + */ + function getFileExtension(source) { + if (source) { + return source.substring(source.lastIndexOf(".") + 1); + } + } + + /** + * Return the file extension. + * + * @function getFilename + * @category file + * @param {*} source - Object to be checked. + * @returns {String|undefined} - Returns the extension. + * + * @example + * import { getFilename, assert } from '@universalweb/acid'; + * assert(getFilename('./universalweb/test.js'),'test.js'); + */ + function getFilename(source) { + if (source) { + return source.substring(source.lastIndexOf("/") + 1); + } + } + + function regexTestFactory(regexType) { + return (item) => { + return hasValue(item) ? regexType.test(item) : false; + }; + } + + /** + * Checks if the string has a .css extension. + * + * @function isFileCSS + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileCSS, assert } from '@universalweb/acid'; + * assert(isFileCSS('test.css'), true); + */ + const isFileCSS = regexTestFactory(/\.css$/); + + /** + * Checks if the string has a .html extension. + * + * @function isFileHTML + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileHTML, assert } from '@universalweb/acid'; + * assert(isFileHTML('test.html'), true); + */ + const isFileHTML = regexTestFactory(/\.html$/); + + /** + * Checks if the string has a .js extension. + * + * @function isFileJS + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileJS, assert } from '@universalweb/acid'; + * assert(isFileJS('test.js'), true); + */ + const isFileJS = regexTestFactory(/\.js$/); + + /** + * Checks if the string has a .json extension. + * + * @function isFileJSON + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileJSON, assert } from '@universalweb/acid'; + * assert(isFileJSON('test.json'), true); + */ + const isFileJSON = regexTestFactory(/\.json$/); + + /** + * Creates a function that executes callable, only after being called n times. + * + * @function after + * @category function + * @type {Function} + * @param {Number} amount - The number of calls until method is invoked. + * @param {Function} callable - The function to be called. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * import { after, assert } from '@universalweb/acid'; + * const onlyAfter = after(1, (item) => { return item;}); + * assert(onlyAfter(1), undefined); + * assert(onlyAfter(2), 2); + */ + function after(amount, callable) { + let point = amount; + let value; + const onlyAfter = (...args) => { + if (point !== null) { + point--; + } + if (point <= 0) { + value = callable(...args); + point = null; + } + return value; + }; + return onlyAfter; + } + + /** + * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments. + * + * @function ary + * @category function + * @type {Function} + * @param {Function} callable - The function to cap arguments for. + * @param {Number} amount - The arity cap. + * @returns {Object} - Returns the new capped function. + * + * @example + * import { ary, assert } from '@universalweb/acid'; + * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]); + */ + function ary(callable, amount) { + return (...args) => { + return callable(...args.splice(0, amount)); + }; + } + + /** + * Creates a function that executes callable, only before n times. + * + * @function before + * @category function + * @type {Function} + * @param {Number} amount - The number of calls before n. + * @param {Function} callable - The function to be called. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * import { before, assert } from '@universalweb/acid'; + * const onlyBefore = before(3, () => { return 1;}); + * assert(onlyBefore(1), 1); + */ + function before(amount, callable) { + let point = amount; + let value; + const onlyBefore = (...args) => { + if (point !== null) { + point--; + } + if (point >= 1) { + value = callable(...args); + } else { + point = null; + } + return value; + }; + return onlyBefore; + } + + /** + * Asynchronously iterates through the given object. + * + * @function eachAsyncObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg. + * @param {*} thisCall - Iteratee called with thisCall as this. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Object|Function|undefined} - Returns source. + * + * @example + * import { eachAsyncObject, assert } from '@universalweb/acid'; + * const tempList = []; + * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => { + * tempList[key] = item; + * }); + * assert(tempList, {a: 1, b: 2, c: 3}); + */ + const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => { + if (!source) { + return; + } + const objectKeys = keys(source); + if (hasValue(thisCall)) { + await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { + return iteratee.call( + thisCall, + source[key], + key, + source, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } else { + await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { + return iteratee( + source[key], + key, + source, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } + return source; + }; + + /** + * Iterates through the given object. + * + * @function eachObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Object|Function|undefined} - Returns the calling object. + * + * @example + * import { eachObject, assert } from '@universalweb/acid'; + * assert(eachObject({a: 1, b: 2, c: 3}, (item) => { + * console.log(item); + * }), {a: 1, b: 2, c: 3}); + */ + function eachObject(source, iteratee, thisCall, additionalArg) { + if (!source) { + return; + } + const objectKeys = keys(source); + if (hasValue(thisCall)) { + eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { + iteratee.call( + thisCall, + source[key], + key, + source, + propertyCount, + objectKeysArray, + additionalArg, + ); + }); + } else { + eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { + iteratee( + source[key], + key, + source, + propertyCount, + objectKeysArray, + additionalArg, + ); + }); + } + return source; + } + + async function forEachAsync(source, callback) { + const values = []; + const properties = []; + let valuesLength = 0; + source.forEach((item, key) => { + values[valuesLength] = item; + properties[valuesLength] = item; + valuesLength++; + }); + for (let index = 0; index < valuesLength; index++) { + await callback(values[index], properties[index]); + } + return source; + } + + /** + * Checks if an object(s) is a Set. + * + * @function isSet + * @category type + * @param {...*} sources - Objects to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isSet, assert } from '@universalweb/acid'; + * assert(isSet(new Set()), true); + */ + const isSetCall = isConstructorNameFactory("Set"); + const isSet = isTypeFactory(isSetCall); + + function forOf(source, iteratee) { + if (isSet(source)) { + for (const value of source) { + iteratee(value, source); + } + return source; + } + for (const [key, value] of source) { + iteratee(value, key, source); + } + return source; + } + + /** + * Checks if an object or objects are a Int16Array. + * + * @function isGenerator + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isGenerator } from '@universalweb/acid'; + * isGenerator(function* (){}); + * // => true + */ + const isGeneratorCall = isConstructorNameFactory("GeneratorFunction"); + const isGenerator = isTypeFactory(isGeneratorCall); + + async function forOfAsync(source, iteratee, generatorArgs) { + if (isSet(source)) { + for (const value of source) { + await iteratee(value, source); + } + return source; + } + if (isGenerator(source)) { + for await (const item of source(...generatorArgs)) { + await iteratee(item, source); + } + } + for (const [key, value] of source) { + await iteratee(value, key, source); + } + return source; + } + + /** + * Checks if an object is an async function. + * + * @function isAsync + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isAsync, assert } from '@universalweb/acid'; + * assert(isAsync(async() => {}), true); + */ + const isAsyncCall = isConstructorNameFactory("AsyncFunction"); + const isAsync = isTypeFactory(isAsyncCall); + + function generateLoop( + arrayLoop, + arrayLoopAsync, + objectLoop, + objectLoopAsync, + forOfLoop, + forOfLoopAsync, + ) { + return (source, iteratee, argument1, argument2, argument3) => { + let returned; + const isIterateeAsync = isAsync(iteratee); + if (!hasValue(source) || !iteratee) { + return; + } else if (isArray(source)) { + returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; + } else if (isPlainObject(source) || isFunction(source)) { + returned = isIterateeAsync ? objectLoopAsync : objectLoop; + } else if (forOfLoop) { + returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; + } else if (isGenerator(source)) { + returned = forOfLoopAsync; + } else { + returned = isIterateeAsync ? objectLoopAsync : objectLoop; + } + return returned(source, iteratee, argument1, argument2, argument3); + }; + } + + /** + * Iterates through the given object. + * + * @function each + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array | object | Function} - The originally given object. + * + * @example + * import { each, assert } from '@universalweb/acid'; + * const list = {}; + * each({a: 1, b: 2, c: 3}, (item, key) => { + * list[key] = item; + * }); + * assert(list, {a: 1, b: 2, c: 3}); + */ + const each = generateLoop( + eachArray, + eachAsyncArray, + eachObject, + eachAsyncObject, + forOf, + forOfAsync, + ); + + class Chain { + constructor(methods) { + this.addChainMethod(methods); + } + addChainMethod(methods) { + const thisChain = this; + each(methods, (method, methodName) => { + thisChain[methodName] = function (...args) { + this.value = method.call(thisChain, thisChain.value, ...args); + return thisChain; + }; + }); + } + setValue(value) { + this.value = value; + return this; + } + done() { + const value = this.value; + this.value = null; + return value; + } + value = null; + } + /** + * Creates a chainable set of functions. + * + * @function chain + * @category function + * @type {Function} + * @param {Array|Object} config - The object to take methods from. + * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining. + * + * @example + * import { chain, assert } from '@universalweb/acid'; + * const chained = chain({ + * a(value, c) { + * return value + c; + * } + * }).setValue(2).a(1).done(); + * assert(chained, 3); + */ + function chain(config) { + return construct(Chain, [config]); + } + + /** + * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient. + * + * @function curry + * @category function + * @type {Function} + * @param {Function} callable - The function to curry. + * @param {Number} arity - The arity of method. + * @returns {*} - Returns the new curried function. + * + * @example + * import { curry, assert } from '@universalweb/acid'; + * const result = curry((a, b, c) => { + * return [a, b, c]; + * })(1)(2)(3); + * assert(result, [1, 2, 3]); + */ + function curry(callable, arity = callable.length) { + const curries = []; + const curried = (...curryArgs) => { + curries.push(...curryArgs); + if (curries.length === arity) { + const result = callable(...curries); + clearArray(curries); + return result; + } + return curried; + }; + return curried; + } + + /** + * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order. + * + * @function curryRight + * @type {Function} + * @param {Function} callable - The function to curry. + * @param {Number} arity - The arity of method. + * @returns {*} - Returns the new curried function. + * + * @example + * import { curryRight, assert } from '@universalweb/acid'; + * const result = curryRight((a, b, c) => { + * return [a, b, c]; + * })(1)(2)(3); + * assert(result, [3, 2, 1]); + */ + function curryRight(callable, arity = callable.length) { + const curries = []; + const curried = (...curryArgs) => { + curries.unshift(...curryArgs); + if (curries.length === arity) { + const result = callable(...curries); + clearArray(curries); + return result; + } + return curried; + }; + return curried; + } + + /** + * This method returns undefined. + * + * @function noop + * @category function + * @type {Function} + * @returns {undefined} - Returns undefined. + * + * @example + * import { noop, assert } from '@universalweb/acid'; + * assert(noop(), undefined); + */ + function noop() { + return; + } + + /** + * Iterates based on the amount given invoking the iteratee with the current index as an argument. + * + * @function times + * @category utility + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @returns {undefined} - Nothing. + * + * @example + * import { times } from '@universalweb/acid'; + * times(3, (item) => { + * console.log(item); + * }); + * // 0 + * // 1 + * // 2 + * // => undefined + */ + function times(amount, iteratee) { + for (let index = 0; index < amount; index++) { + iteratee(index); + } + } + /** + * Iterates based on the amount given and maps the results returned by the iteratee each time to an array. + * + * @function timesMap + * @category utility + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @param {Array} [results = []] - Array that will have iteratee return pushed to. + * @returns {Array} - An array with iteratee's returned values. + * + * @example + * import { timesMap } from '@universalweb/acid'; + * timesMap(3, (item) => { + * return item; + * }); + * // => [0, 1, 2] + */ + function timesMap(amount, iteratee, results = []) { + for (let index = 0; index < amount; index++) { + results[index] = iteratee(amount); + } + return results; + } + + class Timers { + list = construct(Map); + construct() {} + /** + * Remove a timer that was created using the timer function. + * + * @param {Number} id - The id of the timer to remove. + * @returns {undefined} - Returns nothing. + * + * @example + * import { timer, assert } from '@universalweb/acid'; + * timer(() => {}, 100); + * // => 0 + */ + remove(id) { + clearTimeout(id); + this.list.delete(id); + } + has(id) { + return this.list.has(id); + } + get(id) { + return this.list.get(id); + } + /** + * Create a timer and add it to the list of timers. + * + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setTimeoutId ID. + * + * @example + * import { timers, assert } from '@universalweb/acid'; + * timers.set(() => {}, 100); + * // => 0 + */ + set(callable, time) { + const currentThis = this; + const id = setTimeout(() => { + callable(); + currentThis.remove(id); + }, time); + this.list.set(id, true); + return id; + } + /** + * Clear all active timers. + * + * @returns {undefined} - Returns undefined. + * + * @example + * import { timers, assert } from '@universalweb/acid'; + * timers.clear(); + * // => undefined + */ + clear() { + const currentThis = this; + currentThis.list.forEach((id) => { + currentThis.remove(id); + }); + } + } + const timers = construct(Timers); + /** + * Timer wrapper. + * + * @function timer + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setTimeoutId ID. + * + * @example + * import { timer, assert } from '@universalweb/acid'; + * timer(() => {}, 100); + * // => 0 + */ + function timer(callable, time) { + return timers.set(callable, time); + } + /** + * Clear all active timers. + * + * @function clearTimers + * @category function + * @returns {undefined} - Returns undefined. + * + * @example + * import { clearTimers, assert } from '@universalweb/acid'; + * clearTimers(); + * // => undefined + */ + function clearTimers() { + const id = setTimeout(noop, 0); + times(id, (index) => { + timers.remove(index); + }); + } + + const applyNative = Reflect.apply; + /** + * Calls a target function with an optional "this" and optional arguments as specified. Same as Reflect.apply but with a function check. + * + * @function apply + * @category function + * @param {Function} target - The target function to call. + * @param {*} thisArgument - Array like object. + * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called. + * @returns {*} - The result of calling the given target function with the specified this value and arguments. + * + * @example + * import { apply, assert } from '@universalweb/acid'; + * assert(apply(function (a) {return a;}, undefined, [2]), 2); + */ + function apply(target, thisArgument, argumentsList) { + if (isFunction(target)) { + return applyNative(target, thisArgument, argumentsList); + } + } + + /** + * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer. + * + * @function debounce + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Function} - The debounced function. + * + * @example + * import { debounce, promise, assert } from '@universalweb/acid'; + * const promised = promise((a) => { + * const debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0); + * }); + * assert(await promised(), 'debounced'); + */ + function debounce(callable, time) { + function debounced(...args) { + if (debounced.id !== false) { + timers.remove(debounced.id); + } + debounced.id = timer(() => { + debounced.callable(...args); + debounced.id = false; + }, time); + } + debounced.id = false; + debounced.callable = callable.bind(debounced); + debounced.clear = () => { + if (debounced.id !== false) { + timers.remove(debounced.id); + debounced.id = false; + } + }; + return debounced; + } + + /** + * Checks if the given method is a function. If it is then it invokes it with the given arguments. + * + * @function ifInvoke + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked if possible. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args - Arguments to pass to the function. + * @returns {*} - Returns the method invoked or undefined. + * + * @example + * import { ifInvoke, assert } from '@universalweb/acid'; + * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]); + */ + function ifInvoke(callable, thisBind, ...args) { + if (isFunction(callable)) { + if (thisBind) { + return callable.call(thisBind, ...args); + } + return callable(...args); + } + } + + /** + * Creates a function that negates the result of the predicate callable. + * + * @function negate + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @returns {*} - Returns the given methods result. + * + * @example + * negate(() => { return false;})(); + * // => true + */ + function negate(callable) { + return (...args) => { + return !callable(...args); + }; + } + + /** + * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned. + * + * @function nthArg + * @category function + * @type {Function} + * @param {Number} [index = 0] - The index of the argument to return. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * nthArg(1)('a', 'b'); + * // => 'b' + */ + function nthArg(index = 0) { + return (...args) => { + return args[index]; + }; + } + + /** + * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function. + * + * @function once + * @category function + * @type {Function} + * @param {Function} callable - The function to be called. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * const onceOnly = once((item) => { return item;}); + * onceOnly(5); + * onceOnly(3); + * // => 5 + */ + const once = (callable) => { + let value; + const onlyOnce = (...args) => { + if (!hasValue(value)) { + value = callable(...args); + } + return value; + }; + return onlyOnce; + }; + + /** + * Returns the constructor of an object. + * + * @function getType + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { getType, assert } from '@universalweb/acid'; + * assert(getType(1), true); + */ + function getType(source) { + return source?.constructor; + } + + /** + * Returns a new empty object of the same type. + * + * @function cloneType + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { cloneType, assert } from '@universalweb/acid'; + * assert(cloneType([1]), []); + */ + function cloneType(source, args = []) { + const sourceType = getType(source); + if (sourceType === Function) { + if (sourceType.name === "function") { + return function () {}; + } + } + return construct(sourceType, args); + } + + /** + * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object. + * + * @function forOfCompactMap + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => { + * return item; + * }); + * // => {b: 2, c: 3} + */ + function forOfMap(source, iteratee = returnValue, resultsObject) { + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = iteratee(value, results, source); + methodPushBound(result); + } + return results; + } + const methodSet = isFunction(results.set); + for (const [key, value] of source) { + const result = iteratee(value, key, results, source); + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + return results; + } + + /** + * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function forOfCompactMapAsync + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * import { forOfCompactMapAsync, assert } from '@universalweb/acid'; + * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => { + * return item; + * }), {b: 2, c: 3}); + */ + async function forOfMapAsync( + source, + iteratee = returnValue, + resultsObject, + generatorArgs, + ) { + if (isGenerator(source)) { + const resultsGenerator = []; + for await (const item of source(...generatorArgs)) { + resultsGenerator.push(await iteratee(item, resultsGenerator, source)); + } + return resultsGenerator; + } + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = await iteratee(value, results, source); + methodPushBound(result); + } + return results; + } + const methodSet = isFunction(results.set); + for await (const [key, value] of source) { + const result = await iteratee(value, key, results, source); + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + return results; + } + + /** + * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. + * + * @function mapObjectAsync + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function|undefined} - An object of the same calling object's type. + * + * @example + * import { mapAsyncObject, assert } from '@universalweb/acid'; + * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, b: undefined, c: 3}); + */ + async function mapAsyncObject(source, iteratee, results = {}) { + if (!source) { + return; + } + await eachAsyncObject( + source, + async (item, key, thisObject, propertyCount, objectKeys) => { + results[key] = await iteratee( + item, + key, + results, + thisObject, + propertyCount, + objectKeys, + ); + }, + ); + return results; + } + + /** + * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. + * + * @function mapObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Object|Function|undefined} - An object of the same calling object's type. + * + * @example + * import { mapObject, assert } from '@universalweb/acid'; + * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, b: undefined, c: 3}); + */ + function mapObject(source, iteratee, results = {}, thisCall, additionalArg) { + if (!source) { + return; + } + if (hasValue(thisCall)) { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + results[key] = iteratee.call( + thisCall, + item, + key, + results, + original, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } else { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + results[key] = iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } + return results; + } + + /** + * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object. + * + * @function map + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {Object | Function} [results = {}] - Object that will be used to assign results. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array | object | Function} - A new object of the same calling object's type. + * + * @example + * import { map, assert } from '@universalweb/acid'; + * assert(map({a: 1, b: 2, c: 3}, (item) => { + * return item * 2; + * }), {a: 2, b: 4, c: 6}); + */ + const map = generateLoop( + mapArray, + mapAsyncArray, + mapObject, + mapAsyncObject, + forOfMap, + forOfMapAsync, + ); + + /** + * Creates a function that invokes iteratee with the arguments it receives and returns their results. + * + * @function over + * @category function + * @type {Function} + * @param {(Array.|Object.)} iteratees - The list of functions to loop through. + * @returns {Function} - Returns the new over wrapped function. + * + * @example + * import { overEvery, assert } from '@universalweb/acid'; + * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]); + */ + function over(iteratees) { + return (...args) => { + return map(iteratees, (item) => { + return item(...args); + }); + }; + } + + /** + * Iterates through the given object while the iteratee returns true. + * + * @function everyAsyncObject + * @category object + * @type {Function} + * @param {Object} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { everyAsyncObject, assert } from '@universalweb/acid'; + * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => { + * return item; + * }); + * assert(result, true); + */ + async function everyAsyncObject(source, iteratee) { + if (!source) { + return; + } + const objectKeys = keys(source); + return everyAsyncArray( + objectKeys, + (key, index, original, propertyCount) => { + return iteratee(source[key], key, source, propertyCount, original); + }, + ); + } + + /** + * Iterates through the given object while the iteratee returns true. + * + * @function everyObject + * @category object + * @type {Function} + * @param {Object} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { everyObject, assert } from '@universalweb/acid'; + * const result = everyObject({a: true, b: true, c: true}, (item) => { + * return item; + * }); + * assert(result, true); + */ + function everyObject(source, iteratee) { + if (!source) { + return; + } + const objectKeys = keys(source); + return everyArray(objectKeys, (key, index, original, propertyCount) => { + return iteratee(source[key], key, source, propertyCount, original); + }); + } + + /** + * Iterates (for of) through the given object while the iteratee returns true using a for of loop. + * + * @function forOfEvery + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { every, assert } from '@universalweb/acid'; + * assert(forOfEvery({a: false, b: true, c: true}, (item) => { + * return item; + * }), false); + */ + function forOfEvery(source, iteratee = returnValue) { + if (isArray(source) || isSet(source)) { + for (const value of source) { + const result = iteratee(value, source); + if (result === false) { + return false; + } + } + } else { + for (const [key, value] of source) { + const result = iteratee(value, key, source); + if (result === false) { + return false; + } + } + } + return true; + } + + /** + * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop. + * + * @function forOfEveryAsync + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { every, assert } from '@universalweb/acid'; + * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => { + * return item; + * }), false); + */ + async function forOfEveryAsync( + source, + iteratee = returnValue, + generatorArgs, + ) { + if (isGenerator(source)) { + for await (const item of source(...generatorArgs)) { + const result = await iteratee(item, source); + if (result === false) { + return false; + } + } + } else if (isArray(source) || isSet(source)) { + for (const value of source) { + const result = await iteratee(value, source); + if (result === false) { + return false; + } + } + } else { + for (const [key, value] of source) { + const result = await iteratee(value, key, source); + if (result === false) { + return false; + } + } + } + return true; + } + + /** + * Iterates through the given object while the iteratee returns true. + * + * @function every + * @category utility + * @type {Function} + * @param {Object | Array | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { every, assert } from '@universalweb/acid'; + * assert(every({a: false, b: true, c: true}, (item) => { + * return item; + * }), false); + */ + const every = generateLoop( + everyArray, + everyAsyncArray, + everyObject, + everyAsyncObject, + forOfEvery, + forOfEveryAsync, + ); + + /** + * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives. + * + * @function overEvery + * @category function + * @type {Function} + * @param {(Array.|Object.)} predicates - The list of functions to loop through. + * @returns {Function} - Returns the new overEvery wrapped function. + * + * @example + * import { overEvery, assert } from '@universalweb/acid'; + * assert(overEvery([Boolean, isFinite])('1'), true); + */ + function overEvery(predicates) { + return (arg) => { + return every(predicates, (predicate) => { + return predicate(arg); + }); + }; + } + + /** + * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on. + * + * @function reArg + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Array} indexes - The arranged argument indexes. + * @returns {Function} - Returns the new function. + * + * @example + * reArg((a, b, c) => { + * return [a, b, c]; + * }, [1,2,0])(1,2,3); + * // => [2, 3, 1] + */ + function reArg(callable, indexes) { + return (...args) => { + return callable( + ...indexes.map((item) => { + return args[item]; + }), + ); + }; + } + + /** + * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer. + * + * @function throttle + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Function|undefined} - The throttled function. + * + * @example + * const throttled = throttle(() => { console.log('throttle'); }, 0)(); + * throttled(); + * // 'throttle' + */ + function throttle(callable, time) { + function throttled(...args) { + if (throttled.id) { + throttled.shouldThrottle = true; + return; + } + throttled.callable(...args); + throttled.id = timer(() => { + if (throttled.shouldThrottle) { + throttled.callable(...args); + } + throttled.id = false; + }, time); + } + throttled.id = false; + throttled.callable = callable.bind(throttled); + throttled.clear = () => { + timers.remove(throttled.id); + throttled.id = false; + }; + return throttled; + } + + /** + * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function. + * + * @function wrap + * @category function + * @type {Function} + * @param {*} value - The value to wrap. + * @param {Function} wrapper - The wrapper function. + * @returns {Function} - The new function. + * + * @example + * wrap('Lucy', (firstName, lastName) => { + * return `My name is ${firstName} ${lastName}.`; + * })('Diamonds'); + * // => 'My name is Lucy Diamonds.' + */ + function wrap(value, wrapper) { + return (...arg) => { + return wrapper(value, ...arg); + }; + } + + const functionPrototype = Function.prototype; + /** + * Caches a prototype method. + * + * @function cacheNativeMethod + * @category utility + * @type {Function} + * @param {Function} method - Prototype method. + * @returns {Function} - Cached method. + * + * @example + * import { cacheNativeMethod, assert } from '@universalweb/acid'; + * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1); + */ + function cacheNativeMethod(method) { + return functionPrototype.call.bind(method); + } + + /** + * Returns an array of all properties (enumerable or not) found directly upon a given object. + * + * @function getPropNames + * @category object + * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned. + * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object. + * + * @example + * import { getPropNames, assert } from '@universalweb/acid'; + * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']); + */ + const getPropNames = Object.getOwnPropertyNames; + /** + * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object. + * + * @function getPropDesc + * @category object + * @param {Object} target - The target object. + * @param {String} property - The name of the property whose description is to be retrieved. + * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise. + * + * @example + * getPropDesc({ bar: 42 }, 'bar'); + * // => { configurable: true, enumerable: true, value: 42, writable: true } + */ + const getPropDesc = Object.getOwnPropertyDescriptor; + /** + * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object. + * + * @function defProp + * @category object + * @param {Object} target - The object on which to define the property. + * @param {String} property - The name of the property whose description is to be retrieved. + * @param {Object} descriptor - The descriptor for the property being defined or modified. + * @returns {Object} - The object that was passed to the function. + * + * @example + * defProp({}, 'key', { + * enumerable: false, + * configurable: false, + * writable: false, + * value: 'static' + * }).key; + * // => 'static' + */ + const defProp = Object.defineProperty; + const hasProp = cacheNativeMethod(Object.hasOwnProperty); + + /** + * Determines whether two values are the same value. + * + * @function isSame + * @category object + * @param {*} source - Value to compare to. + * @param {*} target - A value to compare. + * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value. + * + * @example + * import { isSame, assert } from '@universalweb/acid'; + * assert(isSame('foo', 'foo'), true); + */ + const isSame = Object.is; + + /** + * Adds two numbers. + * + * @function add + * @category math + * @type {Function} + * @param {Number} augend - First number. + * @param {Number} addend - Second number which is being added to another (augend). + * @returns {Number} - Returns the sum of the arguments. + * + * @example + * import { add, assert } from '@universalweb/acid'; + * assert(add(1, 1), 2); + */ + function add(augend, addend) { + return augend + addend; + } + + /** + * Decrements a number. + * + * @function deduct + * @category math + * @type {Function} + * @param {Number} source - First number. + * @returns {Number} - Returns a decremented version of the number. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + * deduct(10); + * // => 9 + */ + function deduct(source) { + return source - 1; + } + + /** + * Divides two numbers. + * + * @function divide + * @category math + * @type {Function} + * @param {Number} source - First number. + * @param {Number} value - Second number. + * @returns {Number} - Returns the quotient of the arguments. + * + * @example + * import { divide, assert } from '@universalweb/acid'; + * assert(divide(10, 5), 2); + */ + function divide(source, value) { + return source / value; + } + + /** + * Increments a number. + * + * @function increment + * @category math + * @type {Function} + * @param {Number} source - First number. + * @returns {Number} - Returns an incremented version of the number. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + * increment(10); + * // => 11 + */ + function increment(source) { + return source + 1; + } + + /** + * Multiplies two numbers. + * + * @function multiply + * @category math + * @type {Function} + * @param {Number} source - First number. + * @param {Number} value - Second number. + * @returns {Number} - Returns the product of the arguments. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + */ + function multiply(source, value) { + return source * value; + } + + /** + * Calculate the progress from a given total and current amount. + * + * @function calcProgress + * @category utility + * @type {Function} + * @param {Number} total - The total amount. + * @param {Number} currentAmount - The current amount. + * @returns {Number} - The progress as a percentage. + * + * @example + * import { calcProgress, assert } from '@universalweb/acid'; + * assert(calcProgress(100, 1), 1); + */ + function calcProgress(total, currentAmount) { + if (total === 0) { + return false; + } + if (currentAmount === 0) { + return 0; + } + return (currentAmount / total) * 100; + } + + const { random } = Math; + /** + * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption.. + * + * @function randomFloat + * @category math + * @type {Function} + * @param {Number} max - Establishes highest possible value for the random number. + * @param {Number} [min = 0] - Establishes lowest possible value for the random number. + * @returns {Number} - Returns random integer between the max and min range. + * + * @example + * import { randomFloat, assert } from '@universalweb/acid'; + * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;}); + * // => 9.1 + */ + function randomFloat(max, min = 0) { + return random() * (max - min) + min; + } + + /** + * Extracts the remainder between two numbers. + * + * @function remainder + * @category math + * @type {Function} + * @param {Number} source - First number. + * @param {Number} value - Second number. + * @returns {Number} - Returns the remainder of the arguments. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + * remainder(10, 6); + * // => 4 + */ + function remainder(source, value) { + return source % value; + } + + /** + * Subtract all numbers in the array starting from left to right & return the difference. + * + * @function subtractAll + * @category math + * @type {Function} + * @param {Number[]} source - Array of numbers. + * @returns {Number} - Returns the final difference. + * + * @example + * import { subtractAll, assert } from '@universalweb/acid'; + * assert(subtractAll([10, 1, 2, 3]), 5); + */ + function subtractAll(source) { + return source.reduce((a, b) => { + return a - b; + }, 0); + } + + /** + * Sum all numbers in a given array. + * + * @function sumAll + * @category math + * @type {Function} + * @param {Number[]} source - Array of numbers. + * @returns {Number} - Returns a single number. + * + * @example + * import { sumAll, assert } from '@universalweb/acid'; + * assert(sumAll([10, 1, 2, 3]), 5); + */ + function sumAll(source) { + return source.reduce((a, b) => { + return a + b; + }, 0); + } + + /** + * Checks if a number is within a range. + * + * @function isNumberInRange + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @param {Number} start - Beginning of range. + * @param {Number} end - End of range. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumberInRange, assert } from '@universalweb/acid'; + * assert(isNumberInRange(1, 0, 2), true); + * assert(isNumberInRange(1, 2, 5), false); + */ + function isNumberInRange(source, start, end) { + return source > start && source < end; + } + + /** + * Checks if a number is within a range. + * + * @function isNumberNotInRange + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @param {Number} start - Beginning of range. + * @param {Number} end - End of range. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumberNotInRange, assert } from '@universalweb/acid'; + * assert(isNumberNotInRange(1, 0, 2), false); + * assert(isNumberNotInRange(1, 2, 5), true); + */ + function isNumberNotInRange(source, start, end) { + return source < start || source > end; + } + + /** + * Checks if a number is negative & returns true or false. + * + * @function isPositive + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isPositive, assert } from '@universalweb/acid'; + * assert(isPositive(1), true); + */ + const { sign } = Math; + function isPositive(source) { + return sign(source) === 1; + } + + /** + * Strictly checks if a number is zero. + * + * @function isZero + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isZero, assert } from '@universalweb/acid'; + * assert(isZero(0), true); + */ + function isZero(source) { + return source === 0; + } + + /** + * Checks if a number is odd & returns true or false. + * + * @function isOdd + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isOdd, assert } from '@universalweb/acid'; + * assert(isOdd(1), true); + */ + function isOdd(source) { + return (source & 1) === 1; + } + + /** + * Checks if a number is even & returns true or false. + * + * @function isEven + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEven, assert } from '@universalweb/acid'; + * assert(isEven(1), true); + */ + function isEven(source) { + return (source & 1) === 0; + } + + const objectEntries = Object.entries; + /** + * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error. + * + * @function getEntries + * @category object + * @param {Object} source - The source object. + * @returns {Array|undefined} - Returns the Object.entries of the source object. + * + * @example + * import { getEntries, assert } from '@universalweb/acid'; + * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]); + */ + function getEntries(source) { + if (hasValue(source)) { + return objectEntries(source); + } + } + + /** + * Extracts all keys from an object whose values are not null or undefined. + * + * @function compactKeys + * @category object + * @type {Function} + * @param {Object} object - Object from which keys are extracted. + * @returns {Array} - Returns an array of key values. + * + * @example + * import { compactKeys, assert } from '@universalweb/acid'; + * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']); + */ + function compactKeys(object) { + const compactedKeys = []; + eachObject(object, (item, key) => { + if (hasValue(item)) { + compactedKeys.push(key); + } + }); + return compactedKeys; + } + + /** + * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function compactMapAsyncObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with mapped properties that are not null or undefined. + * + * @example + * import { compactMapAsyncObject, assert } from '@universalweb/acid'; + * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, c: 3}); + */ + async function compactMapAsyncObject( + source, + iteratee = returnValue, + results = {}, + ) { + await eachAsyncObject( + source, + async (item, key, original, propertyCount, objectKeys) => { + const result = await iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + ); + if (hasValue(result)) { + results[key] = result; + } + }, + ); + return results; + } + + /** + * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function compactMapObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with mapped properties that are not null or undefined. + * + * @example + * import { compactMapObject, assert } from '@universalweb/acid'; + * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, c: 3}); + */ + function compactMapObject(source, iteratee = returnValue, results = {}) { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + const result = iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + ); + if (hasValue(result)) { + results[key] = result; + } + }); + return results; + } + + /** + * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. + * + * @function filterObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with properties that passed the test. + * + * @example + * filterObject({a: false, b: true, c: true}, (item) => { + * return item; + * }); + * // => {b: true, c: true} + */ + function filterObject(source, iteratee, results = {}) { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + if ( + iteratee(item, key, results, original, propertyCount, objectKeys) === + true + ) { + results[key] = item; + } + }); + return results; + } + + /** + * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. + * + * @function filterAsyncObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with properties that passed the test. + * + * @example + * filterAsyncObject({a: false, b: true, c: true}, (item) => { + * return item; + * }); + * // => {b: true, c: true} + */ + async function filterAsyncObject(source, iteratee, results = {}) { + await eachAsyncObject( + source, + async (item, key, original, propertyCount, objectKeys) => { + if ( + (await iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + )) === true + ) { + results[key] = item; + } + }, + ); + return results; + } + + /** + * Creates an inverted version of a given object by switching it's keys and values. + * + * @function invert + * @type {Function} + * @category object + * @param {Object} source - Object to be inverted. + * @param {Array} [target = {}] - Empty object to be populated with inverted values from source. + * @returns {Object|undefined} - Returns object with keys and values switched. + * + * @example + * import { invert, assert } from '@universalweb/acid'; + * assert(invert({a:1}), {1:'a'}); + */ + function invert(source, target = {}) { + if (!source) { + return; + } + eachObject(source, (item, key) => { + target[item] = key; + }); + return target; + } + + /** + * Performs a shallow strict comparison between two objects. + * + * @function isMatchObject + * @type {Function} + * @category object + * @param {Object} source - Source object. + * @param {Object} target - Object to compare to source. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { assert, isMatchObject } from '@universalweb/acid'; + * assert(isMatchObject({a: 1}, {a: 1}), true); + */ + const isMatchObject = (source, target) => { + if (source === target) { + return true; + } + const sourceKeys = keys(source); + const targetKeys = keys(target); + if (sourceKeys.length === targetKeys.length) { + return everyArray(sourceKeys, (key) => { + return source[key] === target[key]; + }); + } + return false; + }; + + /** + * Returns a regex safe special characters escaped version of a string. + * + * @function regexSafe + * @category regex + * @type {Function} + * @param {Object} source - String to make safe. + * @returns {Object} - Returns a regex safe version of the string. + * + * @example + * import { regexSafe, assert } from '@universalweb/acid'; + * assert(regexSafe(/.+/), '\/\.\+\/'); + */ + const escapeRegexRegex = /[()[\]{}*+?^$|#.,/\\\s-]/g; + function escapeRegex(source) { + return source.replace(escapeRegexRegex, "\\$&"); + } + + /** + * Convert array of strings to regex. + * + * @function arrayToRegex + * @category regex + * @type {Function} + * @param {Object} source - Array of strings. + * @returns {Object} - Returns a regex safe version of the string. + * + * @example + * import { arrayToRegex, assert } from '@universalweb/acid'; + * assert(String(arrayToRegex(['a','b'])), String(/a|b/)); + */ + function arrayToRegex(source, makeSafe) { + if (makeSafe) { + return arrayToRegex(mapArray(source, escapeRegex)); + } + return RegExp(source.join("|")); + } + + /** + * Checks if the value is a RegExp. + * + * @function isRegex + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isRegex, assert } from '@universalweb/acid'; + * assert(isRegex(/test/), true); + */ + const isRegexCall = isConstructorNameFactory("RegExp"); + const isRegex = isTypeFactory(isRegexCall); + + /** + * Returns a clone of the given object without the given properties. + * + * @function omit + * @category object + * @type {Function} + * @param {Object} source - Object from which keys are extracted. + * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object. + * @returns {Object|undefined} - A new object with the removed. + * + * @example + * import { omit, assert } from '@universalweb/acid'; + * assert(omit({a:1, b:2}, ['a']), {b:2}); + * assert(omit({a:1, b:2}, 'a'), {b:2}); + * assert(omit({1:'test', b:2}, 1), {b:2}); + */ + function omit(source, blacklist) { + if (!source) { + return {}; + } + if (isArray(blacklist)) { + const blacklistRegex = arrayToRegex(blacklist); + return filterObject(source, (item, key) => { + return !blacklistRegex.test(key); + }); + } + if (isRegex(blacklist)) { + return filterObject(source, (item, key) => { + return !blacklist.test(key); + }); + } + if (isString(blacklist)) { + return filterObject(source, (item, key) => { + return key !== blacklist; + }); + } + if (isNumber(blacklist)) { + const numberToString = blacklist.toString(); + return filterObject(source, (item, key) => { + return key !== numberToString; + }); + } + if (isFunction(blacklist)) { + return filterObject(source, (item, key) => { + return !blacklist(item, key); + }); + } + return objectAssign({}, source); + } + + /** + * Returns a clone of the source object with the plucked properties. + * + * @function pick + * @type {Function} + * @category object + * @param {Object} source - Object to be cloned. + * @param {Array} whitelist - Array of property names used to determine what values to pluck. + * @param {Object} [target = {}] - Object to be populated with plucked values. + * @returns {Object|undefined} - A new object with plucked properties. + * + * @example + * import { pick, assert } from '@universalweb/acid'; + * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2}); + */ + const pick = (source, whitelist, target = {}) => { + if (!source) { + return; + } + eachArray(whitelist, (item) => { + target[item] = source[item]; + }); + return target; + }; + + /** + * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object. + * + * @function objectSize + * @category object + * @param {Object} source - The source object. + * @returns {Number|undefined} - The amount of keys. + * + * @example + * import { objectSize, assert } from '@universalweb/acid'; + * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3); + */ + function objectSize(source) { + if (!source) { + return; + } + if (isPlainObject(source)) { + return keys(source).length; + } + const objectLengthProperty = source.length; + if (hasValue(objectLengthProperty)) { + return objectLengthProperty; + } + const objectSizeProperty = source.size; + if (hasValue(objectLengthProperty)) { + return objectSizeProperty; + } + return keys(source).length; + } + + /** + * Creates an object from two arrays, one of property identifiers and one of corresponding values. + * + * @function zipObject + * @type {Function} + * @category object + * @param {Array} properties - The property identifiers. + * @param {Array} values - The property values. + * @returns {Object} - Returns the new object. + * + * @example + * zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + const zipObject = (properties, values) => { + const source = {}; + eachArray(properties, (item, key) => { + source[item] = values[key]; + }); + return source; + }; + /** + * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. + * + * @function unZipObject + * @type {Function} + * @category object + * @param {Object} object - The object to process. + * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array. + * + * @example + * unZipObject({ 'a': 1, 'b': 2 }); + * // => [['a', 'b'], [1, 2]] + */ + const unZipObject = (object) => { + const objectKeys = []; + const objectValues = []; + eachObject(object, (item, key) => { + objectKeys.push(key); + objectValues.push(item); + }); + return [objectKeys, objectValues]; + }; + + const normalizeCase$4 = /[ _-]+/g; + /** + * Converts a string into Camel case format. + * + * @function camelCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into Camel case. + * @returns {String} - Converted string in Camel case. + * + * @example + * import { camelCase, assert } from '@universalweb/acid'; + * assert(camelCase('camel case'), 'camelCase'); + */ + function camelCase(source) { + let result = ""; + source + .replace(normalizeCase$4, " ") + .trim() + .split(" ") + .forEach((item, index) => { + if (index === 0) { + result += item.toLowerCase(); + } else { + result += item[0].toUpperCase() + item.slice(1).toLowerCase(); + } + }); + return result; + } + + const normalizeCase$3 = /[ _-]+/g; + const space$1 = /[ ]+/g; + /** + * Converts a string into single space sepperated words in Kebab case. + * + * @function kebabCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into Kebab case. + * @returns {String} - Converted string in Kebab case. + * + * @example + * import { kebabCase, assert } from '@universalweb/acid'; + * assert(kebabCase('kebab case'), 'kebab-case'); + */ + function kebabCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase$3, " ") + .trim() + .toLowerCase() + .replace(space$1, "-"); + } + + const normalizeCase$2 = /[ _-]+/g; + const space = /[ ]+/g; + /** + * Converts a string into single space sepperated words in snake case. + * + * @function snakeCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into snake case. + * @returns {String} - Converted string in Snake case. + * + * @example + * import { snakeCase, assert } from '@universalweb/acid'; + * assert(snakeCase('snake case'), 'snake_case'); + */ + function snakeCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase$2, " ") + .trim() + .toLowerCase() + .replace(space, "_"); + } + + const normalizeCase$1 = /[ _-]+/g; + /** + * Converts a string into single space sepperated words in uppercase. + * + * @function upperCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into upper case. + * @returns {String} - Converted string in upper case. + * + * @example + * import { upperCase, assert } from '@universalweb/acid'; + * assert(upperCase('upper-case'), 'UPPER CASE'); + * assert(upperCase('upper_case'), 'UPPER CASE'); + */ + function upperCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase$1, " ") + .trim() + .toUpperCase(); + } + + const normalizeCase = /[ _-]+/g; + /** + * Converts a string into single space sepperated words in lowerCase. + * + * @function lowerCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into upper case. + * @returns {String} - Converted string in upper case. + * + * @example + * import { lowerCase, assert } from '@universalweb/acid'; + * assert(lowerCase('lower-CASE'), 'lower case'); + */ + function lowerCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase, " ") + .trim() + .toLowerCase(); + } + + /** + * Inserts text into a string at a given position. + * + * @function insertInRange + * @category string + * @type {Function} + * @param {String} string - String to insert the text into. + * @param {Number} index - Point of insertion. + * @param {String} text - The string to be inserted. + * @returns {String} - The string with the text inserted at the given point. + * + * @example + * import { insertInRange, assert } from '@universalweb/acid'; + * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.'); + */ + function insertInRange(string, index, text) { + return string.slice(0, index) + text + string.slice(index, string.length); + } + /** + * Plucks a letter using the index starting from the right. + * + * @function rightString + * @category string + * @type {Function} + * @param {String} string - String to extract the letter from. + * @param {Number} [index=1] - The starting position. + * @returns {String} - A letter at the given index. + * + * @example + * import { rightString, assert } from '@universalweb/acid'; + * assert(rightString('rightString'), 'g'); + * assert(rightString('rightString', 2), 'n'); + */ + function rightString(string, index = 1) { + return string[string.length - index]; + } + /** + * Splits up a string into chunks. + * + * @function chunkString + * @category string + * @type {Function} + * @param {String} string - String to chunked. + * @param {Number} [size] - The max string length per chunk. + * @returns {Array} - An array with strings that are <= size parameter. + * + * @example + * import { chunkString, assert } from '@universalweb/acid'; + * assert(chunkString('chunk', 2), ['ch', 'un', 'k']); + */ + function chunkString(string, size) { + return string.match(new RegExp(`(.|[\r\n]){1,${size}}`, "g")); + } + /** + * Truncates everything before the index starting from the right. + * + * @function initialString + * @category string + * @type {Function} + * @param {String} string - String to extract the initial letters from. + * @param {Number} [index=1] - Starting point from the right. + * @returns {String} - A string with the characters before the index starting from the right. + * + * @example + * import { initialString, assert } from '@universalweb/acid'; + * assert(initialString('initialString', 2), 'initialStri'); + */ + function initialString(string, index = 1) { + return string.slice(0, index * -1); + } + /** + * Truncates everything after a index. + * + * @function restString + * @category string + * @type {Function} + * @param {String} string - String to extract the rest of the letters from. + * @param {Number} [index=1] - Starting point. + * @returns {String} - A string without the characters up-to to the index. + * + * @example + * import { restString, assert } from '@universalweb/acid'; + * assert(restString('restString', 2), 'stString'); + */ + function restString(string, index = 1) { + return string.substring(index); + } + + /** + * Replaces all occurrences of strings in an array with a value. + * + * @function replaceList + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @param {Array} words - Strings to replace. + * @param {String} value - The match replacement. + * @returns {String} - The string with the replacement. + * + * @example + * import { replaceList, assert } from '@universalweb/acid'; + * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.'); + */ + function replaceList(string, words, value) { + return string.replace(new RegExp(`\\b${words.join("|")}\\b`, "gi"), value); + } + + const rawURLDecodeRegex = /%(?![\da-f]{2})/gi; + const andRegex = /&/g; + const lessThanRegex = //g; + const doubleQuoteRegex = /"/g; + /** + * Raw URL decoder. + * + * @function rawURLDecode + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @returns {String} - Converted string into the decoded URI Component . + * + * @example + * import { rawURLDecode, assert } from '@universalweb/acid'; + * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.'); + */ + function rawURLDecode(string) { + return decodeURIComponent( + string.replace(rawURLDecodeRegex, () => { + return "%25"; + }), + ); + } + /** + * Replaced sensitive characters with their matching html entity. + * + * @function htmlEntities + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @returns {String} - Replaced string. + * + * @example + * import { htmlEntities, assert } from '@universalweb/acid'; + * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`); + */ + function htmlEntities(string) { + return string + .replace(andRegex, "&") + .replace(lessThanRegex, "<") + .replace(moreThanRegex, ">") + .replace(doubleQuoteRegex, """); + } + /** + * Executes rawURLDecode followd by htmlEntities methods on a string. + * + * @function sanitize + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @returns {String} - Replaced string. + * + * @example + * import { sanitize, assert } from '@universalweb/acid'; + * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`); + */ + function sanitize(string) { + return htmlEntities(rawURLDecode(string)); + } + + const tokenizeRegEx = /\S+/g; + const wordsRegEx = /\w+/g; + /** + * Break string by non-white space characters matches. + * + * @function tokenize + * @type {Function} + * @category string + * @param {String} string - String to be broken up. + * @returns {Array} - Array of words without white space characters. + * + * @example + * import { tokenize, assert } from '@universalweb/acid'; + * assert(tokenize('I am Lucy!'), ["I", "am", "Acid!"]); + */ + function tokenize(string) { + return string.match(tokenizeRegEx) || []; + } + /** + * Break string into word matches. + * + * @function words + * @type {Function} + * @param {String} string - String to be broken up. + * @returns {Array} - Array of words with word characters only. + * + * @example + * import { words, assert } from '@universalweb/acid'; + * assert(words('I am Acid!'), ["I", "am", "Acid"]); + */ + function words(string) { + return string.match(wordsRegEx) || []; + } + + const truncateDown = (string, maxLength, stringLength) => { + const breakAll = string.split(""); + const breakAllLength = breakAll.length; + let item; + let index = stringLength - maxLength; + for (; index < breakAllLength && index >= 0; index--) { + item = breakAll[index]; + if (item === " ") { + break; + } + } + return string.slice(0, index).trim(); + }; + const truncateUp = (string, maxLength, stringLength) => { + const breakAll = string.split(""); + const breakAllLength = breakAll.length; + let item; + let index = maxLength; + for (; index < breakAllLength && index > 0; index++) { + item = breakAll[index]; + if (item === " ") { + break; + } + } + return string.substring(index, stringLength).trim(); + }; + /** + * Truncates the string, accounting for word placement and character count. + * + * @function truncate + * @type {Function} + * @category string + * @param {String} string - String to be truncated. + * @param {Number} maxLength - The desired max length of the string. + * @returns {String} - The mutated string. + * + * @example + * import { truncate, assert } from '@universalweb/acid'; + * assert(truncate('Where is Lucy?', 2), 'Where is'); + */ + function truncate(string, maxLength) { + const stringLength = string.length; + return stringLength > maxLength + ? truncateDown(string, maxLength, stringLength) + : string; + } + /** + * Truncates the string, accounting for word placement and character count from the right. + * + * @function truncateRight + * @type {Function} + * @category string + * @param {String} string - String to be truncated. + * @param {Number} maxLength - The desired max length of the string. + * @returns {String} - The mutated string. + * + * @example + * import { truncateRight, assert } from '@universalweb/acid'; + * assert(truncateRight('Where is Lucy?', 6), 'Lucy?'); + */ + function truncateRight(string, maxLength) { + const stringLength = string.length; + return stringLength > maxLength + ? truncateUp(string, maxLength, stringLength) + : string; + } + + const getWords = /\w+/g; + /** + * Returns the first letter capitalized. + * + * @function upperFirstLetter + * @type {Function} + * @category string + * @param {String} string - String to extract first letter from. + * @returns {String} - An upper case letter. + * + * @example + * import { upperFirstLetter, assert } from '@universalweb/acid'; + * assert(upperFirstLetter('upper'), 'U'); + */ + function upperFirstLetter(string) { + return string[0].toUpperCase(); + } + /** + * Capitalizes the first letter. + * + * @function upperFirst + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with first letter capitalized. + * + * @example + * import { upperFirst, assert } from '@universalweb/acid'; + * assert(upperFirstLetter('upper'), 'U'); + * upperFirst('upper'); + * // => 'Upper' + */ + function upperFirst(string) { + return upperFirstLetter(string) + restString(string); + } + /** + * Capitalize first letter and lower case the rest. + * + * @function upperFirstOnly + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with first letter capitalized. + * + * @example + * import { upperFirstOnly, assert } from '@universalweb/acid'; + * assert(upperFirstOnly('upper'), 'Upper'); + */ + function upperFirstOnly(string) { + return upperFirstLetter(string) + restString(string).toLowerCase(); + } + /** + * Capitalize all first letters. + * + * @function upperFirstAll + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with all first letters capitalized. + * + * @example + * import { upperFirstAll, assert } from '@universalweb/acid'; + * assert(upperFirstAll('uPPer'), 'UPPer'); + */ + function upperFirstAll(string) { + return string.replace(getWords, (match) => { + return upperFirst(match); + }); + } + /** + * Capitalize all first letters and lower case the rest. + * + * @function upperFirstOnlyAll + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with all first letters capitalized. + * + * @example + * import { upperFirstOnlyAll, assert } from '@universalweb/acid'; + * assert(upperFirstOnlyAll('this is'), 'This Is'); + */ + function upperFirstOnlyAll(string) { + return string.replace(getWords, (match) => { + return upperFirstOnly(match); + }); + } + + /** + * Returns the constructor name of an object. + * + * @function getTypeName + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { getTypeName, assert } from '@universalweb/acid'; + * assert(getTypeName(1), true); + */ + function getTypeName(source) { + return getType(source)?.name; + } + + /** + * Checks if the value is an Arguments object. + * + * @function isArguments + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArguments, assert } from '@universalweb/acid'; + * assert(isArguments((function() { return arguments;})()), true); + * assert(isArguments([]), false); + */ + const objectArguments = "[object Arguments]"; + function isArguments(source) { + return hasValue(source) ? source.toString() === objectArguments : false; + } + + /** + * Checks if an object or objects are a Map. + * + * @function isMap + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isMap } from '@universalweb/acid'; + * isMap(new Map()); + * // => true + */ + const isMapCall = isConstructorNameFactory("Map"); + const isMap = isTypeFactory(isMapCall); + + /** + * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer. + * + * @function isTypedArray + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isTypedArray, assert } from '@universalweb/acid'; + * assert(isTypedArray([]), false); + * assert(isTypedArray(new Int8Array()), true); + */ + const typedArrayRegex = /Array/; + const arrayConstructorName = "Array"; + function isTypedArray(source) { + if (source) { + const constructorName = getTypeName(source); + if ( + typedArrayRegex.test(constructorName) && + constructorName !== arrayConstructorName + ) { + return true; + } + } + return false; + } + + /** + * Checks if an object is null or undefined. + * + * @function noValue + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { noValue, assert } from '@universalweb/acid'; + * assert(noValue(null), true); + * assert(noValue(undefined), true); + * assert(noValue(1), false); + * assert(noValue(0), false); + */ + function noValue(source) { + return !hasValue(source); + } + + /** + * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property. + * + * @function isArrayLike + * @category type + * @param {*} source - Object to be checked. + * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArrayLike, assert } from '@universalweb/acid'; + * assert(isArrayLike([]), true); + * assert(isArrayLike(2), false); + */ + function isArrayLike(source, strictFlag) { + if (noValue(source) || isFunction(source)) { + return false; + } + if (isArray(source) || isTypedArray(source)) { + return true; + } + const sourceLength = source.length; + if (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) { + return false; + } + if (strictFlag) { + const indexes = keys(source); + if (indexes) { + return every(indexes, (value, index) => { + return index >= 0 && isNumber(index); + }); + } + return false; + } + return true; + } + + /** + * Checks if an object or objects are a BigInt. + * + * @function isBigInt + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isBigInt, assert } from '@universalweb/acid'; + * assert(isBigInt(BigInt(123)), true); + */ + const isBigIntCall = isConstructorNameFactory("BigInt"); + const isBigInt = isTypeFactory(isBigIntCall); + + /** + * Checks if the value is a Boolean. + * + * @function isBoolean + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isBoolean } from '@universalweb/acid'; + * isBoolean(true); + * // => true + */ + const isBooleanCall = isConstructorNameFactory("Boolean"); + const isBoolean = isTypeFactory(isBooleanCall); + + /** + * Checks if an object or objects are a ArrayBuffer. + * + * @function isArrayBuffer + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArrayBuffer, assert } from '@universalweb/acid'; + * assert(isArrayBuffer(new ArrayBuffer()), true); + */ + const isArrayBufferCall = isConstructorNameFactory("ArrayBuffer"); + const isArrayBuffer = isTypeFactory(isArrayBufferCall); + + /** + * Checks if an object is the child of another. Typically used for classes. + * + * @function isChild + * @category type + * @param {*} sourceChild - Object to be checked as the child. + * @param {*} targetParent - Object to be checked as the parent. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isChild, construct, assert } from '@universalweb/acid'; + * class Grandparent{} + * class Parent extends Grandparent{} + * class Child extends Parent{} + * const child = construct(Child); + * assert(isChild(Child, Grandparent), true); + * assert(isChild(Child, Parent), false); + * assert(isChild(Parent, Grandparent), false); + * assert(isChild(child1, child3), false); + */ + function isChild(sourceChild, targetParent) { + if (!sourceChild || !targetParent) { + return false; + } + return sourceChild instanceof targetParent; + } + + /** + * Checks if an object or objects are a structured-cloneable type. + * + * @function isCloneable + * @category type + * @param {...*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isCloneable, assert } from '@universalweb/acid'; + * assert(isCloneable(function (){}), false); + */ + const constructorNames = RegExp( + "Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError", + ); + function isCloneable(source) { + if (hasValue(source)) { + const constructorName = source?.constructor?.name; + return constructorNames.test(constructorName); + } + return false; + } + + /** + * Checks if the value is a Date. + * + * @function isDate + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isDate, assert } from '@universalweb/acid'; + * assert(isDate(new Date()), true); + */ + const isDateCall = isConstructorNameFactory("Date"); + const isDate = isTypeFactory(isDateCall); + + /** + * Checks if the value is empty. + * + * @function isEmpty + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEmpty, assert } from '@universalweb/acid'; + * assert(isEmpty([]), true); + */ + function isEmpty(source) { + if (isString(source) || isArray(source)) { + return !hasLength(source); + } else if (isPlainObject(source)) { + return !objectSize(source); + } + return !hasValue(source); + } + + /** + * Check if a value equals false using strict comparison. + * + * @function isFalse + * @category Utility + * @type {Function} + * @param {Boolean} source - Item to compare. + * @returns {Boolean} - Returns true if the item equals false. + * + * @example + * import { isFalse, assert } from '@universalweb/acid'; + * assert(isFalse(1), false); + * assert(isFalse(true), false); + * assert(isFalse(false), true); + */ + function isFalse(source) { + return source === false; + } + + /** + * Checks if an object or objects are a Float32Array. + * + * @function isF32 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isF32, assert } from '@universalweb/acid'; + * assert(isF32(new Float32Array()), true); + */ + const isF32Call = isConstructorNameFactory("Float32Array"); + const isF32 = isTypeFactory(isF32Call); + + /** + * Checks if an object or objects are a Float64Array. + * + * @function isF64 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isF64 } from '@universalweb/acid'; + * isF64(new Float64Array()); + * // => true + */ + const isF64Call = isConstructorNameFactory("Float64Array"); + const isF64 = isTypeFactory(isF64Call); + + const { isInteger } = Number; + /** + * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. + * + * @function isFloat + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFloat } from '@universalweb/acid'; + * isFloat(1.01); + * // => true + */ + const isFloat = isInteger; + + /** + * Checks if an object or objects are a Int16Array. + * + * @function isI16 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isI16 } from '@universalweb/acid'; + * isI16(new Int16Array()); + * // => true + */ + const isI16Call = isConstructorNameFactory("Int16Array"); + const isI16 = isTypeFactory(isI16Call); + + /** + * Checks if an object or objects are a Int32Array. + * + * @function isI32 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isI32, assert } from '@universalweb/acid'; + * assert(isI32(new Int32Array()), true); + */ + const isI32Call = isConstructorNameFactory("Int32Array"); + const isI32 = isTypeFactory(isI32Call); + + /** + * Checks if an object or objects are a Int8Array. + * + * @function isI8 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isInt8 } from '@universalweb/acid'; + * isInt8(new Int8Array()); + * // => true + */ + const isI8Call = isConstructorNameFactory("Int8Array"); + const isI8 = isTypeFactory(isI8Call); + + /** + * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments. + * + * @function isIterable + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isIterable, assert } from '@universalweb/acid'; + * assert(isIterable([]), true); + * assert(isIterable(new Int8Array()), true); + * assert(isIterable('test'), false); + */ + function isIterable(source) { + return hasValue(source) && typeof source[Symbol.iterator] === "function"; + } + + /** + * Checks if an object is a promise. + * + * @function isPromise + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isPromise } from '@universalweb/acid'; + * isPromise(new Promise(() => {})); + * // => true + */ + function isPromise(source) { + if (source) { + return source instanceof Promise; + } + return false; + } + + /** + * Checks if an object is a kind of async object such as async function, promise, or generator. + * + * @function isKindAsync + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isKindAsync, assert } from '@universalweb/acid'; + * assert(isKindAsync(async() => {}), true); + */ + function isKindAsync(source) { + if (source) { + return isPromise(source) || isAsync(source) || isGenerator(source); + } + return false; + } + + /** + * Checks if an object is the child of another. Typically used for classes. + * + * @function isParent + * @category type + * @param {*} sourceParent - Object to be checked as the child. + * @param {*} targetChild - Object to be checked as the parent. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isParent, construct, assert } from '@universalweb/acid'; + * class parentClass{} + * class otherClass{} + * const child1 = construct(parentClass); + * const child2 = construct(otherClass); + * assert(isParent(child1, parentClass), true); + * assert(isParent(child3, parentClass), false); + * assert(isParent(parentClass, child1), false); + * assert(isParent(child1, child3), false); + */ + function isParent(sourceParent, targetChild) { + if (!sourceParent || !targetChild || !targetChild.call) { + return false; + } + return sourceParent instanceof targetChild; + } + + /** + * Checks if an object is a primitive. + * + * @function isPrimitive + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isPrimitive, assert } from '@universalweb/acid'; + * assert(isPrimitive(1), true); + * assert(isPrimitive(() => {}), false); + */ + function isPrimitive(source) { + const type = typeof value; + return ( + source === null || + source === undefined || + (type !== "object" && type !== "function") + ); + } + + /** + * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways. + * + * @function isRelated + * @category type + * @param {*} targetOne - Object to be checked. + * @param {*} targetTwo - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isRelated, construct, assert } from '@universalweb/acid'; + * class parentClass{} + * class otherClass{} + * const child1 = construct(parentClass); + * const child2 = construct(parentClass); + * const child3 = construct(otherClass); + * assert(isRelated(child1, child2), true); + * assert(isRelated(child1, parentClass), true); + * assert(isRelated(parentClass, child2), true); + * assert(isRelated(child1, child3), false); + */ + function isRelated(targetOne, targetTwo) { + if (noValue(targetOne) || noValue(targetTwo)) { + return false; + } + if (targetOne.call) { + return targetTwo instanceof targetOne; + } + if (targetTwo.call) { + return targetOne instanceof targetTwo; + } + return targetTwo.constructor === targetOne.constructor; + } + + const { isSafeInteger } = Number; + /** + * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. + * + * @function isSafeInt + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isSafeInt } from '@universalweb/acid'; + * isSafeInt(1.01); + * // => true + */ + const isSafeInt = isSafeInteger; + + function isSameType(source, other) { + const sourceType = getType(source); + const otherType = getType(other); + if (sourceType === otherType) { + if (sourceType.name === otherType.name) { + return true; + } + } + return false; + } + + /** + * Check if a value equals true using strict comparison. + * + * @function isTrue + * @category Utility + * @type {Function} + * @param {Boolean} source - Item to check. + * @returns {Boolean} - Returns true if the item is true. + * + * @example + * import { isTrue, assert } from '@universalweb/acid'; + * assert(isTrue(1), false); + * assert(isTrue(true), true); + * assert(isTrue(false), false); + */ + function isTrue(source) { + return source === true; + } + + /** + * Checks if an object or objects are a Uint16Array. + * + * @function isU16 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU16 } from '@universalweb/acid'; + * isU16(new Uint16Array()); + * // => true + */ + const isU16Call = isConstructorNameFactory("Uint16Array"); + const isU16 = isTypeFactory(isU16Call); + + /** + * Checks if an object or objects are a Uint32Array. + * + * @function isU32 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU32 } from '@universalweb/acid'; + * isU32(new Uint32Array()); + * // => true + */ + const isU32Call = isConstructorNameFactory("Uint32Array"); + const isU32 = isTypeFactory(isU32Call); + + /** + * Checks if an object or objects are a Uint8Array. + * + * @function isU8 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU8 } from '@universalweb/acid'; + * isU8(new Uint8Array()); + * // => true + */ + const isU8Call = isConstructorNameFactory("Uint8Array"); + const isU8 = isTypeFactory(isU8Call); + + /** + * Checks if an object or objects are a Uint8ClampedArray. + * + * @function isU8C + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU8C } from '@universalweb/acid'; + * isU8C(new Uint8ClampedArray()); + * // => true + */ + const isU8CCall = isConstructorNameFactory("Uint8ClampedArray"); + const isU8C = isTypeFactory(isU8CCall); + + /** + * Checks if an object or objects are a WeakMap. + * + * @function isWeakMap + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isWeakMap } from '@universalweb/acid'; + * assert(isWeakMap(new WeakMap()), true); + */ + const isWeakMapCall = isConstructorNameFactory("WeakMap"); + const isWeakMap = isTypeFactory(isWeakMapCall); + + const isDeno = typeof globalThis.Deno !== "undefined"; + + const isNodejs = + typeof globalThis.process !== "undefined" && + process.versions && + process.versions.node; + + /** + * Check if a value is isTruthy which is anything but false, null, 0, "", undefined, and NaN. + * + * @function isTruthy + * @category type + * @type {Function} + * @param {*} source - Item to be isTruthy checked. + * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy. + * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false. + * + * @example + * import { isTruthy, assert } from '@universalweb/acid'; + * assert(isTruthy(1), true); + * assert(isTruthy(0), false); + */ + function isTruthy(source, returnIfTrue = true) { + return Boolean(source) && returnIfTrue; + } + + /** + * Check if a value is isFalsy which are false, null, 0, "", undefined, and NaN. + * + * @function isFalsy + * @category type + * @type {Function} + * @param {*} source - Item to be isFalsy checked. + * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy. + * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false. + * + * @example + * import { isFalsy, assert } from '@universalweb/acid'; + * assert(isFalsy(0), true); + * assert(isFalsy(1), false); + */ + function isFalsy(source, returnIfTrue = true) { + return Boolean(source) === false && returnIfTrue; + } + + /** + * If source has a value then assign it to an object or call a function. + * + * @function ifValue + * @category utility + * @param {*} source - The source object to be hasValue checked. + * @param {Function|Object} target - The target which is either a function or object. + * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target). + * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function. + * @returns {source|undefined} The source object if it passes the hasValue check. + * + * @example + * import { ifValue, assert } from '@universalweb/acid'; + * assert(ifValue(1, {}, 'a'), {a:1}); + */ + function ifValue(source, target, optional, args) { + if (hasValue(source)) { + if (isFunction(target)) { + if (optional) { + return apply(target, optional, args); + } + return target(...args); + } else if (isPlainObject(target)) { + target[optional] = source; + return target; + } + } + } + + /** + * Performs a deep comparison between two objects & determines if they're different using strict comparison. + * + * @function notEqual + * @type {Function} + * @category utility + * @param {*} source - Source object. + * @param {*} target - Object to be compared. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { notEqual, assert } from '@universalweb/acid'; + * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true); + */ + function notEqual(source, target) { + return isFalse(isEqual(source, target)); + } + + const jsonNative = JSON; + /** + * Parses JSON string with safety check for undefined. + * + * @function jsonParse + * @category utility + * @type {Function} + * @param {String} source - String to be parsed. + * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned. + * @returns {Object|undefined} - Returns the parsed object. + * + * @example + * import { jsonParse, assert } from '@universalweb/acid'; + * assert(jsonParse('{a:1}'), {a:1}); + */ + function jsonParse(source, reviver) { + if (source) { + return jsonNative.parse(source, reviver); + } + } + /** + * Stringify an object into a JSON string. + * + * @function stringify + * @category utility + * @type {Function} + * @param {Object} object - Object to Stringify. + * @returns {String} - Returns the object as a valid JSON string. + * + * @example + * import { stringify, assert } from '@universalweb/acid'; + * assert(stringify({a:1}), '{a:1}'); + */ + const stringify = jsonNative.stringify; + + function createAssertError(source, expected, localOptions) { + const options = globalThis.options || localOptions; + let errorTitle; + if (isFunction(options)) { + errorTitle = `${options.name} : ${options.constructor.name}`; + } else if (options) { + errorTitle = `${options.title || options.method.name} -> ${options.file}`; + } + return new Error( + `Test Failed: ${errorTitle} Result: ${stringify(source)} Expected: ${stringify(expected)}`, - options - ); - } - async function assertAsync(sourceArg, expected, options) { - const source = await sourceArg; - const expectedFunction = isFunction(expected) && (await expected(source, options)) === false; - if (expectedFunction || notEqual(source, expected)) { - return createAssertError(source, expected, options); - } - return true; - } - /** - * Check if source value matches the expected value. - * - * @function assert - * @category utility - * @type {Function} - * @param {*} source - The source object to compare to. - * @param {*} expected - The expected result that's compared to the source. - * @param {*} options - Additional options for the Error instance & unit test information. - * @returns {Object} - Returns a deep clone of an object. - * - * @example - * import { assert } from '@universalweb/acid'; - * if (!assert(1,1)) { - * new Error('Assert Method Failed'); - * } - */ - function assert(source, expected, options) { - if (isKindAsync(source) || isKindAsync(expected)) { - return assertAsync(source, expected, options); - } - const expectedFunction = isFunction(expected) && expected(source, options) === false; - if (expectedFunction || notEqual(source, expected)) { - return createAssertError(source, expected, options); - } - return true; - } - - /** - * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to. - * - * @function bindAll - * @category utility - * @type {Function} - * @param {Object|Function|Array} collection - The functions to bind. - * @param {*} bindThis - Object to be bound to functions. - * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to. - * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided. - * - * @example - * import { assert, bindAll } from '@universalweb/acid'; - * const bounded = bindAll([function () { return this;}], 'Bounded'); - * assert(bounded[0](), 'Bounded'); - */ - function bindAll(collection, bindThis, targetAssign) { - const results = map(collection, (item) => { - return isFunction(item) ? item.bind(bindThis) : item; - }); - return targetAssign ? assign(targetAssign, results) : results; - } - - /** - * Clears the values out of an array, buffer, and objects like Map that have a clear method. - * - * @function clear - * @category utility - * @type {Function} - * @param {Array} source - Takes an array to be emptied. - * @returns {Array} - The originally given array. - * - * @example - * import { clear, assert } from '@universalweb/acid'; - * assert(clear(Buffer.from([1,'B', 'Cat'])), []); - */ - function clear(source) { - if (source) { - if (isBuffer(source)) { - return clearBuffer(source); - } else if (isArray(source)) { - return clearArray(source); - } else if (source.clear) { - source.clear(); - } else if (source.length) { - source.length = 0; - } - } - return source; - } - - /** - * Creates a structured clone of an object which is a "structured-cloneable type". - * - * @function clone - * @category utility - * @type {Function} - * @param {Object} source - Any structured-cloneable type object. - * @returns {Object} - Returns a deep clone of an object. - * - * @example - * import { clone, assert } from '@universalweb/acid'; - * assert(clone({a:{b:[2]}}), {a:{b:[2]}}); - */ - const structuredCloneSafe = globalThis.structuredClone; - function clone(source) { - return structuredCloneSafe(source); - } - - /** - * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next. - * - * @function concurrent - * @type {Function} - * @category Utility - * @async - * @param {Array} source - Array of async functions that will be looped through. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. - * @returns {Object} - The originally given array. - * - * @example - * import { concurrent, assert } from '@universalweb/acid'; - * const list = []; - * await concurrent([async (item) => { - * return item; - * }, async (item) => { - * return item; - * }], null, 1); - * assert(list, [1, 1]); - */ - async function concurrent(source, thisBind, ...args) { - const arrayLength = source.length; - const results = []; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = source[index].call(thisBind, ...args, index, results, callable); - } - } else { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = source[index](...args, index, results, callable); - } - } - return Promise.all(results); - } - - /** - * Creates an array with all isFalsy values removed. The values false, null, 0, "", undefined, and NaN are isFalsy. - * - * @function compact - * @category Utility - * @type {Function} - * @param {Array|Object} source - Array or Object to be compacted. - * @returns {Array|Object} - A new object or array containing the filtered values. - * - * @example - * import { compact, assert } from '@universalweb/acid'; - * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']); - */ - function compact(source) { - if (isPlainObject(source)) { - const sourceKeys = keys(source); - const sourceKeysLength = sourceKeys.length; - const targetObject = {}; - for (let i = 0; i < sourceKeysLength; i++) { - const keyName = sourceKeys[i]; - const item = source[keyName]; - const isisTruthy = isTruthy(item); - if (isisTruthy) { - targetObject[keyName] = item; - } - } - return targetObject; - } - return source.filter((item) => { - return isTruthy(item); - }); - } - - /** - * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function forOfCompactMapAsync - * @category utility - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * import { assert,forOfCompactMapAsync } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = await forOfCompactMapAsync(source, async (item) => { - * return item; - * }); - * assert(temp, {b: 2, c: 3}); - */ - async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) { - if (isGenerator(source)) { - const resultsGenerator = []; - for await (const item of source(...generatorArgs)) { - const result = await iteratee(item, resultsGenerator, source); - if (hasValue(result)) { - resultsGenerator.push(result); - } - } - return resultsGenerator; - } - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = await iteratee(value, results, source); - if (hasValue(result)) { - methodPushBound(result); - } - } - return results; - } - const methodSet = isFunction(results.set); - for await (const [key, value] of source) { - const result = await iteratee(value, key, results, source); - if (hasValue(result)) { - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - } - return results; - } - - /** - * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function forOfCompactMap - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * import { assert,forOfCompactMap } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = forOfCompactMap(source, (item) => { - * return item; - * }); - * assert(temp, {b: 2, c: 3}); - */ - function forOfCompactMap(source, iteratee = returnValue, resultsObject) { - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = iteratee(value, results, source); - if (hasValue(result)) { - methodPushBound(result); - } - } - return results; - } - const methodSet = isFunction(results.set); - for (const [key, value] of source) { - const result = iteratee(value, key, results, source); - if (hasValue(result)) { - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - } - return results; - } - - /** - * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function compactMap - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {Object | Function} [results = {}] - Object that will be used to assign results. - * @returns {Array | object | Function} - A new object of the same calling object's type. - * - * @example - * import { compactMap, assert } from '@universalweb/acid'; - * assert(compactMap({a: null, b: 2, c: 3}, (item) => { - * return item; - * }), {b: 2, c: 3}); - */ - const compactMap = generateLoop( - compactMapArray, - compactMapAsyncArray, - compactMapObject, - compactMapAsyncObject, - forOfCompactMap, - forOfCompactMapAsync - ); - - function everyArg(...methods) { - if (isAsync(methods[0])) { - return async function (...args) { - return every(methods, async (method) => { - return every(args, async (item) => { - return method(item); - }); - }); - }; - } - return function (...args) { - return every(methods, (method) => { - return every(args, (item) => { - return method(item); - }); - }); - }; - } - - /** - * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. - * - * @function forOfFilter - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. - * - * @example - * import { assert, forOfFilter } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = forOfFilter(source, (item) => { - * return Boolean(item); - * }); - * assert(temp, {b: 2, c: 3}); - */ - function forOfFilter(source, iteratee = returnValue, resultsObject) { - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = iteratee(value, results, source); - if (result === true) { - methodPushBound(value); - } - } - } else { - const methodSet = isFunction(results.set); - for (const [key, value] of source) { - const result = iteratee(value, key, results, source); - if (result === true) { - if (methodSet) { - results.set(key, value); - } else { - results[key] = value; - } - } - } - } - return results; - } - - /** - * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. - * - * @function forOfFilterAsync - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. - * - * @example - * import { assert, forOfFilterAsync } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = forOfFilterAsync(source, (item) => { - * return Boolean(item); - * }); - * assert(temp, {b: 2, c: 3}); - */ - async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) { - if (isGenerator(source)) { - const resultsGenerator = []; - for await (const item of source(...generatorArgs)) { - if ((await iteratee(item, resultsGenerator, source)) === true) { - resultsGenerator.push(item); - } - } - return resultsGenerator; - } - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = await iteratee(value, results, source); - if (result === true) { - methodPushBound(value); - } - } - } else { - const methodSet = isFunction(results.set); - for await (const [key, value] of source) { - const result = await iteratee(value, key, results, source); - if (result === true) { - if (methodSet) { - results.set(key, value); - } else { - results[key] = value; - } - } - } - } - return results; - } - - /** - * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. - * - * @function filter - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {Object | Function} [results = {}] - Object that will be used to assign results. - * @returns {Array | object | Function} - A new object of the same calling object's type. - * - * @example - * import { filter, assert } from '@universalweb/acid'; - * assert(filter({a: false, b: true, c: true}, (item) => { - * return item; - * }), {b: true, c: true}); - */ - const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync); - - function returnFlow$1(callable) { - return (...methods) => { - return (arg) => { - let value = arg; - callable(methods, (item) => { - value = item(value); - }); - return value; - }; - }; - } - /** - * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. - * - * @function flow - * @category utility - * @type {Function} - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flow(increment, increment, deduct)(0); - * // => 1 - */ - const flow = returnFlow$1(eachArray); - /** - * This method is like flow except that it creates a function that invokes the given functions from right to left. - * - * @function flowRight - * @category utility - * @type {Function} - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flowRight(increment, increment, deduct)(0); - * // => 1 - */ - const flowRight = returnFlow$1(eachRight); - - function returnFlow(callable) { - return (...methods) => { - return async (arg) => { - let value = arg; - await callable(methods, async (item) => { - value = await item(value); - }); - return value; - }; - }; - } - /** - * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. - * - * @function flowAsync - * @category utility - * @type {Function} - * @async - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); - * // => 2 - */ - const flowAsync = returnFlow(eachAsyncArray); - /** - * This method is like flow except that it creates a function that invokes the given functions from right to left. - * - * @function flowAsyncRight - * @category utility - * @type {Function} - * @async - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); - * // => 2 - */ - const flowAsyncRight = returnFlow(eachRightAsync); - - function forMap(source, callback) { - const cloned = cloneType(source); - const method = cloned.push || cloned.add; - if (method && isFunction(method)) { - const methodBound = method.bind(cloned); - source.forEach((item) => { - const result = callback(item, cloned); - methodBound(result); - }); - } else if (isFunction(cloned.set)) { - source.forEach((item, key) => { - const result = callback(item, key, cloned); - cloned.set(key, result); - }); - } else { - source.forEach((item, key) => { - const result = callback(item, key, cloned); - cloned[key] = result; - }); - } - return cloned; - } - - /** - * Takes all but the last item in the array. - * - * @function arraysToObject - * @type {Function} - * @category utility - * @param {Array} source - Array to have items extracted from. - * @param {Array} properties - Array to have items extracted from. - * @returns {Array} - Returns a completely flattened array. - * - * @example - * import { arraysToObject, assert } from '@universalweb/acid'; - * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3}); - */ - function arraysToObject(source, properties) { - const sortedObject = {}; - eachArray(source, (item, key) => { - sortedObject[properties[key]] = item; - }); - return sortedObject; - } - - /** - * Checks if an object contains something. For basic searches. - * - * @function has - * @category utility - * @param {Array|String|Object} source - Object to be checked. - * @param {String|Array|Function|RegExp} search - Object that is being searched for. - * @param {Number} position - Index at which to start searching. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { has, assert } from '@universalweb/acid'; - * assert(has('Hello World', 'Hello'), true); - * assert(has(['Hello', 'World'], 'hello'), true); - */ - function has(source, search, position) { - if (noValue(source) || noValue(search)) { - return false; - } - if (source === search) { - return true; - } - if (isString(source)) { - if (isString(search)) { - return source.includes(search, position); - } - if (isRegex(search)) { - return search.test(source); - } - if (isFunction(search)) { - return search(source); - } - if (isArray(search)) { - return everyArray(search, (item) => { - return has(source, item); - }); - } - return every(search, (item) => { - return has(source, item); - }); - } - if (isArray(source)) { - if (isRegex(search)) { - return everyArray(source, (item) => { - return item.test(search); - }); - } - if (isFunction(search)) { - return everyArray(source, search); - } - if (isArray(search)) { - return everyArray(search, (item) => { - return has(source, item); - }); - } - return source.includes(search, position); - } - if (isPlainObject(source)) { - if (isRegex(search)) { - return everyObject(source, (item) => { - return item.test(search); - }); - } - if (isFunction(search)) { - return everyObject(source, search); - } - if (isPlainObject(search)) { - return everyObject(source, (item, key) => { - return item === search[key]; - }); - } - return everyObject(source, (item) => { - return has(item, search); - }); - } - return false; - } - - /** - * Checks if the string has a '.'. - * - * @function hasDot - * @category utility - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { hasDot, assert } from '@universalweb/acid'; - * assert(hasDot('test.js'), true); - */ - const hasDot = regexTestFactory(/\./); - - /** - * Checks if a property on an object has a value. If not, it will assign a value. - * - * @function ifNotAssign - * @category utility - * @type {Function} - * @param {Object} rootObject - The object to check. - * @param {String} property - The property name which is to be checked. - * @param {*} equalThis - The reassignment value for the property being checked. - * @returns {Object} - Returns the provided rootObject. - * - * @example - * import { ifNotAssign, assert } from '@universalweb/acid'; - * assert(ifNotAssign({}, 'a', 1), {a:1}); - */ - const ifNotAssign = (rootObject, property, equalThis) => { - if (property && !hasValue(rootObject[property])) { - rootObject[property] = equalThis; - } - return rootObject; - }; - - class Intervals { - list = construct(Map); - construct() {} - /** - * Remove a setInterval that was created using the intervals function. - * - * @param {Number} id - The id of the setInterval to remove. - * @returns {undefined} - Returns nothing. - * - * @example - * timer(() => {}, 100); - * // => 0 - */ - remove(id) { - clearInterval(id); - this.list.delete(id); - } - has(id) { - return this.list.has(id); - } - get(id) { - return this.list.get(id); - } - /** - * Create a setInterval & add it to the list of interval timers. - * - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setTimeoutId ID. - * - * @example - * timers.set(() => {}, 100); - * // => 0 - */ - set(callable, time) { - const id = setInterval(() => { - callable(); - }, time); - this.list.set(id, true); - return id; - } - /** - * Clear all active setIntervals. - * - * @returns {undefined} - Returns undefined. - * - * @example - * intervals.clear(); - * // => undefined - */ - clear() { - const currentThis = this; - currentThis.list.forEach((id) => { - currentThis.remove(id); - }); - } - } - const intervals = construct(Intervals); - /** - * Create an interval timer. - * - * @function interval - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setInterval ID. - * - * @example - * interval(() => {}, 100); - * // => 0 - */ - function interval(callable, time) { - return intervals.set(callable, time); - } - /** - * Clear all active interval timers. - * - * @function clearIntervals - * @category function - * @returns {undefined} - Returns undefined. - * - * @example - * clearIntervals(); - * // => undefined - */ - function clearIntervals() { - const id = setTimeout(noop, 0); - times(id, (index) => { - intervals.remove(index); - }); - } - - function merge(target, ...sources) { - each(sources, (currentSource) => { - each(currentSource, (sourceItem, sourceKey) => { - if (target[sourceKey]) { - if (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) { - return merge(target[sourceKey], sourceItem); - } - } - target[sourceKey] = sourceItem; - }); - }); - return target; - } - - /** - * Returns the model with the given name. - * - * @function Model - * @type {Class} - * @category utility - * @param {String} modelName - The name of the model to return. - * @param {*} modelSource - The value of the model to return. - * @returns {Model} - The model with the given name. - * - * @example - * import { Model, model, assert } from '@universalweb/acid'; - * const test = new Model('test', {a: 1}); - * assert(model('test'), {a: 1}); - */ - class Model { - static models = new Map(); - constructor(modelName, modelSource) { - if (hasValue(modelSource)) { - assign(this, modelSource); - this.modelName = modelName; - Model.models.set(modelName, modelSource); - } else { - assign(this, modelName); - } - } - delete(modelName) { - Model.models.delete(modelName || this.modelName); - } - set(modelName) { - if (modelName) { - this.modelName = modelName; - } - Model.models.set(modelName || this.modelName, this); - } - has(modelName) { - return Model.models.has(modelName || this.modelName); - } - get(modelName) { - return Model.models.get(modelName || this.modelName); - } - } - /** - * Set & Get a model. - * - * @function model - * @type {Function} - * @category utility - * @param {String} modelName - Name of the model. - * @param {Object} modelSource - The model object. - * @returns {Model} - Returns the associated model. - * - * @example - * import { model, assert } from '@universalweb/acid'; - * model('test', {a: 1}); - * assert(model('test'), {a: 1}); - */ - function model(modelName, modelSource) { - if (hasValue(modelSource)) { - return construct(Model, [modelName, modelSource]); - } - return get(modelName, Model.models); - } - - /** - * Takes the first two arguments given and returns them inside a new array. - * - * @function pair - * @category utility - * @param {*} argument1 - The source object. - * @param {*} argument2 - The source object. - * @returns {Array} The array which holds the pair. - * - * @example - * import { pair, assert } from '@universalweb/acid'; - * assert(air(1, 2), [1, 2]); - */ - function pair(argument1, argument2) { - return [argument1, argument2]; - } - - /** - * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee. - * - * @function concurrentStatus - * @category utility - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The array from Promise.allSettled. - * - * @example - * import { concurrentStatus, assert } from '@universalweb/acid'; - * const tempList = []; - * await concurrentStatus([1, 2], async (item) => { - * return item; - * }); - * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]); - */ - function concurrentStatus(source, iteratee, additionalArgument) { - const arrayLength = source.length; - const queue = []; - for (let index = 0; index < arrayLength; index++) { - queue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument); - } - return Promise.allSettled(queue); - } - - /** - * A wrapper around the promise constructor. - * - * @function promise - * @type {Function} - * @category utility - * @param {Function} callback - Function to be called back. - * @returns {Promise} - A constructor with a callback function.). - * - * @example - * promise((a) => {}); - * // => Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined} - */ - function promise(callback) { - return new Promise(callback); - } - - /** - * Using a deep comparison it checks if properties of two objects using an array are equal. - * - * @function propertyMatch - * @type {Function} - * @category utility - * @param {Object} source - The source object to compare. - * @param {Object} compared - Object to be compared to source. - * @param {Array} properties - List of properties to compare defaults to keys(source). - * @returns {Array} - Returns an array of properties. - * - * @example - * import { propertyMatch, assert } from '@universalweb/acid'; - * assert(propertyMatch({ - * a: 1, - * b: 2 - * }, { - * a: 1, - * b: 2 - * }, ['a', 'b']), true); - */ - const propertyMatch = (source, compared, properties = keys(source)) => { - return everyArray(properties, (property) => { - return isEqual(source[property], compared[property]); - }); - }; - - function setKey(source, key, value) { - if (key && isPlainObject(source)) { - source[key] = value; - } else if (isNumber(key) && isArray(source)) { - source[key] = value; - } else if (source.set) { - source.set(key, value); - } else if (source.push) { - source.push(value); - } else if (source.add) { - source.add(value); - } else { - source[key] = value; - } - return source; - } - - function setValue(source, value, key) { - if (isNumber(key) && isArray(source)) { - source[key] = value; - } else if (source.push) { - source.push(value); - } else if (source.add) { - source.add(value); - } else { - source[key] = value; - } - return source; - } - - class Store { - source; - constructor(source = {}) { - this.source = source; - if (source === null || typeof source !== 'object') { - return source; - } - eachObject(source, (property) => { - source[property] = new Store(source[property]); - }); - this.data = new Proxy(source, { - get(proxySource, property) { - console.log(proxySource, property, proxySource[property]); - return proxySource[property]; - }, - set(proxySource, property, value) { - console.log(proxySource, property, proxySource[property]); - proxySource[property] = new Store(value); - return true; - } - }); - } - } - - /** - * This method returns a new empty array. - * - * @function stubArray - * @category utility - * @type {Function} - * @returns {Array} - Returns the new empty array. - * - * @example - * import { stubArray, assert } from '@universalweb/acid'; - * assert(stubArray(), []); - */ - function stubArray() { - return []; - } - - /** - * This method returns false. - * - * @function stubFalse - * @category utility - * @type {Function} - * @returns {Boolean} - Returns false. - * - * @example - * import { stubFalse, assert } from '@universalweb/acid'; - * assert(stubFalse(), false); - */ - function stubFalse() { - return false; - } - - /** - * This method returns a new empty object. - * - * @function stubObject - * @category utility - * @type {Function} - * @returns {Object} - Returns the new empty object. - * - * @example - * import { stubObject, assert } from '@universalweb/acid'; - * assert(stubObject(), {}); - */ - const stubObject = () => { - return {}; - }; - - /** - * This method returns a new empty string. - * - * @function stubString - * @category utility - * @type {Function} - * @returns {String} - Returns the new empty string. - * - * @example - * import { stubString, assert } from '@universalweb/acid'; - * assert(stubString(), ''); - */ - const stubString = () => { - return ''; - }; - - /** - * This method returns true. - * - * @function stubTrue - * @category utility - * @type {Function} - * @returns {Boolean} - Returns true. - * - * @example - * import { stubTrue, assert } from '@universalweb/acid'; - * assert(stubTrue(), true); - */ - const stubTrue = () => { - return true; - }; - - /** - * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument. - * - * @async - * @function timesAsync - * @category utility - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @returns {undefined} - Nothing. - * - * @example - * import { timesAsync } from '@universalweb/acid'; - * await timesAsync(3, async (item) => { - * console.log(item); - * }); - * // 0 - * // 1 - * // 2 - * // => undefined - */ - async function timesAsync(amount, iteratee) { - for (let index = 0; index < amount; index++) { - await iteratee(amount); - } - } - /** - * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array. - * - * @async - * @function timesMapAsync - * @category array - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @param {Array} [results = []] - Array that will have iteratee return pushed to. - * @returns {Array} - An array with iteratee's returned values. - * - * @example - * import { timesMapAsync } from '@universalweb/acid'; - * await timesMapAsync(3, (item) => { - * return item; - * }); - * // => [0, 1, 2] - */ - async function timesMapAsync(amount, iteratee, results = []) { - for (let index = 0; index < amount; index++) { - results[index] = await iteratee(amount); - } - return results; - } - - /** - * Performs a toggle between 2 values using a deep or strict comparison. - * - * @function toggle - * @type {Function} - * @category utility - * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments. - * @param {(string|number|Object|Array)} on - The first object to be compared to. - * @param {(string|number|Object|Array)} off - The second object to be compared to. - * @returns {(string|number|Object|Array)} - The opposing value to the current. - * - * @example - * import { toggle } from '@universalweb/acid'; - * let toggleMe = true; - * toggleMe = toggle(toggleMe, true, false); - * // => false - */ - function toggle(value, on = true, off = false) { - return isEqual(on, value) ? off : on; - } - - /** - * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available. - * - * @class UniqID - * @type {Class} - * @category utility - * @returns {UniqID} - Returns a new instance of UniqID. - * - * @example - * import { UniqID, construct, assert } from '@universalweb/acid'; - * const gen = construct(UniqID); - * assert(gen.get(), 0); - * assert(gen.get(), 1); - * gen.free(0); - * assert(gen.get(), 0); - */ - class UniqID { - totalActive = 0; - freed = []; - totalFree = 0; - /** - * Generates a new ID or recycle one that is no longer used. - * - * @function get - * @class UniqID - * @category utility - * @type {Function} - * @returns {Number} - Returns a unique id. - * - * @example - * import { UniqID, construct, assert } from '@universalweb/acid'; - * const gen = construct(UniqID); - * assert(gen.get(), 0); - */ - get() { - let result = this.freed.shift(); - if (hasValue(result)) { - this.totalFree--; - } else { - result = this.totalActive; - this.totalActive++; - } - return result; - } - /** - * Frees an UID so that it may be recycled for later use. - * - * @function free - * @class UniqID - * @category utility - * @type {Function} - * @param {Number} id - Number to be freed. - * @returns {undefined} - Nothing is returned. - * - * @example - * import { UniqID, construct, assert } from '@universalweb/acid'; - * const gen = construct(UniqID); - * assert(gen.get(), 0); - * gen.free(0); - * assert(gen.get(), 0); - */ - free(id) { - this.freed.push(id); - this.totalFree++; - const isActive = this.totalActive > 0; - const shouldReset = this.totalActive === this.totalFree; - if (isActive && shouldReset) { - this.reset(); - } - } - reset() { - this.totalActive = 0; - this.freed.length = 0; - this.totalFree = 0; - } - } - /** - * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available. - * - * @function uniqID - * @category utility - * - * @example - * import { uniqID, assert } from '@universalweb/acid'; - * assert(uniqID.get(), 0); - * assert(uniqID.get(), 1); - * uniqID.free(0); - * assert(uniqID.get(), 0); - */ - const uniqID = construct(UniqID); - - /** - * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. - * - * @function VirtualStorage - * @category utility - * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. - * @returns {*} - Returns a new VirtualStorage Object. - * - * @example - * import { VirtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = new VirtualStorage(); - * // => New VirtualStorage Object - */ - class VirtualStorage { - constructor(initialObject = new Map()) { - this.items = initialObject; - } - /** - * Get an item from a virtual storage object. - * - * @param {String} key - The key used to store the data. - * @returns {undefined} - Returns undefined. - * - * @example - * import { VirtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = virtualStorage(); - * myVirtualStorage.setItem('key', 'value'); - * myVirtualStorage.getItem('key'); - * // => 'value' - */ - getItem(key) { - if (this.isMap) { - return this.items.get(key); - } else { - return this.items[key]; - } - } - get(...args) { - return this.getItem(...args); - } - hasItem(key) { - if (this.isMap) { - return this.items.has(key); - } else { - return hasValue(this.items[key]); - } - } - has(...args) { - return this.hasItem(...args); - } - /** - * Save an item to a virtual storage object. - * - * @param {String} key - The key used to store the data. - * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify. - * @returns {undefined} - Returns undefined. - * - * @example - * import { VirtualStorage, assert } from '@universalweb/acid'; - * const vStorage = new VirtualStorage(); - * vStorage.setItem('title', 'value'); - * assert(vStorage.getItem('title'), 'value'); - */ - setItem(key, value) { - if (this.isMap) { - this.items.set(key, value); - } else { - this.items[key] = value; - } - return this; - } - set(...args) { - return this.setItem(...args); - } - /** - * Clears all data from the virtual storage object by replacing with a new object. - * - * @returns {undefined} - Returns undefined. - * - * @example - * import { virtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = virtualStorage(); - * myVirtualStorage.setItem('key', 'value'); - * myVirtualStorage.clear(); - * myVirtualStorage.getItem('key'); - * // => undefined - */ - clear() { - if (this.isMap) { - this.items.clear(); - } else { - this.items = cloneType(this.items); - } - return this; - } - /** - * Remove an item from a virtual storage object. - * - * @param {String} key - The key used to remove data. - * @returns {undefined} - Returns undefined. - * - * @example - * import { virtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = virtualStorage(); - * myVirtualStorage.setItem('key', 'value'); - * myVirtualStorage.removeItem('key'); - * myVirtualStorage.getItem('key'); - * // => undefined - */ - removeItem(key) { - if (this.isMap) { - this.items.delete(key); - } else { - this.items[key] = null; - } - return this; - } - remove(...args) { - return this.removeItem(...args); - } - } - /** - * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. - * - * @function virtualStorage - * @category browser - * @type {Function} - * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. - * @returns {*} - Returns a new VirtualStorage Object. - * - * @example - * import { virtualStorage, assert } from '@universalweb/acid'; - * const vStorage = virtualStorage(); - * vStorage.setItem('title', 'value'); - * assert(vStorage.getItem('title'), 'value'); - */ - function virtualStorage(initialObject) { - return new VirtualStorage(initialObject); - } - - /** - * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object. - * - * @function inAsync - * @type {Function} - * @category Utility - * @async - * @param {Array} source - Array of async functions that will be looped through. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. - * @returns {Object} - The originally given array. - * - * @example - * import { inAsync, assert } from '@universalweb/acid'; - * const list = []; - * await inAsync([async (firstArgument, item, index) => { - * list.push(index + firstArgument.a); - * }, async (firstArgument, item, index) => { - * list.push(index); - * }], {a:1}); - * assert(list, [1, 1]); - */ - async function inAsync(source, thisBind, ...args) { - const arrayLength = source.length; - const results = []; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = await source[index].call(thisBind, ...args, index, callable); - } - } else { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = await source[index](...args, index, callable); - } - } - return results; - } - - /** - * Invoke an array of functions. - * - * @function inSync - * @category Utility - * @type {Function} - * @param {Array} source - Array of functions that will be looped through. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function. - * @returns {undefined} - Returns undefined. - * - * @example - * inSync([() => {console.log(1);}, () => {console.log(2);}]); - * // 1 - * // 2 - * // => undefined - */ - function inSync(source, thisBind, ...args) { - const arrayLength = source.length; - const results = []; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = callable.call(thisBind, ...args, index, callable); - } - } else { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = callable(...args, index, callable); - } - } - return results; - } - - /** - * Checks to see of the browser agent has a string. - * - * @function isAgent - * @category browser - * @type {Function} - * @param {String} source - The string to search for. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isAgent, assert } from '@universalweb/acid'; - * assert(isAgent('NotThere'), false); - */ - function isAgent(source) { - return hasValue(source) ? isAgent[source] : keys(isAgent); - } - const userAgent = globalThis.navigator?.userAgentData; - if (userAgent) { - eachObject(userAgent, (value, key) => { - if (isBoolean(value) && value) { - isAgent[key] = value; - } - }); - eachArray(userAgent.brands, (value) => { - isAgent[value.brand] = value.version; - }); - } else if (navigator.userAgent) { - let userAgentNormalized = navigator.userAgent.toLowerCase(); - userAgentNormalized = userAgentNormalized.replace(/_/g, '.'); - userAgentNormalized = userAgentNormalized.replace(/[#_,;()]/g, ''); - const userAgentSplit = userAgentNormalized.split(/ |\//); - eachArray(userAgentSplit, (item) => { - isAgent[item] = true; - }); - } - - /** - * Attaches an event listener to a node. - * - * @function eventAdd - * @category browser - * @type {Function} - * @param {Node} node - Given node. - * @param {String} eventName - A string representing the event type. - * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs. - * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation. - * @returns {Node} - Returns given node. - * - * @example - * eventAdd(document.body, 'click', () => {console.log('CLICKED');}); - * // = > document.body - */ - function eventAdd(node, eventName, callback, useCapture) { - node.addEventListener(eventName, callback, useCapture); - return node; - } - /** - * Attaches an event listener to a node. - * - * @function eventRemove - * @category browser - * @type {Function} - * @param {Node} node - Given node. - * @param {String} eventName - A string representing the event type. - * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs. - * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation. - * @returns {Node} - Returns given node. - * - * @example - * eventRemove(document.body, () => {console.log('CLICKED');}); - * // = > Undefined - */ - function eventRemove(node, eventName, callback, useCapture) { - node.removeEventListener(eventName, callback, useCapture); - return node; - } - - /** - * Checks if the keycode of the event is strictly equal to 13. - * - * @function isEnter - * @category browser - * @type {Function} - * @param {Object} eventObject - Object to be checked. - * @returns {Boolean} - Returns true if the keycode property of the object equals 13. - * - * @example - * isEnter('click'); - * // => false - */ - function isEnter(eventObject) { - return eventObject.keyCode === 13; - } - - /** - * Create a document fragment. - * - * @function createFragment - * @category browser - * @type {Function} - * @ignore - * @returns {Fragment} - Returns a new document fragment. - */ - const createFragment = document.createDocumentFragment.bind(document); - - /** - * Append a DOM node. - * - * @function append - * @category browser - * @ignoreTest - * @type {Function} - * @ignore - * @param {Node} parentNode - The parent node. - * @param {Node} child - The node to be appended. - * @returns {undefined} - Returns the child. - */ - function append(parentNode, child) { - parentNode.appendChild(child); - return child; - } - - /** - * Assign attributes to a DOM node. - * - * @function nodeAttribute - * @category browser - * @ignoreTest - * @type {Function} - * @async - * @param {Node} node - The DOM node. - * @param {Object|Array} object - Object with key being the attribute name and the value being the attribute value. If an array is given it will get the values corresponding to the array items. - * @returns {Object|Node} - If using an array this returns an object of attribute names as keys and their values as the property value. If using an object this will return the provided node. - * - * @example - * nodeAttribute(document.body, { 'data-example': 'test'}); - */ - function nodeAttribute(node, object) { - if (isArray(object)) { - return zipObject( - object, - mapArray(object, (item) => { - return node.getAttribute(item); - }) - ); - } - eachObject(object, (item, key) => { - node.setAttribute(key, item); - }); - return node; - } - - const dotString = '.'; - const poundString = '#'; - const classTest = /^.[\w_-]+$/; - const tagTest = /^[A-Za-z]+$/; - const regexSpace = /\s/; - /** - * Wrapper around getElementsByClassName. - * - * @function getByClass - * @category browser - * @ignoreTest - * @type {Function} - */ - const getByClass = document.getElementsByClassName.bind(document); - /** - * Wrapper around getElementsByTagName. - * - * @function getByTag - * @category browser - * @ignoreTest - * @type {Function} - */ - const getByTag = document.getElementsByTagName.bind(document); - /** - * Wrapper around getElementsByIdName. - * - * @function getById - * @category browser - * @ignoreTest - * @type {Function} - */ - const getById = document.getElementById.bind(document); - /** - * Wrapper around querySelector. - * - * @function querySelector - * @category browser - * @ignoreTest - * @type {Function} - */ - const querySelector = document.querySelector.bind(document); - /** - * Wrapper around querySelectorAll. - * - * @function querySelectorAll - * @category browser - * @ignoreTest - * @type {Function} - */ - const querySelectorAll = document.querySelectorAll.bind(document); - /** - * Returns relevant DOM node. - * - * @function selector - * @category browser - * @ignoreTest - * @param {String} select - String to be evaluated. - * @type {Function} - * @returns {Node} - Returns a DOM node. - * - * @example - * selector('#node'); - * // =>
- */ - function selector(select) { - const firstLetter = select[0]; - switch (firstLetter) { - case poundString: { - if (!regexSpace.test(select)) { - return getById(restString(select)); - } - break; - } - case dotString: { - if (classTest.test(select)) { - return getByClass(restString(select)); - } - break; - } - default: { - if (tagTest.test(select)) { - return getByTag(select); - } - } - } - return querySelectorAll(select); - } - - const createElementCache = document.createElement.bind(document); - const nodeAttachLoadingEvents = (node) => { - return promise((accept) => { - eventAdd(node, 'load', accept, true); - eventAdd(node, 'error', accept, true); - append(querySelector('head'), node); - }); - }; - /** - * Asynchronously import a js file and append it to the head node. - * If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity. - * - * @function importjs - * @category browser - * @type {Function} - * @async - * @param {*} url - URL of the script to import. If not "." is found in the file name ".js" will be appended. - * @returns {Promise} - Returns a promise which returns a "load" or "error" event associated with the script. - * - * @example - * importjs('core.js'); - * importjs('core'); - */ - function importjs(url) { - const src = (hasDot(url) && url) || `${url}.js`; - const node = nodeAttribute(createElementCache('script'), { - async: '', - src - }); - return nodeAttachLoadingEvents(node); - } - - /** - * Runs a function if the document has finished loading. If not, add an eventlistener. - * - * @function isDocumentReady - * @category browser - * @ignoreTest - * @type {Function} - * @param {Function} callable - Function to be run. - * @returns {Boolean|Function} - If the document is ready, returns a function. If not, return false. - * - * @example - * isDocumentReady(() => {return 1}); - * // => 1 - */ - function isDocumentReady(callable) { - const state = document.readyState; - const checkStatus = state === 'interactive' || state === 'completed' || state === 'complete'; - if (checkStatus) { - return callable ? callable() : true; - } - if (callable) { - eventAdd(document, 'DOMContentLoaded', callable); - } - return false; - } - isDocumentReady(() => { - const scriptTag = getById('AcidLib'); - const scriptName = (scriptTag && scriptTag.getAttribute('data-index')) || '/index'; - importjs(scriptName); - }); - - const protocol = location.protocol; - const protocolSocket = protocol === 'http:' ? 'ws' : 'wss'; - const hostname = location.hostname; - /** - * Holds client hardware, browser, and host info. - * - * @memberof $ - * @category browser - * @ignoreTest - * @property {Object} info - Client hardware & host info. - * @type {Object} - */ - const info = { - hardware: { - cores: navigator.hardwareConcurrency - }, - host: { - name: hostname, - protocol, - protocolSocket - } - }; - - function saveDimensions() { - assign(info, { - bodyHeight: document.body.offsetHeight, - bodyWidth: document.body.offsetWidth, - windowHeight: window.innerHeight, - windowWidth: window.innerWidth - }); - } - /** - * Save current document & window dimensions to the info property. - * - * @function updateDimensions - * @category browser - * @ignoreTest - * @type {Function} - * @returns {undefined} - Returns undefined. - * - * @example - * updateDimensions(); - */ - function updateDimensions() { - saveDimensions(); - } - isDocumentReady(updateDimensions); - eventAdd(window, 'load', updateDimensions, true); - eventAdd(window, 'resize', updateDimensions, true); - - /** - * LocalStorage Module.. - * - * @module browser/storage - */ - exports.hasLocal = void 0; - function hasStorage(storeCheck) { - try { - storeCheck().removeItem('TESTING'); - exports.hasLocal = true; - } catch (e) { - exports.hasLocal = false; - } - } - hasStorage(() => { - return localStorage; - }); - /** - * Constructs a virtual storage container with localStorage support. - * BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported. - * If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed. - * BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed. - * - * @class BrowserStorage - * @category browser - * @returns {BrowserStorage} - Returns a new instance of BrowserStorage. - * - * @example - * import { BrowserStorage, construct, assert } from '@universalweb/acid'; - * const storageBrowserStorage = construct(BrowserStorage); - * storageBrowserStorage.setItem('key', 'value'); - * assert(storageBrowserStorage.getItem('key'), 'value'); - */ - class BrowserStorage { - constructor(initialObject) { - if (this.hasLocal) { - this.local = localStorage; - } - this.storage = virtualStorage(initialObject); - } - hasLocal = exports.hasLocal; - /** - * Save an item to a browserStorage. - * - * @function setItem - * @class BrowserStorage - * @category browser - * @param {String} key - The key used to store the data. - * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify. - * @returns {undefined} - Returns undefined. - * - * @example - * import { BrowserStorage, construct, assert } from '@universalweb/acid'; - * const storageBrowserStorage = construct(BrowserStorage); - * storageBrowserStorage.setItem('key', 'value'); - * assert(storageBrowserStorage.getItem('key'), 'value'); - */ - setItem(key, value) { - if (this.hasLocal) { - this.local.setItem(key, isString(value) ? value : stringify(value)); - } - return this.storage.setItem(key, value); - } - /** - * Get an item from a browserStorage. - * - * @function getItem - * @class BrowserStorage - * @category browser - * @param {String} key - The key used to store the data. - * @returns {undefined} - Returns undefined. - * - * @example - * import { BrowserStorage, construct, assert } from '@universalweb/acid'; - * const storageBrowserStorage = construct(BrowserStorage); - * storageBrowserStorage.setItem('key', 'value'); - * assert(storageBrowserStorage.getItem('key'), 'value'); - */ - getItem(key) { - const item = this.storage.getItem(key); - if (hasValue(item)) { - return item; - } - if (!hasValue(item) && this.hasLocal) { - return this.local.getItem(key); - } - } - /** - * Clears all data for the browserStorage including all of localStorage if supported. - * - * @function clear - * @class BrowserStorage - * @category browser - * @returns {undefined} - Returns undefined. - * - * @example - * import { BrowserStorage, construct, assert } from '@universalweb/acid'; - * const storageBrowserStorage = construct(BrowserStorage); - * storageBrowserStorage.setItem('key', 'value'); - * assert(storageBrowserStorage.getItem('key'), 'value'); - * storageBrowserStorage.clear(); - * assert(storageBrowserStorage.getItem('key'), undefined); - */ - clear() { - if (this.hasLocal) { - this.local.clear(); - } - this.storage.clear(); - } - /** - * Remove an item from a browserStorage. - * - * @class BrowserStorage - * @category browser - * @function removeItem - * @param {String} key - The key used to remove data. - * @returns {undefined} - Returns undefined. - * - * @example - * import { BrowserStorage, construct, assert } from '@universalweb/acid'; - * const storageBrowserStorage = construct(BrowserStorage); - * storageBrowserStorage.setItem('key', 'value'); - * assert(storageBrowserStorage.getItem('key'), 'value'); - * storageBrowserStorage.removeItem('key'); - * assert(storageBrowserStorage.getItem('key'), undefined); - */ - removeItem(key) { - if (this.hasLocal) { - this.local.removeItem(key); - } - this.storage.removeItem(key); - } - } - /** - * The browserStorage function is a factory which wraps the BrowserStorage class constructor. - * - * @function browserStorage - * @category browser - * @type {Function} - * @returns {*} - Returns a new BrowserStorage Object. - * - * @example - * const storageBrowserStorage = browserStorage(); - * // => New BrowserStorage Object - */ - function browserStorage(virtualFlag) { - return new BrowserStorage(virtualFlag); - } - - const generateTheme = (color, bg) => { - return `color:${color};background:${bg};`; - }; - const themes = { - alert: generateTheme('#fff', '#f44336'), - important: generateTheme('#fff', '#E91E63'), - notify: generateTheme('#fff', '#651FFF'), - warning: generateTheme('#000', '#FFEA00') - }; - /** - * Console.trace wrapper with theme support. - * - * @function cnsl - * @category browser - * @ignoreTest - * @type {Function} - * @param {Object} value - The value to be logged. - * @param {String} themeName - The name of the theme to be used. - * @returns {undefined} - Returns undefined. - * - * @example - * cnsl('Lucy', 'notify'); - * // 'Lucy' - */ - const cnsl = (value, themeName) => { - const data = isString(value) ? value : stringify(value); - if (themeName === 'alert' || themeName === 'warning') { - return console.trace(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`); - } - console.log(`%c${data}`, `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`); - }; - /** - * Create color themes for cnsl method. - * - * @function cnslTheme - * @category browser - * @ignoreTest - * @type {Function} - * @param {String} themeName - The name of the theme. - * @param {String} color - The text color. - * @param {String} background - The background color of the block. - * @returns {undefined} - Returns undefined. - * - * @example - * cnslTheme('BlackNWhite', '#fff', '#000'); - */ - const cnslTheme = (themeName, color, background) => { - themes[themeName] = generateTheme(color, background); - }; - - /** - * Checks if value is a plain DOM Node. - * - * @function isDom - * @category browser - * @ignoreTest - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isDom, assert } from '@universalweb/acid'; - * assert(isDom(document.querySelectorAll('head')), true); - */ - function isDom(source) { - return source && source.nodeType !== 9; - } - /** - * Checks if the value is a HTMLCollection. - * - * @function isHTMLCollection - * @category browser - * @ignoreTest - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isHTMLCollection, assert } from '@universalweb/acid'; - * document.body.innerHTML = '
'; - * assert(isHTMLCollection(document.getElementsByClassName('test')), true); - */ - const objectHTMLCollection = '[object HTMLCollection]'; - function isHTMLCollection(source) { - return hasValue(source) ? source.toString() === objectHTMLCollection : false; - } - /** - * Checks if the value is a NodeList. - * - * @function isNodeList - * @category browser - * @ignoreTest - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNodeList, assert } from '@universalweb/acid'; - * document.body.innerHTML = '
'; - * assert(isNodeList(document.querySelectorAll('.test')), true); - */ - const objectNodeList = '[object NodeList]'; - function isNodeList(source) { - return hasValue(source) ? source.toString() === objectNodeList : false; - } - - exports.BrowserStorage = BrowserStorage; - exports.Chain = Chain; - exports.Intervals = Intervals; - exports.Model = Model; - exports.Store = Store; - exports.Timers = Timers; - exports.UniqID = UniqID; - exports.VirtualStorage = VirtualStorage; - exports.add = add; - exports.after = after; - exports.append = append; - exports.apply = apply; - exports.arrayToRegex = arrayToRegex; - exports.arraysToObject = arraysToObject; - exports.ary = ary; - exports.assert = assert; - exports.assertAsync = assertAsync; - exports.assign = assign; - exports.assignToClass = assignToClass; - exports.assignToObject = assignToObject; - exports.before = before; - exports.bindAll = bindAll; - exports.browserStorage = browserStorage; - exports.cacheNativeMethod = cacheNativeMethod; - exports.calcProgress = calcProgress; - exports.camelCase = camelCase; - exports.chain = chain; - exports.chunk = chunk; - exports.chunkString = chunkString; - exports.clear = clear; - exports.clearArray = clearArray; - exports.clearBuffer = clearBuffer; - exports.clearIntervals = clearIntervals; - exports.clearTimers = clearTimers; - exports.clone = clone; - exports.cloneArray = cloneArray; - exports.cloneType = cloneType; - exports.cnsl = cnsl; - exports.cnslTheme = cnslTheme; - exports.compact = compact; - exports.compactKeys = compactKeys; - exports.compactMap = compactMap; - exports.compactMapArray = compactMapArray; - exports.compactMapAsyncArray = compactMapAsyncArray; - exports.compactMapAsyncObject = compactMapAsyncObject; - exports.compactMapObject = compactMapObject; - exports.concurrent = concurrent; - exports.concurrentEachArray = concurrentEachArray; - exports.concurrentStatus = concurrentStatus; - exports.construct = construct; - exports.constructorName = constructorName; - exports.countBy = countBy; - exports.countKey = countKey; - exports.countWithoutKey = countWithoutKey; - exports.createFragment = createFragment; - exports.curry = curry; - exports.curryRight = curryRight; - exports.debounce = debounce; - exports.deduct = deduct; - exports.defProp = defProp; - exports.difference = difference; - exports.divide = divide; - exports.drop = drop; - exports.dropRight = dropRight; - exports.each = each; - exports.eachArray = eachArray; - exports.eachAsyncArray = eachAsyncArray; - exports.eachAsyncObject = eachAsyncObject; - exports.eachObject = eachObject; - exports.eachRight = eachRight; - exports.eachRightAsync = eachRightAsync; - exports.ensureArray = ensureArray; - exports.ensureBuffer = ensureBuffer; - exports.equalsZero = isZero; - exports.escapeRegex = escapeRegex; - exports.escapeRegexRegex = escapeRegexRegex; - exports.eventAdd = eventAdd; - exports.eventRemove = eventRemove; - exports.every = every; - exports.everyArg = everyArg; - exports.everyArray = everyArray; - exports.everyAsyncArray = everyAsyncArray; - exports.everyAsyncObject = everyAsyncObject; - exports.everyObject = everyObject; - exports.extendClass = extendClass; - exports.filter = filter; - exports.filterArray = filterArray; - exports.filterAsyncArray = filterAsyncArray; - exports.filterAsyncObject = filterAsyncObject; - exports.filterObject = filterObject; - exports.findIndex = findIndex; - exports.findIndexCache = findIndexCache; - exports.findItem = findItem; - exports.first = first; - exports.flatten = flatten; - exports.flattenDeep = flattenDeep; - exports.flow = flow; - exports.flowAsync = flowAsync; - exports.flowAsyncRight = flowAsyncRight; - exports.flowRight = flowRight; - exports.forEach = forEach; - exports.forEachAsync = forEachAsync; - exports.forMap = forMap; - exports.forOf = forOf; - exports.forOfAsync = forOfAsync; - exports.forOfCompactMap = forOfCompactMap; - exports.forOfCompactMapAsync = forOfCompactMapAsync; - exports.forOfEvery = forOfEvery; - exports.forOfEveryAsync = forOfEveryAsync; - exports.forOfFilter = forOfFilter; - exports.forOfFilterAsync = forOfFilterAsync; - exports.forOfMap = forOfMap; - exports.forOfMapAsync = forOfMapAsync; - exports.generateLoop = generateLoop; - exports.get = get; - exports.getByClass = getByClass; - exports.getById = getById; - exports.getByTag = getByTag; - exports.getEntries = getEntries; - exports.getFileExtension = getFileExtension; - exports.getFilename = getFilename; - exports.getHighest = getHighest; - exports.getLowest = getLowest; - exports.getNumberInsertIndex = getNumberInsertIndex; - exports.getPropDesc = getPropDesc; - exports.getPropNames = getPropNames; - exports.getType = getType; - exports.getTypeName = getTypeName; - exports.groupBy = groupBy; - exports.has = has; - exports.hasAnyKeys = hasAnyKeys; - exports.hasDot = hasDot; - exports.hasKeys = hasKeys; - exports.hasLength = hasLength; - exports.hasProp = hasProp; - exports.hasValue = hasValue; - exports.htmlEntities = htmlEntities; - exports.ifInvoke = ifInvoke; - exports.ifNotAssign = ifNotAssign; - exports.ifValue = ifValue; - exports.importjs = importjs; - exports.inAsync = inAsync; - exports.inSync = inSync; - exports.increment = increment; - exports.indexBy = indexBy; - exports.info = info; - exports.initial = initial; - exports.initialString = initialString; - exports.insertInRange = insertInRange; - exports.intersection = intersection; - exports.interval = interval; - exports.intervals = intervals; - exports.invert = invert; - exports.invokeArray = invokeArray; - exports.invokeCollection = invokeCollection; - exports.invokeCollectionAsync = invokeCollectionAsync; - exports.isAgent = isAgent; - exports.isArguments = isArguments; - exports.isArray = isArray; - exports.isArrayBuffer = isArrayBuffer; - exports.isArrayBufferCall = isArrayBufferCall; - exports.isArrayLike = isArrayLike; - exports.isAsync = isAsync; - exports.isAsyncCall = isAsyncCall; - exports.isBigInt = isBigInt; - exports.isBigIntCall = isBigIntCall; - exports.isBoolean = isBoolean; - exports.isBooleanCall = isBooleanCall; - exports.isBuffer = isBuffer; - exports.isBufferCall = isBufferCall; - exports.isChild = isChild; - exports.isCloneable = isCloneable; - exports.isConstructor = isConstructor; - exports.isConstructorFactory = isConstructorFactory; - exports.isConstructorNameFactory = isConstructorNameFactory; - exports.isDate = isDate; - exports.isDateCall = isDateCall; - exports.isDeno = isDeno; - exports.isDocumentReady = isDocumentReady; - exports.isDom = isDom; - exports.isEmpty = isEmpty; - exports.isEnter = isEnter; - exports.isEqual = isEqual; - exports.isF32 = isF32; - exports.isF32Call = isF32Call; - exports.isF64 = isF64; - exports.isF64Call = isF64Call; - exports.isFalse = isFalse; - exports.isFalsy = isFalsy; - exports.isFileCSS = isFileCSS; - exports.isFileHTML = isFileHTML; - exports.isFileJS = isFileJS; - exports.isFileJSON = isFileJSON; - exports.isFloat = isFloat; - exports.isFunction = isFunction; - exports.isGenerator = isGenerator; - exports.isGeneratorCall = isGeneratorCall; - exports.isHTMLCollection = isHTMLCollection; - exports.isI16 = isI16; - exports.isI16Call = isI16Call; - exports.isI32 = isI32; - exports.isI32Call = isI32Call; - exports.isI8 = isI8; - exports.isI8Call = isI8Call; - exports.isIterable = isIterable; - exports.isKindAsync = isKindAsync; - exports.isMap = isMap; - exports.isMapCall = isMapCall; - exports.isMatchArray = isMatchArray; - exports.isMatchObject = isMatchObject; - exports.isNegative = isNegative; - exports.isNodeList = isNodeList; - exports.isNodejs = isNodejs; - exports.isNotArray = isNotArray; - exports.isNotNumber = isNotNumber; - exports.isNotString = isNotString; - exports.isNull = isNull; - exports.isNumber = isNumber; - exports.isNumberCall = isNumberCall; - exports.isNumberEqual = isNumberEqual; - exports.isNumberInRange = isNumberInRange; - exports.isNumberNotInRange = isNumberNotInRange; - exports.isParent = isParent; - exports.isPlainObject = isPlainObject; - exports.isPositive = isPositive; - exports.isPrimitive = isPrimitive; - exports.isPromise = isPromise; - exports.isRegex = isRegex; - exports.isRegexCall = isRegexCall; - exports.isRelated = isRelated; - exports.isSafeInt = isSafeInt; - exports.isSame = isSame; - exports.isSameType = isSameType; - exports.isSet = isSet; - exports.isSetCall = isSetCall; - exports.isString = isString; - exports.isTrue = isTrue; - exports.isTruthy = isTruthy; - exports.isTypeFactory = isTypeFactory; - exports.isTypedArray = isTypedArray; - exports.isU16 = isU16; - exports.isU16Call = isU16Call; - exports.isU32 = isU32; - exports.isU32Call = isU32Call; - exports.isU8 = isU8; - exports.isU8C = isU8C; - exports.isU8CCall = isU8CCall; - exports.isU8Call = isU8Call; - exports.isUndefined = isUndefined; - exports.isWeakMap = isWeakMap; - exports.isWeakMapCall = isWeakMapCall; - exports.isZero = isZero; - exports.jsonParse = jsonParse; - exports.kebabCase = kebabCase; - exports.keys = keys; - exports.largest = largest; - exports.last = last; - exports.lowerCase = lowerCase; - exports.map = map; - exports.mapArray = mapArray; - exports.mapAsyncArray = mapAsyncArray; - exports.mapAsyncObject = mapAsyncObject; - exports.mapObject = mapObject; - exports.mapRightArray = mapRightArray; - exports.mapWhile = mapWhile; - exports.merge = merge; - exports.model = model; - exports.multiply = multiply; - exports.negate = negate; - exports.noValue = noValue; - exports.nodeAttribute = nodeAttribute; - exports.noop = noop; - exports.notEqual = notEqual; - exports.nthArg = nthArg; - exports.objectAssign = objectAssign; - exports.objectEntries = objectEntries; - exports.objectSize = objectSize; - exports.omit = omit; - exports.once = once; - exports.onlyUnique = onlyUnique; - exports.over = over; - exports.overEvery = overEvery; - exports.pair = pair; - exports.partition = partition; - exports.pick = pick; - exports.pluck = pluck; - exports.pluckObject = pluckObject; - exports.promise = promise; - exports.propertyMatch = propertyMatch; - exports.querySelector = querySelector; - exports.querySelectorAll = querySelectorAll; - exports.randomFloat = randomFloat; - exports.randomInt = randomInt; - exports.range = range; - exports.rangeDown = rangeDown; - exports.rangeUp = rangeUp; - exports.rawURLDecode = rawURLDecode; - exports.reArg = reArg; - exports.regexTestFactory = regexTestFactory; - exports.remainder = remainder; - exports.remove = remove; - exports.removeBy = removeBy; - exports.replaceList = replaceList; - exports.rest = rest; - exports.restString = restString; - exports.returnValue = returnValue; - exports.right = right; - exports.rightString = rightString; - exports.sample = sample; - exports.sanitize = sanitize; - exports.saveDimensions = saveDimensions; - exports.selector = selector; - exports.setKey = setKey; - exports.setValue = setValue; - exports.shuffle = shuffle; - exports.smallest = smallest; - exports.snakeCase = snakeCase; - exports.sortCollectionAlphabetically = sortCollectionAlphabetically; - exports.sortCollectionAlphabeticallyReverse = sortCollectionAlphabeticallyReverse; - exports.sortCollectionAscending = sortCollectionAscending; - exports.sortCollectionAscendingFilter = sortCollectionAscendingFilter; - exports.sortCollectionDescending = sortCollectionDescending; - exports.sortCollectionDescendingFilter = sortCollectionDescendingFilter; - exports.sortNumberAscending = sortNumberAscending; - exports.sortNumberDescening = sortNumberDescening; - exports.sortObjectsAlphabetically = sortObjectsAlphabetically; - exports.sortObjectsAlphabeticallyReverse = sortObjectsAlphabeticallyReverse; - exports.sortUnique = sortUnique; - exports.stringify = stringify; - exports.stubArray = stubArray; - exports.stubFalse = stubFalse; - exports.stubObject = stubObject; - exports.stubString = stubString; - exports.stubTrue = stubTrue; - exports.subtract = subtract; - exports.subtractAll = subtractAll; - exports.subtractReverse = subtractReverse; - exports.sumAll = sumAll; - exports.take = take; - exports.takeRight = takeRight; - exports.themes = themes; - exports.throttle = throttle; - exports.timer = timer; - exports.timers = timers; - exports.times = times; - exports.timesAsync = timesAsync; - exports.timesMap = timesMap; - exports.timesMapAsync = timesMapAsync; - exports.toArray = toArray; - exports.toPath = toPath; - exports.toggle = toggle; - exports.tokenize = tokenize; - exports.truncate = truncate; - exports.truncateRight = truncateRight; - exports.unZip = unZip; - exports.unZipObject = unZipObject; - exports.union = union; - exports.uniqID = uniqID; - exports.unique = unique; - exports.untilFalseArray = untilFalseArray; - exports.untilTrueArray = untilTrueArray; - exports.updateDimensions = updateDimensions; - exports.upperCase = upperCase; - exports.upperFirst = upperFirst; - exports.upperFirstAll = upperFirstAll; - exports.upperFirstLetter = upperFirstLetter; - exports.upperFirstOnly = upperFirstOnly; - exports.upperFirstOnlyAll = upperFirstOnlyAll; - exports.virtualStorage = virtualStorage; - exports.whileCompactMap = whileCompactMap; - exports.whileEachArray = whileEachArray; - exports.whileMapArray = whileMapArray; - exports.without = without; - exports.words = words; - exports.wrap = wrap; - exports.xor = xor; - exports.zip = zip; - exports.zipObject = zipObject; + options, + ); + } + async function assertAsync(sourceArg, expected, options) { + const source = await sourceArg; + const expectedFunction = + isFunction(expected) && (await expected(source, options)) === false; + if (expectedFunction || notEqual(source, expected)) { + return createAssertError(source, expected, options); + } + return true; + } + /** + * Check if source value matches the expected value. + * + * @function assert + * @category utility + * @type {Function} + * @param {*} source - The source object to compare to. + * @param {*} expected - The expected result that's compared to the source. + * @param {*} options - Additional options for the Error instance & unit test information. + * @returns {Object} - Returns a deep clone of an object. + * + * @example + * import { assert } from '@universalweb/acid'; + * if (!assert(1,1)) { + * new Error('Assert Method Failed'); + * } + */ + function assert(source, expected, options) { + if (isKindAsync(source) || isKindAsync(expected)) { + return assertAsync(source, expected, options); + } + const expectedFunction = + isFunction(expected) && expected(source, options) === false; + if (expectedFunction || notEqual(source, expected)) { + return createAssertError(source, expected, options); + } + return true; + } + + /** + * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to. + * + * @function bindAll + * @category utility + * @type {Function} + * @param {Object|Function|Array} collection - The functions to bind. + * @param {*} bindThis - Object to be bound to functions. + * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to. + * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided. + * + * @example + * import { assert, bindAll } from '@universalweb/acid'; + * const bounded = bindAll([function () { return this;}], 'Bounded'); + * assert(bounded[0](), 'Bounded'); + */ + function bindAll(collection, bindThis, targetAssign) { + const results = map(collection, (item) => { + return isFunction(item) ? item.bind(bindThis) : item; + }); + return targetAssign ? assign(targetAssign, results) : results; + } + + /** + * Clears the values out of an array, buffer, and objects like Map that have a clear method. + * + * @function clear + * @category utility + * @type {Function} + * @param {Array} source - Takes an array to be emptied. + * @returns {Array} - The originally given array. + * + * @example + * import { clear, assert } from '@universalweb/acid'; + * assert(clear(Buffer.from([1,'B', 'Cat'])), []); + */ + function clear(source) { + if (source) { + if (isBuffer(source)) { + return clearBuffer(source); + } else if (isArray(source)) { + return clearArray(source); + } else if (source.clear) { + source.clear(); + } else if (source.length) { + source.length = 0; + } + } + return source; + } + + /** + * Creates a structured clone of an object which is a "structured-cloneable type". + * + * @function clone + * @category utility + * @type {Function} + * @param {Object} source - Any structured-cloneable type object. + * @returns {Object} - Returns a deep clone of an object. + * + * @example + * import { clone, assert } from '@universalweb/acid'; + * assert(clone({a:{b:[2]}}), {a:{b:[2]}}); + */ + const structuredCloneSafe = globalThis.structuredClone; + function clone(source) { + return structuredCloneSafe(source); + } + + /** + * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next. + * + * @function concurrent + * @type {Function} + * @category Utility + * @async + * @param {Array} source - Array of async functions that will be looped through. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. + * @returns {Object} - The originally given array. + * + * @example + * import { concurrent, assert } from '@universalweb/acid'; + * const list = []; + * await concurrent([async (item) => { + * return item; + * }, async (item) => { + * return item; + * }], null, 1); + * assert(list, [1, 1]); + */ + async function concurrent(source, thisBind, ...args) { + const arrayLength = source.length; + const results = []; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = source[index].call( + thisBind, + ...args, + index, + results, + callable, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = source[index](...args, index, results, callable); + } + } + return Promise.all(results); + } + + /** + * Creates an array with all isFalsy values removed. The values false, null, 0, "", undefined, and NaN are isFalsy. + * + * @function compact + * @category Utility + * @type {Function} + * @param {Array|Object} source - Array or Object to be compacted. + * @returns {Array|Object} - A new object or array containing the filtered values. + * + * @example + * import { compact, assert } from '@universalweb/acid'; + * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']); + */ + function compact(source) { + if (isPlainObject(source)) { + const sourceKeys = keys(source); + const sourceKeysLength = sourceKeys.length; + const targetObject = {}; + for (let i = 0; i < sourceKeysLength; i++) { + const keyName = sourceKeys[i]; + const item = source[keyName]; + const isisTruthy = isTruthy(item); + if (isisTruthy) { + targetObject[keyName] = item; + } + } + return targetObject; + } + return source.filter((item) => { + return isTruthy(item); + }); + } + + /** + * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function forOfCompactMapAsync + * @category utility + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * import { assert,forOfCompactMapAsync } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = await forOfCompactMapAsync(source, async (item) => { + * return item; + * }); + * assert(temp, {b: 2, c: 3}); + */ + async function forOfCompactMapAsync( + source, + iteratee = returnValue, + resultsObject, + generatorArgs, + ) { + if (isGenerator(source)) { + const resultsGenerator = []; + for await (const item of source(...generatorArgs)) { + const result = await iteratee(item, resultsGenerator, source); + if (hasValue(result)) { + resultsGenerator.push(result); + } + } + return resultsGenerator; + } + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = await iteratee(value, results, source); + if (hasValue(result)) { + methodPushBound(result); + } + } + return results; + } + const methodSet = isFunction(results.set); + for await (const [key, value] of source) { + const result = await iteratee(value, key, results, source); + if (hasValue(result)) { + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + } + return results; + } + + /** + * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function forOfCompactMap + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * import { assert,forOfCompactMap } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = forOfCompactMap(source, (item) => { + * return item; + * }); + * assert(temp, {b: 2, c: 3}); + */ + function forOfCompactMap(source, iteratee = returnValue, resultsObject) { + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = iteratee(value, results, source); + if (hasValue(result)) { + methodPushBound(result); + } + } + return results; + } + const methodSet = isFunction(results.set); + for (const [key, value] of source) { + const result = iteratee(value, key, results, source); + if (hasValue(result)) { + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + } + return results; + } + + /** + * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function compactMap + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {Object | Function} [results = {}] - Object that will be used to assign results. + * @returns {Array | object | Function} - A new object of the same calling object's type. + * + * @example + * import { compactMap, assert } from '@universalweb/acid'; + * assert(compactMap({a: null, b: 2, c: 3}, (item) => { + * return item; + * }), {b: 2, c: 3}); + */ + const compactMap = generateLoop( + compactMapArray, + compactMapAsyncArray, + compactMapObject, + compactMapAsyncObject, + forOfCompactMap, + forOfCompactMapAsync, + ); + + function everyArg(...methods) { + if (isAsync(methods[0])) { + return async function (...args) { + return every(methods, async (method) => { + return every(args, async (item) => { + return method(item); + }); + }); + }; + } + return function (...args) { + return every(methods, (method) => { + return every(args, (item) => { + return method(item); + }); + }); + }; + } + + /** + * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. + * + * @function forOfFilter + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. + * + * @example + * import { assert, forOfFilter } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = forOfFilter(source, (item) => { + * return Boolean(item); + * }); + * assert(temp, {b: 2, c: 3}); + */ + function forOfFilter(source, iteratee = returnValue, resultsObject) { + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = iteratee(value, results, source); + if (result === true) { + methodPushBound(value); + } + } + } else { + const methodSet = isFunction(results.set); + for (const [key, value] of source) { + const result = iteratee(value, key, results, source); + if (result === true) { + if (methodSet) { + results.set(key, value); + } else { + results[key] = value; + } + } + } + } + return results; + } + + /** + * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. + * + * @function forOfFilterAsync + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. + * + * @example + * import { assert, forOfFilterAsync } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = forOfFilterAsync(source, (item) => { + * return Boolean(item); + * }); + * assert(temp, {b: 2, c: 3}); + */ + async function forOfFilterAsync( + source, + iteratee = returnValue, + resultsObject, + generatorArgs, + ) { + if (isGenerator(source)) { + const resultsGenerator = []; + for await (const item of source(...generatorArgs)) { + if ((await iteratee(item, resultsGenerator, source)) === true) { + resultsGenerator.push(item); + } + } + return resultsGenerator; + } + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = await iteratee(value, results, source); + if (result === true) { + methodPushBound(value); + } + } + } else { + const methodSet = isFunction(results.set); + for await (const [key, value] of source) { + const result = await iteratee(value, key, results, source); + if (result === true) { + if (methodSet) { + results.set(key, value); + } else { + results[key] = value; + } + } + } + } + return results; + } + + /** + * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. + * + * @function filter + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {Object | Function} [results = {}] - Object that will be used to assign results. + * @returns {Array | object | Function} - A new object of the same calling object's type. + * + * @example + * import { filter, assert } from '@universalweb/acid'; + * assert(filter({a: false, b: true, c: true}, (item) => { + * return item; + * }), {b: true, c: true}); + */ + const filter = generateLoop( + filterArray, + filterAsyncArray, + filterObject, + filterAsyncObject, + forOfFilter, + forOfFilterAsync, + ); + + function returnFlow$1(callable) { + return (...methods) => { + return (arg) => { + let value = arg; + callable(methods, (item) => { + value = item(value); + }); + return value; + }; + }; + } + /** + * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. + * + * @function flow + * @category utility + * @type {Function} + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flow(increment, increment, deduct)(0); + * // => 1 + */ + const flow = returnFlow$1(eachArray); + /** + * This method is like flow except that it creates a function that invokes the given functions from right to left. + * + * @function flowRight + * @category utility + * @type {Function} + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flowRight(increment, increment, deduct)(0); + * // => 1 + */ + const flowRight = returnFlow$1(eachRight); + + function returnFlow(callable) { + return (...methods) => { + return async (arg) => { + let value = arg; + await callable(methods, async (item) => { + value = await item(value); + }); + return value; + }; + }; + } + /** + * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. + * + * @function flowAsync + * @category utility + * @type {Function} + * @async + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); + * // => 2 + */ + const flowAsync = returnFlow(eachAsyncArray); + /** + * This method is like flow except that it creates a function that invokes the given functions from right to left. + * + * @function flowAsyncRight + * @category utility + * @type {Function} + * @async + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); + * // => 2 + */ + const flowAsyncRight = returnFlow(eachRightAsync); + + function forMap(source, callback) { + const cloned = cloneType(source); + const method = cloned.push || cloned.add; + if (method && isFunction(method)) { + const methodBound = method.bind(cloned); + source.forEach((item) => { + const result = callback(item, cloned); + methodBound(result); + }); + } else if (isFunction(cloned.set)) { + source.forEach((item, key) => { + const result = callback(item, key, cloned); + cloned.set(key, result); + }); + } else { + source.forEach((item, key) => { + const result = callback(item, key, cloned); + cloned[key] = result; + }); + } + return cloned; + } + + /** + * Takes all but the last item in the array. + * + * @function arraysToObject + * @type {Function} + * @category utility + * @param {Array} source - Array to have items extracted from. + * @param {Array} properties - Array to have items extracted from. + * @returns {Array} - Returns a completely flattened array. + * + * @example + * import { arraysToObject, assert } from '@universalweb/acid'; + * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3}); + */ + function arraysToObject(source, properties) { + const sortedObject = {}; + eachArray(source, (item, key) => { + sortedObject[properties[key]] = item; + }); + return sortedObject; + } + + /** + * Checks if an object contains something. For basic searches. + * + * @function has + * @category utility + * @param {Array|String|Object} source - Object to be checked. + * @param {String|Array|Function|RegExp} search - Object that is being searched for. + * @param {Number} position - Index at which to start searching. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { has, assert } from '@universalweb/acid'; + * assert(has('Hello World', 'Hello'), true); + * assert(has(['Hello', 'World'], 'hello'), true); + */ + function has(source, search, position) { + if (noValue(source) || noValue(search)) { + return false; + } + if (source === search) { + return true; + } + if (isString(source)) { + if (isString(search)) { + return source.includes(search, position); + } + if (isRegex(search)) { + return search.test(source); + } + if (isFunction(search)) { + return search(source); + } + if (isArray(search)) { + return everyArray(search, (item) => { + return has(source, item); + }); + } + return every(search, (item) => { + return has(source, item); + }); + } + if (isArray(source)) { + if (isRegex(search)) { + return everyArray(source, (item) => { + return item.test(search); + }); + } + if (isFunction(search)) { + return everyArray(source, search); + } + if (isArray(search)) { + return everyArray(search, (item) => { + return has(source, item); + }); + } + return source.includes(search, position); + } + if (isPlainObject(source)) { + if (isRegex(search)) { + return everyObject(source, (item) => { + return item.test(search); + }); + } + if (isFunction(search)) { + return everyObject(source, search); + } + if (isPlainObject(search)) { + return everyObject(source, (item, key) => { + return item === search[key]; + }); + } + return everyObject(source, (item) => { + return has(item, search); + }); + } + return false; + } + + /** + * Checks if the string has a '.'. + * + * @function hasDot + * @category utility + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { hasDot, assert } from '@universalweb/acid'; + * assert(hasDot('test.js'), true); + */ + const hasDot = regexTestFactory(/\./); + + /** + * Checks if a property on an object has a value. If not, it will assign a value. + * + * @function ifNotAssign + * @category utility + * @type {Function} + * @param {Object} rootObject - The object to check. + * @param {String} property - The property name which is to be checked. + * @param {*} equalThis - The reassignment value for the property being checked. + * @returns {Object} - Returns the provided rootObject. + * + * @example + * import { ifNotAssign, assert } from '@universalweb/acid'; + * assert(ifNotAssign({}, 'a', 1), {a:1}); + */ + const ifNotAssign = (rootObject, property, equalThis) => { + if (property && !hasValue(rootObject[property])) { + rootObject[property] = equalThis; + } + return rootObject; + }; + + class Intervals { + list = construct(Map); + construct() {} + /** + * Remove a setInterval that was created using the intervals function. + * + * @param {Number} id - The id of the setInterval to remove. + * @returns {undefined} - Returns nothing. + * + * @example + * timer(() => {}, 100); + * // => 0 + */ + remove(id) { + clearInterval(id); + this.list.delete(id); + } + has(id) { + return this.list.has(id); + } + get(id) { + return this.list.get(id); + } + /** + * Create a setInterval & add it to the list of interval timers. + * + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setTimeoutId ID. + * + * @example + * timers.set(() => {}, 100); + * // => 0 + */ + set(callable, time) { + const id = setInterval(() => { + callable(); + }, time); + this.list.set(id, true); + return id; + } + /** + * Clear all active setIntervals. + * + * @returns {undefined} - Returns undefined. + * + * @example + * intervals.clear(); + * // => undefined + */ + clear() { + const currentThis = this; + currentThis.list.forEach((id) => { + currentThis.remove(id); + }); + } + } + const intervals = construct(Intervals); + /** + * Create an interval timer. + * + * @function interval + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setInterval ID. + * + * @example + * interval(() => {}, 100); + * // => 0 + */ + function interval(callable, time) { + return intervals.set(callable, time); + } + /** + * Clear all active interval timers. + * + * @function clearIntervals + * @category function + * @returns {undefined} - Returns undefined. + * + * @example + * clearIntervals(); + * // => undefined + */ + function clearIntervals() { + const id = setTimeout(noop, 0); + times(id, (index) => { + intervals.remove(index); + }); + } + + function merge(target, ...sources) { + each(sources, (currentSource) => { + each(currentSource, (sourceItem, sourceKey) => { + if (target[sourceKey]) { + if ( + isPlainObject(sourceItem) || + isArray(sourceItem) || + sourceItem.forEach + ) { + return merge(target[sourceKey], sourceItem); + } + } + target[sourceKey] = sourceItem; + }); + }); + return target; + } + + /** + * Returns the model with the given name. + * + * @function Model + * @type {Class} + * @category utility + * @param {String} modelName - The name of the model to return. + * @param {*} modelSource - The value of the model to return. + * @returns {Model} - The model with the given name. + * + * @example + * import { Model, model, assert } from '@universalweb/acid'; + * const test = new Model('test', {a: 1}); + * assert(model('test'), {a: 1}); + */ + class Model { + static models = new Map(); + constructor(modelName, modelSource) { + if (hasValue(modelSource)) { + assign(this, modelSource); + this.modelName = modelName; + Model.models.set(modelName, modelSource); + } else { + assign(this, modelName); + } + } + delete(modelName) { + Model.models.delete(modelName || this.modelName); + } + set(modelName) { + if (modelName) { + this.modelName = modelName; + } + Model.models.set(modelName || this.modelName, this); + } + has(modelName) { + return Model.models.has(modelName || this.modelName); + } + get(modelName) { + return Model.models.get(modelName || this.modelName); + } + } + /** + * Set & Get a model. + * + * @function model + * @type {Function} + * @category utility + * @param {String} modelName - Name of the model. + * @param {Object} modelSource - The model object. + * @returns {Model} - Returns the associated model. + * + * @example + * import { model, assert } from '@universalweb/acid'; + * model('test', {a: 1}); + * assert(model('test'), {a: 1}); + */ + function model(modelName, modelSource) { + if (hasValue(modelSource)) { + return construct(Model, [modelName, modelSource]); + } + return get(modelName, Model.models); + } + + /** + * Takes the first two arguments given and returns them inside a new array. + * + * @function pair + * @category utility + * @param {*} argument1 - The source object. + * @param {*} argument2 - The source object. + * @returns {Array} The array which holds the pair. + * + * @example + * import { pair, assert } from '@universalweb/acid'; + * assert(air(1, 2), [1, 2]); + */ + function pair(argument1, argument2) { + return [argument1, argument2]; + } + + /** + * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee. + * + * @function concurrentStatus + * @category utility + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The array from Promise.allSettled. + * + * @example + * import { concurrentStatus, assert } from '@universalweb/acid'; + * const tempList = []; + * await concurrentStatus([1, 2], async (item) => { + * return item; + * }); + * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]); + */ + function concurrentStatus(source, iteratee, additionalArgument) { + const arrayLength = source.length; + const queue = []; + for (let index = 0; index < arrayLength; index++) { + queue[index] = iteratee( + source[index], + index, + source, + arrayLength, + additionalArgument, + ); + } + return Promise.allSettled(queue); + } + + /** + * A wrapper around the promise constructor. + * + * @function promise + * @type {Function} + * @category utility + * @param {Function} callback - Function to be called back. + * @returns {Promise} - A constructor with a callback function.). + * + * @example + * promise((a) => {}); + * // => Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined} + */ + function promise(callback) { + return new Promise(callback); + } + + /** + * Using a deep comparison it checks if properties of two objects using an array are equal. + * + * @function propertyMatch + * @type {Function} + * @category utility + * @param {Object} source - The source object to compare. + * @param {Object} compared - Object to be compared to source. + * @param {Array} properties - List of properties to compare defaults to keys(source). + * @returns {Array} - Returns an array of properties. + * + * @example + * import { propertyMatch, assert } from '@universalweb/acid'; + * assert(propertyMatch({ + * a: 1, + * b: 2 + * }, { + * a: 1, + * b: 2 + * }, ['a', 'b']), true); + */ + const propertyMatch = (source, compared, properties = keys(source)) => { + return everyArray(properties, (property) => { + return isEqual(source[property], compared[property]); + }); + }; + + function setKey(source, key, value) { + if (key && isPlainObject(source)) { + source[key] = value; + } else if (isNumber(key) && isArray(source)) { + source[key] = value; + } else if (source.set) { + source.set(key, value); + } else if (source.push) { + source.push(value); + } else if (source.add) { + source.add(value); + } else { + source[key] = value; + } + return source; + } + + function setValue(source, value, key) { + if (isNumber(key) && isArray(source)) { + source[key] = value; + } else if (source.push) { + source.push(value); + } else if (source.add) { + source.add(value); + } else { + source[key] = value; + } + return source; + } + + class Store { + source; + constructor(source = {}) { + this.source = source; + if (source === null || typeof source !== "object") { + return source; + } + eachObject(source, (property) => { + source[property] = new Store(source[property]); + }); + this.data = new Proxy(source, { + get(proxySource, property) { + console.log(proxySource, property, proxySource[property]); + return proxySource[property]; + }, + set(proxySource, property, value) { + console.log(proxySource, property, proxySource[property]); + proxySource[property] = new Store(value); + return true; + }, + }); + } + } + + /** + * This method returns a new empty array. + * + * @function stubArray + * @category utility + * @type {Function} + * @returns {Array} - Returns the new empty array. + * + * @example + * import { stubArray, assert } from '@universalweb/acid'; + * assert(stubArray(), []); + */ + function stubArray() { + return []; + } + + /** + * This method returns false. + * + * @function stubFalse + * @category utility + * @type {Function} + * @returns {Boolean} - Returns false. + * + * @example + * import { stubFalse, assert } from '@universalweb/acid'; + * assert(stubFalse(), false); + */ + function stubFalse() { + return false; + } + + /** + * This method returns a new empty object. + * + * @function stubObject + * @category utility + * @type {Function} + * @returns {Object} - Returns the new empty object. + * + * @example + * import { stubObject, assert } from '@universalweb/acid'; + * assert(stubObject(), {}); + */ + const stubObject = () => { + return {}; + }; + + /** + * This method returns a new empty string. + * + * @function stubString + * @category utility + * @type {Function} + * @returns {String} - Returns the new empty string. + * + * @example + * import { stubString, assert } from '@universalweb/acid'; + * assert(stubString(), ''); + */ + const stubString = () => { + return ""; + }; + + /** + * This method returns true. + * + * @function stubTrue + * @category utility + * @type {Function} + * @returns {Boolean} - Returns true. + * + * @example + * import { stubTrue, assert } from '@universalweb/acid'; + * assert(stubTrue(), true); + */ + const stubTrue = () => { + return true; + }; + + /** + * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument. + * + * @async + * @function timesAsync + * @category utility + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @returns {undefined} - Nothing. + * + * @example + * import { timesAsync } from '@universalweb/acid'; + * await timesAsync(3, async (item) => { + * console.log(item); + * }); + * // 0 + * // 1 + * // 2 + * // => undefined + */ + async function timesAsync(amount, iteratee) { + for (let index = 0; index < amount; index++) { + await iteratee(amount); + } + } + /** + * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array. + * + * @async + * @function timesMapAsync + * @category array + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @param {Array} [results = []] - Array that will have iteratee return pushed to. + * @returns {Array} - An array with iteratee's returned values. + * + * @example + * import { timesMapAsync } from '@universalweb/acid'; + * await timesMapAsync(3, (item) => { + * return item; + * }); + * // => [0, 1, 2] + */ + async function timesMapAsync(amount, iteratee, results = []) { + for (let index = 0; index < amount; index++) { + results[index] = await iteratee(amount); + } + return results; + } + + /** + * Performs a toggle between 2 values using a deep or strict comparison. + * + * @function toggle + * @type {Function} + * @category utility + * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments. + * @param {(string|number|Object|Array)} on - The first object to be compared to. + * @param {(string|number|Object|Array)} off - The second object to be compared to. + * @returns {(string|number|Object|Array)} - The opposing value to the current. + * + * @example + * import { toggle } from '@universalweb/acid'; + * let toggleMe = true; + * toggleMe = toggle(toggleMe, true, false); + * // => false + */ + function toggle(value, on = true, off = false) { + return isEqual(on, value) ? off : on; + } + + /** + * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available. + * + * @class UniqID + * @type {Class} + * @category utility + * @returns {UniqID} - Returns a new instance of UniqID. + * + * @example + * import { UniqID, construct, assert } from '@universalweb/acid'; + * const gen = construct(UniqID); + * assert(gen.get(), 0); + * assert(gen.get(), 1); + * gen.free(0); + * assert(gen.get(), 0); + */ + class UniqID { + totalActive = 0; + freed = []; + totalFree = 0; + /** + * Generates a new ID or recycle one that is no longer used. + * + * @function get + * @class UniqID + * @category utility + * @type {Function} + * @returns {Number} - Returns a unique id. + * + * @example + * import { UniqID, construct, assert } from '@universalweb/acid'; + * const gen = construct(UniqID); + * assert(gen.get(), 0); + */ + get() { + let result = this.freed.shift(); + if (hasValue(result)) { + this.totalFree--; + } else { + result = this.totalActive; + this.totalActive++; + } + return result; + } + /** + * Frees an UID so that it may be recycled for later use. + * + * @function free + * @class UniqID + * @category utility + * @type {Function} + * @param {Number} id - Number to be freed. + * @returns {undefined} - Nothing is returned. + * + * @example + * import { UniqID, construct, assert } from '@universalweb/acid'; + * const gen = construct(UniqID); + * assert(gen.get(), 0); + * gen.free(0); + * assert(gen.get(), 0); + */ + free(id) { + this.freed.push(id); + this.totalFree++; + const isActive = this.totalActive > 0; + const shouldReset = this.totalActive === this.totalFree; + if (isActive && shouldReset) { + this.reset(); + } + } + reset() { + this.totalActive = 0; + this.freed.length = 0; + this.totalFree = 0; + } + } + /** + * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available. + * + * @function uniqID + * @category utility + * + * @example + * import { uniqID, assert } from '@universalweb/acid'; + * assert(uniqID.get(), 0); + * assert(uniqID.get(), 1); + * uniqID.free(0); + * assert(uniqID.get(), 0); + */ + const uniqID = construct(UniqID); + + /** + * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. + * + * @function VirtualStorage + * @category utility + * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. + * @returns {*} - Returns a new VirtualStorage Object. + * + * @example + * import { VirtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = new VirtualStorage(); + * // => New VirtualStorage Object + */ + class VirtualStorage { + constructor(initialObject = new Map()) { + this.items = initialObject; + } + /** + * Get an item from a virtual storage object. + * + * @param {String} key - The key used to store the data. + * @returns {undefined} - Returns undefined. + * + * @example + * import { VirtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = virtualStorage(); + * myVirtualStorage.setItem('key', 'value'); + * myVirtualStorage.getItem('key'); + * // => 'value' + */ + getItem(key) { + if (this.isMap) { + return this.items.get(key); + } else { + return this.items[key]; + } + } + get(...args) { + return this.getItem(...args); + } + hasItem(key) { + if (this.isMap) { + return this.items.has(key); + } else { + return hasValue(this.items[key]); + } + } + has(...args) { + return this.hasItem(...args); + } + /** + * Save an item to a virtual storage object. + * + * @param {String} key - The key used to store the data. + * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify. + * @returns {undefined} - Returns undefined. + * + * @example + * import { VirtualStorage, assert } from '@universalweb/acid'; + * const vStorage = new VirtualStorage(); + * vStorage.setItem('title', 'value'); + * assert(vStorage.getItem('title'), 'value'); + */ + setItem(key, value) { + if (this.isMap) { + this.items.set(key, value); + } else { + this.items[key] = value; + } + return this; + } + set(...args) { + return this.setItem(...args); + } + /** + * Clears all data from the virtual storage object by replacing with a new object. + * + * @returns {undefined} - Returns undefined. + * + * @example + * import { virtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = virtualStorage(); + * myVirtualStorage.setItem('key', 'value'); + * myVirtualStorage.clear(); + * myVirtualStorage.getItem('key'); + * // => undefined + */ + clear() { + if (this.isMap) { + this.items.clear(); + } else { + this.items = cloneType(this.items); + } + return this; + } + /** + * Remove an item from a virtual storage object. + * + * @param {String} key - The key used to remove data. + * @returns {undefined} - Returns undefined. + * + * @example + * import { virtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = virtualStorage(); + * myVirtualStorage.setItem('key', 'value'); + * myVirtualStorage.removeItem('key'); + * myVirtualStorage.getItem('key'); + * // => undefined + */ + removeItem(key) { + if (this.isMap) { + this.items.delete(key); + } else { + this.items[key] = null; + } + return this; + } + remove(...args) { + return this.removeItem(...args); + } + } + /** + * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. + * + * @function virtualStorage + * @category browser + * @type {Function} + * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. + * @returns {*} - Returns a new VirtualStorage Object. + * + * @example + * import { virtualStorage, assert } from '@universalweb/acid'; + * const vStorage = virtualStorage(); + * vStorage.setItem('title', 'value'); + * assert(vStorage.getItem('title'), 'value'); + */ + function virtualStorage(initialObject) { + return new VirtualStorage(initialObject); + } + + /** + * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object. + * + * @function inAsync + * @type {Function} + * @category Utility + * @async + * @param {Array} source - Array of async functions that will be looped through. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. + * @returns {Object} - The originally given array. + * + * @example + * import { inAsync, assert } from '@universalweb/acid'; + * const list = []; + * await inAsync([async (firstArgument, item, index) => { + * list.push(index + firstArgument.a); + * }, async (firstArgument, item, index) => { + * list.push(index); + * }], {a:1}); + * assert(list, [1, 1]); + */ + async function inAsync(source, thisBind, ...args) { + const arrayLength = source.length; + const results = []; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = await source[index].call( + thisBind, + ...args, + index, + callable, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = await source[index](...args, index, callable); + } + } + return results; + } + + /** + * Invoke an array of functions. + * + * @function inSync + * @category Utility + * @type {Function} + * @param {Array} source - Array of functions that will be looped through. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function. + * @returns {undefined} - Returns undefined. + * + * @example + * inSync([() => {console.log(1);}, () => {console.log(2);}]); + * // 1 + * // 2 + * // => undefined + */ + function inSync(source, thisBind, ...args) { + const arrayLength = source.length; + const results = []; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = callable.call(thisBind, ...args, index, callable); + } + } else { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = callable(...args, index, callable); + } + } + return results; + } + + /** + * Checks to see of the browser agent has a string. + * + * @function isAgent + * @category browser + * @type {Function} + * @param {String} source - The string to search for. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isAgent, assert } from '@universalweb/acid'; + * assert(isAgent('NotThere'), false); + */ + function isAgent(source) { + return hasValue(source) ? isAgent[source] : keys(isAgent); + } + const userAgent = globalThis.navigator?.userAgentData; + if (userAgent) { + eachObject(userAgent, (value, key) => { + if (isBoolean(value) && value) { + isAgent[key] = value; + } + }); + eachArray(userAgent.brands, (value) => { + isAgent[value.brand] = value.version; + }); + } else if (navigator.userAgent) { + let userAgentNormalized = navigator.userAgent.toLowerCase(); + userAgentNormalized = userAgentNormalized.replace(/_/g, "."); + userAgentNormalized = userAgentNormalized.replace(/[#_,;()]/g, ""); + const userAgentSplit = userAgentNormalized.split(/ |\//); + eachArray(userAgentSplit, (item) => { + isAgent[item] = true; + }); + } + + /** + * Attaches an event listener to a node. + * + * @function eventAdd + * @category browser + * @type {Function} + * @param {Node} node - Given node. + * @param {String} eventName - A string representing the event type. + * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs. + * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation. + * @returns {Node} - Returns given node. + * + * @example + * eventAdd(document.body, 'click', () => {console.log('CLICKED');}); + * // = > document.body + */ + function eventAdd(node, eventName, callback, useCapture) { + node.addEventListener(eventName, callback, useCapture); + return node; + } + /** + * Attaches an event listener to a node. + * + * @function eventRemove + * @category browser + * @type {Function} + * @param {Node} node - Given node. + * @param {String} eventName - A string representing the event type. + * @param {Object|Function} callback - The object which receives a notification when an event of the specified type occurs. + * @param {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation. + * @returns {Node} - Returns given node. + * + * @example + * eventRemove(document.body, () => {console.log('CLICKED');}); + * // = > Undefined + */ + function eventRemove(node, eventName, callback, useCapture) { + node.removeEventListener(eventName, callback, useCapture); + return node; + } + + /** + * Checks if the keycode of the event is strictly equal to 13. + * + * @function isEnter + * @category browser + * @type {Function} + * @param {Object} eventObject - Object to be checked. + * @returns {Boolean} - Returns true if the keycode property of the object equals 13. + * + * @example + * isEnter('click'); + * // => false + */ + function isEnter(eventObject) { + return eventObject.keyCode === 13; + } + + /** + * Create a document fragment. + * + * @function createFragment + * @category browser + * @type {Function} + * @ignore + * @returns {Fragment} - Returns a new document fragment. + */ + const createFragment = document.createDocumentFragment.bind(document); + + /** + * Append a DOM node. + * + * @function append + * @category browser + * @ignoreTest + * @type {Function} + * @ignore + * @param {Node} parentNode - The parent node. + * @param {Node} child - The node to be appended. + * @returns {undefined} - Returns the child. + */ + function append(parentNode, child) { + parentNode.appendChild(child); + return child; + } + + /** + * Assign attributes to a DOM node. + * + * @function nodeAttribute + * @category browser + * @ignoreTest + * @type {Function} + * @async + * @param {Node} node - The DOM node. + * @param {Object|Array} object - Object with key being the attribute name and the value being the attribute value. If an array is given it will get the values corresponding to the array items. + * @returns {Object|Node} - If using an array this returns an object of attribute names as keys and their values as the property value. If using an object this will return the provided node. + * + * @example + * nodeAttribute(document.body, { 'data-example': 'test'}); + */ + function nodeAttribute(node, object) { + if (isArray(object)) { + return zipObject( + object, + mapArray(object, (item) => { + return node.getAttribute(item); + }), + ); + } + eachObject(object, (item, key) => { + node.setAttribute(key, item); + }); + return node; + } + + const dotString = "."; + const poundString = "#"; + const classTest = /^.[\w_-]+$/; + const tagTest = /^[A-Za-z]+$/; + const regexSpace = /\s/; + /** + * Wrapper around getElementsByClassName. + * + * @function getByClass + * @category browser + * @ignoreTest + * @type {Function} + */ + const getByClass = document.getElementsByClassName.bind(document); + /** + * Wrapper around getElementsByTagName. + * + * @function getByTag + * @category browser + * @ignoreTest + * @type {Function} + */ + const getByTag = document.getElementsByTagName.bind(document); + /** + * Wrapper around getElementsByIdName. + * + * @function getById + * @category browser + * @ignoreTest + * @type {Function} + */ + const getById = document.getElementById.bind(document); + /** + * Wrapper around querySelector. + * + * @function querySelector + * @category browser + * @ignoreTest + * @type {Function} + */ + const querySelector = document.querySelector.bind(document); + /** + * Wrapper around querySelectorAll. + * + * @function querySelectorAll + * @category browser + * @ignoreTest + * @type {Function} + */ + const querySelectorAll = document.querySelectorAll.bind(document); + /** + * Returns relevant DOM node. + * + * @function selector + * @category browser + * @ignoreTest + * @param {String} select - String to be evaluated. + * @type {Function} + * @returns {Node} - Returns a DOM node. + * + * @example + * selector('#node'); + * // =>
+ */ + function selector(select) { + const firstLetter = select[0]; + switch (firstLetter) { + case poundString: { + if (!regexSpace.test(select)) { + return getById(restString(select)); + } + break; + } + case dotString: { + if (classTest.test(select)) { + return getByClass(restString(select)); + } + break; + } + default: { + if (tagTest.test(select)) { + return getByTag(select); + } + } + } + return querySelectorAll(select); + } + + const createElementCache = document.createElement.bind(document); + const nodeAttachLoadingEvents = (node) => { + return promise((accept) => { + eventAdd(node, "load", accept, true); + eventAdd(node, "error", accept, true); + append(querySelector("head"), node); + }); + }; + /** + * Asynchronously import a js file and append it to the head node. + * If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity. + * + * @function importjs + * @category browser + * @type {Function} + * @async + * @param {*} url - URL of the script to import. If not "." is found in the file name ".js" will be appended. + * @returns {Promise} - Returns a promise which returns a "load" or "error" event associated with the script. + * + * @example + * importjs('core.js'); + * importjs('core'); + */ + function importjs(url) { + const src = (hasDot(url) && url) || `${url}.js`; + const node = nodeAttribute(createElementCache("script"), { + async: "", + src, + }); + return nodeAttachLoadingEvents(node); + } + + /** + * Runs a function if the document has finished loading. If not, add an eventlistener. + * + * @function isDocumentReady + * @category browser + * @ignoreTest + * @type {Function} + * @param {Function} callable - Function to be run. + * @returns {Boolean|Function} - If the document is ready, returns a function. If not, return false. + * + * @example + * isDocumentReady(() => {return 1}); + * // => 1 + */ + function isDocumentReady(callable) { + const state = document.readyState; + const checkStatus = + state === "interactive" || state === "completed" || state === "complete"; + if (checkStatus) { + return callable ? callable() : true; + } + if (callable) { + eventAdd(document, "DOMContentLoaded", callable); + } + return false; + } + isDocumentReady(() => { + const scriptTag = getById("AcidLib"); + const scriptName = + (scriptTag && scriptTag.getAttribute("data-index")) || "/index"; + importjs(scriptName); + }); + + const protocol = location.protocol; + const protocolSocket = protocol === "http:" ? "ws" : "wss"; + const hostname = location.hostname; + /** + * Holds client hardware, browser, and host info. + * + * @memberof $ + * @category browser + * @ignoreTest + * @property {Object} info - Client hardware & host info. + * @type {Object} + */ + const info = { + hardware: { + cores: navigator.hardwareConcurrency, + }, + host: { + name: hostname, + protocol, + protocolSocket, + }, + }; + + function saveDimensions() { + assign(info, { + bodyHeight: document.body.offsetHeight, + bodyWidth: document.body.offsetWidth, + windowHeight: window.innerHeight, + windowWidth: window.innerWidth, + }); + } + /** + * Save current document & window dimensions to the info property. + * + * @function updateDimensions + * @category browser + * @ignoreTest + * @type {Function} + * @returns {undefined} - Returns undefined. + * + * @example + * updateDimensions(); + */ + function updateDimensions() { + saveDimensions(); + } + isDocumentReady(updateDimensions); + eventAdd(window, "load", updateDimensions, true); + eventAdd(window, "resize", updateDimensions, true); + + /** + * LocalStorage Module.. + * + * @module browser/storage + */ + exports.hasLocal = void 0; + function hasStorage(storeCheck) { + try { + storeCheck().removeItem("TESTING"); + exports.hasLocal = true; + } catch (e) { + exports.hasLocal = false; + } + } + hasStorage(() => { + return localStorage; + }); + /** + * Constructs a virtual storage container with localStorage support. + * BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported. + * If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed. + * BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed. + * + * @class BrowserStorage + * @category browser + * @returns {BrowserStorage} - Returns a new instance of BrowserStorage. + * + * @example + * import { BrowserStorage, construct, assert } from '@universalweb/acid'; + * const storageBrowserStorage = construct(BrowserStorage); + * storageBrowserStorage.setItem('key', 'value'); + * assert(storageBrowserStorage.getItem('key'), 'value'); + */ + class BrowserStorage { + constructor(initialObject) { + if (this.hasLocal) { + this.local = localStorage; + } + this.storage = virtualStorage(initialObject); + } + hasLocal = exports.hasLocal; + /** + * Save an item to a browserStorage. + * + * @function setItem + * @class BrowserStorage + * @category browser + * @param {String} key - The key used to store the data. + * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify. + * @returns {undefined} - Returns undefined. + * + * @example + * import { BrowserStorage, construct, assert } from '@universalweb/acid'; + * const storageBrowserStorage = construct(BrowserStorage); + * storageBrowserStorage.setItem('key', 'value'); + * assert(storageBrowserStorage.getItem('key'), 'value'); + */ + setItem(key, value) { + if (this.hasLocal) { + this.local.setItem(key, isString(value) ? value : stringify(value)); + } + return this.storage.setItem(key, value); + } + /** + * Get an item from a browserStorage. + * + * @function getItem + * @class BrowserStorage + * @category browser + * @param {String} key - The key used to store the data. + * @returns {undefined} - Returns undefined. + * + * @example + * import { BrowserStorage, construct, assert } from '@universalweb/acid'; + * const storageBrowserStorage = construct(BrowserStorage); + * storageBrowserStorage.setItem('key', 'value'); + * assert(storageBrowserStorage.getItem('key'), 'value'); + */ + getItem(key) { + const item = this.storage.getItem(key); + if (hasValue(item)) { + return item; + } + if (!hasValue(item) && this.hasLocal) { + return this.local.getItem(key); + } + } + /** + * Clears all data for the browserStorage including all of localStorage if supported. + * + * @function clear + * @class BrowserStorage + * @category browser + * @returns {undefined} - Returns undefined. + * + * @example + * import { BrowserStorage, construct, assert } from '@universalweb/acid'; + * const storageBrowserStorage = construct(BrowserStorage); + * storageBrowserStorage.setItem('key', 'value'); + * assert(storageBrowserStorage.getItem('key'), 'value'); + * storageBrowserStorage.clear(); + * assert(storageBrowserStorage.getItem('key'), undefined); + */ + clear() { + if (this.hasLocal) { + this.local.clear(); + } + this.storage.clear(); + } + /** + * Remove an item from a browserStorage. + * + * @class BrowserStorage + * @category browser + * @function removeItem + * @param {String} key - The key used to remove data. + * @returns {undefined} - Returns undefined. + * + * @example + * import { BrowserStorage, construct, assert } from '@universalweb/acid'; + * const storageBrowserStorage = construct(BrowserStorage); + * storageBrowserStorage.setItem('key', 'value'); + * assert(storageBrowserStorage.getItem('key'), 'value'); + * storageBrowserStorage.removeItem('key'); + * assert(storageBrowserStorage.getItem('key'), undefined); + */ + removeItem(key) { + if (this.hasLocal) { + this.local.removeItem(key); + } + this.storage.removeItem(key); + } + } + /** + * The browserStorage function is a factory which wraps the BrowserStorage class constructor. + * + * @function browserStorage + * @category browser + * @type {Function} + * @returns {*} - Returns a new BrowserStorage Object. + * + * @example + * const storageBrowserStorage = browserStorage(); + * // => New BrowserStorage Object + */ + function browserStorage(virtualFlag) { + return new BrowserStorage(virtualFlag); + } + + const generateTheme = (color, bg) => { + return `color:${color};background:${bg};`; + }; + const themes = { + alert: generateTheme("#fff", "#f44336"), + important: generateTheme("#fff", "#E91E63"), + notify: generateTheme("#fff", "#651FFF"), + warning: generateTheme("#000", "#FFEA00"), + }; + /** + * Console.trace wrapper with theme support. + * + * @function cnsl + * @category browser + * @ignoreTest + * @type {Function} + * @param {Object} value - The value to be logged. + * @param {String} themeName - The name of the theme to be used. + * @returns {undefined} - Returns undefined. + * + * @example + * cnsl('Lucy', 'notify'); + * // 'Lucy' + */ + const cnsl = (value, themeName) => { + const data = isString(value) ? value : stringify(value); + if (themeName === "alert" || themeName === "warning") { + return console.trace( + `%c${data}`, + `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`, + ); + } + console.log( + `%c${data}`, + `${themes[themeName]}font-size:13px;padding:2px 5px;border-radius:2px;`, + ); + }; + /** + * Create color themes for cnsl method. + * + * @function cnslTheme + * @category browser + * @ignoreTest + * @type {Function} + * @param {String} themeName - The name of the theme. + * @param {String} color - The text color. + * @param {String} background - The background color of the block. + * @returns {undefined} - Returns undefined. + * + * @example + * cnslTheme('BlackNWhite', '#fff', '#000'); + */ + const cnslTheme = (themeName, color, background) => { + themes[themeName] = generateTheme(color, background); + }; + + /** + * Checks if value is a plain DOM Node. + * + * @function isDom + * @category browser + * @ignoreTest + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isDom, assert } from '@universalweb/acid'; + * assert(isDom(document.querySelectorAll('head')), true); + */ + function isDom(source) { + return source && source.nodeType !== 9; + } + /** + * Checks if the value is a HTMLCollection. + * + * @function isHTMLCollection + * @category browser + * @ignoreTest + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isHTMLCollection, assert } from '@universalweb/acid'; + * document.body.innerHTML = '
'; + * assert(isHTMLCollection(document.getElementsByClassName('test')), true); + */ + const objectHTMLCollection = "[object HTMLCollection]"; + function isHTMLCollection(source) { + return hasValue(source) + ? source.toString() === objectHTMLCollection + : false; + } + /** + * Checks if the value is a NodeList. + * + * @function isNodeList + * @category browser + * @ignoreTest + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNodeList, assert } from '@universalweb/acid'; + * document.body.innerHTML = '
'; + * assert(isNodeList(document.querySelectorAll('.test')), true); + */ + const objectNodeList = "[object NodeList]"; + function isNodeList(source) { + return hasValue(source) ? source.toString() === objectNodeList : false; + } + + exports.BrowserStorage = BrowserStorage; + exports.Chain = Chain; + exports.Intervals = Intervals; + exports.Model = Model; + exports.Store = Store; + exports.Timers = Timers; + exports.UniqID = UniqID; + exports.VirtualStorage = VirtualStorage; + exports.add = add; + exports.after = after; + exports.append = append; + exports.apply = apply; + exports.arrayToRegex = arrayToRegex; + exports.arraysToObject = arraysToObject; + exports.ary = ary; + exports.assert = assert; + exports.assertAsync = assertAsync; + exports.assign = assign; + exports.assignToClass = assignToClass; + exports.assignToObject = assignToObject; + exports.before = before; + exports.bindAll = bindAll; + exports.browserStorage = browserStorage; + exports.cacheNativeMethod = cacheNativeMethod; + exports.calcProgress = calcProgress; + exports.camelCase = camelCase; + exports.chain = chain; + exports.chunk = chunk; + exports.chunkString = chunkString; + exports.clear = clear; + exports.clearArray = clearArray; + exports.clearBuffer = clearBuffer; + exports.clearIntervals = clearIntervals; + exports.clearTimers = clearTimers; + exports.clone = clone; + exports.cloneArray = cloneArray; + exports.cloneType = cloneType; + exports.cnsl = cnsl; + exports.cnslTheme = cnslTheme; + exports.compact = compact; + exports.compactKeys = compactKeys; + exports.compactMap = compactMap; + exports.compactMapArray = compactMapArray; + exports.compactMapAsyncArray = compactMapAsyncArray; + exports.compactMapAsyncObject = compactMapAsyncObject; + exports.compactMapObject = compactMapObject; + exports.concurrent = concurrent; + exports.concurrentEachArray = concurrentEachArray; + exports.concurrentStatus = concurrentStatus; + exports.construct = construct; + exports.constructorName = constructorName; + exports.countBy = countBy; + exports.countKey = countKey; + exports.countWithoutKey = countWithoutKey; + exports.createFragment = createFragment; + exports.curry = curry; + exports.curryRight = curryRight; + exports.debounce = debounce; + exports.deduct = deduct; + exports.defProp = defProp; + exports.difference = difference; + exports.divide = divide; + exports.drop = drop; + exports.dropRight = dropRight; + exports.each = each; + exports.eachArray = eachArray; + exports.eachAsyncArray = eachAsyncArray; + exports.eachAsyncObject = eachAsyncObject; + exports.eachObject = eachObject; + exports.eachRight = eachRight; + exports.eachRightAsync = eachRightAsync; + exports.ensureArray = ensureArray; + exports.ensureBuffer = ensureBuffer; + exports.equalsZero = isZero; + exports.escapeRegex = escapeRegex; + exports.escapeRegexRegex = escapeRegexRegex; + exports.eventAdd = eventAdd; + exports.eventRemove = eventRemove; + exports.every = every; + exports.everyArg = everyArg; + exports.everyArray = everyArray; + exports.everyAsyncArray = everyAsyncArray; + exports.everyAsyncObject = everyAsyncObject; + exports.everyObject = everyObject; + exports.extendClass = extendClass; + exports.filter = filter; + exports.filterArray = filterArray; + exports.filterAsyncArray = filterAsyncArray; + exports.filterAsyncObject = filterAsyncObject; + exports.filterObject = filterObject; + exports.findIndex = findIndex; + exports.findIndexCache = findIndexCache; + exports.findItem = findItem; + exports.first = first; + exports.flatten = flatten; + exports.flattenDeep = flattenDeep; + exports.flow = flow; + exports.flowAsync = flowAsync; + exports.flowAsyncRight = flowAsyncRight; + exports.flowRight = flowRight; + exports.forEach = forEach; + exports.forEachAsync = forEachAsync; + exports.forMap = forMap; + exports.forOf = forOf; + exports.forOfAsync = forOfAsync; + exports.forOfCompactMap = forOfCompactMap; + exports.forOfCompactMapAsync = forOfCompactMapAsync; + exports.forOfEvery = forOfEvery; + exports.forOfEveryAsync = forOfEveryAsync; + exports.forOfFilter = forOfFilter; + exports.forOfFilterAsync = forOfFilterAsync; + exports.forOfMap = forOfMap; + exports.forOfMapAsync = forOfMapAsync; + exports.generateLoop = generateLoop; + exports.get = get; + exports.getByClass = getByClass; + exports.getById = getById; + exports.getByTag = getByTag; + exports.getEntries = getEntries; + exports.getFileExtension = getFileExtension; + exports.getFilename = getFilename; + exports.getHighest = getHighest; + exports.getLowest = getLowest; + exports.getNumberInsertIndex = getNumberInsertIndex; + exports.getPropDesc = getPropDesc; + exports.getPropNames = getPropNames; + exports.getType = getType; + exports.getTypeName = getTypeName; + exports.groupBy = groupBy; + exports.has = has; + exports.hasAnyKeys = hasAnyKeys; + exports.hasDot = hasDot; + exports.hasKeys = hasKeys; + exports.hasLength = hasLength; + exports.hasProp = hasProp; + exports.hasValue = hasValue; + exports.htmlEntities = htmlEntities; + exports.ifInvoke = ifInvoke; + exports.ifNotAssign = ifNotAssign; + exports.ifValue = ifValue; + exports.importjs = importjs; + exports.inAsync = inAsync; + exports.inSync = inSync; + exports.increment = increment; + exports.indexBy = indexBy; + exports.info = info; + exports.initial = initial; + exports.initialString = initialString; + exports.insertInRange = insertInRange; + exports.intersection = intersection; + exports.interval = interval; + exports.intervals = intervals; + exports.invert = invert; + exports.invokeArray = invokeArray; + exports.invokeCollection = invokeCollection; + exports.invokeCollectionAsync = invokeCollectionAsync; + exports.isAgent = isAgent; + exports.isArguments = isArguments; + exports.isArray = isArray; + exports.isArrayBuffer = isArrayBuffer; + exports.isArrayBufferCall = isArrayBufferCall; + exports.isArrayLike = isArrayLike; + exports.isAsync = isAsync; + exports.isAsyncCall = isAsyncCall; + exports.isBigInt = isBigInt; + exports.isBigIntCall = isBigIntCall; + exports.isBoolean = isBoolean; + exports.isBooleanCall = isBooleanCall; + exports.isBuffer = isBuffer; + exports.isBufferCall = isBufferCall; + exports.isChild = isChild; + exports.isCloneable = isCloneable; + exports.isConstructor = isConstructor; + exports.isConstructorFactory = isConstructorFactory; + exports.isConstructorNameFactory = isConstructorNameFactory; + exports.isDate = isDate; + exports.isDateCall = isDateCall; + exports.isDeno = isDeno; + exports.isDocumentReady = isDocumentReady; + exports.isDom = isDom; + exports.isEmpty = isEmpty; + exports.isEnter = isEnter; + exports.isEqual = isEqual; + exports.isEven = isEven; + exports.isF32 = isF32; + exports.isF32Call = isF32Call; + exports.isF64 = isF64; + exports.isF64Call = isF64Call; + exports.isFalse = isFalse; + exports.isFalsy = isFalsy; + exports.isFileCSS = isFileCSS; + exports.isFileHTML = isFileHTML; + exports.isFileJS = isFileJS; + exports.isFileJSON = isFileJSON; + exports.isFloat = isFloat; + exports.isFunction = isFunction; + exports.isGenerator = isGenerator; + exports.isGeneratorCall = isGeneratorCall; + exports.isHTMLCollection = isHTMLCollection; + exports.isI16 = isI16; + exports.isI16Call = isI16Call; + exports.isI32 = isI32; + exports.isI32Call = isI32Call; + exports.isI8 = isI8; + exports.isI8Call = isI8Call; + exports.isIterable = isIterable; + exports.isKindAsync = isKindAsync; + exports.isMap = isMap; + exports.isMapCall = isMapCall; + exports.isMatchArray = isMatchArray; + exports.isMatchObject = isMatchObject; + exports.isNegative = isNegative; + exports.isNodeList = isNodeList; + exports.isNodejs = isNodejs; + exports.isNotArray = isNotArray; + exports.isNotNumber = isNotNumber; + exports.isNotString = isNotString; + exports.isNull = isNull; + exports.isNumber = isNumber; + exports.isNumberCall = isNumberCall; + exports.isNumberEqual = isNumberEqual; + exports.isNumberInRange = isNumberInRange; + exports.isNumberNotInRange = isNumberNotInRange; + exports.isOdd = isOdd; + exports.isParent = isParent; + exports.isPlainObject = isPlainObject; + exports.isPositive = isPositive; + exports.isPrimitive = isPrimitive; + exports.isPromise = isPromise; + exports.isRegex = isRegex; + exports.isRegexCall = isRegexCall; + exports.isRelated = isRelated; + exports.isSafeInt = isSafeInt; + exports.isSame = isSame; + exports.isSameType = isSameType; + exports.isSet = isSet; + exports.isSetCall = isSetCall; + exports.isString = isString; + exports.isTrue = isTrue; + exports.isTruthy = isTruthy; + exports.isTypeFactory = isTypeFactory; + exports.isTypedArray = isTypedArray; + exports.isU16 = isU16; + exports.isU16Call = isU16Call; + exports.isU32 = isU32; + exports.isU32Call = isU32Call; + exports.isU8 = isU8; + exports.isU8C = isU8C; + exports.isU8CCall = isU8CCall; + exports.isU8Call = isU8Call; + exports.isUndefined = isUndefined; + exports.isWeakMap = isWeakMap; + exports.isWeakMapCall = isWeakMapCall; + exports.isZero = isZero; + exports.jsonParse = jsonParse; + exports.kebabCase = kebabCase; + exports.keys = keys; + exports.largest = largest; + exports.last = last; + exports.lowerCase = lowerCase; + exports.map = map; + exports.mapArray = mapArray; + exports.mapAsyncArray = mapAsyncArray; + exports.mapAsyncObject = mapAsyncObject; + exports.mapObject = mapObject; + exports.mapRightArray = mapRightArray; + exports.mapWhile = mapWhile; + exports.merge = merge; + exports.model = model; + exports.multiply = multiply; + exports.negate = negate; + exports.noValue = noValue; + exports.nodeAttribute = nodeAttribute; + exports.noop = noop; + exports.notEqual = notEqual; + exports.nthArg = nthArg; + exports.objectAssign = objectAssign; + exports.objectEntries = objectEntries; + exports.objectSize = objectSize; + exports.omit = omit; + exports.once = once; + exports.onlyUnique = onlyUnique; + exports.over = over; + exports.overEvery = overEvery; + exports.pair = pair; + exports.partition = partition; + exports.pick = pick; + exports.pluck = pluck; + exports.pluckObject = pluckObject; + exports.promise = promise; + exports.propertyMatch = propertyMatch; + exports.querySelector = querySelector; + exports.querySelectorAll = querySelectorAll; + exports.randomFloat = randomFloat; + exports.randomInt = randomInt; + exports.range = range; + exports.rangeDown = rangeDown; + exports.rangeUp = rangeUp; + exports.rawURLDecode = rawURLDecode; + exports.reArg = reArg; + exports.regexTestFactory = regexTestFactory; + exports.remainder = remainder; + exports.remove = remove; + exports.removeBy = removeBy; + exports.replaceList = replaceList; + exports.rest = rest; + exports.restString = restString; + exports.returnValue = returnValue; + exports.right = right; + exports.rightString = rightString; + exports.sample = sample; + exports.sanitize = sanitize; + exports.saveDimensions = saveDimensions; + exports.selector = selector; + exports.setKey = setKey; + exports.setValue = setValue; + exports.shuffle = shuffle; + exports.smallest = smallest; + exports.snakeCase = snakeCase; + exports.sortCollectionAlphabetically = sortCollectionAlphabetically; + exports.sortCollectionAlphabeticallyReverse = + sortCollectionAlphabeticallyReverse; + exports.sortCollectionAscending = sortCollectionAscending; + exports.sortCollectionAscendingFilter = sortCollectionAscendingFilter; + exports.sortCollectionDescending = sortCollectionDescending; + exports.sortCollectionDescendingFilter = sortCollectionDescendingFilter; + exports.sortNumberAscending = sortNumberAscending; + exports.sortNumberDescening = sortNumberDescening; + exports.sortObjectsAlphabetically = sortObjectsAlphabetically; + exports.sortObjectsAlphabeticallyReverse = sortObjectsAlphabeticallyReverse; + exports.sortUnique = sortUnique; + exports.stringify = stringify; + exports.stubArray = stubArray; + exports.stubFalse = stubFalse; + exports.stubObject = stubObject; + exports.stubString = stubString; + exports.stubTrue = stubTrue; + exports.subtract = subtract; + exports.subtractAll = subtractAll; + exports.subtractReverse = subtractReverse; + exports.sumAll = sumAll; + exports.take = take; + exports.takeRight = takeRight; + exports.themes = themes; + exports.throttle = throttle; + exports.timer = timer; + exports.timers = timers; + exports.times = times; + exports.timesAsync = timesAsync; + exports.timesMap = timesMap; + exports.timesMapAsync = timesMapAsync; + exports.toArray = toArray; + exports.toPath = toPath; + exports.toggle = toggle; + exports.tokenize = tokenize; + exports.truncate = truncate; + exports.truncateRight = truncateRight; + exports.unZip = unZip; + exports.unZipObject = unZipObject; + exports.union = union; + exports.uniqID = uniqID; + exports.unique = unique; + exports.untilFalseArray = untilFalseArray; + exports.untilTrueArray = untilTrueArray; + exports.updateDimensions = updateDimensions; + exports.upperCase = upperCase; + exports.upperFirst = upperFirst; + exports.upperFirstAll = upperFirstAll; + exports.upperFirstLetter = upperFirstLetter; + exports.upperFirstOnly = upperFirstOnly; + exports.upperFirstOnlyAll = upperFirstOnlyAll; + exports.virtualStorage = virtualStorage; + exports.whileCompactMap = whileCompactMap; + exports.whileEachArray = whileEachArray; + exports.whileMapArray = whileMapArray; + exports.without = without; + exports.words = words; + exports.wrap = wrap; + exports.xor = xor; + exports.zip = zip; + exports.zipObject = zipObject; }); //# sourceMappingURL=browser.bundle.js.map diff --git a/docs/browser.js b/docs/browser.js index b597a51..9c92d54 100644 --- a/docs/browser.js +++ b/docs/browser.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:f}=Math;function h(t){return-1===f(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const d=Array.isArray;const m=Reflect.construct;function y(t,n=[],e){const r=d(n)?n:[n];return e?m(t,r,e):m(t,r)}function b(t){return d(t)&&t||i(t)&&[t]||[]}function A(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=y(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function I(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function O(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function E(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function M(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const j=/\.|\[/,x=/]/g,T="";function N(t){return t.replace(x,T).split(j)}function R(t,n){if(!n)return!1;let e=n;return E(d(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function L(t){if(t)return B(t)}const $=Object.hasOwn;function k(t,...n){if(t)return E(n,(n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}}))}function D(t,n){return t?.constructor===n||!1}function U(t){return n=>D(n,t)}function P(t){return t?.constructor?.name}function q(t){return n=>P(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&E(e,t):t(n)}}const W=q("Buffer"),Z=z(W),_=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(Z(t))return t.equals(n);if(t.toString()===n.toString())if(_(t)){const e=L(t);if(k(n,e))return E(e,(e=>H(t[e],n[e])))}else if(d(t)&&t.length===n.length)return E(t,((t,e)=>H(t,n[e])));return!1};const V=Math.max;function K(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function G(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function J(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,lt=q("Number"),ft=z(lt);const ht=U(String);const gt=Object.assign;function pt(t,n){if(_(n))gt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:gt(t,n)}else(ht(n)||ft(n))&&(t[n]=n);return t}function dt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function At(t,n="id",e){return t.sort(((t,r)=>bt(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:K(n,(n=>t[n]))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Et(t){return n=>!!i(n)&&t.test(n)}const St=Et(/\.css$/),Ft=Et(/\.html$/),Mt=Et(/\.js$/),jt=Et(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=L(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Tt(t,n,e,r){if(!t)return;const o=L(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Rt=z(Nt);function Bt(t,n){if(Rt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Lt=q("GeneratorFunction"),$t=z(Lt);async function kt(t,n,e){if(Rt(t)){for(const e of t)await n(e,t);return t}if($t(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const Dt=q("AsyncFunction"),Ut=z(Dt);function Pt(t,n,e,r,o,c){return(s,u,a,l,f)=>{let h;const g=Ut(u);if(i(s)&&u)return h=d(s)?g?n:t:_(s)||at(s)?g?r:e:o?g?c:o:$t(s)?c:g?r:e,h(s,u,a,l,f)}}const qt=Pt(s,a,Tt,xt,Bt,kt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Zt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=y(_t);function Vt(t,n){return Ht.set(t,n)}const Kt=Reflect.apply;function Gt(t,n,e){if(at(t))return Kt(t,n,e)}function Jt(t){return t?.constructor}function Qt(t,n=[]){const e=Jt(t);return e===Function&&"function"===e.name?function(){}:y(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Tt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Tt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Pt(K,G,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return S(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return E(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(d(t)||Rt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if($t(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(d(t)||Rt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Pt(E,S,on,rn,cn,sn);const an=Function.prototype;function ln(t){return an.call.bind(t)}const fn=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,gn=Object.defineProperty,pn=ln(Object.hasOwnProperty),dn=Object.is;const{random:mn}=Math;const{sign:yn}=Math;function bn(t){return 0===t}const An=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Tt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Tt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function In(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const On=/[()[\]{}*+?^$|#.,/\\\s-]/g;function En(t){return t.replace(On,"\\$&")}function Sn(t,n){return n?Sn(K(t,En)):RegExp(t.join("|"))}const Fn=q("RegExp"),Mn=z(Fn);function jn(t){if(!t)return;if(_(t))return L(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:L(t).length}const xn=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Tn=/[ _-]+/g;const Nn=/[ _-]+/g,Rn=/[ ]+/g;const Bn=/[ _-]+/g,Ln=/[ ]+/g;const $n=/[ _-]+/g;const kn=/[ _-]+/g;function Dn(t,n=1){return t.substring(n)}const Un=/%(?![\da-f]{2})/gi,Pn=/&/g,qn=//g,Wn=/"/g;function Zn(t){return decodeURIComponent(t.replace(Un,(()=>"%25")))}function _n(t){return t.replace(Pn,"&").replace(qn,"<").replace(zn,">").replace(Wn,""")}const Hn=/\S+/g,Vn=/\w+/g;const Kn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+Dn(t)}function Qn(t){return Gn(t)+Dn(t).toLowerCase()}function Xn(t){return Jt(t)?.name}const Yn=q("Map"),te=z(Yn),ne=/Array/,ee="Array";function re(t){if(t){const n=Xn(t);if(ne.test(n)&&n!==ee)return!0}return!1}function oe(t){return!i(t)}const ie=q("BigInt"),ce=z(ie),se=q("Boolean"),ue=z(se),ae=q("ArrayBuffer"),le=z(ae);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const he=q("Date"),ge=z(he);function pe(t){return!1===t}const de=q("Float32Array"),me=z(de),ye=q("Float64Array"),be=z(ye),{isInteger:Ae}=Number,we=Ae,ve=q("Int16Array"),Ce=z(ve),Ie=q("Int32Array"),Oe=z(Ie),Ee=q("Int8Array"),Se=z(Ee);function Fe(t){return!!t&&t instanceof Promise}function Me(t){return!!t&&(Fe(t)||Ut(t)||$t(t))}const{isSafeInteger:je}=Number,xe=je;const Te=q("Uint16Array"),Ne=z(Te),Re=q("Uint32Array"),Be=z(Re),Le=q("Uint8Array"),$e=z(Le),ke=q("Uint8ClampedArray"),De=z(ke),Ue=q("WeakMap"),Pe=z(Ue),qe=void 0!==globalThis.Deno,ze=void 0!==globalThis.process&&process.versions&&process.versions.node;function We(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(H(t,n))}const _e=JSON;const He=_e.stringify;function Ve(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${He(t)}\n\t\tExpected: ${He(n)}`,r)}async function Ke(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||Ve(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function Qe(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Xe=Pt(u,l,vn,wn,Qe,Je);function Ye(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function tr(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const nr=Pt(F,M,Cn,In,Ye,tr);function er(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const rr=er(s),or=er(I);function ir(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const cr=ir(a),sr=ir(O);const ur=Et(/\./);class ar{list=y(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const lr=y(ar);class fr{static models=new Map;constructor(t,n){i(n)?(dt(this,n),this.modelName=t,fr.models.set(t,n)):dt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}function hr(t){return new Promise(t)}class gr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Tt(t,(n=>{t[n]=new gr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new gr(e),!0)})}}class pr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const dr=y(pr);class mr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function yr(t){return new mr(t)}function br(t){return i(t)?br[t]:L(br)}const Ar=globalThis.navigator?.userAgentData;if(Ar)Tt(Ar,((t,n)=>{ue(t)&&t&&(br[n]=t)})),s(Ar.brands,(t=>{br[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{br[t]=!0}))}function wr(t,n,e,r){return t.addEventListener(n,e,r),t}const vr=document.createDocumentFragment.bind(document);function Cr(t,n){return t.appendChild(n),n}function Ir(t,n){return d(n)?xn(n,K(n,(n=>t.getAttribute(n)))):(Tt(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Or=/^.[\w_-]+$/,Er=/^[A-Za-z]+$/,Sr=/\s/,Fr=document.getElementsByClassName.bind(document),Mr=document.getElementsByTagName.bind(document),jr=document.getElementById.bind(document),xr=document.querySelector.bind(document),Tr=document.querySelectorAll.bind(document);const Nr=document.createElement.bind(document);function Rr(t){const n=ur(t)&&t||`${t}.js`;return(t=>hr((n=>{wr(t,"load",n,!0),wr(t,"error",n,!0),Cr(xr("head"),t)})))(Ir(Nr("script"),{async:"",src:n}))}function Br(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&wr(document,"DOMContentLoaded",t),!1)}Br((()=>{const t=jr("AcidLib");Rr(t&&t.getAttribute("data-index")||"/index")}));const Lr=location.protocol,$r="http:"===Lr?"ws":"wss",kr=location.hostname,Dr={hardware:{cores:navigator.hardwareConcurrency},host:{name:kr,protocol:Lr,protocolSocket:$r}};function Ur(){dt(Dr,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Pr(){Ur()}Br(Pr),wr(window,"load",Pr,!0),wr(window,"resize",Pr,!0),t.hasLocal=void 0,function(n){try{n().removeItem("TESTING"),t.hasLocal=!0}catch(n){t.hasLocal=!1}}((()=>localStorage));class qr{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=yr(t)}hasLocal=t.hasLocal;setItem(t,n){return this.hasLocal&&this.local.setItem(t,ht(n)?n:He(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return i(n)?n:!i(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}const zr=(t,n)=>`color:${t};background:${n};`,Wr={alert:zr("#fff","#f44336"),important:zr("#fff","#E91E63"),notify:zr("#fff","#651FFF"),warning:zr("#000","#FFEA00")};t.BrowserStorage=qr,t.Chain=zt,t.Intervals=ar,t.Model=fr,t.Store=gr,t.Timers=_t,t.UniqID=pr,t.VirtualStorage=mr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.append=Cr,t.apply=Gt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Me(t)||Me(n)?Ke(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||Ve(t,n,e)},t.assertAsync=Ke,t.assign=dt,t.assignToClass=mt,t.assignToObject=pt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?dt(e,r):r},t.browserStorage=function(t){return new qr(t)},t.cacheNativeMethod=ln,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Tn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return y(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(Z(t))return ut(t);if(d(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Zt(setTimeout(Wt,0),(t=>{lr.remove(t)}))},t.clearTimers=function(){Zt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.cnsl=(t,n)=>{const e=ht(t)?t:He(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},t.cnslTheme=(t,n,e)=>{Wr[t]=zr(n,e)},t.compact=function(t){if(_(t)){const n=L(t),e=n.length,r={};for(let o=0;oWe(t)))},t.compactKeys=function(t){const n=[];return Tt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Xe,t.compactMapArray=u,t.compactMapAsyncArray=l,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.createFragment=vr,t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Vt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=gn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Tt,t.eachRight=I,t.eachRightAsync=O,t.ensureArray=b,t.ensureBuffer=function(t){return Z(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=bn,t.escapeRegex=En,t.escapeRegexRegex=On,t.eventAdd=wr,t.eventRemove=function(t,n,e,r){return t.removeEventListener(n,e,r),t},t.every=un,t.everyArg=function(...t){return Ut(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=E,t.everyAsyncArray=S,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;ryt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=yt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>yt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(b(n))),[]);return e},t.flattenDeep=A,t.flow=rr,t.flowAsync=cr,t.flowAsyncRight=sr,t.flowRight=or,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=Qe,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Ye,t.forOfFilterAsync=tr,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Pt,t.get=R,t.getByClass=Fr,t.getById=jr,t.getByTag=Mr,t.getEntries=function(t){if(i(t))return An(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return At(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return E(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=fn,t.getType=Jt,t.getTypeName=Xn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!oe(n)&&!oe(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):Mn(e)?e.test(n):at(e)?e(n):d(e)?E(e,(e=>t(n,e))):un(e,(e=>t(n,e))):d(n)?Mn(e)?E(n,(t=>t.test(e))):at(e)?E(n,e):d(e)?E(e,(e=>t(n,e))):n.includes(e,r):!!_(n)&&(Mn(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):_(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}})))},t.hasDot=ur,t.hasKeys=k,t.hasLength=r,t.hasProp=pn,t.hasValue=i,t.htmlEntities=_n,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Gt(n,e,r):n(...r);if(_(n))return n[e]=t,n}},t.importjs=Rr,t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.info=Dr,t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(E(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return lr.set(t,n)},t.intervals=lr,t.invert=function(t,n={}){if(t)return Tt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return G(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isAgent=br,t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=d,t.isArrayBuffer=le,t.isArrayBufferCall=ae,t.isArrayLike=function(t,n){if(oe(t)||at(t))return!1;if(d(t)||re(t))return!0;const e=t.length;if(!oe(e)||!ft(e)||e<0)return!1;if(n){const n=L(t);return!!n&&un(n,((t,n)=>n>=0&&ft(n)))}return!0},t.isAsync=Ut,t.isAsyncCall=Dt,t.isBigInt=ce,t.isBigIntCall=ie,t.isBoolean=ue,t.isBooleanCall=se,t.isBuffer=Z,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=D,t.isConstructorFactory=U,t.isConstructorNameFactory=q,t.isDate=ge,t.isDateCall=he,t.isDeno=qe,t.isDocumentReady=Br,t.isDom=function(t){return t&&9!==t.nodeType},t.isEmpty=function(t){return ht(t)||d(t)?!r(t):_(t)?!jn(t):!i(t)},t.isEnter=function(t){return 13===t.keyCode},t.isEqual=H,t.isF32=me,t.isF32Call=de,t.isF64=be,t.isF64Call=ye,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=Ft,t.isFileJS=Mt,t.isFileJSON=jt,t.isFloat=we,t.isFunction=at,t.isGenerator=$t,t.isGeneratorCall=Lt,t.isHTMLCollection=function(t){return!!i(t)&&"[object HTMLCollection]"===t.toString()},t.isI16=Ce,t.isI16Call=ve,t.isI32=Oe,t.isI32Call=Ie,t.isI8=Se,t.isI8Call=Ee,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Me,t.isMap=te,t.isMapCall=Yn,t.isMatchArray=function(t,n){return t.length===n.length&&E(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=L(t),r=L(n);return e.length===r.length&&E(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodeList=function(t){return!!i(t)&&"[object NodeList]"===t.toString()},t.isNodejs=ze,t.isNotArray=function(t){return!d(t)},t.isNotNumber=function(t){return!ft(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=ft,t.isNumberCall=lt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=_,t.isPositive=function(t){return 1===yn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Fe,t.isRegex=Mn,t.isRegexCall=Fn,t.isRelated=function(t,n){return!oe(t)&&!oe(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=xe,t.isSame=dn,t.isSameType=function(t,n){const e=Jt(t),r=Jt(n);return e===r&&e.name===r.name},t.isSet=Rt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=We,t.isTypeFactory=z,t.isTypedArray=re,t.isU16=Ne,t.isU16Call=Te,t.isU32=Be,t.isU32Call=Re,t.isU8=$e,t.isU8C=De,t.isU8CCall=ke,t.isU8Call=Le,t.isUndefined=e,t.isWeakMap=Pe,t.isWeakMapCall=Ue,t.isZero=bn,t.jsonParse=function(t,n){if(t)return _e.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Nn," ").trim().toLowerCase().replace(Rn,"-")},t.keys=L,t.largest=function(t){return V(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(kn," ").trim().toLowerCase()},t.map=en,t.mapArray=K,t.mapAsyncArray=G,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(_(e)||d(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?y(fr,[t,n]):R(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=oe,t.nodeAttribute=Ir,t.noop=Wt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=gt,t.objectEntries=An,t.objectSize=jn,t.omit=function(t,n){if(!t)return{};if(d(n)){const e=Sn(n);return Cn(t,((t,n)=>!e.test(n)))}if(Mn(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(ft(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):gt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return K(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=hr,t.propertyMatch=(t,n,e=L(t))=>E(e,(e=>H(t[e],n[e]))),t.querySelector=xr,t.querySelectorAll=Tr,t.randomFloat=function(t,n=0){return mn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Et,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cIt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Ot(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=At,t.sortCollectionDescendingFilter=bt,t.sortNumberAscending=function(t){return t.sort(J)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=It,t.sortObjectsAlphabeticallyReverse=Ot,t.sortUnique=ct,t.stringify=He,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=J,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.themes=Wr,t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Vt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Vt,t.timers=Ht,t.times=Zt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Tt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(A(t))},t.uniqID=dr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Qn,t.upperFirstOnlyAll=function(t){return t.replace(Kn,(t=>Qn(t)))},t.virtualStorage=yr,t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Vn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=y(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=xn})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:f}=Math;function h(t){return-1===f(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const d=Array.isArray;const m=Reflect.construct;function y(t,n=[],e){const r=d(n)?n:[n];return e?m(t,r,e):m(t,r)}function b(t){return d(t)&&t||i(t)&&[t]||[]}function A(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=y(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function I(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function O(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function E(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function M(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const j=/\.|\[/,x=/]/g,T="";function N(t){return t.replace(x,T).split(j)}function R(t,n){if(!n)return!1;let e=n;return E(d(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function L(t){if(t)return B(t)}const $=Object.hasOwn;function k(t,...n){if(t)return E(n,(n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}}))}function D(t,n){return t?.constructor===n||!1}function U(t){return n=>D(n,t)}function P(t){return t?.constructor?.name}function q(t){return n=>P(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&E(e,t):t(n)}}const W=q("Buffer"),Z=z(W),_=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(Z(t))return t.equals(n);if(t.toString()===n.toString())if(_(t)){const e=L(t);if(k(n,e))return E(e,(e=>H(t[e],n[e])))}else if(d(t)&&t.length===n.length)return E(t,((t,e)=>H(t,n[e])));return!1};const V=Math.max;function K(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function G(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function J(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,lt=q("Number"),ft=z(lt);const ht=U(String);const gt=Object.assign;function pt(t,n){if(_(n))gt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:gt(t,n)}else(ht(n)||ft(n))&&(t[n]=n);return t}function dt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function At(t,n="id",e){return t.sort(((t,r)=>bt(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:K(n,(n=>t[n]))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Et(t){return n=>!!i(n)&&t.test(n)}const St=Et(/\.css$/),Ft=Et(/\.html$/),Mt=Et(/\.js$/),jt=Et(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=L(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Tt(t,n,e,r){if(!t)return;const o=L(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Rt=z(Nt);function Bt(t,n){if(Rt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Lt=q("GeneratorFunction"),$t=z(Lt);async function kt(t,n,e){if(Rt(t)){for(const e of t)await n(e,t);return t}if($t(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const Dt=q("AsyncFunction"),Ut=z(Dt);function Pt(t,n,e,r,o,c){return(s,u,a,l,f)=>{let h;const g=Ut(u);if(i(s)&&u)return h=d(s)?g?n:t:_(s)||at(s)?g?r:e:o?g?c:o:$t(s)?c:g?r:e,h(s,u,a,l,f)}}const qt=Pt(s,a,Tt,xt,Bt,kt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Zt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=y(_t);function Vt(t,n){return Ht.set(t,n)}const Kt=Reflect.apply;function Gt(t,n,e){if(at(t))return Kt(t,n,e)}function Jt(t){return t?.constructor}function Qt(t,n=[]){const e=Jt(t);return e===Function&&"function"===e.name?function(){}:y(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Tt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Tt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Pt(K,G,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return S(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return E(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(d(t)||Rt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if($t(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(d(t)||Rt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Pt(E,S,on,rn,cn,sn);const an=Function.prototype;function ln(t){return an.call.bind(t)}const fn=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,gn=Object.defineProperty,pn=ln(Object.hasOwnProperty),dn=Object.is;const{random:mn}=Math;const{sign:yn}=Math;function bn(t){return 0===t}const An=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Tt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Tt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function In(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const On=/[()[\]{}*+?^$|#.,/\\\s-]/g;function En(t){return t.replace(On,"\\$&")}function Sn(t,n){return n?Sn(K(t,En)):RegExp(t.join("|"))}const Fn=q("RegExp"),Mn=z(Fn);function jn(t){if(!t)return;if(_(t))return L(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:L(t).length}const xn=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Tn=/[ _-]+/g;const Nn=/[ _-]+/g,Rn=/[ ]+/g;const Bn=/[ _-]+/g,Ln=/[ ]+/g;const $n=/[ _-]+/g;const kn=/[ _-]+/g;function Dn(t,n=1){return t.substring(n)}const Un=/%(?![\da-f]{2})/gi,Pn=/&/g,qn=//g,Wn=/"/g;function Zn(t){return decodeURIComponent(t.replace(Un,(()=>"%25")))}function _n(t){return t.replace(Pn,"&").replace(qn,"<").replace(zn,">").replace(Wn,""")}const Hn=/\S+/g,Vn=/\w+/g;const Kn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+Dn(t)}function Qn(t){return Gn(t)+Dn(t).toLowerCase()}function Xn(t){return Jt(t)?.name}const Yn=q("Map"),te=z(Yn),ne=/Array/,ee="Array";function re(t){if(t){const n=Xn(t);if(ne.test(n)&&n!==ee)return!0}return!1}function oe(t){return!i(t)}const ie=q("BigInt"),ce=z(ie),se=q("Boolean"),ue=z(se),ae=q("ArrayBuffer"),le=z(ae);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const he=q("Date"),ge=z(he);function pe(t){return!1===t}const de=q("Float32Array"),me=z(de),ye=q("Float64Array"),be=z(ye),{isInteger:Ae}=Number,we=Ae,ve=q("Int16Array"),Ce=z(ve),Ie=q("Int32Array"),Oe=z(Ie),Ee=q("Int8Array"),Se=z(Ee);function Fe(t){return!!t&&t instanceof Promise}function Me(t){return!!t&&(Fe(t)||Ut(t)||$t(t))}const{isSafeInteger:je}=Number,xe=je;const Te=q("Uint16Array"),Ne=z(Te),Re=q("Uint32Array"),Be=z(Re),Le=q("Uint8Array"),$e=z(Le),ke=q("Uint8ClampedArray"),De=z(ke),Ue=q("WeakMap"),Pe=z(Ue),qe=void 0!==globalThis.Deno,ze=void 0!==globalThis.process&&process.versions&&process.versions.node;function We(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(H(t,n))}const _e=JSON;const He=_e.stringify;function Ve(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${He(t)}\n\t\tExpected: ${He(n)}`,r)}async function Ke(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||Ve(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function Qe(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Xe=Pt(u,l,vn,wn,Qe,Je);function Ye(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function tr(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const nr=Pt(F,M,Cn,In,Ye,tr);function er(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const rr=er(s),or=er(I);function ir(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const cr=ir(a),sr=ir(O);const ur=Et(/\./);class ar{list=y(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const lr=y(ar);class fr{static models=new Map;constructor(t,n){i(n)?(dt(this,n),this.modelName=t,fr.models.set(t,n)):dt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}function hr(t){return new Promise(t)}class gr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Tt(t,(n=>{t[n]=new gr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new gr(e),!0)})}}class pr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const dr=y(pr);class mr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function yr(t){return new mr(t)}function br(t){return i(t)?br[t]:L(br)}const Ar=globalThis.navigator?.userAgentData;if(Ar)Tt(Ar,((t,n)=>{ue(t)&&t&&(br[n]=t)})),s(Ar.brands,(t=>{br[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{br[t]=!0}))}function wr(t,n,e,r){return t.addEventListener(n,e,r),t}const vr=document.createDocumentFragment.bind(document);function Cr(t,n){return t.appendChild(n),n}function Ir(t,n){return d(n)?xn(n,K(n,(n=>t.getAttribute(n)))):(Tt(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Or=/^.[\w_-]+$/,Er=/^[A-Za-z]+$/,Sr=/\s/,Fr=document.getElementsByClassName.bind(document),Mr=document.getElementsByTagName.bind(document),jr=document.getElementById.bind(document),xr=document.querySelector.bind(document),Tr=document.querySelectorAll.bind(document);const Nr=document.createElement.bind(document);function Rr(t){const n=ur(t)&&t||`${t}.js`;return(t=>hr((n=>{wr(t,"load",n,!0),wr(t,"error",n,!0),Cr(xr("head"),t)})))(Ir(Nr("script"),{async:"",src:n}))}function Br(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&wr(document,"DOMContentLoaded",t),!1)}Br((()=>{const t=jr("AcidLib");Rr(t&&t.getAttribute("data-index")||"/index")}));const Lr=location.protocol,$r="http:"===Lr?"ws":"wss",kr=location.hostname,Dr={hardware:{cores:navigator.hardwareConcurrency},host:{name:kr,protocol:Lr,protocolSocket:$r}};function Ur(){dt(Dr,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Pr(){Ur()}Br(Pr),wr(window,"load",Pr,!0),wr(window,"resize",Pr,!0),t.hasLocal=void 0,function(n){try{n().removeItem("TESTING"),t.hasLocal=!0}catch(n){t.hasLocal=!1}}((()=>localStorage));class qr{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=yr(t)}hasLocal=t.hasLocal;setItem(t,n){return this.hasLocal&&this.local.setItem(t,ht(n)?n:He(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return i(n)?n:!i(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}const zr=(t,n)=>`color:${t};background:${n};`,Wr={alert:zr("#fff","#f44336"),important:zr("#fff","#E91E63"),notify:zr("#fff","#651FFF"),warning:zr("#000","#FFEA00")};t.BrowserStorage=qr,t.Chain=zt,t.Intervals=ar,t.Model=fr,t.Store=gr,t.Timers=_t,t.UniqID=pr,t.VirtualStorage=mr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.append=Cr,t.apply=Gt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Me(t)||Me(n)?Ke(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||Ve(t,n,e)},t.assertAsync=Ke,t.assign=dt,t.assignToClass=mt,t.assignToObject=pt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?dt(e,r):r},t.browserStorage=function(t){return new qr(t)},t.cacheNativeMethod=ln,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Tn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return y(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(Z(t))return ut(t);if(d(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Zt(setTimeout(Wt,0),(t=>{lr.remove(t)}))},t.clearTimers=function(){Zt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.cnsl=(t,n)=>{const e=ht(t)?t:He(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},t.cnslTheme=(t,n,e)=>{Wr[t]=zr(n,e)},t.compact=function(t){if(_(t)){const n=L(t),e=n.length,r={};for(let o=0;oWe(t)))},t.compactKeys=function(t){const n=[];return Tt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Xe,t.compactMapArray=u,t.compactMapAsyncArray=l,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.createFragment=vr,t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Vt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=gn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Tt,t.eachRight=I,t.eachRightAsync=O,t.ensureArray=b,t.ensureBuffer=function(t){return Z(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=bn,t.escapeRegex=En,t.escapeRegexRegex=On,t.eventAdd=wr,t.eventRemove=function(t,n,e,r){return t.removeEventListener(n,e,r),t},t.every=un,t.everyArg=function(...t){return Ut(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=E,t.everyAsyncArray=S,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;ryt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=yt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>yt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(b(n))),[]);return e},t.flattenDeep=A,t.flow=rr,t.flowAsync=cr,t.flowAsyncRight=sr,t.flowRight=or,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=Qe,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Ye,t.forOfFilterAsync=tr,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Pt,t.get=R,t.getByClass=Fr,t.getById=jr,t.getByTag=Mr,t.getEntries=function(t){if(i(t))return An(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return At(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return E(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=fn,t.getType=Jt,t.getTypeName=Xn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!oe(n)&&!oe(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):Mn(e)?e.test(n):at(e)?e(n):d(e)?E(e,(e=>t(n,e))):un(e,(e=>t(n,e))):d(n)?Mn(e)?E(n,(t=>t.test(e))):at(e)?E(n,e):d(e)?E(e,(e=>t(n,e))):n.includes(e,r):!!_(n)&&(Mn(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):_(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}})))},t.hasDot=ur,t.hasKeys=k,t.hasLength=r,t.hasProp=pn,t.hasValue=i,t.htmlEntities=_n,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Gt(n,e,r):n(...r);if(_(n))return n[e]=t,n}},t.importjs=Rr,t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.info=Dr,t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(E(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return lr.set(t,n)},t.intervals=lr,t.invert=function(t,n={}){if(t)return Tt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return G(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isAgent=br,t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=d,t.isArrayBuffer=le,t.isArrayBufferCall=ae,t.isArrayLike=function(t,n){if(oe(t)||at(t))return!1;if(d(t)||re(t))return!0;const e=t.length;if(!oe(e)||!ft(e)||e<0)return!1;if(n){const n=L(t);return!!n&&un(n,((t,n)=>n>=0&&ft(n)))}return!0},t.isAsync=Ut,t.isAsyncCall=Dt,t.isBigInt=ce,t.isBigIntCall=ie,t.isBoolean=ue,t.isBooleanCall=se,t.isBuffer=Z,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=D,t.isConstructorFactory=U,t.isConstructorNameFactory=q,t.isDate=ge,t.isDateCall=he,t.isDeno=qe,t.isDocumentReady=Br,t.isDom=function(t){return t&&9!==t.nodeType},t.isEmpty=function(t){return ht(t)||d(t)?!r(t):_(t)?!jn(t):!i(t)},t.isEnter=function(t){return 13===t.keyCode},t.isEqual=H,t.isEven=function(t){return!(1&t)},t.isF32=me,t.isF32Call=de,t.isF64=be,t.isF64Call=ye,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=Ft,t.isFileJS=Mt,t.isFileJSON=jt,t.isFloat=we,t.isFunction=at,t.isGenerator=$t,t.isGeneratorCall=Lt,t.isHTMLCollection=function(t){return!!i(t)&&"[object HTMLCollection]"===t.toString()},t.isI16=Ce,t.isI16Call=ve,t.isI32=Oe,t.isI32Call=Ie,t.isI8=Se,t.isI8Call=Ee,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Me,t.isMap=te,t.isMapCall=Yn,t.isMatchArray=function(t,n){return t.length===n.length&&E(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=L(t),r=L(n);return e.length===r.length&&E(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodeList=function(t){return!!i(t)&&"[object NodeList]"===t.toString()},t.isNodejs=ze,t.isNotArray=function(t){return!d(t)},t.isNotNumber=function(t){return!ft(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=ft,t.isNumberCall=lt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=_,t.isPositive=function(t){return 1===yn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Fe,t.isRegex=Mn,t.isRegexCall=Fn,t.isRelated=function(t,n){return!oe(t)&&!oe(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=xe,t.isSame=dn,t.isSameType=function(t,n){const e=Jt(t),r=Jt(n);return e===r&&e.name===r.name},t.isSet=Rt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=We,t.isTypeFactory=z,t.isTypedArray=re,t.isU16=Ne,t.isU16Call=Te,t.isU32=Be,t.isU32Call=Re,t.isU8=$e,t.isU8C=De,t.isU8CCall=ke,t.isU8Call=Le,t.isUndefined=e,t.isWeakMap=Pe,t.isWeakMapCall=Ue,t.isZero=bn,t.jsonParse=function(t,n){if(t)return _e.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Nn," ").trim().toLowerCase().replace(Rn,"-")},t.keys=L,t.largest=function(t){return V(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(kn," ").trim().toLowerCase()},t.map=en,t.mapArray=K,t.mapAsyncArray=G,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(_(e)||d(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?y(fr,[t,n]):R(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=oe,t.nodeAttribute=Ir,t.noop=Wt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=gt,t.objectEntries=An,t.objectSize=jn,t.omit=function(t,n){if(!t)return{};if(d(n)){const e=Sn(n);return Cn(t,((t,n)=>!e.test(n)))}if(Mn(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(ft(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):gt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return K(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=hr,t.propertyMatch=(t,n,e=L(t))=>E(e,(e=>H(t[e],n[e]))),t.querySelector=xr,t.querySelectorAll=Tr,t.randomFloat=function(t,n=0){return mn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Et,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cIt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Ot(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=At,t.sortCollectionDescendingFilter=bt,t.sortNumberAscending=function(t){return t.sort(J)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=It,t.sortObjectsAlphabeticallyReverse=Ot,t.sortUnique=ct,t.stringify=He,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=J,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.themes=Wr,t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Vt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Vt,t.timers=Ht,t.times=Zt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Tt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(A(t))},t.uniqID=dr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Qn,t.upperFirstOnlyAll=function(t){return t.replace(Kn,(t=>Qn(t)))},t.virtualStorage=yr,t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Vn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=y(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=xn})); //# sourceMappingURL=browser.js.map diff --git a/docs/index.bundle.es.js b/docs/index.bundle.es.js index 85f6455..34bda30 100644 --- a/docs/index.bundle.es.js +++ b/docs/index.bundle.es.js @@ -874,7 +874,7 @@ function get(propertyString, target) { return false; } let link = target; - const pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString); + const pathArray = isArray(propertyString) ? propertyString : toPath(propertyString); everyArray(pathArray, (item) => { link = link[item]; return hasValue(link); @@ -1284,7 +1284,7 @@ function mapRightArray(source, iteratee, results = [], additionalArgument) { */ function mapWhile(source, iteratee, results = [], additionalArgument) { const arrayLength = source.length; - for (let index = 0;index < arrayLength;index++) { + for (let index = 0; index < arrayLength; index++) { const item = source[index]; const returned = iteratee(item, index, results, source, arrayLength, additionalArgument); if (returned === false) { @@ -2958,7 +2958,10 @@ function forOf(source, iteratee) { } return source; } - for (const [key, value] of source) { + for (const [ + key, + value + ] of source) { iteratee(value, key, source); } return source; @@ -3020,15 +3023,15 @@ function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, fo if (!hasValue(source) || !iteratee) { return; } else if (isArray(source)) { - returned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop; + returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; } else if (isPlainObject(source) || isFunction(source)) { - returned = (isIterateeAsync) ? objectLoopAsync : objectLoop; + returned = isIterateeAsync ? objectLoopAsync : objectLoop; } else if (forOfLoop) { - returned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop; + returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; } else if (isGenerator(source)) { returned = forOfLoopAsync; } else { - returned = (isIterateeAsync) ? objectLoopAsync : objectLoop; + returned = isIterateeAsync ? objectLoopAsync : objectLoop; } return returned(source, iteratee, argument1, argument2, argument3); }; @@ -4312,6 +4315,40 @@ function isZero(source) { return source === 0; } +/** + * Checks if a number is odd & returns true or false. + * + * @function isOdd + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isOdd, assert } from '@universalweb/acid'; + * assert(isOdd(1), true); + */ +function isOdd(source) { + return (source & 1) === 1; +} + +/** + * Checks if a number is even & returns true or false. + * + * @function isEven + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEven, assert } from '@universalweb/acid'; + * assert(isEven(1), true); + */ +function isEven(source) { + return (source & 1) === 0; +} + const objectEntries = Object.entries; /** * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error. @@ -4685,11 +4722,11 @@ function objectSize(source) { * // => { 'a': 1, 'b': 2 } */ const zipObject = (properties, values) => { - const zipedObject = {}; + const source = {}; eachArray(properties, (item, key) => { - zipedObject[item] = values[key]; + source[item] = values[key]; }); - return zipedObject; + return source; }; /** * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. @@ -4705,13 +4742,16 @@ const zipObject = (properties, values) => { * // => [['a', 'b'], [1, 2]] */ const unZipObject = (object) => { - const unZippedKeys = []; - const values = []; + const objectKeys = []; + const objectValues = []; eachObject(object, (item, key) => { - unZippedKeys.push(key); - values.push(item); + objectKeys.push(key); + objectValues.push(item); }); - return [unZippedKeys, values]; + return [ + objectKeys, + objectValues, + ]; }; const normalizeCase$4 = /[ _-]+/g; @@ -6251,8 +6291,14 @@ function forOfCompactMap(source, iteratee = returnValue, resultsObject) { * return item; * }), {b: 2, c: 3}); */ -const compactMap = generateLoop(compactMapArray, compactMapAsyncArray, - compactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync); +const compactMap = generateLoop( + compactMapArray, + compactMapAsyncArray, + compactMapObject, + compactMapAsyncObject, + forOfCompactMap, + forOfCompactMapAsync +); function everyArg(...methods) { if (isAsync(methods[0])) { @@ -6846,7 +6892,7 @@ function pair(argument1, argument2) { function concurrentStatus(source, iteratee, additionalArgument) { const arrayLength = source.length; const queue = []; - for (let index = 0;index < arrayLength; index++) { + for (let index = 0; index < arrayLength; index++) { queue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument); } return Promise.allSettled(queue); @@ -7100,7 +7146,7 @@ async function timesMapAsync(amount, iteratee, results = []) { * // => false */ function toggle(value, on = true, off = false) { - return (isEqual(on, value)) ? off : on; + return ((isEqual(on, value)) ? off : on); } /** @@ -7443,5 +7489,5 @@ function currentPath(importMeta) { return path$1.dirname(fileURLToPath(importMeta.url)); } -export { Chain, Intervals, Model, Store, Timers, UniqID, VirtualStorage, add, after, apply, arrayToRegex, arraysToObject, ary, assert, assertAsync, assign, assignToClass, assignToObject, before, bindAll, cacheNativeMethod, calcProgress, camelCase, chain, chunk, chunkString, clear, clearArray, clearBuffer, clearIntervals, clearTimers, clone, cloneArray, cloneType, compact, compactKeys, compactMap, compactMapArray, compactMapAsyncArray, compactMapAsyncObject, compactMapObject, concurrent, concurrentEachArray, concurrentStatus, construct, constructorName, copyFolder, countBy, countKey, countWithoutKey, currentFile, currentPath, curry, curryRight, debounce, deduct, defProp, difference, divide, drop, dropRight, each, eachArray, eachAsyncArray, eachAsyncObject, eachObject, eachRight, eachRightAsync, ensureArray, ensureBuffer, isZero as equalsZero, escapeRegex, escapeRegexRegex, every, everyArg, everyArray, everyAsyncArray, everyAsyncObject, everyObject, extendClass, filter, filterArray, filterAsyncArray, filterAsyncObject, filterObject, findIndex, findIndexCache, findItem, first, flatten, flattenDeep, flow, flowAsync, flowAsyncRight, flowRight, forEach, forEachAsync, forMap, forOf, forOfAsync, forOfCompactMap, forOfCompactMapAsync, forOfEvery, forOfEveryAsync, forOfFilter, forOfFilterAsync, forOfMap, forOfMapAsync, generateLoop, get, getEntries, getFileExtension, getFilename, getHighest, getLowest, getNumberInsertIndex, getPropDesc, getPropNames, getType, getTypeName, groupBy, has, hasAnyKeys, hasDot, hasKeys, hasLength, hasProp, hasValue, htmlEntities, ifInvoke, ifNotAssign, ifValue, inAsync, inSync, increment, indexBy, initial, initialString, insertInRange, intersection, interval, intervals, invert, invokeArray, invokeCollection, invokeCollectionAsync, isArguments, isArray, isArrayBuffer, isArrayBufferCall, isArrayLike, isAsync, isAsyncCall, isBigInt, isBigIntCall, isBoolean, isBooleanCall, isBuffer, isBufferCall, isChild, isCloneable, isConstructor, isConstructorFactory, isConstructorNameFactory, isDate, isDateCall, isDeno, isEmpty, isEqual, isF32, isF32Call, isF64, isF64Call, isFalse, isFalsy, isFileCSS, isFileHTML, isFileJS, isFileJSON, isFloat, isFunction, isGenerator, isGeneratorCall, isI16, isI16Call, isI32, isI32Call, isI8, isI8Call, isIterable, isKindAsync, isMap, isMapCall, isMatchArray, isMatchObject, isNegative, isNodejs, isNotArray, isNotNumber, isNotString, isNull, isNumber, isNumberCall, isNumberEqual, isNumberInRange, isNumberNotInRange, isParent, isPlainObject, isPositive, isPrimitive, isPromise, isRegex, isRegexCall, isRelated, isSafeInt, isSame, isSameType, isSet, isSetCall, isString, isTrue, isTruthy, isTypeFactory, isTypedArray, isU16, isU16Call, isU32, isU32Call, isU8, isU8C, isU8CCall, isU8Call, isUndefined, isWeakMap, isWeakMapCall, isZero, jsonParse, kebabCase, keys, largest, last, lowerCase, map, mapArray, mapAsyncArray, mapAsyncObject, mapObject, mapRightArray, mapWhile, merge, model, multiply, negate, noValue, noop, notEqual, nthArg, objectAssign, objectEntries, objectSize, omit, once, onlyUnique, over, overEvery, pair, partition, pick, pluck, pluckObject, promise, propertyMatch, randomFloat, randomInt, range, rangeDown, rangeUp, rawURLDecode, reArg, regexTestFactory, remainder, remove, removeBy, replaceList, rest, restString, returnValue, right, rightString, sample, sanitize, setKey, setValue, shuffle, smallest, snakeCase, sortCollectionAlphabetically, sortCollectionAlphabeticallyReverse, sortCollectionAscending, sortCollectionAscendingFilter, sortCollectionDescending, sortCollectionDescendingFilter, sortNumberAscending, sortNumberDescening, sortObjectsAlphabetically, sortObjectsAlphabeticallyReverse, sortUnique, stringify, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, subtractAll, subtractReverse, sumAll, take, takeRight, throttle, timer, timers, times, timesAsync, timesMap, timesMapAsync, toArray, toPath, toggle, tokenize, truncate, truncateRight, unZip, unZipObject, union, uniqID, unique, untilFalseArray, untilTrueArray, upperCase, upperFirst, upperFirstAll, upperFirstLetter, upperFirstOnly, upperFirstOnlyAll, virtualStorage, whileCompactMap, whileEachArray, whileMapArray, without, words, wrap, xor, zip, zipObject }; +export { Chain, Intervals, Model, Store, Timers, UniqID, VirtualStorage, add, after, apply, arrayToRegex, arraysToObject, ary, assert, assertAsync, assign, assignToClass, assignToObject, before, bindAll, cacheNativeMethod, calcProgress, camelCase, chain, chunk, chunkString, clear, clearArray, clearBuffer, clearIntervals, clearTimers, clone, cloneArray, cloneType, compact, compactKeys, compactMap, compactMapArray, compactMapAsyncArray, compactMapAsyncObject, compactMapObject, concurrent, concurrentEachArray, concurrentStatus, construct, constructorName, copyFolder, countBy, countKey, countWithoutKey, currentFile, currentPath, curry, curryRight, debounce, deduct, defProp, difference, divide, drop, dropRight, each, eachArray, eachAsyncArray, eachAsyncObject, eachObject, eachRight, eachRightAsync, ensureArray, ensureBuffer, isZero as equalsZero, escapeRegex, escapeRegexRegex, every, everyArg, everyArray, everyAsyncArray, everyAsyncObject, everyObject, extendClass, filter, filterArray, filterAsyncArray, filterAsyncObject, filterObject, findIndex, findIndexCache, findItem, first, flatten, flattenDeep, flow, flowAsync, flowAsyncRight, flowRight, forEach, forEachAsync, forMap, forOf, forOfAsync, forOfCompactMap, forOfCompactMapAsync, forOfEvery, forOfEveryAsync, forOfFilter, forOfFilterAsync, forOfMap, forOfMapAsync, generateLoop, get, getEntries, getFileExtension, getFilename, getHighest, getLowest, getNumberInsertIndex, getPropDesc, getPropNames, getType, getTypeName, groupBy, has, hasAnyKeys, hasDot, hasKeys, hasLength, hasProp, hasValue, htmlEntities, ifInvoke, ifNotAssign, ifValue, inAsync, inSync, increment, indexBy, initial, initialString, insertInRange, intersection, interval, intervals, invert, invokeArray, invokeCollection, invokeCollectionAsync, isArguments, isArray, isArrayBuffer, isArrayBufferCall, isArrayLike, isAsync, isAsyncCall, isBigInt, isBigIntCall, isBoolean, isBooleanCall, isBuffer, isBufferCall, isChild, isCloneable, isConstructor, isConstructorFactory, isConstructorNameFactory, isDate, isDateCall, isDeno, isEmpty, isEqual, isEven, isF32, isF32Call, isF64, isF64Call, isFalse, isFalsy, isFileCSS, isFileHTML, isFileJS, isFileJSON, isFloat, isFunction, isGenerator, isGeneratorCall, isI16, isI16Call, isI32, isI32Call, isI8, isI8Call, isIterable, isKindAsync, isMap, isMapCall, isMatchArray, isMatchObject, isNegative, isNodejs, isNotArray, isNotNumber, isNotString, isNull, isNumber, isNumberCall, isNumberEqual, isNumberInRange, isNumberNotInRange, isOdd, isParent, isPlainObject, isPositive, isPrimitive, isPromise, isRegex, isRegexCall, isRelated, isSafeInt, isSame, isSameType, isSet, isSetCall, isString, isTrue, isTruthy, isTypeFactory, isTypedArray, isU16, isU16Call, isU32, isU32Call, isU8, isU8C, isU8CCall, isU8Call, isUndefined, isWeakMap, isWeakMapCall, isZero, jsonParse, kebabCase, keys, largest, last, lowerCase, map, mapArray, mapAsyncArray, mapAsyncObject, mapObject, mapRightArray, mapWhile, merge, model, multiply, negate, noValue, noop, notEqual, nthArg, objectAssign, objectEntries, objectSize, omit, once, onlyUnique, over, overEvery, pair, partition, pick, pluck, pluckObject, promise, propertyMatch, randomFloat, randomInt, range, rangeDown, rangeUp, rawURLDecode, reArg, regexTestFactory, remainder, remove, removeBy, replaceList, rest, restString, returnValue, right, rightString, sample, sanitize, setKey, setValue, shuffle, smallest, snakeCase, sortCollectionAlphabetically, sortCollectionAlphabeticallyReverse, sortCollectionAscending, sortCollectionAscendingFilter, sortCollectionDescending, sortCollectionDescendingFilter, sortNumberAscending, sortNumberDescening, sortObjectsAlphabetically, sortObjectsAlphabeticallyReverse, sortUnique, stringify, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, subtractAll, subtractReverse, sumAll, take, takeRight, throttle, timer, timers, times, timesAsync, timesMap, timesMapAsync, toArray, toPath, toggle, tokenize, truncate, truncateRight, unZip, unZipObject, union, uniqID, unique, untilFalseArray, untilTrueArray, upperCase, upperFirst, upperFirstAll, upperFirstLetter, upperFirstOnly, upperFirstOnlyAll, virtualStorage, whileCompactMap, whileEachArray, whileMapArray, without, words, wrap, xor, zip, zipObject }; //# sourceMappingURL=bundle.js.map diff --git a/docs/index.bundle.js b/docs/index.bundle.js index e06fc17..806e731 100644 --- a/docs/index.bundle.js +++ b/docs/index.bundle.js @@ -1,7819 +1,8246 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' - ? factory(exports, require('node:fs/promises'), require('node:path'), require('node:url'), require('path')) - : typeof define === 'function' && define.amd - ? define(['exports', 'node:fs/promises', 'node:path', 'node:url', 'path'], factory) - : ((global = typeof globalThis !== 'undefined' ? globalThis : global || self), - factory((global.$ = {}), global.promises, global.path, global.node_url, global.path$1)); + typeof exports === "object" && typeof module !== "undefined" + ? factory( + exports, + require("node:fs/promises"), + require("node:path"), + require("node:url"), + require("path"), + ) + : typeof define === "function" && define.amd + ? define( + ["exports", "node:fs/promises", "node:path", "node:url", "path"], + factory, + ) + : ((global = + typeof globalThis !== "undefined" ? globalThis : global || self), + factory( + (global.$ = {}), + global.promises, + global.path, + global.node_url, + global.path$1, + )); })(this, function (exports, promises, path, node_url, path$1) { - 'use strict'; - - /** - * Chunks an array according to a user defined number. - * - * @function chunk - * @category Array - * @type {Function} - * @param {Array} array - Array to be chunked. - * @param {Number} size - Number which determines the size of each chunk. - * @returns {Array} - A chunked version of the source array. - * - * @example - * import { chunk, assert } from '@universalweb/acid'; - * assert(chunk([1,2,3], 1), [[1],[2],[3]]); - */ - function chunk(array, size = 1) { - const chunked = []; - let index = 0; - array.forEach((item, key) => { - if (!(key % size)) { - chunked.push([]); - if (key) { - index++; - } - } - chunked[index].push(item); - }); - return chunked; - } - - /** - * Clears the values out of an array. - * - * @function clearArray - * @category Array - * @type {Function} - * @param {Array} source - Takes an array to be emptied. - * @returns {Array} - The originally given array. - * - * @example - * import { clearArray, assert } from '@universalweb/acid'; - * assert(clearArray([1,'B', 'Cat']), []); - */ - function clearArray(source) { - source.length = 0; - return source; - } - - /** - * Clone an array (uses .slice()) and assign the source arrays values to the new array. - * - * @function cloneArray - * @category Array - * @type {Function} - * @param {Array} source - The array to be quick cloned. - * @returns {Array} - The newly cloned array with assigned items. - * - * @example - * import { cloneArray, assert } from '@universalweb/acid'; - * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']); - */ - function cloneArray(source) { - return source.slice(); - } - - /** Checks if the value is undefined. - * - * @function isUndefined - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isUndefined, assert } from '@universalweb/acid'; - * assert(isUndefined(undefined), true); - */ - function isUndefined(source) { - return source === undefined; - } - - /** - * Checks if the value has length greater than 0. - * - * @function hasLength - * @category utility - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { hasLength, assert } from '@universalweb/acid'; - * assert(hasLength([1]), true); - */ - function hasLength(source) { - return Boolean(source.length); - } - - /** - * Checks if the value is null. - * - * @function isNull - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNull, assert } from '@universalweb/acid'; - * assert(isNull(null), true); - */ - function isNull(source) { - return source === null; - } - - /** - * Checks if the value is not null or undefined. - * - * @function hasValue - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { hasValue, assert } from '@universalweb/acid'; - * assert(hasValue(1), true); - */ - function hasValue(source) { - return !isUndefined(source) && !isNull(source); - } - - /** - * A simple function which returns the value it's given. - * - * @function returnValue - * @category utility - * @param {*} source - The source object. - * @returns {source} The source object. - */ - function returnValue(source) { - return source; - } - - /** - * Iterates through the given array. - * - * @function eachArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. - * @param {*} thisBind - Iteratee called with thisBind as this. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array|undefined} - The originally given array. - * - * @example - * import { eachArray, assert } from '@universalweb/acid'; - * const list = []; - * eachArray([1, 2, 3], (item, index) => { - * list[index] = item; - * }); - * assert(list, [1, 2, 3]); - */ - function eachArray(source, iteratee, thisBind, additionalArg) { - if (!source) { - return; - } - const arrayLength = source.length; - if (hasValue(thisBind)) { - for (let index = 0; index < arrayLength; index++) { - iteratee.call(thisBind, source[index], index, source, arrayLength, additionalArg); - } - } else { - for (let index = 0; index < arrayLength; index++) { - iteratee(source[index], index, source, arrayLength, additionalArg); - } - } - return source; - } - - /** - * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. - * - * @function compactMapArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array} - An array with mapped properties that are not null or undefined. - * - * @example - * import { compactMapArray, assert } from '@universalweb/acid'; - * assert(compactMapArray([null, 2, 3], (item) => { - * return item; - * }), [2, 3]); - */ - function compactMapArray(source, iteratee = returnValue, results = [], thisCall, additionalArg) { - if (hasValue(thisCall)) { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - const returned = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg); - if (hasValue(returned)) { - results.push(returned); - } - }); - } else { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - const returned = iteratee(item, index, results, arrayOriginal, arrayLength, thisCall, additionalArg); - if (hasValue(returned)) { - results.push(returned); - } - }); - } - return results; - } - - /** - * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order. - * - * @function eachAsyncArray - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. - * @param {*} thisCall - Iteratee called with thisCall as this. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array|undefined} - Returns source the originally given array. - * - * @example - * import { eachAsyncArray, assert } from '@universalweb/acid'; - * const tempList = []; - * await eachAsyncArray([1, 2, 3], async (item) => { - * tempList.push(item); - * }); - * assert(tempList, [1, 2, 3]); - */ - async function eachAsyncArray(source, iteratee, thisCall, additionalArg) { - if (!source) { - return; - } - const arrayLength = source.length; - if (hasValue(thisCall)) { - for (let index = 0; index < arrayLength; index++) { - await iteratee.call(thisCall, source[index], index, source, arrayLength, additionalArg); - } - } else { - for (let index = 0; index < arrayLength; index++) { - await iteratee(source[index], index, source, arrayLength, additionalArg); - } - } - return source; - } - - /** - * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. - * - * @function compactMapAsyncArray - * @type {Function} - * @category array - * @async - * @param {Array} source - Array to be compacted. - * @param {Function} iteratee - Iteratee to be performed on array. - * @returns {Array} - Array values after being put through an iterator. - * - * @example - * import { compactMapAsync, assert } from '@universalweb/acid'; - * assert(await compactMapAsync([1, 2, 3, null], async (item) => { - * return item; - * }), [1, 2, 3]); - */ - async function compactMapAsyncArray(source, iteratee = returnValue) { - const results = []; - await eachAsyncArray(source, async (item, index, arrayLength) => { - const result = await iteratee(item, index, results, arrayLength); - if (hasValue(result)) { - results.push(result); - } - }); - return results; - } - - /** - * Checks if a number is negative & returns true or false. - * - * @function isNegative - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNegative, assert } from '@universalweb/acid'; - * assert(isNegative(-1), true); - */ - const { sign: sign$1 } = Math; - function isNegative(source) { - return sign$1(source) === -1; - } - - function rangeUp(start, end, step, sourceArray) { - let position = start; - while (position < end) { - sourceArray.push(position); - position += step; - } - return sourceArray; - } - function rangeDown(start, end, step, sourceArray) { - let position = start; - while (position > end) { - sourceArray.push(position); - position -= step; - } - return sourceArray; - } - /** - * Create a numbered list of integers. - * - * @function range - * @category array - * @type {Function} - * @param {Number} start - Value which determines the start of the range. - * @param {Number} end - Value which determines the end of the range. - * @param {Number} step - Value used to step between integers. - * @returns {Array} - An array of integers. - * - * @example - * import { range, assert } from '@universalweb/acid'; - * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]); - */ - function range(start, end, step = 1, sourceArray = []) { - if (isNegative(step)) { - return sourceArray; - } - if (start < end) { - return rangeUp(start, end, step, sourceArray); - } else { - return rangeDown(start, end, step, sourceArray); - } - } - - /** - * Checks if the value is an array. This references Array.isArray. - * - * @function isArray - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArray, assert } from '@universalweb/acid'; - * assert(isArray([]), true); - * assert(isArray(2), false); - */ - const isArray = Array.isArray; - /** - * Checks if the value is not an array. This references Array.isArray. - * - * @function isNotArray - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNotArray, assert } from '@universalweb/acid'; - * assert(isNotArray([]), false); - * assert(isNotArray(2), true); - */ - function isNotArray(source) { - return !isArray(source); - } - - /** - * A function which acts like the "new" operator and can pass arguments. This is a safe version of the original which will error if given undefined - * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects. - * - * @function construct - * @category class - * @param {Function} target - The target function or class. - * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array. - * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target. - * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList. - * - * @example - * import { construct, assert } from '@universalweb/acid'; - * class test { - * constructor(a) { - * return 1; - * } - * } - * const newClass = construct(test, [1]); - * assert(test, 1); - */ - const reflectConstruct = Reflect.construct; - function construct(target, argumentsList = [], newTarget) { - const args = isArray(argumentsList) ? argumentsList : [argumentsList]; - if (newTarget) { - return reflectConstruct(target, args, newTarget); - } - return reflectConstruct(target, args); - } - - /** - * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned. - * - * @function ensureArray - * @category array - * @type {Function} - * @param {*} source - Object to be checked. - * @returns {Array} - Returns an array. - * - * @example - * import { isArray, ensureArray, assert } from '@universalweb/acid'; - * assert(isArray(ensureArray('test')), ['test']); - */ - function ensureArray(source) { - return (isArray(source) && source) || (hasValue(source) && [source]) || []; - } - - /** - * Flattens an array to a single level. - * - * @function flattenDeep - * @type {Function} - * @category array - * @param {Array} source - Array to flatten. - * @returns {Array} - Returns a completely flattened array. - * - * @example - * import { flattenDeep, assert } from '@universalweb/acid'; - * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]); - */ - function flattenDeep(source) { - return source.flat(Infinity); - } - - function forEach(source, callback) { - source.forEach(callback); - return source; - } - - /** - * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences. - * - * @function difference - * @category array - * @type {Function} - * @param {...Array} sources - List of arrays to be compared. - * @returns {Array|undefined} - An array which contains the differences between the source and compare array. - * - * @example - * import { difference, assert } from '@universalweb/acid'; - * assert(difference([1, 2, 3], [1, 2]), [3]); - */ - function difference(...sources) { - const differencesMap = construct(Map); - const differences = []; - eachArray(sources, (currentArray, parentIndex) => { - eachArray(currentArray, (child, childIndex) => { - let childRoot = differencesMap.get(child); - if (!childRoot) { - childRoot = { - count: 1, - parentIndex, - child - }; - differencesMap.set(child, childRoot); - } else if (childRoot.parentIndex === parentIndex) { - return; - } else { - childRoot.count++; - } - }); - }); - forEach(differencesMap, (item) => { - if (item.count === 1 && item.parentIndex === 0) { - differences.push(item.child); - } - }); - return differences; - } - - /** - * Removes all items from an array after a specified index. - * - * @function drop - * @category array - * @type {Function} - * @param {Array} array - Source array. - * @param {Number} amount - Amount of items to drop from the array. - * @param {Number} [upTo = array.length] - Index to stop at. - * @returns {Array} - An array with all values removed after a user defined index. - * - * @example - * import { drop, assert } from '@universalweb/acid'; - * assert(drop([1, 2, 3]), [2, 3]); - * assert(drop([1, 2, 3], 2), [3]); - */ - function drop(array, amount = 1, upTo = array.length) { - return array.splice(amount, upTo); - } - - /** - * Removes all items from an array before a specified index. - * - * @function dropRight - * @type {Function} - * @category array - * @param {Array} array - Source array. - * @param {Number} amount - Amount of items to drop from the array. - * @param {Number} [upTo = array.length] - Index to stop at. - * @returns {Array} - An array with all values removed before a user defined index. - * - * @example - * import { dropRight, assert } from '@universalweb/acid'; - * assert(dropRight([1, 2, 3]), [1, 2]); - * assert(dropRight([1, 2, 3], 2), [1]); - */ - const dropRight = (array, amount = 1, upTo = array.length) => { - return drop(array, 0, upTo - amount); - }; - - /** - * Iterates through the given array in reverse. - * - * @function eachRight - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array|undefined} - The originally given array. - * - * @example - * import { eachRight, assert } from '@universalweb/acid'; - * const tempList = []; - * eachRight([1, 2, 3], (item) => { - * tempList.push(item); - * }); - * assert(tempList, [3, 2, 1]); - */ - function eachRight(source, iteratee, additionalArgument) { - if (!source) { - return; - } - const arrayLength = source.length; - for (let index = arrayLength - 1; index >= 0; index--) { - iteratee(source[index], index, source, arrayLength, additionalArgument); - } - return source; - } - - /** - * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order. - * - * @function eachRightAsync - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @returns {Object|undefined} - The originally given array. - * - * @example - * import { eachRightAsync, assert } from '@universalweb/acid'; - * const tempList = []; - * await eachRightAsync([1, 2, 3], async (item) => { - * tempList.push(item); - * }); - * assert(tempList, [3, 2, 1]); - */ - async function eachRightAsync(source, iteratee) { - if (!source) { - return; - } - const arrayLength = source.length; - for (let index = arrayLength - 1; index >= 0; index--) { - await iteratee(source[index], index, source, arrayLength); - } - return source; - } - - /** - * Iterates through the given array while the iteratee returns true else the loop exits & returns false. - * - * @function everyArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. - * - * @example - * import { everyArray, assert } from '@universalweb/acid'; - * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), false); - * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), true); - */ - function everyArray(source, iteratee, additionalArgument) { - if (!source) { - return; - } - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if (iteratee(source[index], index, source, sourceLength, additionalArgument) === false) { - return false; - } - } - return true; - } - - /** - * Iterates through the given array while the iteratee returns true else the loop exits & returns false. - * - * @function everyAsyncArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. - * - * @example - * import { everyAsyncArray, assert } from '@universalweb/acid'; - * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), false); - * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { - * return item; - * }), true); - */ - async function everyAsyncArray(source, iteratee, additionalArgument) { - if (!source) { - return; - } - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if ((await iteratee(source[index], index, source, sourceLength, additionalArgument)) === false) { - return false; - } - } - return true; - } - - /** - * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. - * - * @function filterArray - * @category array - * @type {Function} - * @category array - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array with properties that passed the test. - * - * @example - * import { filterArray, assert } from '@universalweb/acid'; - * assert(filterArray([false, true, true], (item) => { - * return item; - * }), [true, true]); - */ - function filterArray(source, iteratee, results = [], additionalArgument) { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - if (iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument) === true) { - results.push(item); - } - }); - return results; - } - - /** - * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. - * - * @function filterAsyncArray - * @category array - * @type {Function} - * @category array - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array with properties that passed the test. - * - * @example - * import { filterAsyncArray, assert } from '@universalweb/acid'; - * assert(filterAsyncArray([false, true, true], (item) => { - * return item; - * }), [true, true]); - */ - async function filterAsyncArray(source, iteratee, results = [], additionalArgument) { - await eachAsyncArray(source, async (item, index, arrayOriginal, arrayLength) => { - if ((await iteratee(item, index, results, arrayOriginal, arrayLength, additionalArgument)) === true) { - results.push(item); - } - }); - return results; - } - - /** - * Takes the first or multiple items from an array. - * - * @function first - * @type {Function} - * @category array - * @param {Array} array - Array to extract from. - * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array. - * @returns {Array} - Returns an array. - * - * @example - * import { first, assert } from '@universalweb/acid'; - * assert(first([1, 2, 3]), 1); - */ - function first(array, upTo) { - return upTo ? array.slice(0, upTo) : array[0]; - } - - /** - * Flattens an array up to the provided level. - * - * @function flatten - * @type {Function} - * @category array - * @param {Array} source - Array to flatten. - * @param {Number} [level = 1] - Number which determines how deep the array nest can be. - * @returns {Array|undefined} - Returns an array. - * - * @example - * import { flatten, assert } from '@universalweb/acid'; - * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]); - */ - function flatten(source, level = 1) { - if (!source) { - return; - } - let sourceArray = source; - for (let i = 0; i < level; i++) { - sourceArray = sourceArray.reduce((previousValue, currentValue) => { - return previousValue.concat(ensureArray(currentValue)); - }, []); - } - return sourceArray; - } - - /** - * Takes all but the last item in the array. - * - * @function initial - * @category array - * @type {Function} - * @param {Array} array - Array to have items extracted from. - * @returns {Array} - Returns a completely flattened array. - * - * @example - * import { initial, assert } from '@universalweb/acid'; - * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]); - */ - function initial(array) { - return array.slice(0, array.length - 1); - } - - // Add intersectionBy & intersectionWith - /** - * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory)) - * of the array and the input array(s). - * - * @function intersection - * @param {Array} array - Array to compare other arrays to. - * @param {...Array} arrays - A variable number of arrays. - * @category array - * @returns {Array} - The new array of unique values shared by all of the arrays. - * - * @example - * import { intersection, assert } from '@universalweb/acid'; - * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]); - */ - function intersection(array, ...arrays) { - return compactMapArray(array, (item) => { - const shouldReturn = everyArray(arrays, (otherItem) => { - return otherItem.includes(item); - }); - if (shouldReturn) { - return item; - } - }); - } - - /** - * Invoke each function in the given array. - * - * @function invokeArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} additionalArg - An object to be given each time to the iteratee. - * @param {*} thisCall - Iteratee called with thisCall as this. - * @returns {Array|undefined} - The originally given array. - * - * @example - * import { invokeArray, assert } from '@universalweb/acid'; - * function test(arg){ - * return [this, arg]; - * } - * const results = invokeArray([test], 1, test); - * assert(results, [test, 1]); - */ - function invokeArray(source, additionalArg, thisCall) { - if (!source) { - return; - } - const arrayLength = source.length; - if (hasValue(thisCall)) { - for (let index = 0; index < arrayLength; index++) { - source[index].call(thisCall, additionalArg); - } - } else { - for (let index = 0; index < arrayLength; index++) { - source[index](additionalArg); - } - } - return source; - } - - const regexToPath = /\.|\[/; - const regexCloseBracket = /]/g; - const emptyString = ''; - /** - * Breaks up string into object chain list. - * - * @function toPath - * @type {Function} - * @category utility - * @param {String} source - String to be broken up. - * @returns {Array} - Array used to go through object chain. - * - * @example - * import { toPath, assert } from '@universalweb/acid'; - * assert(toPath('post.like[2]'), ['post', 'like', '2']); - */ - function toPath(source) { - return source.replace(regexCloseBracket, emptyString).split(regexToPath); - } - - /** - * Returns property on an object. - * - * @function get - * @category utility - * @type {Function} - * @param {String} propertyString - String used to retrieve properties. - * @param {Object} target - Object which has a property retrieved from it. - * @returns {Object} - Returns property from the given object. - * - * @example - * import { get, assert } from '@universalweb/acid'; - * const objectTarget = { - * post: { - * like: ['a','b','c'] - * } - * }; - * assert(get('post.like[2]', objectTarget), 'c'); - */ - function get(propertyString, target) { - if (!target) { - return false; - } - let link = target; - const pathArray = isArray(propertyString) ? propertyString : toPath(propertyString); - everyArray(pathArray, (item) => { - link = link[item]; - return hasValue(link); - }); - return link; - } - - /** - * Get object's keys. - * - * @function keys - * @category object - * @param {*} source - The source object to pull keys from. - * @returns {Array} - Array of keys. - * - * @example - * keys({a: 1, b: 2}); - * // => ['a', 'b'] - */ - const objectKeys = Object.keys; - function keys(source) { - if (source) { - return objectKeys(source); - } - } - - const hasOwn = Object.hasOwn; - /** - * Checks to see if an object has all of the given property names. - * - * @function hasKeys - * @category object - * @type {Function} - * @param {Object} source - Source object to check for keys. - * @param {...String} properties - List of strings to check. - * @returns {Boolean|undefined} - Returns true or false. - * - * @example - * import { hasKeys, assert } from '@universalweb/acid'; - * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true); - */ - function hasKeys(source, ...properties) { - if (!source) { - return; - } - return everyArray(properties, (item) => { - const pathArray = toPath(item); - if (pathArray.length === 1) { - return hasOwn(source, item); - } else { - const lastPath = pathArray.pop(); - const initialPathObject = get(pathArray, source); - if (initialPathObject) { - return hasOwn(initialPathObject, lastPath); - } - return false; - } - }); - } - /** - * Checks to see if an object has any of the given property names. - * - * @function hasAnyKeys - * @category object - * @type {Function} - * @param {Object} source - Source object to check for keys. - * @param {Array} properties - List of strings to check. - * @returns {Boolean|undefined} - Returns true or false. - * - * @example - * import { hasAnyKeys, assert } from '@universalweb/acid'; - * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true); - * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false); - */ - function hasAnyKeys(source, ...properties) { - if (!source) { - return; - } - return Boolean( - properties.find((item) => { - const pathArray = toPath(item); - if (pathArray.length === 1) { - return hasOwn(source, item); - } else { - const lastPath = pathArray.pop(); - const initialPathObject = get(pathArray, source); - if (initialPathObject) { - return hasOwn(initialPathObject, lastPath); - } - return false; - } - }) - ); - } - - /** - * Checks to see if the constructor is that of a native object. - * - * @function isConstructor - * @category type - * @param {Object} target - The object to be checked. - * @param {Object} source - The source constructor object. - * @returns {Object} - Returns the target object. - * - * @example - * import { isConstructor, assert } from '@universalweb/acid'; - * assert(isConstructor(2, Number), true); - */ - function isConstructor(target, source) { - return target?.constructor === source || false; - } - function isConstructorFactory(source) { - return (target) => { - return isConstructor(target, source); - }; - } - function constructorName(source) { - return source?.constructor?.name; - } - function isConstructorNameFactory(source) { - return (target) => { - return constructorName(target) === source || false; - }; - } - - function isTypeFactory(method) { - return function (primarySource, ...otherSources) { - if (otherSources) { - return method(primarySource) && everyArray(otherSources, method); - } - return method(primarySource); - }; - } - - /** - * Checks if an object or objects are a Buffer. - * - * @function isBuffer - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isBuffer, assert } from '@universalweb/acid'; - * assert(isBuffer(Buffer.from('test')), true); - */ - const isBufferCall = isConstructorNameFactory('Buffer'); - const isBuffer = isTypeFactory(isBufferCall); - - /** - * Checks if the value is a plain object. - * - * @function isPlainObject - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isPlainObject } from '@universalweb/acid'; - * isPlainObject({}); - * // => true - */ - const isPlainObject = (source) => { - if (hasValue(source)) { - return source.constructor.toString().trim().slice(9, 16) === 'Object('; - } - return false; - }; - - /** - * Performs a deep comparison between two objects & determines if the value is the same using strict comparison. - * - * @function isEqual - * @type {Function} - * @category utility - * @param {*} source - Source object. - * @param {*} target - Object to be compared. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isEqual, assert } from '@universalweb/acid'; - * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true); - */ - // Add map & buffer Support - Review required for performance and support for more types - const isEqual = (source, target) => { - if (source === target) { - return true; - } else if (isBuffer(source)) { - return source.equals(target); - } else if (source.toString() === target.toString()) { - if (isPlainObject(source)) { - const sourceProperties = keys(source); - if (hasKeys(target, sourceProperties)) { - return everyArray(sourceProperties, (key) => { - return isEqual(source[key], target[key]); - }); - } - } else if (isArray(source)) { - if (source.length === target.length) { - return everyArray(source, (item, index) => { - return isEqual(item, target[index]); - }); - } - } - } - return false; - }; - - /** - * Performs a shallow strict comparison between two objects. - * - * @function isMatchArray - * @type {Function} - * @category array - * @param {Array} source - Source object. - * @param {Array} compareArray - Object to compare to source. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isMatchArray, assert } from '@universalweb/acid'; - * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true); - */ - function isMatchArray(source, compareArray) { - if (source.length === compareArray.length) { - return everyArray(source, (item, index) => { - return isEqual(compareArray[index], item); - }); - } - return false; - } - - const mathNativeMax = Math.max; - /** - * Plucks the largest value from an array. - * - * @function largest - * @type {Function} - * @category array - * @param {Array} array - Array from which largest number is taken. - * @returns {Number} - The largest number. - * - * @example - * import { largest, assert } from '@universalweb/acid'; - * assert(largest([1,2,3]), 3); - */ - function largest(array) { - return mathNativeMax(...array); - } - - /** - * Extracts item(s) from an array starting from the last item in the array. - * - * @function last - * @type {Function} - * @category array - * @param {Array} array - Array to have items extracted from. - * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array. - * @returns {Array} - Items from the array. - * - * @example - * import { last, assert } from '@universalweb/acid'; - * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]); - */ - function last(array, indexFrom) { - const arrayLength = array.length; - return indexFrom ? array.slice(arrayLength - indexFrom, arrayLength) : array[arrayLength - 1]; - } - - /** - * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. - * - * @function mapArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array} - An array of the same calling array's type. - * - * @example - * import { mapArray, assert } from '@universalweb/acid'; - * assert(mapArray([1, 2, 3], (item) => { - * return item * 2; - * }), [2, 4, 6]); - */ - function mapArray(source, iteratee, results = [], thisCall, additionalArg) { - if (hasValue(thisCall)) { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - results[index] = iteratee.call(thisCall, item, index, results, arrayOriginal, arrayLength, additionalArg); - }); - } else { - eachArray(source, (item, index, arrayOriginal, arrayLength) => { - results[index] = iteratee(item, index, results, arrayOriginal, arrayLength, additionalArg); - }); - } - return results; - } - - /** - * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee. - * - * @function concurrentEachArray - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {*} thisBind - Object to use as the "this" within the function. - * @returns {Promise|Array|undefined} - An array of the same calling array's type. - * - * @example - * import { concurrentEachArray, has, assert } from '@universalweb/acid'; - * const results = await concurrentEachArray([1, 2, 3], async (item) => { - * return item * 2; - * }); - * assert(has(results, [2, 4, 6]), true); - */ - async function concurrentEachArray(source, iteratee, thisBind) { - if (!source) { - return; - } - const results = []; - const arrayLength = source.length; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - results[index] = iteratee.call(thisBind, source[index], index, results, arrayLength); - } - } else { - for (let index = 0; index < arrayLength; index++) { - results[index] = iteratee(source[index], index, results, arrayLength); - } - } - return Promise.all(results); - } - - /** - * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray. - * - * @function mapAsyncArray - * @category array - * @type {Function} - * @async - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @returns {Array} - An array of the same calling array's type. - * - * @example - * import { mapAsyncArray, assert } from '@universalweb/acid'; - * assert(await mapAsyncArray([1, 2, 3], async (item) => { - * return item * 2; - * }), [2, 4, 6]); - */ - async function mapAsyncArray(source, iteratee) { - const results = []; - await eachAsyncArray(source, async (item, index, arrayLength) => { - results[index] = await iteratee(item, index, results, arrayLength); - }); - return results; - } - - /** - * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse. - * - * @function mapRightArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array of the same calling array's type. - * - * @example - * import { mapRightArray, assert } from '@universalweb/acid'; - * assert(mapRightArray([1, 2, 3], (item) => { - * return item * 2; - * }), [6, 4, 2]); - */ - function mapRightArray(source, iteratee, results = [], additionalArgument) { - let trueIndex = 0; - const arrayLength = source.length; - for (let index = arrayLength - 1; index >= 0; index--) { - results[trueIndex] = iteratee(source[index], index, source, arrayLength, additionalArgument); - trueIndex++; - } - return results; - } - - /** - * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee. - * - * @function mapWhile - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - An array with properties that passed the test. - * - * @example - * import { mapWhile, assert } from '@universalweb/acid'; - * assert(mapWhile([1, 2, 0], (item) => { - * return Boolean(item); - * }), [1, 2]); - */ - function mapWhile(source, iteratee, results = [], additionalArgument) { - const arrayLength = source.length; - for (let index = 0; index < arrayLength; index++) { - const item = source[index]; - const returned = iteratee(item, index, results, source, arrayLength, additionalArgument); - if (returned === false) { - break; - } - results[index] = item; - } - return results; - } - - /** - * Subtracts the subtrahend (second argument) from the minuend (first argument). - * - * @function subtract - * @category math - * @type {Function} - * @param {Number} minuend - The minuend. - * @param {Number} subtrahend - The subtrahend. - * @returns {Number} - Returns the difference. - * - * @example - * import { subtract, assert } from '@universalweb/acid'; - * assert(subtract(3, 1), 2); - */ - function subtract(minuend, subtrahend) { - return minuend - subtrahend; - } - - /** - * Sorts an array of numbers in ascending order. Smallest to largest. - * - * @function sortNumberAscending - * @category array - * @param {Array} numberList - Array of numbers. - * @returns {Array} - The array this method was called on. - * - * @example - * import { sortNumberAscending, assert } from '@universalweb/acid'; - * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]); - */ - function sortNumberAscending(numberList) { - return numberList.sort(subtract); - } - - /** - * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. - * - * @function partition - * @type {Function} - * @category array - * @param {Array} array - Takes an array to split. - * @param {Function} predicate - Function run on each item in the array. - * @returns {Array} - One array split into two arrays. - * - * @example - * import { partition, assert } from '@universalweb/acid'; - * const result = partition([ - * {user: 'barney', age: 36, active: false}, - * {user: 'fred', age: 40, active: true}, - * {user: 'pebbles', age: 1, active: false} - * ], (item) => { return item.active; }); - * assert(result, [{"user":"fred","age":40,"active":true}], - * [{"user":"barney","age":36,"active":false}, - * {"user":"pebbles","age":1,"active":false}]); - */ - function partition(array, predicate) { - const rejected = []; - return [ - compactMapArray(array, (item, index) => { - if (predicate(item, index)) { - return item; - } - rejected.push(item); - }), - rejected - ]; - } - - /** - * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function. - * - * @function subtractReverse - * @category math - * @type {Function} - * @param {Number} subtrahend - The subtrahend. - * @param {Number} minuend - The minuend. - * @returns {Number} - Returns the difference. - * - * @example - * import { subtractReverse, assert } from '@universalweb/acid'; - * assert(subtractReverse(1, 3), 2); - */ - function subtractReverse(subtrahend, minuend) { - return minuend - subtrahend; - } - - /** - * Sorts an array of numbers in descending order. Largest to smallest. - * - * @function sortNumberDescening - * @category array - * @param {Array} numberList - Array of numbers. - * @returns {Array} - The array this method was called on. - * - * @example - * import { sortNumberDescening, assert } from '@universalweb/acid'; - * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]); - */ - function sortNumberDescening(numberList) { - return numberList.sort(subtractReverse); - } - - /** - * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation. - * - * @function remove - * @category array - * @param {Array} array - Array to be mutated. - * @param {String|Array} removeThese - Items to remove from the array. - * @returns {Array} - The array this method was called on. - * - * @example - * remove([1, 2, 3, 3, 4, 3, 5], 1); - * // => [2, 3, 3, 4, 3, 5] - * @example - * remove([3, 3, 4, 5], 3, 4); - * // => [5] - */ - function remove(array, removeThese) { - let arrayLength = array.length; - for (let index = 0; index < arrayLength; index++) { - const item = array[index]; - if (removeThese.includes(item)) { - array.splice(index, 1); - index--; - arrayLength--; - } - } - return array; - } - /** - * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation. - * - * @function removeBy - * @category array - * @param {Array} source - Array to be mutated. - * @param {Function} iteratee - Function used to check object. Return true to remove the value. - * @returns {Array} - The array this method was called on. - * - * @example - * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);}); - * // => [2, 4] - */ - function removeBy(source, iteratee) { - let arrayLength = source.length; - for (let index = 0; index < arrayLength; index++) { - const item = source[index]; - if (iteratee(item, index)) { - source.splice(index, 1); - index--; - arrayLength--; - } - } - return source; - } - - /** - * Extracts all items in array except the first and last item. - * - * @function rest - * @type {Function} - * @category array - * @param {Array} array - Array to be sliced. - * @returns {Array} - Returns the aggregated array. - * - * @example - * rest([1, 2, 3, 4, 5]); - * // => [2, 3, 4, 5] - */ - function rest(array) { - return array.slice(1, array.length); - } - - /** - * Get the item at the supplied index starting at the end of the array. - * - * @function right - * @type {Function} - * @category array - * @param {Array} source - Array to be sliced. - * @param {Number} amount - Amount from the right. - * @returns {*} - Returns the object at the evaluated position. - * - * @example - * right([1, 2, 3, 4, 5] , 1); - * // => 4 - */ - function right(source, amount) { - return source[source.length - 1 - amount]; - } - - const { floor, random: random$1 } = Math; - /** - * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption.. - * - * @function randomInt - * @category number - * @type {Function} - * @param {Number} max - The highest possible value for the random number. - * @param {Number} [min = 0] - Establishes lowest possible value for the random number. - * @returns {Number} - Returns random integer between the max and min range. - * - * @example - * import { randomInt, assert } from '@universalweb/acid'; - * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;}); - */ - function randomInt(max, min = 0) { - return floor(random$1() * (max - min)) + min; - } - - /** - * Checks if two numbers are the same. - * - * @function isNumberEqual - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @param {Number} target - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumberEqual, assert } from '@universalweb/acid'; - * assert(isNumberEqual(0, 0), true); - */ - function isNumberEqual(source, target) { - return source === target; - } - - const arrayFrom = Array.from; - /** - * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check. - * - * @function toArray - * @category array - * @param {*} arrayLike - Array like object. - * @param {Function} mapFn - Function to map over the array. - * @param {*} thisArg - MapFn's "this". - * @returns {Array|undefined} - New array. - * - * @example - * import { toArray, assert } from '@universalweb/acid'; - * assert(toArray(new Map([[1, 2]])), [[1, 2]]); - */ - function toArray(arrayLike, mapFn, thisArg) { - if (hasValue(arrayLike)) { - return arrayFrom(arrayLike, mapFn, thisArg); - } - } - - /** - * Shuffle an array and return a new array. - * - * @function shuffle - * @category array - * @param {Array} target - Target Array to be shuffled. - * @param {Number} amount - The amount of times to shuffle the array. - * @returns {Array} - An array with the shuffled results. - * - * @example - * import { shuffle, assert } from '@universalweb/acid'; - * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]); - */ - function shuffle(target, amount = target.length) { - if (target.length <= 1) { - return toArray(target); - } - const shuffleArray = toArray(target); - let count = 0; - let index; - let value; - while (count < amount) { - index = randomInt(shuffleArray.length - 1, 0); - value = shuffleArray[count]; - shuffleArray[count] = shuffleArray[index]; - shuffleArray[index] = value; - count++; - } - return shuffleArray; - } - - /** - * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned. - * - * @function sample - * @category array - * @param {Array} source - The array to pull sample(s) from. - * @param {Number} amount - The amount of samples to take. - * @returns {Array} - An array of randomly pulled samples. - * - * @example - * sample([1, 2, 3, 4] , 2); - * // => [1, 3] - */ - function sample(source, amount) { - if (!source) { - return false; - } - const arrayLength = source.length; - if (arrayLength === amount || amount > arrayLength) { - return shuffle(source); - } - if (amount === 1) { - return [source[randomInt(arrayLength - 1, 0)]]; - } - const sampleArray = []; - const used = {}; - let count = 0; - let index; - while (count < amount) { - index = randomInt(source.length - 1, 0); - if (!used[index]) { - sampleArray.push(source[index]); - used[index] = true; - count++; - } - } - return sampleArray; - } - - const mathNativeMin = Math.min; - /** - * Plucks the smallest value from an array. - * - * @function smallest - * @category array - * @type {Function} - * @param {Array} array - Array from which smallest number is taken. - * @returns {Number} - The smallest number. - * - * @example - * smallest([1,2,3]); - * // => 1 - */ - function smallest(array) { - return mathNativeMin(...array); - } - - /** - * What index should the number be inserted at to keep a sorted array still sorted. - * - * @function getNumberInsertIndex - * @category array - * @type {Function} - * @param {Array} source - Array to be checked. - * @param {Number} target - Number to check where to be inserted. - * @returns {Number} - The index at which to insert. - * - * @example - * import { getNumberInsertIndex, assert } from '@universalweb/acid'; - * assert(getNumberInsertIndex([30, 39, 50], 40), 1); - */ - function getNumberInsertIndex(source, target) { - let insertIndex = 0; - everyArray(source, (item, index) => { - insertIndex = index; - if (target >= item) { - insertIndex = index + 1; - return true; - } else { - return false; - } - }); - return insertIndex; - } - - /** - * Returns a shallow copy of the array up to an amount. - * - * @function take - * @category array - * @type {Function} - * @param {Array} source - The source array to take from. - * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction. - * @returns {Array} - The aggregated array. - * - * @example - * import { take, assert } from '@universalweb/acid'; - * assert(take([1,2,3], 2), [1, 2]); - */ - function take(source, endIndex = 1) { - return source.slice(0, endIndex); - } - - /** - * Returns a shallow copy of the array up to an amount starting from the right. - * - * @function takeRight - * @category array - * @type {Function} - * @param {Array} source - The source array to take right from. - * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction. - * @returns {Array} - The aggregated array. - * - * @example - * import { takeRight, assert } from '@universalweb/acid'; - * assert(takeRight([1,2,3], 2), [2, 3]); - */ - function takeRight(source, indexRight = 1) { - const arrayLength = source.length; - return source.slice(arrayLength - indexRight, arrayLength); - } - - function onlyUnique(value, index, array) { - return array.indexOf(value) === index; - } - function sortUnique(item, index, array) { - return item !== array[index - 1]; - } - /** - * Filters the array down to unique elements. - * - * @function unique - * @category array - * @type {Function} - * @param {Array} source - The array to be filtered. - * @param {Boolean} isSorted - Flag which means the array is already sorted. - * @returns {Array} - The filtered array. - * - * @example - * unique([1, 2, 2, 4]); - * // => [1, 2, 4] - */ - function unique(source, isSorted) { - if (isSorted) { - return source.filter(sortUnique); - } - return source.filter(onlyUnique); - } - - /** - * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays. - * - * @function union - * @category array - * @type {Function} - * @param {...Array} arrays - The arrays to be evaluated. - * @returns {Array} - The aggregated array. - * - * @example - * union([1,2,4], [1,2,3]); - * // => [1, 2, 4, 3] - */ - function union(...arrays) { - return unique(flattenDeep(arrays)); - } - - /** - * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned. - * If and when the iteratee yields false the loop stops & false is returned. - * - * @function untilFalseArray - * @category array - * @type {Function} - * @param {Array} source - The array to iterate over. - * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. - * @returns {Array} - Returns true if all returns are true or false if one value returns false. - * - * @example - * import { untilFalseArray, assert } from '@universalweb/acid'; - * assert(untilFalseArray([true, true, false], (item) => { - * return item; - * }), false); - * assert(untilFalseArray([true, true, true], (item) => { - * return item; - * }), true); - */ - function untilFalseArray(source, iteratee) { - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if (iteratee(source[index], index) === false) { - return false; - } - } - return true; - } - - /** - * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned. - * If and when the iteratee yields true the loop stops & false is returned. - * - * @function untilTrueArray - * @category array - * @type {Function} - * @param {Array} source - The array to iterate over. - * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. - * @returns {Array} - Returns true if all returns are false or false if one value returns true. - * - * @example - * import { untilTrueArray, assert } from '@universalweb/acid'; - * assert(untilTrueArray([true], (item) => { - * return item; - * }), false); - * assert(untilTrueArray([true, true, true], (item) => { - * return item; - * }), true); - */ - function untilTrueArray(source, iteratee) { - const sourceLength = source.length; - for (let index = 0; index < sourceLength; index++) { - if (iteratee(source[index], index) === true) { - return false; - } - } - return true; - } - - /** - * Iterates through the calling object and creates a new object based on the calling object's type with the results, - * (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * Re-checks the length each loop. - * - * @function whileCompactMap - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The originally given array. - * - * @example - * import { whileCompactMap, assert } from '@universalweb/acid'; - * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => { - * return item; - * }), [1, 2, 3, false]); - */ - function whileCompactMap(source, iteratee, results = [], additionalArgument) { - let index = 0; - while (index < source.length) { - const result = results.push(iteratee(source[index], index, source, source.length, additionalArgument)); - index++; - if (hasValue(result)) { - results.push(result); - } - } - return source; - } - - /** - * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over. - * - * @function whileEachArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The originally given array. - * - * @example - * import { whileEachArray, assert } from '@universalweb/acid'; - * const list = []; - * whileEachArray([1, 2, 3], (item, index) => { - * list[index] = item; - * }); - * assert(list, [1, 2, 3]); - */ - function whileEachArray(source, iteratee, additionalArgument) { - let index = 0; - while (index < source.length) { - iteratee(source[index], index, source, source.length, additionalArgument); - index++; - } - return source; - } - - /** - * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. - * Re-checks the length each loop. - * - * @function whileMapArray - * @category array - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The originally given array. - * - * @example - * import { whileMapArray, assert } from '@universalweb/acid'; - * assert(whileMapArray([1, 2, 3], (item, index, source) => { - * if (index === 0) { - * source.push(4); - * } - * return item; - * }), [1, 2, 3, 4]); - */ - function whileMapArray(source, iteratee, results = [], additionalArgument) { - let index = 0; - while (index < source.length) { - results.push(iteratee(source[index], index, source, source.length, additionalArgument)); - index++; - } - return source; - } - - /** - * Returns a copy of the array with all instances of the values removed. - * - * @function without - * @type {Function} - * @category array - * @param {Array} target - The target array to be filtered. - * @param {Array} sources - Items to be removed. - * @returns {Array} - The target array filtered. - * - * @example - * import { without, assert } from '@universalweb/acid'; - * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]); - */ - function without(target, sources) { - if (!sources) { - return target; - } - const sourcesSet = construct(Set, sources); - return target.filter((item) => { - return !sourcesSet.has(item); - }); - } - - /** - * Creates an array that is the symmetric difference of the provided arrays. - * - * @function xor - * @category array - * @type {Function} - * @param {...Array} sources - The array(s) to be filtered. - * @returns {Array|undefined} - The filtered array. - * - * @example - * xor([2, 1], [2, 3, 5], [6]); - * // => [1, 3, 5, 6] - */ - function xor(...sources) { - const xorMap = construct(Map); - const xored = []; - const sourcesLength = sources.length; - if (sourcesLength === 2) { - return difference(sources[0], sources[1]); - } - eachArray(sources, (currentArray, parentIndex) => { - eachArray(currentArray, (child, childIndex) => { - let childRoot = xorMap.get(child); - if (!childRoot) { - childRoot = { - count: 1, - parentIndex, - child - }; - xorMap.set(child, childRoot); - } else if (childRoot.parentIndex === parentIndex) { - return; - } else { - childRoot.count++; - } - }); - }); - forEach(xorMap, (item) => { - if (item.count === 1) { - xored.push(item.child); - } - }); - return xored; - } - - /** - * Merges together the values of each of the arrays with the values at the corresponding position. - * - * @function zip - * @type {Function} - * @category array - * @param {Array} arrays - The arrays to process. - * @returns {Array} - Returns the new array of regrouped elements. - * - * @example - * zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] - */ - function zip(...arrays) { - return arrays[0].map((item, index) => { - return arrays.map((array) => { - return array[index]; - }); - }); - } - /** - * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration. - * - * @function unZip - * @type {Function} - * @category array - * @param {Array} source - The array of grouped elements to process. - * @returns {Array} - Returns the new array of regrouped elements. - * - * @example - * unZip([['a', 1, true], ['b', 2, false]]); - * // => [['a', 'b'], [1, 2], [true, false]] - */ - function unZip(source) { - return source[0].map((item, index) => { - return source.map((arraySet) => { - return arraySet[index]; - }); - }); - } - - /** - * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer. - * - * @function ensureBuffer - * @category buffer - * @type {Function} - * @param {*} source - Object to be checked. - * @returns {Array} - Returns an array. - * - * @example - * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid'; - * assert(isBuffer(ensureBuffer('test')), true); - */ - function ensureBuffer(source) { - return (isBuffer(source) && source) || (hasValue(source) && Buffer.from(source)) || Buffer.alloc(0); - } - - /** - * Clears the values out of a buffer. - * - * @function clearBuffer - * @category buffer - * @type {Function} - * @param {Array} source - Takes an array to be emptied. - * @returns {Array} - The originally given array. - * - * @example - * import { clearBuffer, assert } from '@universalweb/acid'; - * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([])); - */ - function clearBuffer(source) { - source.fill(0); - return source; - } - - /** - * Checks if an object or objects are a plain object. - * - * @function isFunction - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFunction } from '@universalweb/acid'; - * isFunction(() => {}); - * // => true - */ - const isFunction = (source) => { - return hasValue(source) ? source instanceof Function : false; - }; - - /** - * Checks if the value is a number. - * - * @function isNumber - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumber, assert } from '@universalweb/acid'; - * assert(isNumber(1), true); - */ - const isNumberCall = isConstructorNameFactory('Number'); - const isNumber = isTypeFactory(isNumberCall); - /** - * Checks if the value is not a number. - * - * @function isNotNumber - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNotNumber, assert } from '@universalweb/acid'; - * assert(isNotNumber(1), false); - */ - function isNotNumber(source) { - return !isNumber(source); - } - - /** - * Checks if the value is a string. - * - * @function isString - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isString, assert } from '@universalweb/acid'; - * assert(isString('hello'), true); - * assert(isString(1), false); - */ - const isString = isConstructorFactory(String); - /** - * Checks if the value is not a string. - * - * @function isNotString - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNotString, assert } from '@universalweb/acid'; - * assert(isNotString(1), true); - * assert(isNotString('hello'), false); - */ - function isNotString(source) { - return !isString(source); - } - - const objectAssign = Object.assign; - function assignToObject(target, source) { - if (isPlainObject(source)) { - objectAssign(target, source); - } else if (isFunction(source)) { - const key = source.name; - if (key) { - target[key] = source; - } else { - objectAssign(target, source); - } - } else if (isString(source) || isNumber(source)) { - target[source] = source; - } - return target; - } - /** - * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module. - * - * @function assign - * @category object - * @param {Object} target - The target object. - * @param {...Object} sources - The source object(s). - * @returns {Object} - Returns the target object. - * - * @example - * import { assign, assert } from '@universalweb/acid'; - * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5}); - */ - function assign(target, ...sources) { - const sourceLength = sources.length; - for (let index = 0; index < sourceLength; index++) { - assignToObject(target, sources[index]); - } - return target; - } - - function assignToClass(target, source) { - if (isPlainObject(source)) { - objectAssign(target.prototype, source); - } else if (isFunction(source)) { - const key = source.name; - if (key) { - target.prototype[key] = source; - } - } else if (isConstructor(source)) { - const key = source.constructor?.name; - if (key) { - target.prototype[key] = source; - } - } else if (isString(source) || isNumber(source)) { - target.prototype[source] = source; - } - return target; - } - /** - * The function adds a new method to a class. - * @param {Class} target - The target parameter refers to the Class or constructor function to which you want - * to add a new method. - * @param {Function|Object|String|Number} sources - What you want to add to the class. - * @returns {Class} - Returns the Class provided in the target parameter. - * - * @example - * import { extendClass, assert } from '@universalweb/acid'; - * class Test {} - * function a(){return 1;} - * extendClass(Test, a) - * assert((new Test()).a(), 1); - */ - function extendClass(target, ...sources) { - const sourceLength = sources.length; - for (let index = 0; index < sourceLength; index++) { - assignToClass(target, sources[index]); - } - return target; - } - - /** - * Creates an object composed of keys generated from the results of running each element of collection through iteratee. - * - * @function countBy - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {Function} iteratee - The iteratee to transform keys. - * @returns {Object} - Returns the composed aggregate object. - * - * @example - * import { countBy, assert } from '@universalweb/acid'; - * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2}); - */ - function countBy(collection, iteratee) { - const object = {}; - let result; - eachArray(collection, (item) => { - result = iteratee(item); - if (!object[result]) { - object[result] = 0; - } - object[result]++; - }); - return object; - } - - /** - * Count the amount of times a key is present in a collection. - * - * @function countKey - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {Function} propertyName - The name of the key. - * @returns {Number} - The count. - * - * @example - * import { countKey, assert } from '@universalweb/acid'; - * assert(countKey([{a:1}, {a:3}], 'a'), 2); - */ - function countKey(collection, propertyName) { - let count = 0; - eachArray(collection, (item) => { - if (item[propertyName]) { - count++; - } - }); - return count; - } - - /** - * Count the amount of times a key is not present in a collection. - * - * @function countWithoutKey - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {String} propertyName - The name of the key. - * @returns {Number} - The count. - * - * @example - * import { countWithoutKey, assert } from '@universalweb/acid'; - * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2); - */ - function countWithoutKey(collection, propertyName) { - let count = 0; - eachArray(collection, (item) => { - if (!item[propertyName]) { - count++; - } - }); - return count; - } - - function findIndexCache(element, index, array, indexMatch, propertyName) { - if (element[propertyName] === indexMatch) { - return true; - } - } - - /** - * Finds an object in a collection by the given id and property name and returns the array index of the object. - * - * @function findIndex - * @type {Function} - * @category collection - * @param {Array} collection - Collection to be checked for an item. - * @param {Number|string} id - The value to look for. - * @param {String} [propertyName = 'id'] - The name of the property to compare. - * @returns {Number} - The index of the object. - * - * @example - * findIndex([{id: 1}, {id: 2}], 1); - * // => 0 - */ - function findIndex(collection, id, propertyName = 'id') { - const result = collection.findIndex((element, index) => { - return findIndexCache(element, index, collection, id, propertyName); - }); - return result === -1 ? false : result; - } - - /** - * Finds an object in a collection by the given id and property name. - * - * @function findItem - * @type {Function} - * @category collection - * @param {Array} collection - Collection to be checked for an item. - * @param {Number|string} id - The value to look for. - * @param {String} [propertyName = 'id'] - The name of the property to compare. - * @returns {Object} - The found object. - * - * @example - * findItem([{id: 1}, {id: 2}], 1); - * // => {id: 1} - */ - function findItem(collection, id, propertyName = 'id') { - const result = collection.find((element, index) => { - return findIndexCache(element, index, collection, id, propertyName); - }); - return result === -1 ? false : result; - } - - function sortCollectionDescendingFilter(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - if (!nextKey) { - return -1; - } else if (!previousKey) { - return 1; - } else if (previousKey < nextKey) { - return 1; - } else if (previousKey > nextKey) { - return -1; - } - return 0; - } - /** - * Sorts an array in place using a key in descending order. - * - * @function sortCollectionDescending - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array and or a clone of the array sorted. - * - * @example - * import { sortCollectionDescending, assert } from '@universalweb/acid'; - * const result = [{id: 1}, {id: 0}]; - * const collect = [{id: 0}, {id: 1}]; - * const prop = 'id'; - * assert(sortCollectionDescending(collect, prop), result); - */ - function sortCollectionDescending(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortCollectionDescendingFilter(previous, next, propertyName, ifMatch); - }); - } - - /** - * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array. - * - * @function getLowest - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @returns {Object} - The newest object in the collection. - * - * @example - * import { getLowest, assert } from '@universalweb/acid'; - * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1}); - */ - function getLowest(collection, propertyName) { - return sortCollectionDescending(collection, propertyName, false)[0]; - } - - function sortCollectionAscendingFilter(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - if (!nextKey) { - return 1; - } else if (!previousKey) { - return -1; - } else if (previousKey < nextKey) { - return -1; - } else if (previousKey > nextKey) { - return 1; - } - return 0; - } - /** - * Sorts an array in place using a key in ascending order. - * - * @function sortCollectionAscending - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array and or a clone of the array sorted. - * - * @example - * import { sortCollectionAscending, assert } from '@universalweb/acid'; - * const result = [{id: 0}, {id: 1}]; - * const collect = [{id: 1}, {id: 0}]; - * const prop = 'id'; - * assert(sortCollectionAscending(collect, prop), result); - */ - function sortCollectionAscending(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortCollectionAscendingFilter(previous, next, propertyName, ifMatch); - }); - } - - /** - * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array. - * - * @function getHighest - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - The property name to sort by based on it's value. - * @returns {Object} - The newest object in the collection. - * - * @example - * import { getHighest, assert } from '@universalweb/acid'; - * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0}); - */ - function getHighest(collection, propertyName = 'id') { - return sortCollectionAscending(collection, propertyName)[0]; - } - - /** - * Creates an object composed of keys generated from the results of running each element of collection thru iteratee. - * The order of grouped values is determined by the order they occur in collection. - * The corresponding value of each key is an array of elements responsible for generating the key. - * - * @function groupBy - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {Function} iteratee - The iteratee to transform keys. - * @returns {Object} - Returns the composed aggregate object. - * - * @example - * groupBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': [4.2], '6': [6.1, 6.3] } - */ - function groupBy(collection, iteratee) { - const sortedObject = {}; - eachArray(collection, (item) => { - const results = iteratee(item); - if (!sortedObject[results]) { - sortedObject[results] = []; - } - sortedObject[results].push(item); - }); - return sortedObject; - } - - /** - * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique. - * - * @function indexBy - * @category collection - * @type {Function} - * @param {Array} collection - Array of objects. - * @param {String} propertyName - The property name to index by. - * @returns {Object} - Returns the composed aggregate object. - * - * @example - * import { indexBy, assert } from '@universalweb/acid'; - * const result = { "0": {name: 'test', id: 0}, "1": {name: 'test2', id: 1}}; - * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id'); - * assert(indexed, result); - */ - function indexBy(collection, propertyName = 'id') { - const sortedObject = {}; - eachArray(collection, (item) => { - sortedObject[item[propertyName]] = item; - }); - return sortedObject; - } - - /** - * Invokes a function on the provided property name in each object in the collection. - * - * @function invokeCollection - * @category collection - * @type {Function} - * @param {Array} collection - Collection from which method will be taken. - * @param {String} property - Value used to pluck method from object. - * @param {*} value - Value to be passed to callable property. - * @returns {Array} - Returns the results of the invoked method. - * - * @example - * import { invokeCollection, assert } from '@universalweb/acid'; - * const results = invokeCollection([{ - * test(item, index) { return [item, index];} - * }], 'test', ['EXAMPLE']); - * assert(results, [['EXAMPLE', 0]]); - */ - function invokeCollection(collection, property, value, thisBind) { - if (thisBind) { - return mapArray(collection, (item, index) => { - return item[property].call(thisBind, value); - }); - } - return mapArray(collection, (item, index) => { - return item[property](value); - }); - } - - /** - * Asynchronously awaits & invokes a function on the provided property name in each object in the collection. - * - * @function invokeCollectionAsync - * @category collection - * @type {Function} - * @async - * @param {Array} collection - Collection from which method will be taken. - * @param {String} property - Value used to pluck method from object. - * @param {*} value - Value to be passed to callable property. - * @returns {Array} - Returns the results of the invoked method. - * - * @example - * import { invokeCollectionAsync, assert } from '@universalweb/acid'; - * const results = await invokeCollectionAsync([{ - * async test(item, index) { return [item, index];} - * }], 'test', ['EXAMPLE']); - * assert(results, [['EXAMPLE', 0]]); - */ - function invokeCollectionAsync(collection, property, value, thisBind) { - if (thisBind) { - return mapAsyncArray(collection, (item) => { - return item[property].call(thisBind, value); - }); - } - return mapAsyncArray(collection, async (item) => { - return item[property](value); - }); - } - - /** - * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array. - * - * @function pluckObject - * @category object - * @type {Function} - * @param {Object} source - Array used to determine what sources to be plucked. - * @param {String|Array} targets - Property name. - * @returns {Array|undefined} - An array of plucked sources. - * - * @example - * import { pluckObject, assert } from '@universalweb/acid'; - * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]); - */ - function pluckObject(source, targets) { - if (!source) { - return; - } else if (isString(targets)) { - return source[targets]; - } - return mapArray(targets, (item) => { - return source[item]; - }); - } - - /** - * Returns an array of the plucked values from the collection. - * - * @function pluck - * @category collection - * @type {Function} - * @param {Array} collection - Array used to determine what value to be plucked. - * @param {(String|Number|Array.)} targets - Property name. - * @returns {Array} - An array of plucked values. - * - * @example - * import { pluck, assert } from '@universalweb/acid'; - * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]); - * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]); - */ - function pluck(collection, targets) { - return mapArray(collection, (item) => { - return pluckObject(item, targets); - }); - } - - function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - return previousKey.localeCompare(nextKey); - } - /** - * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array. - * - * @function sortCollectionAlphabetically - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - Name of property to compare. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array. - * - * @example - * import { sortCollectionAlphabetically, assert } from '@universalweb/acid'; - * const result = [{"letter":"a"},{"letter":"c", g: 0},{"letter":"c", g: 2}, {letter:'f'}]; - * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c", g: 2}, {letter:'c', g: 0}]; - * const prop = 'letter'; - * function ifMatchSort(c, n) { - * if (c.g < n.g) { - * return -1; - * } - * if (c.g > n.g) { - * return 1; - * } - * } - * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result); - */ - function sortCollectionAlphabetically(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortObjectsAlphabetically(previous, next, propertyName, ifMatch); - }); - } - - function sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch) { - const previousKey = previous[propertyName]; - const nextKey = next[propertyName]; - if (previousKey === nextKey && ifMatch) { - return ifMatch(previous, next, propertyName); - } - return nextKey.localeCompare(previousKey); - } - /** - * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array. - * - * @function sortCollectionAlphabeticallyReverse - * @category collection - * @type {Function} - * @param {Array} collection - Collection to be sorted. - * @param {String} propertyName - Name of property to compare. - * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. - * @returns {Array} - The sorted array. - * - * @example - * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid'; - * const result = [{letter:'f'},{"letter":"c"}, {"letter":"a"}]; - * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c"}]; - * const prop = 'letter'; - * assert(sortCollectionAlphabeticallyReverse(collect, prop), result); - */ - function sortCollectionAlphabeticallyReverse(collection, propertyName = 'id', ifMatch) { - return collection.sort((previous, next) => { - return sortObjectsAlphabeticallyReverse(previous, next, propertyName, ifMatch); - }); - } - - /** - * Return the file extension. - * - * @function getFileExtension - * @category file - * @param {*} source - Object to be checked. - * @returns {String|undefined} - Returns the extension. - * - * @example - * import { getFileExtension, assert } from '@universalweb/acid'; - * assert(getFileExtension('test.js'),'js'); - */ - function getFileExtension(source) { - if (source) { - return source.substring(source.lastIndexOf('.') + 1); - } - } - - /** - * Return the file extension. - * - * @function getFilename - * @category file - * @param {*} source - Object to be checked. - * @returns {String|undefined} - Returns the extension. - * - * @example - * import { getFilename, assert } from '@universalweb/acid'; - * assert(getFilename('./universalweb/test.js'),'test.js'); - */ - function getFilename(source) { - if (source) { - return source.substring(source.lastIndexOf('/') + 1); - } - } - - function regexTestFactory(regexType) { - return (item) => { - return hasValue(item) ? regexType.test(item) : false; - }; - } - - /** - * Checks if the string has a .css extension. - * - * @function isFileCSS - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileCSS, assert } from '@universalweb/acid'; - * assert(isFileCSS('test.css'), true); - */ - const isFileCSS = regexTestFactory(/\.css$/); - - /** - * Checks if the string has a .html extension. - * - * @function isFileHTML - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileHTML, assert } from '@universalweb/acid'; - * assert(isFileHTML('test.html'), true); - */ - const isFileHTML = regexTestFactory(/\.html$/); - - /** - * Checks if the string has a .js extension. - * - * @function isFileJS - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileJS, assert } from '@universalweb/acid'; - * assert(isFileJS('test.js'), true); - */ - const isFileJS = regexTestFactory(/\.js$/); - - /** - * Checks if the string has a .json extension. - * - * @function isFileJSON - * @category file - * @param {String} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFileJSON, assert } from '@universalweb/acid'; - * assert(isFileJSON('test.json'), true); - */ - const isFileJSON = regexTestFactory(/\.json$/); - - /** - * Creates a function that executes callable, only after being called n times. - * - * @function after - * @category function - * @type {Function} - * @param {Number} amount - The number of calls until method is invoked. - * @param {Function} callable - The function to be called. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * import { after, assert } from '@universalweb/acid'; - * const onlyAfter = after(1, (item) => { return item;}); - * assert(onlyAfter(1), undefined); - * assert(onlyAfter(2), 2); - */ - function after(amount, callable) { - let point = amount; - let value; - const onlyAfter = (...args) => { - if (point !== null) { - point--; - } - if (point <= 0) { - value = callable(...args); - point = null; - } - return value; - }; - return onlyAfter; - } - - /** - * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments. - * - * @function ary - * @category function - * @type {Function} - * @param {Function} callable - The function to cap arguments for. - * @param {Number} amount - The arity cap. - * @returns {Object} - Returns the new capped function. - * - * @example - * import { ary, assert } from '@universalweb/acid'; - * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]); - */ - function ary(callable, amount) { - return (...args) => { - return callable(...args.splice(0, amount)); - }; - } - - /** - * Creates a function that executes callable, only before n times. - * - * @function before - * @category function - * @type {Function} - * @param {Number} amount - The number of calls before n. - * @param {Function} callable - The function to be called. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * import { before, assert } from '@universalweb/acid'; - * const onlyBefore = before(3, () => { return 1;}); - * assert(onlyBefore(1), 1); - */ - function before(amount, callable) { - let point = amount; - let value; - const onlyBefore = (...args) => { - if (point !== null) { - point--; - } - if (point >= 1) { - value = callable(...args); - } else { - point = null; - } - return value; - }; - return onlyBefore; - } - - /** - * Asynchronously iterates through the given object. - * - * @function eachAsyncObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg. - * @param {*} thisCall - Iteratee called with thisCall as this. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Object|Function|undefined} - Returns source. - * - * @example - * import { eachAsyncObject, assert } from '@universalweb/acid'; - * const tempList = []; - * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => { - * tempList[key] = item; - * }); - * assert(tempList, {a: 1, b: 2, c: 3}); - */ - const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => { - if (!source) { - return; - } - const objectKeys = keys(source); - if (hasValue(thisCall)) { - await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { - return iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeys, additionalArg); - }); - } else { - await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { - return iteratee(source[key], key, source, propertyCount, objectKeys, additionalArg); - }); - } - return source; - }; - - /** - * Iterates through the given object. - * - * @function eachObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Object|Function|undefined} - Returns the calling object. - * - * @example - * import { eachObject, assert } from '@universalweb/acid'; - * assert(eachObject({a: 1, b: 2, c: 3}, (item) => { - * console.log(item); - * }), {a: 1, b: 2, c: 3}); - */ - function eachObject(source, iteratee, thisCall, additionalArg) { - if (!source) { - return; - } - const objectKeys = keys(source); - if (hasValue(thisCall)) { - eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { - iteratee.call(thisCall, source[key], key, source, propertyCount, objectKeysArray, additionalArg); - }); - } else { - eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { - iteratee(source[key], key, source, propertyCount, objectKeysArray, additionalArg); - }); - } - return source; - } - - async function forEachAsync(source, callback) { - const values = []; - const properties = []; - let valuesLength = 0; - source.forEach((item, key) => { - values[valuesLength] = item; - properties[valuesLength] = item; - valuesLength++; - }); - for (let index = 0; index < valuesLength; index++) { - await callback(values[index], properties[index]); - } - return source; - } - - /** - * Checks if an object(s) is a Set. - * - * @function isSet - * @category type - * @param {...*} sources - Objects to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isSet, assert } from '@universalweb/acid'; - * assert(isSet(new Set()), true); - */ - const isSetCall = isConstructorNameFactory('Set'); - const isSet = isTypeFactory(isSetCall); - - function forOf(source, iteratee) { - if (isSet(source)) { - for (const value of source) { - iteratee(value, source); - } - return source; - } - for (const [key, value] of source) { - iteratee(value, key, source); - } - return source; - } - - /** - * Checks if an object or objects are a Int16Array. - * - * @function isGenerator - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isGenerator } from '@universalweb/acid'; - * isGenerator(function* (){}); - * // => true - */ - const isGeneratorCall = isConstructorNameFactory('GeneratorFunction'); - const isGenerator = isTypeFactory(isGeneratorCall); - - async function forOfAsync(source, iteratee, generatorArgs) { - if (isSet(source)) { - for (const value of source) { - await iteratee(value, source); - } - return source; - } - if (isGenerator(source)) { - for await (const item of source(...generatorArgs)) { - await iteratee(item, source); - } - } - for (const [key, value] of source) { - await iteratee(value, key, source); - } - return source; - } - - /** - * Checks if an object is an async function. - * - * @function isAsync - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isAsync, assert } from '@universalweb/acid'; - * assert(isAsync(async() => {}), true); - */ - const isAsyncCall = isConstructorNameFactory('AsyncFunction'); - const isAsync = isTypeFactory(isAsyncCall); - - function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAsync, forOfLoop, forOfLoopAsync) { - return (source, iteratee, argument1, argument2, argument3) => { - let returned; - const isIterateeAsync = isAsync(iteratee); - if (!hasValue(source) || !iteratee) { - return; - } else if (isArray(source)) { - returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; - } else if (isPlainObject(source) || isFunction(source)) { - returned = isIterateeAsync ? objectLoopAsync : objectLoop; - } else if (forOfLoop) { - returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; - } else if (isGenerator(source)) { - returned = forOfLoopAsync; - } else { - returned = isIterateeAsync ? objectLoopAsync : objectLoop; - } - return returned(source, iteratee, argument1, argument2, argument3); - }; - } - - /** - * Iterates through the given object. - * - * @function each - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array | object | Function} - The originally given object. - * - * @example - * import { each, assert } from '@universalweb/acid'; - * const list = {}; - * each({a: 1, b: 2, c: 3}, (item, key) => { - * list[key] = item; - * }); - * assert(list, {a: 1, b: 2, c: 3}); - */ - const each = generateLoop(eachArray, eachAsyncArray, eachObject, eachAsyncObject, forOf, forOfAsync); - - class Chain { - constructor(methods) { - this.addChainMethod(methods); - } - addChainMethod(methods) { - const thisChain = this; - each(methods, (method, methodName) => { - thisChain[methodName] = function (...args) { - this.value = method.call(thisChain, thisChain.value, ...args); - return thisChain; - }; - }); - } - setValue(value) { - this.value = value; - return this; - } - done() { - const value = this.value; - this.value = null; - return value; - } - value = null; - } - /** - * Creates a chainable set of functions. - * - * @function chain - * @category function - * @type {Function} - * @param {Array|Object} config - The object to take methods from. - * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining. - * - * @example - * import { chain, assert } from '@universalweb/acid'; - * const chained = chain({ - * a(value, c) { - * return value + c; - * } - * }).setValue(2).a(1).done(); - * assert(chained, 3); - */ - function chain(config) { - return construct(Chain, [config]); - } - - /** - * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient. - * - * @function curry - * @category function - * @type {Function} - * @param {Function} callable - The function to curry. - * @param {Number} arity - The arity of method. - * @returns {*} - Returns the new curried function. - * - * @example - * import { curry, assert } from '@universalweb/acid'; - * const result = curry((a, b, c) => { - * return [a, b, c]; - * })(1)(2)(3); - * assert(result, [1, 2, 3]); - */ - function curry(callable, arity = callable.length) { - const curries = []; - const curried = (...curryArgs) => { - curries.push(...curryArgs); - if (curries.length === arity) { - const result = callable(...curries); - clearArray(curries); - return result; - } - return curried; - }; - return curried; - } - - /** - * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order. - * - * @function curryRight - * @type {Function} - * @param {Function} callable - The function to curry. - * @param {Number} arity - The arity of method. - * @returns {*} - Returns the new curried function. - * - * @example - * import { curryRight, assert } from '@universalweb/acid'; - * const result = curryRight((a, b, c) => { - * return [a, b, c]; - * })(1)(2)(3); - * assert(result, [3, 2, 1]); - */ - function curryRight(callable, arity = callable.length) { - const curries = []; - const curried = (...curryArgs) => { - curries.unshift(...curryArgs); - if (curries.length === arity) { - const result = callable(...curries); - clearArray(curries); - return result; - } - return curried; - }; - return curried; - } - - /** - * This method returns undefined. - * - * @function noop - * @category function - * @type {Function} - * @returns {undefined} - Returns undefined. - * - * @example - * import { noop, assert } from '@universalweb/acid'; - * assert(noop(), undefined); - */ - function noop() { - return; - } - - /** - * Iterates based on the amount given invoking the iteratee with the current index as an argument. - * - * @function times - * @category utility - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @returns {undefined} - Nothing. - * - * @example - * import { times } from '@universalweb/acid'; - * times(3, (item) => { - * console.log(item); - * }); - * // 0 - * // 1 - * // 2 - * // => undefined - */ - function times(amount, iteratee) { - for (let index = 0; index < amount; index++) { - iteratee(index); - } - } - /** - * Iterates based on the amount given and maps the results returned by the iteratee each time to an array. - * - * @function timesMap - * @category utility - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @param {Array} [results = []] - Array that will have iteratee return pushed to. - * @returns {Array} - An array with iteratee's returned values. - * - * @example - * import { timesMap } from '@universalweb/acid'; - * timesMap(3, (item) => { - * return item; - * }); - * // => [0, 1, 2] - */ - function timesMap(amount, iteratee, results = []) { - for (let index = 0; index < amount; index++) { - results[index] = iteratee(amount); - } - return results; - } - - class Timers { - list = construct(Map); - construct() {} - /** - * Remove a timer that was created using the timer function. - * - * @param {Number} id - The id of the timer to remove. - * @returns {undefined} - Returns nothing. - * - * @example - * import { timer, assert } from '@universalweb/acid'; - * timer(() => {}, 100); - * // => 0 - */ - remove(id) { - clearTimeout(id); - this.list.delete(id); - } - has(id) { - return this.list.has(id); - } - get(id) { - return this.list.get(id); - } - /** - * Create a timer and add it to the list of timers. - * - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setTimeoutId ID. - * - * @example - * import { timers, assert } from '@universalweb/acid'; - * timers.set(() => {}, 100); - * // => 0 - */ - set(callable, time) { - const currentThis = this; - const id = setTimeout(() => { - callable(); - currentThis.remove(id); - }, time); - this.list.set(id, true); - return id; - } - /** - * Clear all active timers. - * - * @returns {undefined} - Returns undefined. - * - * @example - * import { timers, assert } from '@universalweb/acid'; - * timers.clear(); - * // => undefined - */ - clear() { - const currentThis = this; - currentThis.list.forEach((id) => { - currentThis.remove(id); - }); - } - } - const timers = construct(Timers); - /** - * Timer wrapper. - * - * @function timer - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setTimeoutId ID. - * - * @example - * import { timer, assert } from '@universalweb/acid'; - * timer(() => {}, 100); - * // => 0 - */ - function timer(callable, time) { - return timers.set(callable, time); - } - /** - * Clear all active timers. - * - * @function clearTimers - * @category function - * @returns {undefined} - Returns undefined. - * - * @example - * import { clearTimers, assert } from '@universalweb/acid'; - * clearTimers(); - * // => undefined - */ - function clearTimers() { - const id = setTimeout(noop, 0); - times(id, (index) => { - timers.remove(index); - }); - } - - const applyNative = Reflect.apply; - /** - * Calls a target function with an optional "this" and optional arguments as specified. Same as Reflect.apply but with a function check. - * - * @function apply - * @category function - * @param {Function} target - The target function to call. - * @param {*} thisArgument - Array like object. - * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called. - * @returns {*} - The result of calling the given target function with the specified this value and arguments. - * - * @example - * import { apply, assert } from '@universalweb/acid'; - * assert(apply(function (a) {return a;}, undefined, [2]), 2); - */ - function apply(target, thisArgument, argumentsList) { - if (isFunction(target)) { - return applyNative(target, thisArgument, argumentsList); - } - } - - /** - * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer. - * - * @function debounce - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Function} - The debounced function. - * - * @example - * import { debounce, promise, assert } from '@universalweb/acid'; - * const promised = promise((a) => { - * const debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0); - * }); - * assert(await promised(), 'debounced'); - */ - function debounce(callable, time) { - function debounced(...args) { - if (debounced.id !== false) { - timers.remove(debounced.id); - } - debounced.id = timer(() => { - debounced.callable(...args); - debounced.id = false; - }, time); - } - debounced.id = false; - debounced.callable = callable.bind(debounced); - debounced.clear = () => { - if (debounced.id !== false) { - timers.remove(debounced.id); - debounced.id = false; - } - }; - return debounced; - } - - /** - * Checks if the given method is a function. If it is then it invokes it with the given arguments. - * - * @function ifInvoke - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked if possible. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args - Arguments to pass to the function. - * @returns {*} - Returns the method invoked or undefined. - * - * @example - * import { ifInvoke, assert } from '@universalweb/acid'; - * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]); - */ - function ifInvoke(callable, thisBind, ...args) { - if (isFunction(callable)) { - if (thisBind) { - return callable.call(thisBind, ...args); - } - return callable(...args); - } - } - - /** - * Creates a function that negates the result of the predicate callable. - * - * @function negate - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @returns {*} - Returns the given methods result. - * - * @example - * negate(() => { return false;})(); - * // => true - */ - function negate(callable) { - return (...args) => { - return !callable(...args); - }; - } - - /** - * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned. - * - * @function nthArg - * @category function - * @type {Function} - * @param {Number} [index = 0] - The index of the argument to return. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * nthArg(1)('a', 'b'); - * // => 'b' - */ - function nthArg(index = 0) { - return (...args) => { - return args[index]; - }; - } - - /** - * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function. - * - * @function once - * @category function - * @type {Function} - * @param {Function} callable - The function to be called. - * @returns {Function} - Returns the new pass-thru function. - * - * @example - * const onceOnly = once((item) => { return item;}); - * onceOnly(5); - * onceOnly(3); - * // => 5 - */ - const once = (callable) => { - let value; - const onlyOnce = (...args) => { - if (!hasValue(value)) { - value = callable(...args); - } - return value; - }; - return onlyOnce; - }; - - /** - * Returns the constructor of an object. - * - * @function getType - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { getType, assert } from '@universalweb/acid'; - * assert(getType(1), true); - */ - function getType(source) { - return source?.constructor; - } - - /** - * Returns a new empty object of the same type. - * - * @function cloneType - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { cloneType, assert } from '@universalweb/acid'; - * assert(cloneType([1]), []); - */ - function cloneType(source, args = []) { - const sourceType = getType(source); - if (sourceType === Function) { - if (sourceType.name === 'function') { - return function () {}; - } - } - return construct(sourceType, args); - } - - /** - * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object. - * - * @function forOfCompactMap - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => { - * return item; - * }); - * // => {b: 2, c: 3} - */ - function forOfMap(source, iteratee = returnValue, resultsObject) { - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = iteratee(value, results, source); - methodPushBound(result); - } - return results; - } - const methodSet = isFunction(results.set); - for (const [key, value] of source) { - const result = iteratee(value, key, results, source); - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - return results; - } - - /** - * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function forOfCompactMapAsync - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * import { forOfCompactMapAsync, assert } from '@universalweb/acid'; - * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => { - * return item; - * }), {b: 2, c: 3}); - */ - async function forOfMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) { - if (isGenerator(source)) { - const resultsGenerator = []; - for await (const item of source(...generatorArgs)) { - resultsGenerator.push(await iteratee(item, resultsGenerator, source)); - } - return resultsGenerator; - } - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = await iteratee(value, results, source); - methodPushBound(result); - } - return results; - } - const methodSet = isFunction(results.set); - for await (const [key, value] of source) { - const result = await iteratee(value, key, results, source); - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - return results; - } - - /** - * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. - * - * @function mapObjectAsync - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function|undefined} - An object of the same calling object's type. - * - * @example - * import { mapAsyncObject, assert } from '@universalweb/acid'; - * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, b: undefined, c: 3}); - */ - async function mapAsyncObject(source, iteratee, results = {}) { - if (!source) { - return; - } - await eachAsyncObject(source, async (item, key, thisObject, propertyCount, objectKeys) => { - results[key] = await iteratee(item, key, results, thisObject, propertyCount, objectKeys); - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. - * - * @function mapObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Object|Function|undefined} - An object of the same calling object's type. - * - * @example - * import { mapObject, assert } from '@universalweb/acid'; - * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, b: undefined, c: 3}); - */ - function mapObject(source, iteratee, results = {}, thisCall, additionalArg) { - if (!source) { - return; - } - if (hasValue(thisCall)) { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - results[key] = iteratee.call(thisCall, item, key, results, original, propertyCount, objectKeys, additionalArg); - }); - } else { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - results[key] = iteratee(item, key, results, original, propertyCount, objectKeys, additionalArg); - }); - } - return results; - } - - /** - * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object. - * - * @function map - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {Object | Function} [results = {}] - Object that will be used to assign results. - * @param {*} thisCall - An object to be given each time to the iteratee. - * @param {*} additionalArg - An object to be given each time to the iteratee. - * @returns {Array | object | Function} - A new object of the same calling object's type. - * - * @example - * import { map, assert } from '@universalweb/acid'; - * assert(map({a: 1, b: 2, c: 3}, (item) => { - * return item * 2; - * }), {a: 2, b: 4, c: 6}); - */ - const map = generateLoop(mapArray, mapAsyncArray, mapObject, mapAsyncObject, forOfMap, forOfMapAsync); - - /** - * Creates a function that invokes iteratee with the arguments it receives and returns their results. - * - * @function over - * @category function - * @type {Function} - * @param {(Array.|Object.)} iteratees - The list of functions to loop through. - * @returns {Function} - Returns the new over wrapped function. - * - * @example - * import { overEvery, assert } from '@universalweb/acid'; - * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]); - */ - function over(iteratees) { - return (...args) => { - return map(iteratees, (item) => { - return item(...args); - }); - }; - } - - /** - * Iterates through the given object while the iteratee returns true. - * - * @function everyAsyncObject - * @category object - * @type {Function} - * @param {Object} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { everyAsyncObject, assert } from '@universalweb/acid'; - * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => { - * return item; - * }); - * assert(result, true); - */ - async function everyAsyncObject(source, iteratee) { - if (!source) { - return; - } - const objectKeys = keys(source); - return everyAsyncArray(objectKeys, (key, index, original, propertyCount) => { - return iteratee(source[key], key, source, propertyCount, original); - }); - } - - /** - * Iterates through the given object while the iteratee returns true. - * - * @function everyObject - * @category object - * @type {Function} - * @param {Object} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { everyObject, assert } from '@universalweb/acid'; - * const result = everyObject({a: true, b: true, c: true}, (item) => { - * return item; - * }); - * assert(result, true); - */ - function everyObject(source, iteratee) { - if (!source) { - return; - } - const objectKeys = keys(source); - return everyArray(objectKeys, (key, index, original, propertyCount) => { - return iteratee(source[key], key, source, propertyCount, original); - }); - } - - /** - * Iterates (for of) through the given object while the iteratee returns true using a for of loop. - * - * @function forOfEvery - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { every, assert } from '@universalweb/acid'; - * assert(forOfEvery({a: false, b: true, c: true}, (item) => { - * return item; - * }), false); - */ - function forOfEvery(source, iteratee = returnValue) { - if (isArray(source) || isSet(source)) { - for (const value of source) { - const result = iteratee(value, source); - if (result === false) { - return false; - } - } - } else { - for (const [key, value] of source) { - const result = iteratee(value, key, source); - if (result === false) { - return false; - } - } - } - return true; - } - - /** - * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop. - * - * @function forOfEveryAsync - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { every, assert } from '@universalweb/acid'; - * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => { - * return item; - * }), false); - */ - async function forOfEveryAsync(source, iteratee = returnValue, generatorArgs) { - if (isGenerator(source)) { - for await (const item of source(...generatorArgs)) { - const result = await iteratee(item, source); - if (result === false) { - return false; - } - } - } else if (isArray(source) || isSet(source)) { - for (const value of source) { - const result = await iteratee(value, source); - if (result === false) { - return false; - } - } - } else { - for (const [key, value] of source) { - const result = await iteratee(value, key, source); - if (result === false) { - return false; - } - } - } - return true; - } - - /** - * Iterates through the given object while the iteratee returns true. - * - * @function every - * @category utility - * @type {Function} - * @param {Object | Array | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. - * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. - * - * @example - * import { every, assert } from '@universalweb/acid'; - * assert(every({a: false, b: true, c: true}, (item) => { - * return item; - * }), false); - */ - const every = generateLoop(everyArray, everyAsyncArray, everyObject, everyAsyncObject, forOfEvery, forOfEveryAsync); - - /** - * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives. - * - * @function overEvery - * @category function - * @type {Function} - * @param {(Array.|Object.)} predicates - The list of functions to loop through. - * @returns {Function} - Returns the new overEvery wrapped function. - * - * @example - * import { overEvery, assert } from '@universalweb/acid'; - * assert(overEvery([Boolean, isFinite])('1'), true); - */ - function overEvery(predicates) { - return (arg) => { - return every(predicates, (predicate) => { - return predicate(arg); - }); - }; - } - - /** - * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on. - * - * @function reArg - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Array} indexes - The arranged argument indexes. - * @returns {Function} - Returns the new function. - * - * @example - * reArg((a, b, c) => { - * return [a, b, c]; - * }, [1,2,0])(1,2,3); - * // => [2, 3, 1] - */ - function reArg(callable, indexes) { - return (...args) => { - return callable( - ...indexes.map((item) => { - return args[item]; - }) - ); - }; - } - - /** - * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer. - * - * @function throttle - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Function|undefined} - The throttled function. - * - * @example - * const throttled = throttle(() => { console.log('throttle'); }, 0)(); - * throttled(); - * // 'throttle' - */ - function throttle(callable, time) { - function throttled(...args) { - if (throttled.id) { - throttled.shouldThrottle = true; - return; - } - throttled.callable(...args); - throttled.id = timer(() => { - if (throttled.shouldThrottle) { - throttled.callable(...args); - } - throttled.id = false; - }, time); - } - throttled.id = false; - throttled.callable = callable.bind(throttled); - throttled.clear = () => { - timers.remove(throttled.id); - throttled.id = false; - }; - return throttled; - } - - /** - * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function. - * - * @function wrap - * @category function - * @type {Function} - * @param {*} value - The value to wrap. - * @param {Function} wrapper - The wrapper function. - * @returns {Function} - The new function. - * - * @example - * wrap('Lucy', (firstName, lastName) => { - * return `My name is ${firstName} ${lastName}.`; - * })('Diamonds'); - * // => 'My name is Lucy Diamonds.' - */ - function wrap(value, wrapper) { - return (...arg) => { - return wrapper(value, ...arg); - }; - } - - const functionPrototype = Function.prototype; - /** - * Caches a prototype method. - * - * @function cacheNativeMethod - * @category utility - * @type {Function} - * @param {Function} method - Prototype method. - * @returns {Function} - Cached method. - * - * @example - * import { cacheNativeMethod, assert } from '@universalweb/acid'; - * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1); - */ - function cacheNativeMethod(method) { - return functionPrototype.call.bind(method); - } - - /** - * Returns an array of all properties (enumerable or not) found directly upon a given object. - * - * @function getPropNames - * @category object - * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned. - * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object. - * - * @example - * import { getPropNames, assert } from '@universalweb/acid'; - * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']); - */ - const getPropNames = Object.getOwnPropertyNames; - /** - * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object. - * - * @function getPropDesc - * @category object - * @param {Object} target - The target object. - * @param {String} property - The name of the property whose description is to be retrieved. - * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise. - * - * @example - * getPropDesc({ bar: 42 }, 'bar'); - * // => { configurable: true, enumerable: true, value: 42, writable: true } - */ - const getPropDesc = Object.getOwnPropertyDescriptor; - /** - * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object. - * - * @function defProp - * @category object - * @param {Object} target - The object on which to define the property. - * @param {String} property - The name of the property whose description is to be retrieved. - * @param {Object} descriptor - The descriptor for the property being defined or modified. - * @returns {Object} - The object that was passed to the function. - * - * @example - * defProp({}, 'key', { - * enumerable: false, - * configurable: false, - * writable: false, - * value: 'static' - * }).key; - * // => 'static' - */ - const defProp = Object.defineProperty; - const hasProp = cacheNativeMethod(Object.hasOwnProperty); - - /** - * Determines whether two values are the same value. - * - * @function isSame - * @category object - * @param {*} source - Value to compare to. - * @param {*} target - A value to compare. - * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value. - * - * @example - * import { isSame, assert } from '@universalweb/acid'; - * assert(isSame('foo', 'foo'), true); - */ - const isSame = Object.is; - - /** - * Adds two numbers. - * - * @function add - * @category math - * @type {Function} - * @param {Number} augend - First number. - * @param {Number} addend - Second number which is being added to another (augend). - * @returns {Number} - Returns the sum of the arguments. - * - * @example - * import { add, assert } from '@universalweb/acid'; - * assert(add(1, 1), 2); - */ - function add(augend, addend) { - return augend + addend; - } - - /** - * Decrements a number. - * - * @function deduct - * @category math - * @type {Function} - * @param {Number} source - First number. - * @returns {Number} - Returns a decremented version of the number. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - * deduct(10); - * // => 9 - */ - function deduct(source) { - return source - 1; - } - - /** - * Divides two numbers. - * - * @function divide - * @category math - * @type {Function} - * @param {Number} source - First number. - * @param {Number} value - Second number. - * @returns {Number} - Returns the quotient of the arguments. - * - * @example - * import { divide, assert } from '@universalweb/acid'; - * assert(divide(10, 5), 2); - */ - function divide(source, value) { - return source / value; - } - - /** - * Increments a number. - * - * @function increment - * @category math - * @type {Function} - * @param {Number} source - First number. - * @returns {Number} - Returns an incremented version of the number. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - * increment(10); - * // => 11 - */ - function increment(source) { - return source + 1; - } - - /** - * Multiplies two numbers. - * - * @function multiply - * @category math - * @type {Function} - * @param {Number} source - First number. - * @param {Number} value - Second number. - * @returns {Number} - Returns the product of the arguments. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - */ - function multiply(source, value) { - return source * value; - } - - /** - * Calculate the progress from a given total and current amount. - * - * @function calcProgress - * @category utility - * @type {Function} - * @param {Number} total - The total amount. - * @param {Number} currentAmount - The current amount. - * @returns {Number} - The progress as a percentage. - * - * @example - * import { calcProgress, assert } from '@universalweb/acid'; - * assert(calcProgress(100, 1), 1); - */ - function calcProgress(total, currentAmount) { - if (total === 0) { - return false; - } - if (currentAmount === 0) { - return 0; - } - return (currentAmount / total) * 100; - } - - const { random } = Math; - /** - * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption.. - * - * @function randomFloat - * @category math - * @type {Function} - * @param {Number} max - Establishes highest possible value for the random number. - * @param {Number} [min = 0] - Establishes lowest possible value for the random number. - * @returns {Number} - Returns random integer between the max and min range. - * - * @example - * import { randomFloat, assert } from '@universalweb/acid'; - * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;}); - * // => 9.1 - */ - function randomFloat(max, min = 0) { - return random() * (max - min) + min; - } - - /** - * Extracts the remainder between two numbers. - * - * @function remainder - * @category math - * @type {Function} - * @param {Number} source - First number. - * @param {Number} value - Second number. - * @returns {Number} - Returns the remainder of the arguments. - * - * @example - * import { multiply, assert } from '@universalweb/acid'; - * assert(multiply(10, 5), 50); - * remainder(10, 6); - * // => 4 - */ - function remainder(source, value) { - return source % value; - } - - /** - * Subtract all numbers in the array starting from left to right & return the difference. - * - * @function subtractAll - * @category math - * @type {Function} - * @param {Number[]} source - Array of numbers. - * @returns {Number} - Returns the final difference. - * - * @example - * import { subtractAll, assert } from '@universalweb/acid'; - * assert(subtractAll([10, 1, 2, 3]), 5); - */ - function subtractAll(source) { - return source.reduce((a, b) => { - return a - b; - }, 0); - } - - /** - * Sum all numbers in a given array. - * - * @function sumAll - * @category math - * @type {Function} - * @param {Number[]} source - Array of numbers. - * @returns {Number} - Returns a single number. - * - * @example - * import { sumAll, assert } from '@universalweb/acid'; - * assert(sumAll([10, 1, 2, 3]), 5); - */ - function sumAll(source) { - return source.reduce((a, b) => { - return a + b; - }, 0); - } - - /** - * Checks if a number is within a range. - * - * @function isNumberInRange - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @param {Number} start - Beginning of range. - * @param {Number} end - End of range. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumberInRange, assert } from '@universalweb/acid'; - * assert(isNumberInRange(1, 0, 2), true); - * assert(isNumberInRange(1, 2, 5), false); - */ - function isNumberInRange(source, start, end) { - return source > start && source < end; - } - - /** - * Checks if a number is within a range. - * - * @function isNumberNotInRange - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @param {Number} start - Beginning of range. - * @param {Number} end - End of range. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isNumberNotInRange, assert } from '@universalweb/acid'; - * assert(isNumberNotInRange(1, 0, 2), false); - * assert(isNumberNotInRange(1, 2, 5), true); - */ - function isNumberNotInRange(source, start, end) { - return source < start || source > end; - } - - /** - * Checks if a number is negative & returns true or false. - * - * @function isPositive - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isPositive, assert } from '@universalweb/acid'; - * assert(isPositive(1), true); - */ - const { sign } = Math; - function isPositive(source) { - return sign(source) === 1; - } - - /** - * Strictly checks if a number is zero. - * - * @function isZero - * @category number - * @type {Function} - * @param {Number} source - Number to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isZero, assert } from '@universalweb/acid'; - * assert(isZero(0), true); - */ - function isZero(source) { - return source === 0; - } - - const objectEntries = Object.entries; - /** - * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error. - * - * @function getEntries - * @category object - * @param {Object} source - The source object. - * @returns {Array|undefined} - Returns the Object.entries of the source object. - * - * @example - * import { getEntries, assert } from '@universalweb/acid'; - * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]); - */ - function getEntries(source) { - if (hasValue(source)) { - return objectEntries(source); - } - } - - /** - * Extracts all keys from an object whose values are not null or undefined. - * - * @function compactKeys - * @category object - * @type {Function} - * @param {Object} object - Object from which keys are extracted. - * @returns {Array} - Returns an array of key values. - * - * @example - * import { compactKeys, assert } from '@universalweb/acid'; - * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']); - */ - function compactKeys(object) { - const compactedKeys = []; - eachObject(object, (item, key) => { - if (hasValue(item)) { - compactedKeys.push(key); - } - }); - return compactedKeys; - } - - /** - * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function compactMapAsyncObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with mapped properties that are not null or undefined. - * - * @example - * import { compactMapAsyncObject, assert } from '@universalweb/acid'; - * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, c: 3}); - */ - async function compactMapAsyncObject(source, iteratee = returnValue, results = {}) { - await eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => { - const result = await iteratee(item, key, results, original, propertyCount, objectKeys); - if (hasValue(result)) { - results[key] = result; - } - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function compactMapObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with mapped properties that are not null or undefined. - * - * @example - * import { compactMapObject, assert } from '@universalweb/acid'; - * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => { - * return item; - * }), {a: 1, c: 3}); - */ - function compactMapObject(source, iteratee = returnValue, results = {}) { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - const result = iteratee(item, key, results, original, propertyCount, objectKeys); - if (hasValue(result)) { - results[key] = result; - } - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. - * - * @function filterObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with properties that passed the test. - * - * @example - * filterObject({a: false, b: true, c: true}, (item) => { - * return item; - * }); - * // => {b: true, c: true} - */ - function filterObject(source, iteratee, results = {}) { - eachObject(source, (item, key, original, propertyCount, objectKeys) => { - if (iteratee(item, key, results, original, propertyCount, objectKeys) === true) { - results[key] = item; - } - }); - return results; - } - - /** - * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. - * - * @function filterAsyncObject - * @category object - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function} [results = {}] - Object that will be used to assign results. - * @returns {Object|Function} - An object with properties that passed the test. - * - * @example - * filterAsyncObject({a: false, b: true, c: true}, (item) => { - * return item; - * }); - * // => {b: true, c: true} - */ - async function filterAsyncObject(source, iteratee, results = {}) { - await eachAsyncObject(source, async (item, key, original, propertyCount, objectKeys) => { - if ((await iteratee(item, key, results, original, propertyCount, objectKeys)) === true) { - results[key] = item; - } - }); - return results; - } - - /** - * Creates an inverted version of a given object by switching it's keys and values. - * - * @function invert - * @type {Function} - * @category object - * @param {Object} source - Object to be inverted. - * @param {Array} [target = {}] - Empty object to be populated with inverted values from source. - * @returns {Object|undefined} - Returns object with keys and values switched. - * - * @example - * import { invert, assert } from '@universalweb/acid'; - * assert(invert({a:1}), {1:'a'}); - */ - function invert(source, target = {}) { - if (!source) { - return; - } - eachObject(source, (item, key) => { - target[item] = key; - }); - return target; - } - - /** - * Performs a shallow strict comparison between two objects. - * - * @function isMatchObject - * @type {Function} - * @category object - * @param {Object} source - Source object. - * @param {Object} target - Object to compare to source. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { assert, isMatchObject } from '@universalweb/acid'; - * assert(isMatchObject({a: 1}, {a: 1}), true); - */ - const isMatchObject = (source, target) => { - if (source === target) { - return true; - } - const sourceKeys = keys(source); - const targetKeys = keys(target); - if (sourceKeys.length === targetKeys.length) { - return everyArray(sourceKeys, (key) => { - return source[key] === target[key]; - }); - } - return false; - }; - - /** - * Returns a regex safe special characters escaped version of a string. - * - * @function regexSafe - * @category regex - * @type {Function} - * @param {Object} source - String to make safe. - * @returns {Object} - Returns a regex safe version of the string. - * - * @example - * import { regexSafe, assert } from '@universalweb/acid'; - * assert(regexSafe(/.+/), '\/\.\+\/'); - */ - const escapeRegexRegex = /[()[\]{}*+?^$|#.,/\\\s-]/g; - function escapeRegex(source) { - return source.replace(escapeRegexRegex, '\\$&'); - } - - /** - * Convert array of strings to regex. - * - * @function arrayToRegex - * @category regex - * @type {Function} - * @param {Object} source - Array of strings. - * @returns {Object} - Returns a regex safe version of the string. - * - * @example - * import { arrayToRegex, assert } from '@universalweb/acid'; - * assert(String(arrayToRegex(['a','b'])), String(/a|b/)); - */ - function arrayToRegex(source, makeSafe) { - if (makeSafe) { - return arrayToRegex(mapArray(source, escapeRegex)); - } - return RegExp(source.join('|')); - } - - /** - * Checks if the value is a RegExp. - * - * @function isRegex - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isRegex, assert } from '@universalweb/acid'; - * assert(isRegex(/test/), true); - */ - const isRegexCall = isConstructorNameFactory('RegExp'); - const isRegex = isTypeFactory(isRegexCall); - - /** - * Returns a clone of the given object without the given properties. - * - * @function omit - * @category object - * @type {Function} - * @param {Object} source - Object from which keys are extracted. - * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object. - * @returns {Object|undefined} - A new object with the removed. - * - * @example - * import { omit, assert } from '@universalweb/acid'; - * assert(omit({a:1, b:2}, ['a']), {b:2}); - * assert(omit({a:1, b:2}, 'a'), {b:2}); - * assert(omit({1:'test', b:2}, 1), {b:2}); - */ - function omit(source, blacklist) { - if (!source) { - return {}; - } - if (isArray(blacklist)) { - const blacklistRegex = arrayToRegex(blacklist); - return filterObject(source, (item, key) => { - return !blacklistRegex.test(key); - }); - } - if (isRegex(blacklist)) { - return filterObject(source, (item, key) => { - return !blacklist.test(key); - }); - } - if (isString(blacklist)) { - return filterObject(source, (item, key) => { - return key !== blacklist; - }); - } - if (isNumber(blacklist)) { - const numberToString = blacklist.toString(); - return filterObject(source, (item, key) => { - return key !== numberToString; - }); - } - if (isFunction(blacklist)) { - return filterObject(source, (item, key) => { - return !blacklist(item, key); - }); - } - return objectAssign({}, source); - } - - /** - * Returns a clone of the source object with the plucked properties. - * - * @function pick - * @type {Function} - * @category object - * @param {Object} source - Object to be cloned. - * @param {Array} whitelist - Array of property names used to determine what values to pluck. - * @param {Object} [target = {}] - Object to be populated with plucked values. - * @returns {Object|undefined} - A new object with plucked properties. - * - * @example - * import { pick, assert } from '@universalweb/acid'; - * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2}); - */ - const pick = (source, whitelist, target = {}) => { - if (!source) { - return; - } - eachArray(whitelist, (item) => { - target[item] = source[item]; - }); - return target; - }; - - /** - * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object. - * - * @function objectSize - * @category object - * @param {Object} source - The source object. - * @returns {Number|undefined} - The amount of keys. - * - * @example - * import { objectSize, assert } from '@universalweb/acid'; - * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3); - */ - function objectSize(source) { - if (!source) { - return; - } - if (isPlainObject(source)) { - return keys(source).length; - } - const objectLengthProperty = source.length; - if (hasValue(objectLengthProperty)) { - return objectLengthProperty; - } - const objectSizeProperty = source.size; - if (hasValue(objectLengthProperty)) { - return objectSizeProperty; - } - return keys(source).length; - } - - /** - * Creates an object from two arrays, one of property identifiers and one of corresponding values. - * - * @function zipObject - * @type {Function} - * @category object - * @param {Array} properties - The property identifiers. - * @param {Array} values - The property values. - * @returns {Object} - Returns the new object. - * - * @example - * zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ - const zipObject = (properties, values) => { - const zipedObject = {}; - eachArray(properties, (item, key) => { - zipedObject[item] = values[key]; - }); - return zipedObject; - }; - /** - * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. - * - * @function unZipObject - * @type {Function} - * @category object - * @param {Object} object - The object to process. - * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array. - * - * @example - * unZipObject({ 'a': 1, 'b': 2 }); - * // => [['a', 'b'], [1, 2]] - */ - const unZipObject = (object) => { - const unZippedKeys = []; - const values = []; - eachObject(object, (item, key) => { - unZippedKeys.push(key); - values.push(item); - }); - return [unZippedKeys, values]; - }; - - const normalizeCase$4 = /[ _-]+/g; - /** - * Converts a string into Camel case format. - * - * @function camelCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into Camel case. - * @returns {String} - Converted string in Camel case. - * - * @example - * import { camelCase, assert } from '@universalweb/acid'; - * assert(camelCase('camel case'), 'camelCase'); - */ - function camelCase(source) { - let result = ''; - source - .replace(normalizeCase$4, ' ') - .trim() - .split(' ') - .forEach((item, index) => { - if (index === 0) { - result += item.toLowerCase(); - } else { - result += item[0].toUpperCase() + item.slice(1).toLowerCase(); - } - }); - return result; - } - - const normalizeCase$3 = /[ _-]+/g; - const space$1 = /[ ]+/g; - /** - * Converts a string into single space sepperated words in Kebab case. - * - * @function kebabCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into Kebab case. - * @returns {String} - Converted string in Kebab case. - * - * @example - * import { kebabCase, assert } from '@universalweb/acid'; - * assert(kebabCase('kebab case'), 'kebab-case'); - */ - function kebabCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase$3, ' ') - .trim() - .toLowerCase() - .replace(space$1, '-'); - } - - const normalizeCase$2 = /[ _-]+/g; - const space = /[ ]+/g; - /** - * Converts a string into single space sepperated words in snake case. - * - * @function snakeCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into snake case. - * @returns {String} - Converted string in Snake case. - * - * @example - * import { snakeCase, assert } from '@universalweb/acid'; - * assert(snakeCase('snake case'), 'snake_case'); - */ - function snakeCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase$2, ' ') - .trim() - .toLowerCase() - .replace(space, '_'); - } - - const normalizeCase$1 = /[ _-]+/g; - /** - * Converts a string into single space sepperated words in uppercase. - * - * @function upperCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into upper case. - * @returns {String} - Converted string in upper case. - * - * @example - * import { upperCase, assert } from '@universalweb/acid'; - * assert(upperCase('upper-case'), 'UPPER CASE'); - * assert(upperCase('upper_case'), 'UPPER CASE'); - */ - function upperCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase$1, ' ') - .trim() - .toUpperCase(); - } - - const normalizeCase = /[ _-]+/g; - /** - * Converts a string into single space sepperated words in lowerCase. - * - * @function lowerCase - * @category string - * @type {Function} - * @param {String} source - String to be converted into upper case. - * @returns {String} - Converted string in upper case. - * - * @example - * import { lowerCase, assert } from '@universalweb/acid'; - * assert(lowerCase('lower-CASE'), 'lower case'); - */ - function lowerCase(source) { - return source - .replace(/([A-Z]+)/g, ' $1') - .replace(normalizeCase, ' ') - .trim() - .toLowerCase(); - } - - /** - * Inserts text into a string at a given position. - * - * @function insertInRange - * @category string - * @type {Function} - * @param {String} string - String to insert the text into. - * @param {Number} index - Point of insertion. - * @param {String} text - The string to be inserted. - * @returns {String} - The string with the text inserted at the given point. - * - * @example - * import { insertInRange, assert } from '@universalweb/acid'; - * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.'); - */ - function insertInRange(string, index, text) { - return string.slice(0, index) + text + string.slice(index, string.length); - } - /** - * Plucks a letter using the index starting from the right. - * - * @function rightString - * @category string - * @type {Function} - * @param {String} string - String to extract the letter from. - * @param {Number} [index=1] - The starting position. - * @returns {String} - A letter at the given index. - * - * @example - * import { rightString, assert } from '@universalweb/acid'; - * assert(rightString('rightString'), 'g'); - * assert(rightString('rightString', 2), 'n'); - */ - function rightString(string, index = 1) { - return string[string.length - index]; - } - /** - * Splits up a string into chunks. - * - * @function chunkString - * @category string - * @type {Function} - * @param {String} string - String to chunked. - * @param {Number} [size] - The max string length per chunk. - * @returns {Array} - An array with strings that are <= size parameter. - * - * @example - * import { chunkString, assert } from '@universalweb/acid'; - * assert(chunkString('chunk', 2), ['ch', 'un', 'k']); - */ - function chunkString(string, size) { - return string.match(new RegExp(`(.|[\r\n]){1,${size}}`, 'g')); - } - /** - * Truncates everything before the index starting from the right. - * - * @function initialString - * @category string - * @type {Function} - * @param {String} string - String to extract the initial letters from. - * @param {Number} [index=1] - Starting point from the right. - * @returns {String} - A string with the characters before the index starting from the right. - * - * @example - * import { initialString, assert } from '@universalweb/acid'; - * assert(initialString('initialString', 2), 'initialStri'); - */ - function initialString(string, index = 1) { - return string.slice(0, index * -1); - } - /** - * Truncates everything after a index. - * - * @function restString - * @category string - * @type {Function} - * @param {String} string - String to extract the rest of the letters from. - * @param {Number} [index=1] - Starting point. - * @returns {String} - A string without the characters up-to to the index. - * - * @example - * import { restString, assert } from '@universalweb/acid'; - * assert(restString('restString', 2), 'stString'); - */ - function restString(string, index = 1) { - return string.substring(index); - } - - /** - * Replaces all occurrences of strings in an array with a value. - * - * @function replaceList - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @param {Array} words - Strings to replace. - * @param {String} value - The match replacement. - * @returns {String} - The string with the replacement. - * - * @example - * import { replaceList, assert } from '@universalweb/acid'; - * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.'); - */ - function replaceList(string, words, value) { - return string.replace(new RegExp(`\\b${words.join('|')}\\b`, 'gi'), value); - } - - const rawURLDecodeRegex = /%(?![\da-f]{2})/gi; - const andRegex = /&/g; - const lessThanRegex = //g; - const doubleQuoteRegex = /"/g; - /** - * Raw URL decoder. - * - * @function rawURLDecode - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @returns {String} - Converted string into the decoded URI Component . - * - * @example - * import { rawURLDecode, assert } from '@universalweb/acid'; - * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.'); - */ - function rawURLDecode(string) { - return decodeURIComponent( - string.replace(rawURLDecodeRegex, () => { - return '%25'; - }) - ); - } - /** - * Replaced sensitive characters with their matching html entity. - * - * @function htmlEntities - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @returns {String} - Replaced string. - * - * @example - * import { htmlEntities, assert } from '@universalweb/acid'; - * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`); - */ - function htmlEntities(string) { - return string.replace(andRegex, '&').replace(lessThanRegex, '<').replace(moreThanRegex, '>').replace(doubleQuoteRegex, '"'); - } - /** - * Executes rawURLDecode followd by htmlEntities methods on a string. - * - * @function sanitize - * @category string - * @type {Function} - * @param {String} string - String to be replaced. - * @returns {String} - Replaced string. - * - * @example - * import { sanitize, assert } from '@universalweb/acid'; - * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`); - */ - function sanitize(string) { - return htmlEntities(rawURLDecode(string)); - } - - const tokenizeRegEx = /\S+/g; - const wordsRegEx = /\w+/g; - /** - * Break string by non-white space characters matches. - * - * @function tokenize - * @type {Function} - * @category string - * @param {String} string - String to be broken up. - * @returns {Array} - Array of words without white space characters. - * - * @example - * import { tokenize, assert } from '@universalweb/acid'; - * assert(tokenize('I am Lucy!'), ["I", "am", "Acid!"]); - */ - function tokenize(string) { - return string.match(tokenizeRegEx) || []; - } - /** - * Break string into word matches. - * - * @function words - * @type {Function} - * @param {String} string - String to be broken up. - * @returns {Array} - Array of words with word characters only. - * - * @example - * import { words, assert } from '@universalweb/acid'; - * assert(words('I am Acid!'), ["I", "am", "Acid"]); - */ - function words(string) { - return string.match(wordsRegEx) || []; - } - - const truncateDown = (string, maxLength, stringLength) => { - const breakAll = string.split(''); - const breakAllLength = breakAll.length; - let item; - let index = stringLength - maxLength; - for (; index < breakAllLength && index >= 0; index--) { - item = breakAll[index]; - if (item === ' ') { - break; - } - } - return string.slice(0, index).trim(); - }; - const truncateUp = (string, maxLength, stringLength) => { - const breakAll = string.split(''); - const breakAllLength = breakAll.length; - let item; - let index = maxLength; - for (; index < breakAllLength && index > 0; index++) { - item = breakAll[index]; - if (item === ' ') { - break; - } - } - return string.substring(index, stringLength).trim(); - }; - /** - * Truncates the string, accounting for word placement and character count. - * - * @function truncate - * @type {Function} - * @category string - * @param {String} string - String to be truncated. - * @param {Number} maxLength - The desired max length of the string. - * @returns {String} - The mutated string. - * - * @example - * import { truncate, assert } from '@universalweb/acid'; - * assert(truncate('Where is Lucy?', 2), 'Where is'); - */ - function truncate(string, maxLength) { - const stringLength = string.length; - return stringLength > maxLength ? truncateDown(string, maxLength, stringLength) : string; - } - /** - * Truncates the string, accounting for word placement and character count from the right. - * - * @function truncateRight - * @type {Function} - * @category string - * @param {String} string - String to be truncated. - * @param {Number} maxLength - The desired max length of the string. - * @returns {String} - The mutated string. - * - * @example - * import { truncateRight, assert } from '@universalweb/acid'; - * assert(truncateRight('Where is Lucy?', 6), 'Lucy?'); - */ - function truncateRight(string, maxLength) { - const stringLength = string.length; - return stringLength > maxLength ? truncateUp(string, maxLength, stringLength) : string; - } - - const getWords = /\w+/g; - /** - * Returns the first letter capitalized. - * - * @function upperFirstLetter - * @type {Function} - * @category string - * @param {String} string - String to extract first letter from. - * @returns {String} - An upper case letter. - * - * @example - * import { upperFirstLetter, assert } from '@universalweb/acid'; - * assert(upperFirstLetter('upper'), 'U'); - */ - function upperFirstLetter(string) { - return string[0].toUpperCase(); - } - /** - * Capitalizes the first letter. - * - * @function upperFirst - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with first letter capitalized. - * - * @example - * import { upperFirst, assert } from '@universalweb/acid'; - * assert(upperFirstLetter('upper'), 'U'); - * upperFirst('upper'); - * // => 'Upper' - */ - function upperFirst(string) { - return upperFirstLetter(string) + restString(string); - } - /** - * Capitalize first letter and lower case the rest. - * - * @function upperFirstOnly - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with first letter capitalized. - * - * @example - * import { upperFirstOnly, assert } from '@universalweb/acid'; - * assert(upperFirstOnly('upper'), 'Upper'); - */ - function upperFirstOnly(string) { - return upperFirstLetter(string) + restString(string).toLowerCase(); - } - /** - * Capitalize all first letters. - * - * @function upperFirstAll - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with all first letters capitalized. - * - * @example - * import { upperFirstAll, assert } from '@universalweb/acid'; - * assert(upperFirstAll('uPPer'), 'UPPer'); - */ - function upperFirstAll(string) { - return string.replace(getWords, (match) => { - return upperFirst(match); - }); - } - /** - * Capitalize all first letters and lower case the rest. - * - * @function upperFirstOnlyAll - * @type {Function} - * @category string - * @param {String} string - String to be mutated. - * @returns {String} - String with all first letters capitalized. - * - * @example - * import { upperFirstOnlyAll, assert } from '@universalweb/acid'; - * assert(upperFirstOnlyAll('this is'), 'This Is'); - */ - function upperFirstOnlyAll(string) { - return string.replace(getWords, (match) => { - return upperFirstOnly(match); - }); - } - - /** - * Returns the constructor name of an object. - * - * @function getTypeName - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { getTypeName, assert } from '@universalweb/acid'; - * assert(getTypeName(1), true); - */ - function getTypeName(source) { - return getType(source)?.name; - } - - /** - * Checks if the value is an Arguments object. - * - * @function isArguments - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArguments, assert } from '@universalweb/acid'; - * assert(isArguments((function() { return arguments;})()), true); - * assert(isArguments([]), false); - */ - const objectArguments = '[object Arguments]'; - function isArguments(source) { - return hasValue(source) ? source.toString() === objectArguments : false; - } - - /** - * Checks if an object or objects are a Map. - * - * @function isMap - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isMap } from '@universalweb/acid'; - * isMap(new Map()); - * // => true - */ - const isMapCall = isConstructorNameFactory('Map'); - const isMap = isTypeFactory(isMapCall); - - /** - * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer. - * - * @function isTypedArray - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isTypedArray, assert } from '@universalweb/acid'; - * assert(isTypedArray([]), false); - * assert(isTypedArray(new Int8Array()), true); - */ - const typedArrayRegex = /Array/; - const arrayConstructorName = 'Array'; - function isTypedArray(source) { - if (source) { - const constructorName = getTypeName(source); - if (typedArrayRegex.test(constructorName) && constructorName !== arrayConstructorName) { - return true; - } - } - return false; - } - - /** - * Checks if an object is null or undefined. - * - * @function noValue - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { noValue, assert } from '@universalweb/acid'; - * assert(noValue(null), true); - * assert(noValue(undefined), true); - * assert(noValue(1), false); - * assert(noValue(0), false); - */ - function noValue(source) { - return !hasValue(source); - } - - /** - * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property. - * - * @function isArrayLike - * @category type - * @param {*} source - Object to be checked. - * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArrayLike, assert } from '@universalweb/acid'; - * assert(isArrayLike([]), true); - * assert(isArrayLike(2), false); - */ - function isArrayLike(source, strictFlag) { - if (noValue(source) || isFunction(source)) { - return false; - } - if (isArray(source) || isTypedArray(source)) { - return true; - } - const sourceLength = source.length; - if (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) { - return false; - } - if (strictFlag) { - const indexes = keys(source); - if (indexes) { - return every(indexes, (value, index) => { - return index >= 0 && isNumber(index); - }); - } - return false; - } - return true; - } - - /** - * Checks if an object or objects are a BigInt. - * - * @function isBigInt - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isBigInt, assert } from '@universalweb/acid'; - * assert(isBigInt(BigInt(123)), true); - */ - const isBigIntCall = isConstructorNameFactory('BigInt'); - const isBigInt = isTypeFactory(isBigIntCall); - - /** - * Checks if the value is a Boolean. - * - * @function isBoolean - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isBoolean } from '@universalweb/acid'; - * isBoolean(true); - * // => true - */ - const isBooleanCall = isConstructorNameFactory('Boolean'); - const isBoolean = isTypeFactory(isBooleanCall); - - /** - * Checks if an object or objects are a ArrayBuffer. - * - * @function isArrayBuffer - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isArrayBuffer, assert } from '@universalweb/acid'; - * assert(isArrayBuffer(new ArrayBuffer()), true); - */ - const isArrayBufferCall = isConstructorNameFactory('ArrayBuffer'); - const isArrayBuffer = isTypeFactory(isArrayBufferCall); - - /** - * Checks if an object is the child of another. Typically used for classes. - * - * @function isChild - * @category type - * @param {*} sourceChild - Object to be checked as the child. - * @param {*} targetParent - Object to be checked as the parent. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isChild, construct, assert } from '@universalweb/acid'; - * class Grandparent{} - * class Parent extends Grandparent{} - * class Child extends Parent{} - * const child = construct(Child); - * assert(isChild(Child, Grandparent), true); - * assert(isChild(Child, Parent), false); - * assert(isChild(Parent, Grandparent), false); - * assert(isChild(child1, child3), false); - */ - function isChild(sourceChild, targetParent) { - if (!sourceChild || !targetParent) { - return false; - } - return sourceChild instanceof targetParent; - } - - /** - * Checks if an object or objects are a structured-cloneable type. - * - * @function isCloneable - * @category type - * @param {...*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isCloneable, assert } from '@universalweb/acid'; - * assert(isCloneable(function (){}), false); - */ - const constructorNames = RegExp( - 'Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError' - ); - function isCloneable(source) { - if (hasValue(source)) { - const constructorName = source?.constructor?.name; - return constructorNames.test(constructorName); - } - return false; - } - - /** - * Checks if the value is a Date. - * - * @function isDate - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isDate, assert } from '@universalweb/acid'; - * assert(isDate(new Date()), true); - */ - const isDateCall = isConstructorNameFactory('Date'); - const isDate = isTypeFactory(isDateCall); - - /** - * Checks if the value is empty. - * - * @function isEmpty - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isEmpty, assert } from '@universalweb/acid'; - * assert(isEmpty([]), true); - */ - function isEmpty(source) { - if (isString(source) || isArray(source)) { - return !hasLength(source); - } else if (isPlainObject(source)) { - return !objectSize(source); - } - return !hasValue(source); - } - - /** - * Check if a value equals false using strict comparison. - * - * @function isFalse - * @category Utility - * @type {Function} - * @param {Boolean} source - Item to compare. - * @returns {Boolean} - Returns true if the item equals false. - * - * @example - * import { isFalse, assert } from '@universalweb/acid'; - * assert(isFalse(1), false); - * assert(isFalse(true), false); - * assert(isFalse(false), true); - */ - function isFalse(source) { - return source === false; - } - - /** - * Checks if an object or objects are a Float32Array. - * - * @function isF32 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isF32, assert } from '@universalweb/acid'; - * assert(isF32(new Float32Array()), true); - */ - const isF32Call = isConstructorNameFactory('Float32Array'); - const isF32 = isTypeFactory(isF32Call); - - /** - * Checks if an object or objects are a Float64Array. - * - * @function isF64 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isF64 } from '@universalweb/acid'; - * isF64(new Float64Array()); - * // => true - */ - const isF64Call = isConstructorNameFactory('Float64Array'); - const isF64 = isTypeFactory(isF64Call); - - const { isInteger } = Number; - /** - * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. - * - * @function isFloat - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isFloat } from '@universalweb/acid'; - * isFloat(1.01); - * // => true - */ - const isFloat = isInteger; - - /** - * Checks if an object or objects are a Int16Array. - * - * @function isI16 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isI16 } from '@universalweb/acid'; - * isI16(new Int16Array()); - * // => true - */ - const isI16Call = isConstructorNameFactory('Int16Array'); - const isI16 = isTypeFactory(isI16Call); - - /** - * Checks if an object or objects are a Int32Array. - * - * @function isI32 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isI32, assert } from '@universalweb/acid'; - * assert(isI32(new Int32Array()), true); - */ - const isI32Call = isConstructorNameFactory('Int32Array'); - const isI32 = isTypeFactory(isI32Call); - - /** - * Checks if an object or objects are a Int8Array. - * - * @function isI8 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isInt8 } from '@universalweb/acid'; - * isInt8(new Int8Array()); - * // => true - */ - const isI8Call = isConstructorNameFactory('Int8Array'); - const isI8 = isTypeFactory(isI8Call); - - /** - * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments. - * - * @function isIterable - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isIterable, assert } from '@universalweb/acid'; - * assert(isIterable([]), true); - * assert(isIterable(new Int8Array()), true); - * assert(isIterable('test'), false); - */ - function isIterable(source) { - return hasValue(source) && typeof source[Symbol.iterator] === 'function'; - } - - /** - * Checks if an object is a promise. - * - * @function isPromise - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isPromise } from '@universalweb/acid'; - * isPromise(new Promise(() => {})); - * // => true - */ - function isPromise(source) { - if (source) { - return source instanceof Promise; - } - return false; - } - - /** - * Checks if an object is a kind of async object such as async function, promise, or generator. - * - * @function isKindAsync - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isKindAsync, assert } from '@universalweb/acid'; - * assert(isKindAsync(async() => {}), true); - */ - function isKindAsync(source) { - if (source) { - return isPromise(source) || isAsync(source) || isGenerator(source); - } - return false; - } - - /** - * Checks if an object is the child of another. Typically used for classes. - * - * @function isParent - * @category type - * @param {*} sourceParent - Object to be checked as the child. - * @param {*} targetChild - Object to be checked as the parent. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isParent, construct, assert } from '@universalweb/acid'; - * class parentClass{} - * class otherClass{} - * const child1 = construct(parentClass); - * const child2 = construct(otherClass); - * assert(isParent(child1, parentClass), true); - * assert(isParent(child3, parentClass), false); - * assert(isParent(parentClass, child1), false); - * assert(isParent(child1, child3), false); - */ - function isParent(sourceParent, targetChild) { - if (!sourceParent || !targetChild || !targetChild.call) { - return false; - } - return sourceParent instanceof targetChild; - } - - /** - * Checks if an object is a primitive. - * - * @function isPrimitive - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - True or false. - * - * @example - * import { isPrimitive, assert } from '@universalweb/acid'; - * assert(isPrimitive(1), true); - * assert(isPrimitive(() => {}), false); - */ - function isPrimitive(source) { - const type = typeof value; - return source === null || source === undefined || (type !== 'object' && type !== 'function'); - } - - /** - * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways. - * - * @function isRelated - * @category type - * @param {*} targetOne - Object to be checked. - * @param {*} targetTwo - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isRelated, construct, assert } from '@universalweb/acid'; - * class parentClass{} - * class otherClass{} - * const child1 = construct(parentClass); - * const child2 = construct(parentClass); - * const child3 = construct(otherClass); - * assert(isRelated(child1, child2), true); - * assert(isRelated(child1, parentClass), true); - * assert(isRelated(parentClass, child2), true); - * assert(isRelated(child1, child3), false); - */ - function isRelated(targetOne, targetTwo) { - if (noValue(targetOne) || noValue(targetTwo)) { - return false; - } - if (targetOne.call) { - return targetTwo instanceof targetOne; - } - if (targetTwo.call) { - return targetOne instanceof targetTwo; - } - return targetTwo.constructor === targetOne.constructor; - } - - const { isSafeInteger } = Number; - /** - * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. - * - * @function isSafeInt - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isSafeInt } from '@universalweb/acid'; - * isSafeInt(1.01); - * // => true - */ - const isSafeInt = isSafeInteger; - - function isSameType(source, other) { - const sourceType = getType(source); - const otherType = getType(other); - if (sourceType === otherType) { - if (sourceType.name === otherType.name) { - return true; - } - } - return false; - } - - /** - * Check if a value equals true using strict comparison. - * - * @function isTrue - * @category Utility - * @type {Function} - * @param {Boolean} source - Item to check. - * @returns {Boolean} - Returns true if the item is true. - * - * @example - * import { isTrue, assert } from '@universalweb/acid'; - * assert(isTrue(1), false); - * assert(isTrue(true), true); - * assert(isTrue(false), false); - */ - function isTrue(source) { - return source === true; - } - - /** - * Checks if an object or objects are a Uint16Array. - * - * @function isU16 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU16 } from '@universalweb/acid'; - * isU16(new Uint16Array()); - * // => true - */ - const isU16Call = isConstructorNameFactory('Uint16Array'); - const isU16 = isTypeFactory(isU16Call); - - /** - * Checks if an object or objects are a Uint32Array. - * - * @function isU32 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU32 } from '@universalweb/acid'; - * isU32(new Uint32Array()); - * // => true - */ - const isU32Call = isConstructorNameFactory('Uint32Array'); - const isU32 = isTypeFactory(isU32Call); - - /** - * Checks if an object or objects are a Uint8Array. - * - * @function isU8 - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU8 } from '@universalweb/acid'; - * isU8(new Uint8Array()); - * // => true - */ - const isU8Call = isConstructorNameFactory('Uint8Array'); - const isU8 = isTypeFactory(isU8Call); - - /** - * Checks if an object or objects are a Uint8ClampedArray. - * - * @function isU8C - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isU8C } from '@universalweb/acid'; - * isU8C(new Uint8ClampedArray()); - * // => true - */ - const isU8CCall = isConstructorNameFactory('Uint8ClampedArray'); - const isU8C = isTypeFactory(isU8CCall); - - /** - * Checks if an object or objects are a WeakMap. - * - * @function isWeakMap - * @category type - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { isWeakMap } from '@universalweb/acid'; - * assert(isWeakMap(new WeakMap()), true); - */ - const isWeakMapCall = isConstructorNameFactory('WeakMap'); - const isWeakMap = isTypeFactory(isWeakMapCall); - - const isDeno = typeof globalThis.Deno !== 'undefined'; - - const isNodejs = typeof globalThis.process !== 'undefined' && process.versions && process.versions.node; - - /** - * Check if a value is isTruthy which is anything but false, null, 0, "", undefined, and NaN. - * - * @function isTruthy - * @category type - * @type {Function} - * @param {*} source - Item to be isTruthy checked. - * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy. - * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false. - * - * @example - * import { isTruthy, assert } from '@universalweb/acid'; - * assert(isTruthy(1), true); - * assert(isTruthy(0), false); - */ - function isTruthy(source, returnIfTrue = true) { - return Boolean(source) && returnIfTrue; - } - - /** - * Check if a value is isFalsy which are false, null, 0, "", undefined, and NaN. - * - * @function isFalsy - * @category type - * @type {Function} - * @param {*} source - Item to be isFalsy checked. - * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy. - * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false. - * - * @example - * import { isFalsy, assert } from '@universalweb/acid'; - * assert(isFalsy(0), true); - * assert(isFalsy(1), false); - */ - function isFalsy(source, returnIfTrue = true) { - return Boolean(source) === false && returnIfTrue; - } - - /** - * If source has a value then assign it to an object or call a function. - * - * @function ifValue - * @category utility - * @param {*} source - The source object to be hasValue checked. - * @param {Function|Object} target - The target which is either a function or object. - * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target). - * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function. - * @returns {source|undefined} The source object if it passes the hasValue check. - * - * @example - * import { ifValue, assert } from '@universalweb/acid'; - * assert(ifValue(1, {}, 'a'), {a:1}); - */ - function ifValue(source, target, optional, args) { - if (hasValue(source)) { - if (isFunction(target)) { - if (optional) { - return apply(target, optional, args); - } - return target(...args); - } else if (isPlainObject(target)) { - target[optional] = source; - return target; - } - } - } - - /** - * Performs a deep comparison between two objects & determines if they're different using strict comparison. - * - * @function notEqual - * @type {Function} - * @category utility - * @param {*} source - Source object. - * @param {*} target - Object to be compared. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { notEqual, assert } from '@universalweb/acid'; - * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true); - */ - function notEqual(source, target) { - return isFalse(isEqual(source, target)); - } - - const jsonNative = JSON; - /** - * Parses JSON string with safety check for undefined. - * - * @function jsonParse - * @category utility - * @type {Function} - * @param {String} source - String to be parsed. - * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned. - * @returns {Object|undefined} - Returns the parsed object. - * - * @example - * import { jsonParse, assert } from '@universalweb/acid'; - * assert(jsonParse('{a:1}'), {a:1}); - */ - function jsonParse(source, reviver) { - if (source) { - return jsonNative.parse(source, reviver); - } - } - /** - * Stringify an object into a JSON string. - * - * @function stringify - * @category utility - * @type {Function} - * @param {Object} object - Object to Stringify. - * @returns {String} - Returns the object as a valid JSON string. - * - * @example - * import { stringify, assert } from '@universalweb/acid'; - * assert(stringify({a:1}), '{a:1}'); - */ - const stringify = jsonNative.stringify; - - function createAssertError(source, expected, localOptions) { - const options = globalThis.options || localOptions; - let errorTitle; - if (isFunction(options)) { - errorTitle = `${options.name} : ${options.constructor.name}`; - } else if (options) { - errorTitle = `${options.title || options.method.name} -> ${options.file}`; - } - return new Error( - `Test Failed: ${errorTitle} + "use strict"; + + /** + * Chunks an array according to a user defined number. + * + * @function chunk + * @category Array + * @type {Function} + * @param {Array} array - Array to be chunked. + * @param {Number} size - Number which determines the size of each chunk. + * @returns {Array} - A chunked version of the source array. + * + * @example + * import { chunk, assert } from '@universalweb/acid'; + * assert(chunk([1,2,3], 1), [[1],[2],[3]]); + */ + function chunk(array, size = 1) { + const chunked = []; + let index = 0; + array.forEach((item, key) => { + if (!(key % size)) { + chunked.push([]); + if (key) { + index++; + } + } + chunked[index].push(item); + }); + return chunked; + } + + /** + * Clears the values out of an array. + * + * @function clearArray + * @category Array + * @type {Function} + * @param {Array} source - Takes an array to be emptied. + * @returns {Array} - The originally given array. + * + * @example + * import { clearArray, assert } from '@universalweb/acid'; + * assert(clearArray([1,'B', 'Cat']), []); + */ + function clearArray(source) { + source.length = 0; + return source; + } + + /** + * Clone an array (uses .slice()) and assign the source arrays values to the new array. + * + * @function cloneArray + * @category Array + * @type {Function} + * @param {Array} source - The array to be quick cloned. + * @returns {Array} - The newly cloned array with assigned items. + * + * @example + * import { cloneArray, assert } from '@universalweb/acid'; + * assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']); + */ + function cloneArray(source) { + return source.slice(); + } + + /** Checks if the value is undefined. + * + * @function isUndefined + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isUndefined, assert } from '@universalweb/acid'; + * assert(isUndefined(undefined), true); + */ + function isUndefined(source) { + return source === undefined; + } + + /** + * Checks if the value has length greater than 0. + * + * @function hasLength + * @category utility + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { hasLength, assert } from '@universalweb/acid'; + * assert(hasLength([1]), true); + */ + function hasLength(source) { + return Boolean(source.length); + } + + /** + * Checks if the value is null. + * + * @function isNull + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNull, assert } from '@universalweb/acid'; + * assert(isNull(null), true); + */ + function isNull(source) { + return source === null; + } + + /** + * Checks if the value is not null or undefined. + * + * @function hasValue + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { hasValue, assert } from '@universalweb/acid'; + * assert(hasValue(1), true); + */ + function hasValue(source) { + return !isUndefined(source) && !isNull(source); + } + + /** + * A simple function which returns the value it's given. + * + * @function returnValue + * @category utility + * @param {*} source - The source object. + * @returns {source} The source object. + */ + function returnValue(source) { + return source; + } + + /** + * Iterates through the given array. + * + * @function eachArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. + * @param {*} thisBind - Iteratee called with thisBind as this. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array|undefined} - The originally given array. + * + * @example + * import { eachArray, assert } from '@universalweb/acid'; + * const list = []; + * eachArray([1, 2, 3], (item, index) => { + * list[index] = item; + * }); + * assert(list, [1, 2, 3]); + */ + function eachArray(source, iteratee, thisBind, additionalArg) { + if (!source) { + return; + } + const arrayLength = source.length; + if (hasValue(thisBind)) { + for (let index = 0; index < arrayLength; index++) { + iteratee.call( + thisBind, + source[index], + index, + source, + arrayLength, + additionalArg, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + iteratee(source[index], index, source, arrayLength, additionalArg); + } + } + return source; + } + + /** + * Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. + * + * @function compactMapArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array = []} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array} - An array with mapped properties that are not null or undefined. + * + * @example + * import { compactMapArray, assert } from '@universalweb/acid'; + * assert(compactMapArray([null, 2, 3], (item) => { + * return item; + * }), [2, 3]); + */ + function compactMapArray( + source, + iteratee = returnValue, + results = [], + thisCall, + additionalArg, + ) { + if (hasValue(thisCall)) { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + const returned = iteratee.call( + thisCall, + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArg, + ); + if (hasValue(returned)) { + results.push(returned); + } + }); + } else { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + const returned = iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + thisCall, + additionalArg, + ); + if (hasValue(returned)) { + results.push(returned); + } + }); + } + return results; + } + + /** + * Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order. + * + * @function eachAsyncArray + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg. + * @param {*} thisCall - Iteratee called with thisCall as this. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array|undefined} - Returns source the originally given array. + * + * @example + * import { eachAsyncArray, assert } from '@universalweb/acid'; + * const tempList = []; + * await eachAsyncArray([1, 2, 3], async (item) => { + * tempList.push(item); + * }); + * assert(tempList, [1, 2, 3]); + */ + async function eachAsyncArray(source, iteratee, thisCall, additionalArg) { + if (!source) { + return; + } + const arrayLength = source.length; + if (hasValue(thisCall)) { + for (let index = 0; index < arrayLength; index++) { + await iteratee.call( + thisCall, + source[index], + index, + source, + arrayLength, + additionalArg, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + await iteratee( + source[index], + index, + source, + arrayLength, + additionalArg, + ); + } + } + return source; + } + + /** + * Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array. + * + * @function compactMapAsyncArray + * @type {Function} + * @category array + * @async + * @param {Array} source - Array to be compacted. + * @param {Function} iteratee - Iteratee to be performed on array. + * @returns {Array} - Array values after being put through an iterator. + * + * @example + * import { compactMapAsync, assert } from '@universalweb/acid'; + * assert(await compactMapAsync([1, 2, 3, null], async (item) => { + * return item; + * }), [1, 2, 3]); + */ + async function compactMapAsyncArray(source, iteratee = returnValue) { + const results = []; + await eachAsyncArray(source, async (item, index, arrayLength) => { + const result = await iteratee(item, index, results, arrayLength); + if (hasValue(result)) { + results.push(result); + } + }); + return results; + } + + /** + * Checks if a number is negative & returns true or false. + * + * @function isNegative + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNegative, assert } from '@universalweb/acid'; + * assert(isNegative(-1), true); + */ + const { sign: sign$1 } = Math; + function isNegative(source) { + return sign$1(source) === -1; + } + + function rangeUp(start, end, step, sourceArray) { + let position = start; + while (position < end) { + sourceArray.push(position); + position += step; + } + return sourceArray; + } + function rangeDown(start, end, step, sourceArray) { + let position = start; + while (position > end) { + sourceArray.push(position); + position -= step; + } + return sourceArray; + } + /** + * Create a numbered list of integers. + * + * @function range + * @category array + * @type {Function} + * @param {Number} start - Value which determines the start of the range. + * @param {Number} end - Value which determines the end of the range. + * @param {Number} step - Value used to step between integers. + * @returns {Array} - An array of integers. + * + * @example + * import { range, assert } from '@universalweb/acid'; + * assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]); + */ + function range(start, end, step = 1, sourceArray = []) { + if (isNegative(step)) { + return sourceArray; + } + if (start < end) { + return rangeUp(start, end, step, sourceArray); + } else { + return rangeDown(start, end, step, sourceArray); + } + } + + /** + * Checks if the value is an array. This references Array.isArray. + * + * @function isArray + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArray, assert } from '@universalweb/acid'; + * assert(isArray([]), true); + * assert(isArray(2), false); + */ + const isArray = Array.isArray; + /** + * Checks if the value is not an array. This references Array.isArray. + * + * @function isNotArray + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNotArray, assert } from '@universalweb/acid'; + * assert(isNotArray([]), false); + * assert(isNotArray(2), true); + */ + function isNotArray(source) { + return !isArray(source); + } + + /** + * A function which acts like the "new" operator and can pass arguments. This is a safe version of the original which will error if given undefined + * This is useful when working with classes and prefering to avoid the new operator and it's potential side effects. + * + * @function construct + * @category class + * @param {Function} target - The target function or class. + * @param {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array. + * @param {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target. + * @returns {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList. + * + * @example + * import { construct, assert } from '@universalweb/acid'; + * class test { + * constructor(a) { + * return 1; + * } + * } + * const newClass = construct(test, [1]); + * assert(test, 1); + */ + const reflectConstruct = Reflect.construct; + function construct(target, argumentsList = [], newTarget) { + const args = isArray(argumentsList) ? argumentsList : [argumentsList]; + if (newTarget) { + return reflectConstruct(target, args, newTarget); + } + return reflectConstruct(target, args); + } + + /** + * Ensures the source is an array if not the source is wrapped in a array or an empty array is returned. + * + * @function ensureArray + * @category array + * @type {Function} + * @param {*} source - Object to be checked. + * @returns {Array} - Returns an array. + * + * @example + * import { isArray, ensureArray, assert } from '@universalweb/acid'; + * assert(isArray(ensureArray('test')), ['test']); + */ + function ensureArray(source) { + return (isArray(source) && source) || (hasValue(source) && [source]) || []; + } + + /** + * Flattens an array to a single level. + * + * @function flattenDeep + * @type {Function} + * @category array + * @param {Array} source - Array to flatten. + * @returns {Array} - Returns a completely flattened array. + * + * @example + * import { flattenDeep, assert } from '@universalweb/acid'; + * assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]); + */ + function flattenDeep(source) { + return source.flat(Infinity); + } + + function forEach(source, callback) { + source.forEach(callback); + return source; + } + + /** + * Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences. + * + * @function difference + * @category array + * @type {Function} + * @param {...Array} sources - List of arrays to be compared. + * @returns {Array|undefined} - An array which contains the differences between the source and compare array. + * + * @example + * import { difference, assert } from '@universalweb/acid'; + * assert(difference([1, 2, 3], [1, 2]), [3]); + */ + function difference(...sources) { + const differencesMap = construct(Map); + const differences = []; + eachArray(sources, (currentArray, parentIndex) => { + eachArray(currentArray, (child, childIndex) => { + let childRoot = differencesMap.get(child); + if (!childRoot) { + childRoot = { + count: 1, + parentIndex, + child, + }; + differencesMap.set(child, childRoot); + } else if (childRoot.parentIndex === parentIndex) { + return; + } else { + childRoot.count++; + } + }); + }); + forEach(differencesMap, (item) => { + if (item.count === 1 && item.parentIndex === 0) { + differences.push(item.child); + } + }); + return differences; + } + + /** + * Removes all items from an array after a specified index. + * + * @function drop + * @category array + * @type {Function} + * @param {Array} array - Source array. + * @param {Number} amount - Amount of items to drop from the array. + * @param {Number} [upTo = array.length] - Index to stop at. + * @returns {Array} - An array with all values removed after a user defined index. + * + * @example + * import { drop, assert } from '@universalweb/acid'; + * assert(drop([1, 2, 3]), [2, 3]); + * assert(drop([1, 2, 3], 2), [3]); + */ + function drop(array, amount = 1, upTo = array.length) { + return array.splice(amount, upTo); + } + + /** + * Removes all items from an array before a specified index. + * + * @function dropRight + * @type {Function} + * @category array + * @param {Array} array - Source array. + * @param {Number} amount - Amount of items to drop from the array. + * @param {Number} [upTo = array.length] - Index to stop at. + * @returns {Array} - An array with all values removed before a user defined index. + * + * @example + * import { dropRight, assert } from '@universalweb/acid'; + * assert(dropRight([1, 2, 3]), [1, 2]); + * assert(dropRight([1, 2, 3], 2), [1]); + */ + const dropRight = (array, amount = 1, upTo = array.length) => { + return drop(array, 0, upTo - amount); + }; + + /** + * Iterates through the given array in reverse. + * + * @function eachRight + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array|undefined} - The originally given array. + * + * @example + * import { eachRight, assert } from '@universalweb/acid'; + * const tempList = []; + * eachRight([1, 2, 3], (item) => { + * tempList.push(item); + * }); + * assert(tempList, [3, 2, 1]); + */ + function eachRight(source, iteratee, additionalArgument) { + if (!source) { + return; + } + const arrayLength = source.length; + for (let index = arrayLength - 1; index >= 0; index--) { + iteratee(source[index], index, source, arrayLength, additionalArgument); + } + return source; + } + + /** + * Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order. + * + * @function eachRightAsync + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @returns {Object|undefined} - The originally given array. + * + * @example + * import { eachRightAsync, assert } from '@universalweb/acid'; + * const tempList = []; + * await eachRightAsync([1, 2, 3], async (item) => { + * tempList.push(item); + * }); + * assert(tempList, [3, 2, 1]); + */ + async function eachRightAsync(source, iteratee) { + if (!source) { + return; + } + const arrayLength = source.length; + for (let index = arrayLength - 1; index >= 0; index--) { + await iteratee(source[index], index, source, arrayLength); + } + return source; + } + + /** + * Iterates through the given array while the iteratee returns true else the loop exits & returns false. + * + * @function everyArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. + * + * @example + * import { everyArray, assert } from '@universalweb/acid'; + * assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), false); + * assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), true); + */ + function everyArray(source, iteratee, additionalArgument) { + if (!source) { + return; + } + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if ( + iteratee( + source[index], + index, + source, + sourceLength, + additionalArgument, + ) === false + ) { + return false; + } + } + return true; + } + + /** + * Iterates through the given array while the iteratee returns true else the loop exits & returns false. + * + * @function everyAsyncArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array|undefined} - Returns true if all returns are true or false if one value returns false. + * + * @example + * import { everyAsyncArray, assert } from '@universalweb/acid'; + * assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), false); + * assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { + * return item; + * }), true); + */ + async function everyAsyncArray(source, iteratee, additionalArgument) { + if (!source) { + return; + } + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if ( + (await iteratee( + source[index], + index, + source, + sourceLength, + additionalArgument, + )) === false + ) { + return false; + } + } + return true; + } + + /** + * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. + * + * @function filterArray + * @category array + * @type {Function} + * @category array + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array with properties that passed the test. + * + * @example + * import { filterArray, assert } from '@universalweb/acid'; + * assert(filterArray([false, true, true], (item) => { + * return item; + * }), [true, true]); + */ + function filterArray(source, iteratee, results = [], additionalArgument) { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + if ( + iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArgument, + ) === true + ) { + results.push(item); + } + }); + return results; + } + + /** + * Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee. + * + * @function filterAsyncArray + * @category array + * @type {Function} + * @category array + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array with properties that passed the test. + * + * @example + * import { filterAsyncArray, assert } from '@universalweb/acid'; + * assert(filterAsyncArray([false, true, true], (item) => { + * return item; + * }), [true, true]); + */ + async function filterAsyncArray( + source, + iteratee, + results = [], + additionalArgument, + ) { + await eachAsyncArray( + source, + async (item, index, arrayOriginal, arrayLength) => { + if ( + (await iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArgument, + )) === true + ) { + results.push(item); + } + }, + ); + return results; + } + + /** + * Takes the first or multiple items from an array. + * + * @function first + * @type {Function} + * @category array + * @param {Array} array - Array to extract from. + * @param {Number} upTo - Number which determines how many items after the first item are extracted from the array. + * @returns {Array} - Returns an array. + * + * @example + * import { first, assert } from '@universalweb/acid'; + * assert(first([1, 2, 3]), 1); + */ + function first(array, upTo) { + return upTo ? array.slice(0, upTo) : array[0]; + } + + /** + * Flattens an array up to the provided level. + * + * @function flatten + * @type {Function} + * @category array + * @param {Array} source - Array to flatten. + * @param {Number} [level = 1] - Number which determines how deep the array nest can be. + * @returns {Array|undefined} - Returns an array. + * + * @example + * import { flatten, assert } from '@universalweb/acid'; + * assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]); + */ + function flatten(source, level = 1) { + if (!source) { + return; + } + let sourceArray = source; + for (let i = 0; i < level; i++) { + sourceArray = sourceArray.reduce((previousValue, currentValue) => { + return previousValue.concat(ensureArray(currentValue)); + }, []); + } + return sourceArray; + } + + /** + * Takes all but the last item in the array. + * + * @function initial + * @category array + * @type {Function} + * @param {Array} array - Array to have items extracted from. + * @returns {Array} - Returns a completely flattened array. + * + * @example + * import { initial, assert } from '@universalweb/acid'; + * assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]); + */ + function initial(array) { + return array.slice(0, array.length - 1); + } + + // Add intersectionBy & intersectionWith + /** + * Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory)) + * of the array and the input array(s). + * + * @function intersection + * @param {Array} array - Array to compare other arrays to. + * @param {...Array} arrays - A variable number of arrays. + * @category array + * @returns {Array} - The new array of unique values shared by all of the arrays. + * + * @example + * import { intersection, assert } from '@universalweb/acid'; + * assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]); + */ + function intersection(array, ...arrays) { + return compactMapArray(array, (item) => { + const shouldReturn = everyArray(arrays, (otherItem) => { + return otherItem.includes(item); + }); + if (shouldReturn) { + return item; + } + }); + } + + /** + * Invoke each function in the given array. + * + * @function invokeArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} additionalArg - An object to be given each time to the iteratee. + * @param {*} thisCall - Iteratee called with thisCall as this. + * @returns {Array|undefined} - The originally given array. + * + * @example + * import { invokeArray, assert } from '@universalweb/acid'; + * function test(arg){ + * return [this, arg]; + * } + * const results = invokeArray([test], 1, test); + * assert(results, [test, 1]); + */ + function invokeArray(source, additionalArg, thisCall) { + if (!source) { + return; + } + const arrayLength = source.length; + if (hasValue(thisCall)) { + for (let index = 0; index < arrayLength; index++) { + source[index].call(thisCall, additionalArg); + } + } else { + for (let index = 0; index < arrayLength; index++) { + source[index](additionalArg); + } + } + return source; + } + + const regexToPath = /\.|\[/; + const regexCloseBracket = /]/g; + const emptyString = ""; + /** + * Breaks up string into object chain list. + * + * @function toPath + * @type {Function} + * @category utility + * @param {String} source - String to be broken up. + * @returns {Array} - Array used to go through object chain. + * + * @example + * import { toPath, assert } from '@universalweb/acid'; + * assert(toPath('post.like[2]'), ['post', 'like', '2']); + */ + function toPath(source) { + return source.replace(regexCloseBracket, emptyString).split(regexToPath); + } + + /** + * Returns property on an object. + * + * @function get + * @category utility + * @type {Function} + * @param {String} propertyString - String used to retrieve properties. + * @param {Object} target - Object which has a property retrieved from it. + * @returns {Object} - Returns property from the given object. + * + * @example + * import { get, assert } from '@universalweb/acid'; + * const objectTarget = { + * post: { + * like: ['a','b','c'] + * } + * }; + * assert(get('post.like[2]', objectTarget), 'c'); + */ + function get(propertyString, target) { + if (!target) { + return false; + } + let link = target; + const pathArray = isArray(propertyString) + ? propertyString + : toPath(propertyString); + everyArray(pathArray, (item) => { + link = link[item]; + return hasValue(link); + }); + return link; + } + + /** + * Get object's keys. + * + * @function keys + * @category object + * @param {*} source - The source object to pull keys from. + * @returns {Array} - Array of keys. + * + * @example + * keys({a: 1, b: 2}); + * // => ['a', 'b'] + */ + const objectKeys = Object.keys; + function keys(source) { + if (source) { + return objectKeys(source); + } + } + + const hasOwn = Object.hasOwn; + /** + * Checks to see if an object has all of the given property names. + * + * @function hasKeys + * @category object + * @type {Function} + * @param {Object} source - Source object to check for keys. + * @param {...String} properties - List of strings to check. + * @returns {Boolean|undefined} - Returns true or false. + * + * @example + * import { hasKeys, assert } from '@universalweb/acid'; + * assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true); + */ + function hasKeys(source, ...properties) { + if (!source) { + return; + } + return everyArray(properties, (item) => { + const pathArray = toPath(item); + if (pathArray.length === 1) { + return hasOwn(source, item); + } else { + const lastPath = pathArray.pop(); + const initialPathObject = get(pathArray, source); + if (initialPathObject) { + return hasOwn(initialPathObject, lastPath); + } + return false; + } + }); + } + /** + * Checks to see if an object has any of the given property names. + * + * @function hasAnyKeys + * @category object + * @type {Function} + * @param {Object} source - Source object to check for keys. + * @param {Array} properties - List of strings to check. + * @returns {Boolean|undefined} - Returns true or false. + * + * @example + * import { hasAnyKeys, assert } from '@universalweb/acid'; + * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true); + * assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false); + */ + function hasAnyKeys(source, ...properties) { + if (!source) { + return; + } + return Boolean( + properties.find((item) => { + const pathArray = toPath(item); + if (pathArray.length === 1) { + return hasOwn(source, item); + } else { + const lastPath = pathArray.pop(); + const initialPathObject = get(pathArray, source); + if (initialPathObject) { + return hasOwn(initialPathObject, lastPath); + } + return false; + } + }), + ); + } + + /** + * Checks to see if the constructor is that of a native object. + * + * @function isConstructor + * @category type + * @param {Object} target - The object to be checked. + * @param {Object} source - The source constructor object. + * @returns {Object} - Returns the target object. + * + * @example + * import { isConstructor, assert } from '@universalweb/acid'; + * assert(isConstructor(2, Number), true); + */ + function isConstructor(target, source) { + return target?.constructor === source || false; + } + function isConstructorFactory(source) { + return (target) => { + return isConstructor(target, source); + }; + } + function constructorName(source) { + return source?.constructor?.name; + } + function isConstructorNameFactory(source) { + return (target) => { + return constructorName(target) === source || false; + }; + } + + function isTypeFactory(method) { + return function (primarySource, ...otherSources) { + if (otherSources) { + return method(primarySource) && everyArray(otherSources, method); + } + return method(primarySource); + }; + } + + /** + * Checks if an object or objects are a Buffer. + * + * @function isBuffer + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isBuffer, assert } from '@universalweb/acid'; + * assert(isBuffer(Buffer.from('test')), true); + */ + const isBufferCall = isConstructorNameFactory("Buffer"); + const isBuffer = isTypeFactory(isBufferCall); + + /** + * Checks if the value is a plain object. + * + * @function isPlainObject + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isPlainObject } from '@universalweb/acid'; + * isPlainObject({}); + * // => true + */ + const isPlainObject = (source) => { + if (hasValue(source)) { + return source.constructor.toString().trim().slice(9, 16) === "Object("; + } + return false; + }; + + /** + * Performs a deep comparison between two objects & determines if the value is the same using strict comparison. + * + * @function isEqual + * @type {Function} + * @category utility + * @param {*} source - Source object. + * @param {*} target - Object to be compared. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEqual, assert } from '@universalweb/acid'; + * assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true); + */ + // Add map & buffer Support - Review required for performance and support for more types + const isEqual = (source, target) => { + if (source === target) { + return true; + } else if (isBuffer(source)) { + return source.equals(target); + } else if (source.toString() === target.toString()) { + if (isPlainObject(source)) { + const sourceProperties = keys(source); + if (hasKeys(target, sourceProperties)) { + return everyArray(sourceProperties, (key) => { + return isEqual(source[key], target[key]); + }); + } + } else if (isArray(source)) { + if (source.length === target.length) { + return everyArray(source, (item, index) => { + return isEqual(item, target[index]); + }); + } + } + } + return false; + }; + + /** + * Performs a shallow strict comparison between two objects. + * + * @function isMatchArray + * @type {Function} + * @category array + * @param {Array} source - Source object. + * @param {Array} compareArray - Object to compare to source. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isMatchArray, assert } from '@universalweb/acid'; + * assert(isMatchArray([1, 2, 3], [1, 2, 3]), true); + */ + function isMatchArray(source, compareArray) { + if (source.length === compareArray.length) { + return everyArray(source, (item, index) => { + return isEqual(compareArray[index], item); + }); + } + return false; + } + + const mathNativeMax = Math.max; + /** + * Plucks the largest value from an array. + * + * @function largest + * @type {Function} + * @category array + * @param {Array} array - Array from which largest number is taken. + * @returns {Number} - The largest number. + * + * @example + * import { largest, assert } from '@universalweb/acid'; + * assert(largest([1,2,3]), 3); + */ + function largest(array) { + return mathNativeMax(...array); + } + + /** + * Extracts item(s) from an array starting from the last item in the array. + * + * @function last + * @type {Function} + * @category array + * @param {Array} array - Array to have items extracted from. + * @param {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array. + * @returns {Array} - Items from the array. + * + * @example + * import { last, assert } from '@universalweb/acid'; + * assert(last([1, 2, 3, 4, 5] , 2), [4, 5]); + */ + function last(array, indexFrom) { + const arrayLength = array.length; + return indexFrom + ? array.slice(arrayLength - indexFrom, arrayLength) + : array[arrayLength - 1]; + } + + /** + * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. + * + * @function mapArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array} - An array of the same calling array's type. + * + * @example + * import { mapArray, assert } from '@universalweb/acid'; + * assert(mapArray([1, 2, 3], (item) => { + * return item * 2; + * }), [2, 4, 6]); + */ + function mapArray(source, iteratee, results = [], thisCall, additionalArg) { + if (hasValue(thisCall)) { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + results[index] = iteratee.call( + thisCall, + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArg, + ); + }); + } else { + eachArray(source, (item, index, arrayOriginal, arrayLength) => { + results[index] = iteratee( + item, + index, + results, + arrayOriginal, + arrayLength, + additionalArg, + ); + }); + } + return results; + } + + /** + * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee. + * + * @function concurrentEachArray + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {*} thisBind - Object to use as the "this" within the function. + * @returns {Promise|Array|undefined} - An array of the same calling array's type. + * + * @example + * import { concurrentEachArray, has, assert } from '@universalweb/acid'; + * const results = await concurrentEachArray([1, 2, 3], async (item) => { + * return item * 2; + * }); + * assert(has(results, [2, 4, 6]), true); + */ + async function concurrentEachArray(source, iteratee, thisBind) { + if (!source) { + return; + } + const results = []; + const arrayLength = source.length; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + results[index] = iteratee.call( + thisBind, + source[index], + index, + results, + arrayLength, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + results[index] = iteratee(source[index], index, results, arrayLength); + } + } + return Promise.all(results); + } + + /** + * Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray. + * + * @function mapAsyncArray + * @category array + * @type {Function} + * @async + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @returns {Array} - An array of the same calling array's type. + * + * @example + * import { mapAsyncArray, assert } from '@universalweb/acid'; + * assert(await mapAsyncArray([1, 2, 3], async (item) => { + * return item * 2; + * }), [2, 4, 6]); + */ + async function mapAsyncArray(source, iteratee) { + const results = []; + await eachAsyncArray(source, async (item, index, arrayLength) => { + results[index] = await iteratee(item, index, results, arrayLength); + }); + return results; + } + + /** + * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse. + * + * @function mapRightArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array of the same calling array's type. + * + * @example + * import { mapRightArray, assert } from '@universalweb/acid'; + * assert(mapRightArray([1, 2, 3], (item) => { + * return item * 2; + * }), [6, 4, 2]); + */ + function mapRightArray(source, iteratee, results = [], additionalArgument) { + let trueIndex = 0; + const arrayLength = source.length; + for (let index = arrayLength - 1; index >= 0; index--) { + results[trueIndex] = iteratee( + source[index], + index, + source, + arrayLength, + additionalArgument, + ); + trueIndex++; + } + return results; + } + + /** + * Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee. + * + * @function mapWhile + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - An array with properties that passed the test. + * + * @example + * import { mapWhile, assert } from '@universalweb/acid'; + * assert(mapWhile([1, 2, 0], (item) => { + * return Boolean(item); + * }), [1, 2]); + */ + function mapWhile(source, iteratee, results = [], additionalArgument) { + const arrayLength = source.length; + for (let index = 0; index < arrayLength; index++) { + const item = source[index]; + const returned = iteratee( + item, + index, + results, + source, + arrayLength, + additionalArgument, + ); + if (returned === false) { + break; + } + results[index] = item; + } + return results; + } + + /** + * Subtracts the subtrahend (second argument) from the minuend (first argument). + * + * @function subtract + * @category math + * @type {Function} + * @param {Number} minuend - The minuend. + * @param {Number} subtrahend - The subtrahend. + * @returns {Number} - Returns the difference. + * + * @example + * import { subtract, assert } from '@universalweb/acid'; + * assert(subtract(3, 1), 2); + */ + function subtract(minuend, subtrahend) { + return minuend - subtrahend; + } + + /** + * Sorts an array of numbers in ascending order. Smallest to largest. + * + * @function sortNumberAscending + * @category array + * @param {Array} numberList - Array of numbers. + * @returns {Array} - The array this method was called on. + * + * @example + * import { sortNumberAscending, assert } from '@universalweb/acid'; + * assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]); + */ + function sortNumberAscending(numberList) { + return numberList.sort(subtract); + } + + /** + * Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. + * + * @function partition + * @type {Function} + * @category array + * @param {Array} array - Takes an array to split. + * @param {Function} predicate - Function run on each item in the array. + * @returns {Array} - One array split into two arrays. + * + * @example + * import { partition, assert } from '@universalweb/acid'; + * const result = partition([ + * {user: 'barney', age: 36, active: false}, + * {user: 'fred', age: 40, active: true}, + * {user: 'pebbles', age: 1, active: false} + * ], (item) => { return item.active; }); + * assert(result, [{"user":"fred","age":40,"active":true}], + * [{"user":"barney","age":36,"active":false}, + * {"user":"pebbles","age":1,"active":false}]); + */ + function partition(array, predicate) { + const rejected = []; + return [ + compactMapArray(array, (item, index) => { + if (predicate(item, index)) { + return item; + } + rejected.push(item); + }), + rejected, + ]; + } + + /** + * Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function. + * + * @function subtractReverse + * @category math + * @type {Function} + * @param {Number} subtrahend - The subtrahend. + * @param {Number} minuend - The minuend. + * @returns {Number} - Returns the difference. + * + * @example + * import { subtractReverse, assert } from '@universalweb/acid'; + * assert(subtractReverse(1, 3), 2); + */ + function subtractReverse(subtrahend, minuend) { + return minuend - subtrahend; + } + + /** + * Sorts an array of numbers in descending order. Largest to smallest. + * + * @function sortNumberDescening + * @category array + * @param {Array} numberList - Array of numbers. + * @returns {Array} - The array this method was called on. + * + * @example + * import { sortNumberDescening, assert } from '@universalweb/acid'; + * assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]); + */ + function sortNumberDescening(numberList) { + return numberList.sort(subtractReverse); + } + + /** + * Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation. + * + * @function remove + * @category array + * @param {Array} array - Array to be mutated. + * @param {String|Array} removeThese - Items to remove from the array. + * @returns {Array} - The array this method was called on. + * + * @example + * remove([1, 2, 3, 3, 4, 3, 5], 1); + * // => [2, 3, 3, 4, 3, 5] + * @example + * remove([3, 3, 4, 5], 3, 4); + * // => [5] + */ + function remove(array, removeThese) { + let arrayLength = array.length; + for (let index = 0; index < arrayLength; index++) { + const item = array[index]; + if (removeThese.includes(item)) { + array.splice(index, 1); + index--; + arrayLength--; + } + } + return array; + } + /** + * Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation. + * + * @function removeBy + * @category array + * @param {Array} source - Array to be mutated. + * @param {Function} iteratee - Function used to check object. Return true to remove the value. + * @returns {Array} - The array this method was called on. + * + * @example + * removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);}); + * // => [2, 4] + */ + function removeBy(source, iteratee) { + let arrayLength = source.length; + for (let index = 0; index < arrayLength; index++) { + const item = source[index]; + if (iteratee(item, index)) { + source.splice(index, 1); + index--; + arrayLength--; + } + } + return source; + } + + /** + * Extracts all items in array except the first and last item. + * + * @function rest + * @type {Function} + * @category array + * @param {Array} array - Array to be sliced. + * @returns {Array} - Returns the aggregated array. + * + * @example + * rest([1, 2, 3, 4, 5]); + * // => [2, 3, 4, 5] + */ + function rest(array) { + return array.slice(1, array.length); + } + + /** + * Get the item at the supplied index starting at the end of the array. + * + * @function right + * @type {Function} + * @category array + * @param {Array} source - Array to be sliced. + * @param {Number} amount - Amount from the right. + * @returns {*} - Returns the object at the evaluated position. + * + * @example + * right([1, 2, 3, 4, 5] , 1); + * // => 4 + */ + function right(source, amount) { + return source[source.length - 1 - amount]; + } + + const { floor, random: random$1 } = Math; + /** + * Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption.. + * + * @function randomInt + * @category number + * @type {Function} + * @param {Number} max - The highest possible value for the random number. + * @param {Number} [min = 0] - Establishes lowest possible value for the random number. + * @returns {Number} - Returns random integer between the max and min range. + * + * @example + * import { randomInt, assert } from '@universalweb/acid'; + * assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;}); + */ + function randomInt(max, min = 0) { + return floor(random$1() * (max - min)) + min; + } + + /** + * Checks if two numbers are the same. + * + * @function isNumberEqual + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @param {Number} target - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumberEqual, assert } from '@universalweb/acid'; + * assert(isNumberEqual(0, 0), true); + */ + function isNumberEqual(source, target) { + return source === target; + } + + const arrayFrom = Array.from; + /** + * The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check. + * + * @function toArray + * @category array + * @param {*} arrayLike - Array like object. + * @param {Function} mapFn - Function to map over the array. + * @param {*} thisArg - MapFn's "this". + * @returns {Array|undefined} - New array. + * + * @example + * import { toArray, assert } from '@universalweb/acid'; + * assert(toArray(new Map([[1, 2]])), [[1, 2]]); + */ + function toArray(arrayLike, mapFn, thisArg) { + if (hasValue(arrayLike)) { + return arrayFrom(arrayLike, mapFn, thisArg); + } + } + + /** + * Shuffle an array and return a new array. + * + * @function shuffle + * @category array + * @param {Array} target - Target Array to be shuffled. + * @param {Number} amount - The amount of times to shuffle the array. + * @returns {Array} - An array with the shuffled results. + * + * @example + * import { shuffle, assert } from '@universalweb/acid'; + * assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]); + */ + function shuffle(target, amount = target.length) { + if (target.length <= 1) { + return toArray(target); + } + const shuffleArray = toArray(target); + let count = 0; + let index; + let value; + while (count < amount) { + index = randomInt(shuffleArray.length - 1, 0); + value = shuffleArray[count]; + shuffleArray[count] = shuffleArray[index]; + shuffleArray[index] = value; + count++; + } + return shuffleArray; + } + + /** + * Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned. + * + * @function sample + * @category array + * @param {Array} source - The array to pull sample(s) from. + * @param {Number} amount - The amount of samples to take. + * @returns {Array} - An array of randomly pulled samples. + * + * @example + * sample([1, 2, 3, 4] , 2); + * // => [1, 3] + */ + function sample(source, amount) { + if (!source) { + return false; + } + const arrayLength = source.length; + if (arrayLength === amount || amount > arrayLength) { + return shuffle(source); + } + if (amount === 1) { + return [source[randomInt(arrayLength - 1, 0)]]; + } + const sampleArray = []; + const used = {}; + let count = 0; + let index; + while (count < amount) { + index = randomInt(source.length - 1, 0); + if (!used[index]) { + sampleArray.push(source[index]); + used[index] = true; + count++; + } + } + return sampleArray; + } + + const mathNativeMin = Math.min; + /** + * Plucks the smallest value from an array. + * + * @function smallest + * @category array + * @type {Function} + * @param {Array} array - Array from which smallest number is taken. + * @returns {Number} - The smallest number. + * + * @example + * smallest([1,2,3]); + * // => 1 + */ + function smallest(array) { + return mathNativeMin(...array); + } + + /** + * What index should the number be inserted at to keep a sorted array still sorted. + * + * @function getNumberInsertIndex + * @category array + * @type {Function} + * @param {Array} source - Array to be checked. + * @param {Number} target - Number to check where to be inserted. + * @returns {Number} - The index at which to insert. + * + * @example + * import { getNumberInsertIndex, assert } from '@universalweb/acid'; + * assert(getNumberInsertIndex([30, 39, 50], 40), 1); + */ + function getNumberInsertIndex(source, target) { + let insertIndex = 0; + everyArray(source, (item, index) => { + insertIndex = index; + if (target >= item) { + insertIndex = index + 1; + return true; + } else { + return false; + } + }); + return insertIndex; + } + + /** + * Returns a shallow copy of the array up to an amount. + * + * @function take + * @category array + * @type {Function} + * @param {Array} source - The source array to take from. + * @param {Array} [endIndex = 1] - Zero-based index before which to end extraction. + * @returns {Array} - The aggregated array. + * + * @example + * import { take, assert } from '@universalweb/acid'; + * assert(take([1,2,3], 2), [1, 2]); + */ + function take(source, endIndex = 1) { + return source.slice(0, endIndex); + } + + /** + * Returns a shallow copy of the array up to an amount starting from the right. + * + * @function takeRight + * @category array + * @type {Function} + * @param {Array} source - The source array to take right from. + * @param {Array} [indexRight = 1] - Zero-based index from the right to begin extraction. + * @returns {Array} - The aggregated array. + * + * @example + * import { takeRight, assert } from '@universalweb/acid'; + * assert(takeRight([1,2,3], 2), [2, 3]); + */ + function takeRight(source, indexRight = 1) { + const arrayLength = source.length; + return source.slice(arrayLength - indexRight, arrayLength); + } + + function onlyUnique(value, index, array) { + return array.indexOf(value) === index; + } + function sortUnique(item, index, array) { + return item !== array[index - 1]; + } + /** + * Filters the array down to unique elements. + * + * @function unique + * @category array + * @type {Function} + * @param {Array} source - The array to be filtered. + * @param {Boolean} isSorted - Flag which means the array is already sorted. + * @returns {Array} - The filtered array. + * + * @example + * unique([1, 2, 2, 4]); + * // => [1, 2, 4] + */ + function unique(source, isSorted) { + if (isSorted) { + return source.filter(sortUnique); + } + return source.filter(onlyUnique); + } + + /** + * Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays. + * + * @function union + * @category array + * @type {Function} + * @param {...Array} arrays - The arrays to be evaluated. + * @returns {Array} - The aggregated array. + * + * @example + * union([1,2,4], [1,2,3]); + * // => [1, 2, 4, 3] + */ + function union(...arrays) { + return unique(flattenDeep(arrays)); + } + + /** + * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned. + * If and when the iteratee yields false the loop stops & false is returned. + * + * @function untilFalseArray + * @category array + * @type {Function} + * @param {Array} source - The array to iterate over. + * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. + * @returns {Array} - Returns true if all returns are true or false if one value returns false. + * + * @example + * import { untilFalseArray, assert } from '@universalweb/acid'; + * assert(untilFalseArray([true, true, false], (item) => { + * return item; + * }), false); + * assert(untilFalseArray([true, true, true], (item) => { + * return item; + * }), true); + */ + function untilFalseArray(source, iteratee) { + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if (iteratee(source[index], index) === false) { + return false; + } + } + return true; + } + + /** + * Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned. + * If and when the iteratee yields true the loop stops & false is returned. + * + * @function untilTrueArray + * @category array + * @type {Function} + * @param {Array} source - The array to iterate over. + * @param {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned. + * @returns {Array} - Returns true if all returns are false or false if one value returns true. + * + * @example + * import { untilTrueArray, assert } from '@universalweb/acid'; + * assert(untilTrueArray([true], (item) => { + * return item; + * }), false); + * assert(untilTrueArray([true, true, true], (item) => { + * return item; + * }), true); + */ + function untilTrueArray(source, iteratee) { + const sourceLength = source.length; + for (let index = 0; index < sourceLength; index++) { + if (iteratee(source[index], index) === true) { + return false; + } + } + return true; + } + + /** + * Iterates through the calling object and creates a new object based on the calling object's type with the results, + * (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * Re-checks the length each loop. + * + * @function whileCompactMap + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The originally given array. + * + * @example + * import { whileCompactMap, assert } from '@universalweb/acid'; + * assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => { + * return item; + * }), [1, 2, 3, false]); + */ + function whileCompactMap(source, iteratee, results = [], additionalArgument) { + let index = 0; + while (index < source.length) { + const result = results.push( + iteratee( + source[index], + index, + source, + source.length, + additionalArgument, + ), + ); + index++; + if (hasValue(result)) { + results.push(result); + } + } + return source; + } + + /** + * Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over. + * + * @function whileEachArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The originally given array. + * + * @example + * import { whileEachArray, assert } from '@universalweb/acid'; + * const list = []; + * whileEachArray([1, 2, 3], (item, index) => { + * list[index] = item; + * }); + * assert(list, [1, 2, 3]); + */ + function whileEachArray(source, iteratee, additionalArgument) { + let index = 0; + while (index < source.length) { + iteratee(source[index], index, source, source.length, additionalArgument); + index++; + } + return source; + } + + /** + * Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. + * Re-checks the length each loop. + * + * @function whileMapArray + * @category array + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {Array} results - Array that will be used to assign results. Default value is a new empty array. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The originally given array. + * + * @example + * import { whileMapArray, assert } from '@universalweb/acid'; + * assert(whileMapArray([1, 2, 3], (item, index, source) => { + * if (index === 0) { + * source.push(4); + * } + * return item; + * }), [1, 2, 3, 4]); + */ + function whileMapArray(source, iteratee, results = [], additionalArgument) { + let index = 0; + while (index < source.length) { + results.push( + iteratee( + source[index], + index, + source, + source.length, + additionalArgument, + ), + ); + index++; + } + return source; + } + + /** + * Returns a copy of the array with all instances of the values removed. + * + * @function without + * @type {Function} + * @category array + * @param {Array} target - The target array to be filtered. + * @param {Array} sources - Items to be removed. + * @returns {Array} - The target array filtered. + * + * @example + * import { without, assert } from '@universalweb/acid'; + * assert(without([1, 2, 2, 4], [4]), [1, 2, 2]); + */ + function without(target, sources) { + if (!sources) { + return target; + } + const sourcesSet = construct(Set, sources); + return target.filter((item) => { + return !sourcesSet.has(item); + }); + } + + /** + * Creates an array that is the symmetric difference of the provided arrays. + * + * @function xor + * @category array + * @type {Function} + * @param {...Array} sources - The array(s) to be filtered. + * @returns {Array|undefined} - The filtered array. + * + * @example + * xor([2, 1], [2, 3, 5], [6]); + * // => [1, 3, 5, 6] + */ + function xor(...sources) { + const xorMap = construct(Map); + const xored = []; + const sourcesLength = sources.length; + if (sourcesLength === 2) { + return difference(sources[0], sources[1]); + } + eachArray(sources, (currentArray, parentIndex) => { + eachArray(currentArray, (child, childIndex) => { + let childRoot = xorMap.get(child); + if (!childRoot) { + childRoot = { + count: 1, + parentIndex, + child, + }; + xorMap.set(child, childRoot); + } else if (childRoot.parentIndex === parentIndex) { + return; + } else { + childRoot.count++; + } + }); + }); + forEach(xorMap, (item) => { + if (item.count === 1) { + xored.push(item.child); + } + }); + return xored; + } + + /** + * Merges together the values of each of the arrays with the values at the corresponding position. + * + * @function zip + * @type {Function} + * @category array + * @param {Array} arrays - The arrays to process. + * @returns {Array} - Returns the new array of regrouped elements. + * + * @example + * zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + function zip(...arrays) { + return arrays[0].map((item, index) => { + return arrays.map((array) => { + return array[index]; + }); + }); + } + /** + * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration. + * + * @function unZip + * @type {Function} + * @category array + * @param {Array} source - The array of grouped elements to process. + * @returns {Array} - Returns the new array of regrouped elements. + * + * @example + * unZip([['a', 1, true], ['b', 2, false]]); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unZip(source) { + return source[0].map((item, index) => { + return source.map((arraySet) => { + return arraySet[index]; + }); + }); + } + + /** + * Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer. + * + * @function ensureBuffer + * @category buffer + * @type {Function} + * @param {*} source - Object to be checked. + * @returns {Array} - Returns an array. + * + * @example + * import { isBuffer, ensureBuffer, assert } from '@universalweb/acid'; + * assert(isBuffer(ensureBuffer('test')), true); + */ + function ensureBuffer(source) { + return ( + (isBuffer(source) && source) || + (hasValue(source) && Buffer.from(source)) || + Buffer.alloc(0) + ); + } + + /** + * Clears the values out of a buffer. + * + * @function clearBuffer + * @category buffer + * @type {Function} + * @param {Array} source - Takes an array to be emptied. + * @returns {Array} - The originally given array. + * + * @example + * import { clearBuffer, assert } from '@universalweb/acid'; + * assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([])); + */ + function clearBuffer(source) { + source.fill(0); + return source; + } + + /** + * Checks if an object or objects are a plain object. + * + * @function isFunction + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFunction } from '@universalweb/acid'; + * isFunction(() => {}); + * // => true + */ + const isFunction = (source) => { + return hasValue(source) ? source instanceof Function : false; + }; + + /** + * Checks if the value is a number. + * + * @function isNumber + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumber, assert } from '@universalweb/acid'; + * assert(isNumber(1), true); + */ + const isNumberCall = isConstructorNameFactory("Number"); + const isNumber = isTypeFactory(isNumberCall); + /** + * Checks if the value is not a number. + * + * @function isNotNumber + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNotNumber, assert } from '@universalweb/acid'; + * assert(isNotNumber(1), false); + */ + function isNotNumber(source) { + return !isNumber(source); + } + + /** + * Checks if the value is a string. + * + * @function isString + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isString, assert } from '@universalweb/acid'; + * assert(isString('hello'), true); + * assert(isString(1), false); + */ + const isString = isConstructorFactory(String); + /** + * Checks if the value is not a string. + * + * @function isNotString + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNotString, assert } from '@universalweb/acid'; + * assert(isNotString(1), true); + * assert(isNotString('hello'), false); + */ + function isNotString(source) { + return !isString(source); + } + + const objectAssign = Object.assign; + function assignToObject(target, source) { + if (isPlainObject(source)) { + objectAssign(target, source); + } else if (isFunction(source)) { + const key = source.name; + if (key) { + target[key] = source; + } else { + objectAssign(target, source); + } + } else if (isString(source) || isNumber(source)) { + target[source] = source; + } + return target; + } + /** + * Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module. + * + * @function assign + * @category object + * @param {Object} target - The target object. + * @param {...Object} sources - The source object(s). + * @returns {Object} - Returns the target object. + * + * @example + * import { assign, assert } from '@universalweb/acid'; + * assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5}); + */ + function assign(target, ...sources) { + const sourceLength = sources.length; + for (let index = 0; index < sourceLength; index++) { + assignToObject(target, sources[index]); + } + return target; + } + + function assignToClass(target, source) { + if (isPlainObject(source)) { + objectAssign(target.prototype, source); + } else if (isFunction(source)) { + const key = source.name; + if (key) { + target.prototype[key] = source; + } + } else if (isConstructor(source)) { + const key = source.constructor?.name; + if (key) { + target.prototype[key] = source; + } + } else if (isString(source) || isNumber(source)) { + target.prototype[source] = source; + } + return target; + } + /** + * The function adds a new method to a class. + * @param {Class} target - The target parameter refers to the Class or constructor function to which you want + * to add a new method. + * @param {Function|Object|String|Number} sources - What you want to add to the class. + * @returns {Class} - Returns the Class provided in the target parameter. + * + * @example + * import { extendClass, assert } from '@universalweb/acid'; + * class Test {} + * function a(){return 1;} + * extendClass(Test, a) + * assert((new Test()).a(), 1); + */ + function extendClass(target, ...sources) { + const sourceLength = sources.length; + for (let index = 0; index < sourceLength; index++) { + assignToClass(target, sources[index]); + } + return target; + } + + /** + * Creates an object composed of keys generated from the results of running each element of collection through iteratee. + * + * @function countBy + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {Function} iteratee - The iteratee to transform keys. + * @returns {Object} - Returns the composed aggregate object. + * + * @example + * import { countBy, assert } from '@universalweb/acid'; + * assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2}); + */ + function countBy(collection, iteratee) { + const object = {}; + let result; + eachArray(collection, (item) => { + result = iteratee(item); + if (!object[result]) { + object[result] = 0; + } + object[result]++; + }); + return object; + } + + /** + * Count the amount of times a key is present in a collection. + * + * @function countKey + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {Function} propertyName - The name of the key. + * @returns {Number} - The count. + * + * @example + * import { countKey, assert } from '@universalweb/acid'; + * assert(countKey([{a:1}, {a:3}], 'a'), 2); + */ + function countKey(collection, propertyName) { + let count = 0; + eachArray(collection, (item) => { + if (item[propertyName]) { + count++; + } + }); + return count; + } + + /** + * Count the amount of times a key is not present in a collection. + * + * @function countWithoutKey + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {String} propertyName - The name of the key. + * @returns {Number} - The count. + * + * @example + * import { countWithoutKey, assert } from '@universalweb/acid'; + * assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2); + */ + function countWithoutKey(collection, propertyName) { + let count = 0; + eachArray(collection, (item) => { + if (!item[propertyName]) { + count++; + } + }); + return count; + } + + function findIndexCache(element, index, array, indexMatch, propertyName) { + if (element[propertyName] === indexMatch) { + return true; + } + } + + /** + * Finds an object in a collection by the given id and property name and returns the array index of the object. + * + * @function findIndex + * @type {Function} + * @category collection + * @param {Array} collection - Collection to be checked for an item. + * @param {Number|string} id - The value to look for. + * @param {String} [propertyName = 'id'] - The name of the property to compare. + * @returns {Number} - The index of the object. + * + * @example + * findIndex([{id: 1}, {id: 2}], 1); + * // => 0 + */ + function findIndex(collection, id, propertyName = "id") { + const result = collection.findIndex((element, index) => { + return findIndexCache(element, index, collection, id, propertyName); + }); + return result === -1 ? false : result; + } + + /** + * Finds an object in a collection by the given id and property name. + * + * @function findItem + * @type {Function} + * @category collection + * @param {Array} collection - Collection to be checked for an item. + * @param {Number|string} id - The value to look for. + * @param {String} [propertyName = 'id'] - The name of the property to compare. + * @returns {Object} - The found object. + * + * @example + * findItem([{id: 1}, {id: 2}], 1); + * // => {id: 1} + */ + function findItem(collection, id, propertyName = "id") { + const result = collection.find((element, index) => { + return findIndexCache(element, index, collection, id, propertyName); + }); + return result === -1 ? false : result; + } + + function sortCollectionDescendingFilter( + previous, + next, + propertyName, + ifMatch, + ) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + if (!nextKey) { + return -1; + } else if (!previousKey) { + return 1; + } else if (previousKey < nextKey) { + return 1; + } else if (previousKey > nextKey) { + return -1; + } + return 0; + } + /** + * Sorts an array in place using a key in descending order. + * + * @function sortCollectionDescending + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array and or a clone of the array sorted. + * + * @example + * import { sortCollectionDescending, assert } from '@universalweb/acid'; + * const result = [{id: 1}, {id: 0}]; + * const collect = [{id: 0}, {id: 1}]; + * const prop = 'id'; + * assert(sortCollectionDescending(collect, prop), result); + */ + function sortCollectionDescending(collection, propertyName = "id", ifMatch) { + return collection.sort((previous, next) => { + return sortCollectionDescendingFilter( + previous, + next, + propertyName, + ifMatch, + ); + }); + } + + /** + * Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array. + * + * @function getLowest + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @returns {Object} - The newest object in the collection. + * + * @example + * import { getLowest, assert } from '@universalweb/acid'; + * assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1}); + */ + function getLowest(collection, propertyName) { + return sortCollectionDescending(collection, propertyName, false)[0]; + } + + function sortCollectionAscendingFilter( + previous, + next, + propertyName, + ifMatch, + ) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + if (!nextKey) { + return 1; + } else if (!previousKey) { + return -1; + } else if (previousKey < nextKey) { + return -1; + } else if (previousKey > nextKey) { + return 1; + } + return 0; + } + /** + * Sorts an array in place using a key in ascending order. + * + * @function sortCollectionAscending + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array and or a clone of the array sorted. + * + * @example + * import { sortCollectionAscending, assert } from '@universalweb/acid'; + * const result = [{id: 0}, {id: 1}]; + * const collect = [{id: 1}, {id: 0}]; + * const prop = 'id'; + * assert(sortCollectionAscending(collect, prop), result); + */ + function sortCollectionAscending(collection, propertyName = "id", ifMatch) { + return collection.sort((previous, next) => { + return sortCollectionAscendingFilter( + previous, + next, + propertyName, + ifMatch, + ); + }); + } + + /** + * Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array. + * + * @function getHighest + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - The property name to sort by based on it's value. + * @returns {Object} - The newest object in the collection. + * + * @example + * import { getHighest, assert } from '@universalweb/acid'; + * assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0}); + */ + function getHighest(collection, propertyName = "id") { + return sortCollectionAscending(collection, propertyName)[0]; + } + + /** + * Creates an object composed of keys generated from the results of running each element of collection thru iteratee. + * The order of grouped values is determined by the order they occur in collection. + * The corresponding value of each key is an array of elements responsible for generating the key. + * + * @function groupBy + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {Function} iteratee - The iteratee to transform keys. + * @returns {Object} - Returns the composed aggregate object. + * + * @example + * groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + */ + function groupBy(collection, iteratee) { + const sortedObject = {}; + eachArray(collection, (item) => { + const results = iteratee(item); + if (!sortedObject[results]) { + sortedObject[results] = []; + } + sortedObject[results].push(item); + }); + return sortedObject; + } + + /** + * Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique. + * + * @function indexBy + * @category collection + * @type {Function} + * @param {Array} collection - Array of objects. + * @param {String} propertyName - The property name to index by. + * @returns {Object} - Returns the composed aggregate object. + * + * @example + * import { indexBy, assert } from '@universalweb/acid'; + * const result = { "0": {name: 'test', id: 0}, "1": {name: 'test2', id: 1}}; + * const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id'); + * assert(indexed, result); + */ + function indexBy(collection, propertyName = "id") { + const sortedObject = {}; + eachArray(collection, (item) => { + sortedObject[item[propertyName]] = item; + }); + return sortedObject; + } + + /** + * Invokes a function on the provided property name in each object in the collection. + * + * @function invokeCollection + * @category collection + * @type {Function} + * @param {Array} collection - Collection from which method will be taken. + * @param {String} property - Value used to pluck method from object. + * @param {*} value - Value to be passed to callable property. + * @returns {Array} - Returns the results of the invoked method. + * + * @example + * import { invokeCollection, assert } from '@universalweb/acid'; + * const results = invokeCollection([{ + * test(item, index) { return [item, index];} + * }], 'test', ['EXAMPLE']); + * assert(results, [['EXAMPLE', 0]]); + */ + function invokeCollection(collection, property, value, thisBind) { + if (thisBind) { + return mapArray(collection, (item, index) => { + return item[property].call(thisBind, value); + }); + } + return mapArray(collection, (item, index) => { + return item[property](value); + }); + } + + /** + * Asynchronously awaits & invokes a function on the provided property name in each object in the collection. + * + * @function invokeCollectionAsync + * @category collection + * @type {Function} + * @async + * @param {Array} collection - Collection from which method will be taken. + * @param {String} property - Value used to pluck method from object. + * @param {*} value - Value to be passed to callable property. + * @returns {Array} - Returns the results of the invoked method. + * + * @example + * import { invokeCollectionAsync, assert } from '@universalweb/acid'; + * const results = await invokeCollectionAsync([{ + * async test(item, index) { return [item, index];} + * }], 'test', ['EXAMPLE']); + * assert(results, [['EXAMPLE', 0]]); + */ + function invokeCollectionAsync(collection, property, value, thisBind) { + if (thisBind) { + return mapAsyncArray(collection, (item) => { + return item[property].call(thisBind, value); + }); + } + return mapAsyncArray(collection, async (item) => { + return item[property](value); + }); + } + + /** + * Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array. + * + * @function pluckObject + * @category object + * @type {Function} + * @param {Object} source - Array used to determine what sources to be plucked. + * @param {String|Array} targets - Property name. + * @returns {Array|undefined} - An array of plucked sources. + * + * @example + * import { pluckObject, assert } from '@universalweb/acid'; + * assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]); + */ + function pluckObject(source, targets) { + if (!source) { + return; + } else if (isString(targets)) { + return source[targets]; + } + return mapArray(targets, (item) => { + return source[item]; + }); + } + + /** + * Returns an array of the plucked values from the collection. + * + * @function pluck + * @category collection + * @type {Function} + * @param {Array} collection - Array used to determine what value to be plucked. + * @param {(String|Number|Array.)} targets - Property name. + * @returns {Array} - An array of plucked values. + * + * @example + * import { pluck, assert } from '@universalweb/acid'; + * assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]); + * assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]); + */ + function pluck(collection, targets) { + return mapArray(collection, (item) => { + return pluckObject(item, targets); + }); + } + + function sortObjectsAlphabetically(previous, next, propertyName, ifMatch) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + return previousKey.localeCompare(nextKey); + } + /** + * Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array. + * + * @function sortCollectionAlphabetically + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - Name of property to compare. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array. + * + * @example + * import { sortCollectionAlphabetically, assert } from '@universalweb/acid'; + * const result = [{"letter":"a"},{"letter":"c", g: 0},{"letter":"c", g: 2}, {letter:'f'}]; + * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c", g: 2}, {letter:'c', g: 0}]; + * const prop = 'letter'; + * function ifMatchSort(c, n) { + * if (c.g < n.g) { + * return -1; + * } + * if (c.g > n.g) { + * return 1; + * } + * } + * assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result); + */ + function sortCollectionAlphabetically( + collection, + propertyName = "id", + ifMatch, + ) { + return collection.sort((previous, next) => { + return sortObjectsAlphabetically(previous, next, propertyName, ifMatch); + }); + } + + function sortObjectsAlphabeticallyReverse( + previous, + next, + propertyName, + ifMatch, + ) { + const previousKey = previous[propertyName]; + const nextKey = next[propertyName]; + if (previousKey === nextKey && ifMatch) { + return ifMatch(previous, next, propertyName); + } + return nextKey.localeCompare(previousKey); + } + /** + * Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array. + * + * @function sortCollectionAlphabeticallyReverse + * @category collection + * @type {Function} + * @param {Array} collection - Collection to be sorted. + * @param {String} propertyName - Name of property to compare. + * @param {Function} ifMatch - A function which returns a number for the sort function if two object properties match. + * @returns {Array} - The sorted array. + * + * @example + * import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid'; + * const result = [{letter:'f'},{"letter":"c"}, {"letter":"a"}]; + * const collect = [{letter:'a'}, {letter:'f'}, {"letter":"c"}]; + * const prop = 'letter'; + * assert(sortCollectionAlphabeticallyReverse(collect, prop), result); + */ + function sortCollectionAlphabeticallyReverse( + collection, + propertyName = "id", + ifMatch, + ) { + return collection.sort((previous, next) => { + return sortObjectsAlphabeticallyReverse( + previous, + next, + propertyName, + ifMatch, + ); + }); + } + + /** + * Return the file extension. + * + * @function getFileExtension + * @category file + * @param {*} source - Object to be checked. + * @returns {String|undefined} - Returns the extension. + * + * @example + * import { getFileExtension, assert } from '@universalweb/acid'; + * assert(getFileExtension('test.js'),'js'); + */ + function getFileExtension(source) { + if (source) { + return source.substring(source.lastIndexOf(".") + 1); + } + } + + /** + * Return the file extension. + * + * @function getFilename + * @category file + * @param {*} source - Object to be checked. + * @returns {String|undefined} - Returns the extension. + * + * @example + * import { getFilename, assert } from '@universalweb/acid'; + * assert(getFilename('./universalweb/test.js'),'test.js'); + */ + function getFilename(source) { + if (source) { + return source.substring(source.lastIndexOf("/") + 1); + } + } + + function regexTestFactory(regexType) { + return (item) => { + return hasValue(item) ? regexType.test(item) : false; + }; + } + + /** + * Checks if the string has a .css extension. + * + * @function isFileCSS + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileCSS, assert } from '@universalweb/acid'; + * assert(isFileCSS('test.css'), true); + */ + const isFileCSS = regexTestFactory(/\.css$/); + + /** + * Checks if the string has a .html extension. + * + * @function isFileHTML + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileHTML, assert } from '@universalweb/acid'; + * assert(isFileHTML('test.html'), true); + */ + const isFileHTML = regexTestFactory(/\.html$/); + + /** + * Checks if the string has a .js extension. + * + * @function isFileJS + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileJS, assert } from '@universalweb/acid'; + * assert(isFileJS('test.js'), true); + */ + const isFileJS = regexTestFactory(/\.js$/); + + /** + * Checks if the string has a .json extension. + * + * @function isFileJSON + * @category file + * @param {String} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFileJSON, assert } from '@universalweb/acid'; + * assert(isFileJSON('test.json'), true); + */ + const isFileJSON = regexTestFactory(/\.json$/); + + /** + * Creates a function that executes callable, only after being called n times. + * + * @function after + * @category function + * @type {Function} + * @param {Number} amount - The number of calls until method is invoked. + * @param {Function} callable - The function to be called. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * import { after, assert } from '@universalweb/acid'; + * const onlyAfter = after(1, (item) => { return item;}); + * assert(onlyAfter(1), undefined); + * assert(onlyAfter(2), 2); + */ + function after(amount, callable) { + let point = amount; + let value; + const onlyAfter = (...args) => { + if (point !== null) { + point--; + } + if (point <= 0) { + value = callable(...args); + point = null; + } + return value; + }; + return onlyAfter; + } + + /** + * Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments. + * + * @function ary + * @category function + * @type {Function} + * @param {Function} callable - The function to cap arguments for. + * @param {Number} amount - The arity cap. + * @returns {Object} - Returns the new capped function. + * + * @example + * import { ary, assert } from '@universalweb/acid'; + * assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]); + */ + function ary(callable, amount) { + return (...args) => { + return callable(...args.splice(0, amount)); + }; + } + + /** + * Creates a function that executes callable, only before n times. + * + * @function before + * @category function + * @type {Function} + * @param {Number} amount - The number of calls before n. + * @param {Function} callable - The function to be called. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * import { before, assert } from '@universalweb/acid'; + * const onlyBefore = before(3, () => { return 1;}); + * assert(onlyBefore(1), 1); + */ + function before(amount, callable) { + let point = amount; + let value; + const onlyBefore = (...args) => { + if (point !== null) { + point--; + } + if (point >= 1) { + value = callable(...args); + } else { + point = null; + } + return value; + }; + return onlyBefore; + } + + /** + * Asynchronously iterates through the given object. + * + * @function eachAsyncObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg. + * @param {*} thisCall - Iteratee called with thisCall as this. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Object|Function|undefined} - Returns source. + * + * @example + * import { eachAsyncObject, assert } from '@universalweb/acid'; + * const tempList = []; + * await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => { + * tempList[key] = item; + * }); + * assert(tempList, {a: 1, b: 2, c: 3}); + */ + const eachAsyncObject = async (source, iteratee, thisCall, additionalArg) => { + if (!source) { + return; + } + const objectKeys = keys(source); + if (hasValue(thisCall)) { + await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { + return iteratee.call( + thisCall, + source[key], + key, + source, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } else { + await eachAsyncArray(objectKeys, (key, index, array, propertyCount) => { + return iteratee( + source[key], + key, + source, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } + return source; + }; + + /** + * Iterates through the given object. + * + * @function eachObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Object|Function|undefined} - Returns the calling object. + * + * @example + * import { eachObject, assert } from '@universalweb/acid'; + * assert(eachObject({a: 1, b: 2, c: 3}, (item) => { + * console.log(item); + * }), {a: 1, b: 2, c: 3}); + */ + function eachObject(source, iteratee, thisCall, additionalArg) { + if (!source) { + return; + } + const objectKeys = keys(source); + if (hasValue(thisCall)) { + eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { + iteratee.call( + thisCall, + source[key], + key, + source, + propertyCount, + objectKeysArray, + additionalArg, + ); + }); + } else { + eachArray(objectKeys, (key, index, objectKeysArray, propertyCount) => { + iteratee( + source[key], + key, + source, + propertyCount, + objectKeysArray, + additionalArg, + ); + }); + } + return source; + } + + async function forEachAsync(source, callback) { + const values = []; + const properties = []; + let valuesLength = 0; + source.forEach((item, key) => { + values[valuesLength] = item; + properties[valuesLength] = item; + valuesLength++; + }); + for (let index = 0; index < valuesLength; index++) { + await callback(values[index], properties[index]); + } + return source; + } + + /** + * Checks if an object(s) is a Set. + * + * @function isSet + * @category type + * @param {...*} sources - Objects to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isSet, assert } from '@universalweb/acid'; + * assert(isSet(new Set()), true); + */ + const isSetCall = isConstructorNameFactory("Set"); + const isSet = isTypeFactory(isSetCall); + + function forOf(source, iteratee) { + if (isSet(source)) { + for (const value of source) { + iteratee(value, source); + } + return source; + } + for (const [key, value] of source) { + iteratee(value, key, source); + } + return source; + } + + /** + * Checks if an object or objects are a Int16Array. + * + * @function isGenerator + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isGenerator } from '@universalweb/acid'; + * isGenerator(function* (){}); + * // => true + */ + const isGeneratorCall = isConstructorNameFactory("GeneratorFunction"); + const isGenerator = isTypeFactory(isGeneratorCall); + + async function forOfAsync(source, iteratee, generatorArgs) { + if (isSet(source)) { + for (const value of source) { + await iteratee(value, source); + } + return source; + } + if (isGenerator(source)) { + for await (const item of source(...generatorArgs)) { + await iteratee(item, source); + } + } + for (const [key, value] of source) { + await iteratee(value, key, source); + } + return source; + } + + /** + * Checks if an object is an async function. + * + * @function isAsync + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isAsync, assert } from '@universalweb/acid'; + * assert(isAsync(async() => {}), true); + */ + const isAsyncCall = isConstructorNameFactory("AsyncFunction"); + const isAsync = isTypeFactory(isAsyncCall); + + function generateLoop( + arrayLoop, + arrayLoopAsync, + objectLoop, + objectLoopAsync, + forOfLoop, + forOfLoopAsync, + ) { + return (source, iteratee, argument1, argument2, argument3) => { + let returned; + const isIterateeAsync = isAsync(iteratee); + if (!hasValue(source) || !iteratee) { + return; + } else if (isArray(source)) { + returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; + } else if (isPlainObject(source) || isFunction(source)) { + returned = isIterateeAsync ? objectLoopAsync : objectLoop; + } else if (forOfLoop) { + returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; + } else if (isGenerator(source)) { + returned = forOfLoopAsync; + } else { + returned = isIterateeAsync ? objectLoopAsync : objectLoop; + } + return returned(source, iteratee, argument1, argument2, argument3); + }; + } + + /** + * Iterates through the given object. + * + * @function each + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array | object | Function} - The originally given object. + * + * @example + * import { each, assert } from '@universalweb/acid'; + * const list = {}; + * each({a: 1, b: 2, c: 3}, (item, key) => { + * list[key] = item; + * }); + * assert(list, {a: 1, b: 2, c: 3}); + */ + const each = generateLoop( + eachArray, + eachAsyncArray, + eachObject, + eachAsyncObject, + forOf, + forOfAsync, + ); + + class Chain { + constructor(methods) { + this.addChainMethod(methods); + } + addChainMethod(methods) { + const thisChain = this; + each(methods, (method, methodName) => { + thisChain[methodName] = function (...args) { + this.value = method.call(thisChain, thisChain.value, ...args); + return thisChain; + }; + }); + } + setValue(value) { + this.value = value; + return this; + } + done() { + const value = this.value; + this.value = null; + return value; + } + value = null; + } + /** + * Creates a chainable set of functions. + * + * @function chain + * @category function + * @type {Function} + * @param {Array|Object} config - The object to take methods from. + * @returns {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining. + * + * @example + * import { chain, assert } from '@universalweb/acid'; + * const chained = chain({ + * a(value, c) { + * return value + c; + * } + * }).setValue(2).a(1).done(); + * assert(chained, 3); + */ + function chain(config) { + return construct(Chain, [config]); + } + + /** + * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient. + * + * @function curry + * @category function + * @type {Function} + * @param {Function} callable - The function to curry. + * @param {Number} arity - The arity of method. + * @returns {*} - Returns the new curried function. + * + * @example + * import { curry, assert } from '@universalweb/acid'; + * const result = curry((a, b, c) => { + * return [a, b, c]; + * })(1)(2)(3); + * assert(result, [1, 2, 3]); + */ + function curry(callable, arity = callable.length) { + const curries = []; + const curried = (...curryArgs) => { + curries.push(...curryArgs); + if (curries.length === arity) { + const result = callable(...curries); + clearArray(curries); + return result; + } + return curried; + }; + return curried; + } + + /** + * Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order. + * + * @function curryRight + * @type {Function} + * @param {Function} callable - The function to curry. + * @param {Number} arity - The arity of method. + * @returns {*} - Returns the new curried function. + * + * @example + * import { curryRight, assert } from '@universalweb/acid'; + * const result = curryRight((a, b, c) => { + * return [a, b, c]; + * })(1)(2)(3); + * assert(result, [3, 2, 1]); + */ + function curryRight(callable, arity = callable.length) { + const curries = []; + const curried = (...curryArgs) => { + curries.unshift(...curryArgs); + if (curries.length === arity) { + const result = callable(...curries); + clearArray(curries); + return result; + } + return curried; + }; + return curried; + } + + /** + * This method returns undefined. + * + * @function noop + * @category function + * @type {Function} + * @returns {undefined} - Returns undefined. + * + * @example + * import { noop, assert } from '@universalweb/acid'; + * assert(noop(), undefined); + */ + function noop() { + return; + } + + /** + * Iterates based on the amount given invoking the iteratee with the current index as an argument. + * + * @function times + * @category utility + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @returns {undefined} - Nothing. + * + * @example + * import { times } from '@universalweb/acid'; + * times(3, (item) => { + * console.log(item); + * }); + * // 0 + * // 1 + * // 2 + * // => undefined + */ + function times(amount, iteratee) { + for (let index = 0; index < amount; index++) { + iteratee(index); + } + } + /** + * Iterates based on the amount given and maps the results returned by the iteratee each time to an array. + * + * @function timesMap + * @category utility + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @param {Array} [results = []] - Array that will have iteratee return pushed to. + * @returns {Array} - An array with iteratee's returned values. + * + * @example + * import { timesMap } from '@universalweb/acid'; + * timesMap(3, (item) => { + * return item; + * }); + * // => [0, 1, 2] + */ + function timesMap(amount, iteratee, results = []) { + for (let index = 0; index < amount; index++) { + results[index] = iteratee(amount); + } + return results; + } + + class Timers { + list = construct(Map); + construct() {} + /** + * Remove a timer that was created using the timer function. + * + * @param {Number} id - The id of the timer to remove. + * @returns {undefined} - Returns nothing. + * + * @example + * import { timer, assert } from '@universalweb/acid'; + * timer(() => {}, 100); + * // => 0 + */ + remove(id) { + clearTimeout(id); + this.list.delete(id); + } + has(id) { + return this.list.has(id); + } + get(id) { + return this.list.get(id); + } + /** + * Create a timer and add it to the list of timers. + * + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setTimeoutId ID. + * + * @example + * import { timers, assert } from '@universalweb/acid'; + * timers.set(() => {}, 100); + * // => 0 + */ + set(callable, time) { + const currentThis = this; + const id = setTimeout(() => { + callable(); + currentThis.remove(id); + }, time); + this.list.set(id, true); + return id; + } + /** + * Clear all active timers. + * + * @returns {undefined} - Returns undefined. + * + * @example + * import { timers, assert } from '@universalweb/acid'; + * timers.clear(); + * // => undefined + */ + clear() { + const currentThis = this; + currentThis.list.forEach((id) => { + currentThis.remove(id); + }); + } + } + const timers = construct(Timers); + /** + * Timer wrapper. + * + * @function timer + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setTimeoutId ID. + * + * @example + * import { timer, assert } from '@universalweb/acid'; + * timer(() => {}, 100); + * // => 0 + */ + function timer(callable, time) { + return timers.set(callable, time); + } + /** + * Clear all active timers. + * + * @function clearTimers + * @category function + * @returns {undefined} - Returns undefined. + * + * @example + * import { clearTimers, assert } from '@universalweb/acid'; + * clearTimers(); + * // => undefined + */ + function clearTimers() { + const id = setTimeout(noop, 0); + times(id, (index) => { + timers.remove(index); + }); + } + + const applyNative = Reflect.apply; + /** + * Calls a target function with an optional "this" and optional arguments as specified. Same as Reflect.apply but with a function check. + * + * @function apply + * @category function + * @param {Function} target - The target function to call. + * @param {*} thisArgument - Array like object. + * @param {Array} argumentsList - An array-like object specifying the arguments with which target should be called. + * @returns {*} - The result of calling the given target function with the specified this value and arguments. + * + * @example + * import { apply, assert } from '@universalweb/acid'; + * assert(apply(function (a) {return a;}, undefined, [2]), 2); + */ + function apply(target, thisArgument, argumentsList) { + if (isFunction(target)) { + return applyNative(target, thisArgument, argumentsList); + } + } + + /** + * Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer. + * + * @function debounce + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Function} - The debounced function. + * + * @example + * import { debounce, promise, assert } from '@universalweb/acid'; + * const promised = promise((a) => { + * const debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0); + * }); + * assert(await promised(), 'debounced'); + */ + function debounce(callable, time) { + function debounced(...args) { + if (debounced.id !== false) { + timers.remove(debounced.id); + } + debounced.id = timer(() => { + debounced.callable(...args); + debounced.id = false; + }, time); + } + debounced.id = false; + debounced.callable = callable.bind(debounced); + debounced.clear = () => { + if (debounced.id !== false) { + timers.remove(debounced.id); + debounced.id = false; + } + }; + return debounced; + } + + /** + * Checks if the given method is a function. If it is then it invokes it with the given arguments. + * + * @function ifInvoke + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked if possible. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args - Arguments to pass to the function. + * @returns {*} - Returns the method invoked or undefined. + * + * @example + * import { ifInvoke, assert } from '@universalweb/acid'; + * assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]); + */ + function ifInvoke(callable, thisBind, ...args) { + if (isFunction(callable)) { + if (thisBind) { + return callable.call(thisBind, ...args); + } + return callable(...args); + } + } + + /** + * Creates a function that negates the result of the predicate callable. + * + * @function negate + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @returns {*} - Returns the given methods result. + * + * @example + * negate(() => { return false;})(); + * // => true + */ + function negate(callable) { + return (...args) => { + return !callable(...args); + }; + } + + /** + * Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned. + * + * @function nthArg + * @category function + * @type {Function} + * @param {Number} [index = 0] - The index of the argument to return. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * nthArg(1)('a', 'b'); + * // => 'b' + */ + function nthArg(index = 0) { + return (...args) => { + return args[index]; + }; + } + + /** + * Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function. + * + * @function once + * @category function + * @type {Function} + * @param {Function} callable - The function to be called. + * @returns {Function} - Returns the new pass-thru function. + * + * @example + * const onceOnly = once((item) => { return item;}); + * onceOnly(5); + * onceOnly(3); + * // => 5 + */ + const once = (callable) => { + let value; + const onlyOnce = (...args) => { + if (!hasValue(value)) { + value = callable(...args); + } + return value; + }; + return onlyOnce; + }; + + /** + * Returns the constructor of an object. + * + * @function getType + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { getType, assert } from '@universalweb/acid'; + * assert(getType(1), true); + */ + function getType(source) { + return source?.constructor; + } + + /** + * Returns a new empty object of the same type. + * + * @function cloneType + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { cloneType, assert } from '@universalweb/acid'; + * assert(cloneType([1]), []); + */ + function cloneType(source, args = []) { + const sourceType = getType(source); + if (sourceType === Function) { + if (sourceType.name === "function") { + return function () {}; + } + } + return construct(sourceType, args); + } + + /** + * Iterates through (using for of) the calling object and creates an object with the results of the iteratee on every element in the calling object. + * + * @function forOfCompactMap + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * forOfCompactMap({a: undefined, b: 2, c: 3}, (item) => { + * return item; + * }); + * // => {b: 2, c: 3} + */ + function forOfMap(source, iteratee = returnValue, resultsObject) { + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = iteratee(value, results, source); + methodPushBound(result); + } + return results; + } + const methodSet = isFunction(results.set); + for (const [key, value] of source) { + const result = iteratee(value, key, results, source); + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + return results; + } + + /** + * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function forOfCompactMapAsync + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * import { forOfCompactMapAsync, assert } from '@universalweb/acid'; + * assert(forOfCompactMapAsync({a: undefined, b: 2, c: 3}, (item) => { + * return item; + * }), {b: 2, c: 3}); + */ + async function forOfMapAsync( + source, + iteratee = returnValue, + resultsObject, + generatorArgs, + ) { + if (isGenerator(source)) { + const resultsGenerator = []; + for await (const item of source(...generatorArgs)) { + resultsGenerator.push(await iteratee(item, resultsGenerator, source)); + } + return resultsGenerator; + } + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = await iteratee(value, results, source); + methodPushBound(result); + } + return results; + } + const methodSet = isFunction(results.set); + for await (const [key, value] of source) { + const result = await iteratee(value, key, results, source); + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + return results; + } + + /** + * Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. + * + * @function mapObjectAsync + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function|undefined} - An object of the same calling object's type. + * + * @example + * import { mapAsyncObject, assert } from '@universalweb/acid'; + * assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, b: undefined, c: 3}); + */ + async function mapAsyncObject(source, iteratee, results = {}) { + if (!source) { + return; + } + await eachAsyncObject( + source, + async (item, key, thisObject, propertyCount, objectKeys) => { + results[key] = await iteratee( + item, + key, + results, + thisObject, + propertyCount, + objectKeys, + ); + }, + ); + return results; + } + + /** + * Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object. + * + * @function mapObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Object|Function|undefined} - An object of the same calling object's type. + * + * @example + * import { mapObject, assert } from '@universalweb/acid'; + * assert(mapObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, b: undefined, c: 3}); + */ + function mapObject(source, iteratee, results = {}, thisCall, additionalArg) { + if (!source) { + return; + } + if (hasValue(thisCall)) { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + results[key] = iteratee.call( + thisCall, + item, + key, + results, + original, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } else { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + results[key] = iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + additionalArg, + ); + }); + } + return results; + } + + /** + * Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object. + * + * @function map + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {Object | Function} [results = {}] - Object that will be used to assign results. + * @param {*} thisCall - An object to be given each time to the iteratee. + * @param {*} additionalArg - An object to be given each time to the iteratee. + * @returns {Array | object | Function} - A new object of the same calling object's type. + * + * @example + * import { map, assert } from '@universalweb/acid'; + * assert(map({a: 1, b: 2, c: 3}, (item) => { + * return item * 2; + * }), {a: 2, b: 4, c: 6}); + */ + const map = generateLoop( + mapArray, + mapAsyncArray, + mapObject, + mapAsyncObject, + forOfMap, + forOfMapAsync, + ); + + /** + * Creates a function that invokes iteratee with the arguments it receives and returns their results. + * + * @function over + * @category function + * @type {Function} + * @param {(Array.|Object.)} iteratees - The list of functions to loop through. + * @returns {Function} - Returns the new over wrapped function. + * + * @example + * import { overEvery, assert } from '@universalweb/acid'; + * assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]); + */ + function over(iteratees) { + return (...args) => { + return map(iteratees, (item) => { + return item(...args); + }); + }; + } + + /** + * Iterates through the given object while the iteratee returns true. + * + * @function everyAsyncObject + * @category object + * @type {Function} + * @param {Object} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { everyAsyncObject, assert } from '@universalweb/acid'; + * const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => { + * return item; + * }); + * assert(result, true); + */ + async function everyAsyncObject(source, iteratee) { + if (!source) { + return; + } + const objectKeys = keys(source); + return everyAsyncArray( + objectKeys, + (key, index, original, propertyCount) => { + return iteratee(source[key], key, source, propertyCount, original); + }, + ); + } + + /** + * Iterates through the given object while the iteratee returns true. + * + * @function everyObject + * @category object + * @type {Function} + * @param {Object} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @returns {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { everyObject, assert } from '@universalweb/acid'; + * const result = everyObject({a: true, b: true, c: true}, (item) => { + * return item; + * }); + * assert(result, true); + */ + function everyObject(source, iteratee) { + if (!source) { + return; + } + const objectKeys = keys(source); + return everyArray(objectKeys, (key, index, original, propertyCount) => { + return iteratee(source[key], key, source, propertyCount, original); + }); + } + + /** + * Iterates (for of) through the given object while the iteratee returns true using a for of loop. + * + * @function forOfEvery + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { every, assert } from '@universalweb/acid'; + * assert(forOfEvery({a: false, b: true, c: true}, (item) => { + * return item; + * }), false); + */ + function forOfEvery(source, iteratee = returnValue) { + if (isArray(source) || isSet(source)) { + for (const value of source) { + const result = iteratee(value, source); + if (result === false) { + return false; + } + } + } else { + for (const [key, value] of source) { + const result = iteratee(value, key, source); + if (result === false) { + return false; + } + } + } + return true; + } + + /** + * Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop. + * + * @function forOfEveryAsync + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { every, assert } from '@universalweb/acid'; + * assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => { + * return item; + * }), false); + */ + async function forOfEveryAsync( + source, + iteratee = returnValue, + generatorArgs, + ) { + if (isGenerator(source)) { + for await (const item of source(...generatorArgs)) { + const result = await iteratee(item, source); + if (result === false) { + return false; + } + } + } else if (isArray(source) || isSet(source)) { + for (const value of source) { + const result = await iteratee(value, source); + if (result === false) { + return false; + } + } + } else { + for (const [key, value] of source) { + const result = await iteratee(value, key, source); + if (result === false) { + return false; + } + } + } + return true; + } + + /** + * Iterates through the given object while the iteratee returns true. + * + * @function every + * @category utility + * @type {Function} + * @param {Object | Array | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, calling array, and array length. + * @returns {Boolean} - Returns true if all values returned are true or false if one value returns false. + * + * @example + * import { every, assert } from '@universalweb/acid'; + * assert(every({a: false, b: true, c: true}, (item) => { + * return item; + * }), false); + */ + const every = generateLoop( + everyArray, + everyAsyncArray, + everyObject, + everyAsyncObject, + forOfEvery, + forOfEveryAsync, + ); + + /** + * Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives. + * + * @function overEvery + * @category function + * @type {Function} + * @param {(Array.|Object.)} predicates - The list of functions to loop through. + * @returns {Function} - Returns the new overEvery wrapped function. + * + * @example + * import { overEvery, assert } from '@universalweb/acid'; + * assert(overEvery([Boolean, isFinite])('1'), true); + */ + function overEvery(predicates) { + return (arg) => { + return every(predicates, (predicate) => { + return predicate(arg); + }); + }; + } + + /** + * Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on. + * + * @function reArg + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Array} indexes - The arranged argument indexes. + * @returns {Function} - Returns the new function. + * + * @example + * reArg((a, b, c) => { + * return [a, b, c]; + * }, [1,2,0])(1,2,3); + * // => [2, 3, 1] + */ + function reArg(callable, indexes) { + return (...args) => { + return callable( + ...indexes.map((item) => { + return args[item]; + }), + ); + }; + } + + /** + * Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer. + * + * @function throttle + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Function|undefined} - The throttled function. + * + * @example + * const throttled = throttle(() => { console.log('throttle'); }, 0)(); + * throttled(); + * // 'throttle' + */ + function throttle(callable, time) { + function throttled(...args) { + if (throttled.id) { + throttled.shouldThrottle = true; + return; + } + throttled.callable(...args); + throttled.id = timer(() => { + if (throttled.shouldThrottle) { + throttled.callable(...args); + } + throttled.id = false; + }, time); + } + throttled.id = false; + throttled.callable = callable.bind(throttled); + throttled.clear = () => { + timers.remove(throttled.id); + throttled.id = false; + }; + return throttled; + } + + /** + * Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function. + * + * @function wrap + * @category function + * @type {Function} + * @param {*} value - The value to wrap. + * @param {Function} wrapper - The wrapper function. + * @returns {Function} - The new function. + * + * @example + * wrap('Lucy', (firstName, lastName) => { + * return `My name is ${firstName} ${lastName}.`; + * })('Diamonds'); + * // => 'My name is Lucy Diamonds.' + */ + function wrap(value, wrapper) { + return (...arg) => { + return wrapper(value, ...arg); + }; + } + + const functionPrototype = Function.prototype; + /** + * Caches a prototype method. + * + * @function cacheNativeMethod + * @category utility + * @type {Function} + * @param {Function} method - Prototype method. + * @returns {Function} - Cached method. + * + * @example + * import { cacheNativeMethod, assert } from '@universalweb/acid'; + * assert(cacheNativeMethod(Array.prototype.push)([], 1), 1); + */ + function cacheNativeMethod(method) { + return functionPrototype.call.bind(method); + } + + /** + * Returns an array of all properties (enumerable or not) found directly upon a given object. + * + * @function getPropNames + * @category object + * @param {Object} source - The object whose enumerable and non-enumerable own properties are to be returned. + * @returns {Object} - An array of strings that correspond to the properties found directly upon the given object. + * + * @example + * import { getPropNames, assert } from '@universalweb/acid'; + * assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']); + */ + const getPropNames = Object.getOwnPropertyNames; + /** + * Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object. + * + * @function getPropDesc + * @category object + * @param {Object} target - The target object. + * @param {String} property - The name of the property whose description is to be retrieved. + * @returns {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise. + * + * @example + * getPropDesc({ bar: 42 }, 'bar'); + * // => { configurable: true, enumerable: true, value: 42, writable: true } + */ + const getPropDesc = Object.getOwnPropertyDescriptor; + /** + * Defines a new property directly on an object, or modifies an existing property on an object, and returns the object. + * + * @function defProp + * @category object + * @param {Object} target - The object on which to define the property. + * @param {String} property - The name of the property whose description is to be retrieved. + * @param {Object} descriptor - The descriptor for the property being defined or modified. + * @returns {Object} - The object that was passed to the function. + * + * @example + * defProp({}, 'key', { + * enumerable: false, + * configurable: false, + * writable: false, + * value: 'static' + * }).key; + * // => 'static' + */ + const defProp = Object.defineProperty; + const hasProp = cacheNativeMethod(Object.hasOwnProperty); + + /** + * Determines whether two values are the same value. + * + * @function isSame + * @category object + * @param {*} source - Value to compare to. + * @param {*} target - A value to compare. + * @returns {Boolean} - A Boolean indicating whether or not the two arguments are the same value. + * + * @example + * import { isSame, assert } from '@universalweb/acid'; + * assert(isSame('foo', 'foo'), true); + */ + const isSame = Object.is; + + /** + * Adds two numbers. + * + * @function add + * @category math + * @type {Function} + * @param {Number} augend - First number. + * @param {Number} addend - Second number which is being added to another (augend). + * @returns {Number} - Returns the sum of the arguments. + * + * @example + * import { add, assert } from '@universalweb/acid'; + * assert(add(1, 1), 2); + */ + function add(augend, addend) { + return augend + addend; + } + + /** + * Decrements a number. + * + * @function deduct + * @category math + * @type {Function} + * @param {Number} source - First number. + * @returns {Number} - Returns a decremented version of the number. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + * deduct(10); + * // => 9 + */ + function deduct(source) { + return source - 1; + } + + /** + * Divides two numbers. + * + * @function divide + * @category math + * @type {Function} + * @param {Number} source - First number. + * @param {Number} value - Second number. + * @returns {Number} - Returns the quotient of the arguments. + * + * @example + * import { divide, assert } from '@universalweb/acid'; + * assert(divide(10, 5), 2); + */ + function divide(source, value) { + return source / value; + } + + /** + * Increments a number. + * + * @function increment + * @category math + * @type {Function} + * @param {Number} source - First number. + * @returns {Number} - Returns an incremented version of the number. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + * increment(10); + * // => 11 + */ + function increment(source) { + return source + 1; + } + + /** + * Multiplies two numbers. + * + * @function multiply + * @category math + * @type {Function} + * @param {Number} source - First number. + * @param {Number} value - Second number. + * @returns {Number} - Returns the product of the arguments. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + */ + function multiply(source, value) { + return source * value; + } + + /** + * Calculate the progress from a given total and current amount. + * + * @function calcProgress + * @category utility + * @type {Function} + * @param {Number} total - The total amount. + * @param {Number} currentAmount - The current amount. + * @returns {Number} - The progress as a percentage. + * + * @example + * import { calcProgress, assert } from '@universalweb/acid'; + * assert(calcProgress(100, 1), 1); + */ + function calcProgress(total, currentAmount) { + if (total === 0) { + return false; + } + if (currentAmount === 0) { + return 0; + } + return (currentAmount / total) * 100; + } + + const { random } = Math; + /** + * Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption.. + * + * @function randomFloat + * @category math + * @type {Function} + * @param {Number} max - Establishes highest possible value for the random number. + * @param {Number} [min = 0] - Establishes lowest possible value for the random number. + * @returns {Number} - Returns random integer between the max and min range. + * + * @example + * import { randomFloat, assert } from '@universalweb/acid'; + * assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;}); + * // => 9.1 + */ + function randomFloat(max, min = 0) { + return random() * (max - min) + min; + } + + /** + * Extracts the remainder between two numbers. + * + * @function remainder + * @category math + * @type {Function} + * @param {Number} source - First number. + * @param {Number} value - Second number. + * @returns {Number} - Returns the remainder of the arguments. + * + * @example + * import { multiply, assert } from '@universalweb/acid'; + * assert(multiply(10, 5), 50); + * remainder(10, 6); + * // => 4 + */ + function remainder(source, value) { + return source % value; + } + + /** + * Subtract all numbers in the array starting from left to right & return the difference. + * + * @function subtractAll + * @category math + * @type {Function} + * @param {Number[]} source - Array of numbers. + * @returns {Number} - Returns the final difference. + * + * @example + * import { subtractAll, assert } from '@universalweb/acid'; + * assert(subtractAll([10, 1, 2, 3]), 5); + */ + function subtractAll(source) { + return source.reduce((a, b) => { + return a - b; + }, 0); + } + + /** + * Sum all numbers in a given array. + * + * @function sumAll + * @category math + * @type {Function} + * @param {Number[]} source - Array of numbers. + * @returns {Number} - Returns a single number. + * + * @example + * import { sumAll, assert } from '@universalweb/acid'; + * assert(sumAll([10, 1, 2, 3]), 5); + */ + function sumAll(source) { + return source.reduce((a, b) => { + return a + b; + }, 0); + } + + /** + * Checks if a number is within a range. + * + * @function isNumberInRange + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @param {Number} start - Beginning of range. + * @param {Number} end - End of range. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumberInRange, assert } from '@universalweb/acid'; + * assert(isNumberInRange(1, 0, 2), true); + * assert(isNumberInRange(1, 2, 5), false); + */ + function isNumberInRange(source, start, end) { + return source > start && source < end; + } + + /** + * Checks if a number is within a range. + * + * @function isNumberNotInRange + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @param {Number} start - Beginning of range. + * @param {Number} end - End of range. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isNumberNotInRange, assert } from '@universalweb/acid'; + * assert(isNumberNotInRange(1, 0, 2), false); + * assert(isNumberNotInRange(1, 2, 5), true); + */ + function isNumberNotInRange(source, start, end) { + return source < start || source > end; + } + + /** + * Checks if a number is negative & returns true or false. + * + * @function isPositive + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isPositive, assert } from '@universalweb/acid'; + * assert(isPositive(1), true); + */ + const { sign } = Math; + function isPositive(source) { + return sign(source) === 1; + } + + /** + * Strictly checks if a number is zero. + * + * @function isZero + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isZero, assert } from '@universalweb/acid'; + * assert(isZero(0), true); + */ + function isZero(source) { + return source === 0; + } + + /** + * Checks if a number is odd & returns true or false. + * + * @function isOdd + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isOdd, assert } from '@universalweb/acid'; + * assert(isOdd(1), true); + */ + function isOdd(source) { + return (source & 1) === 1; + } + + /** + * Checks if a number is even & returns true or false. + * + * @function isEven + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEven, assert } from '@universalweb/acid'; + * assert(isEven(1), true); + */ + function isEven(source) { + return (source & 1) === 0; + } + + const objectEntries = Object.entries; + /** + * Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error. + * + * @function getEntries + * @category object + * @param {Object} source - The source object. + * @returns {Array|undefined} - Returns the Object.entries of the source object. + * + * @example + * import { getEntries, assert } from '@universalweb/acid'; + * assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]); + */ + function getEntries(source) { + if (hasValue(source)) { + return objectEntries(source); + } + } + + /** + * Extracts all keys from an object whose values are not null or undefined. + * + * @function compactKeys + * @category object + * @type {Function} + * @param {Object} object - Object from which keys are extracted. + * @returns {Array} - Returns an array of key values. + * + * @example + * import { compactKeys, assert } from '@universalweb/acid'; + * assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']); + */ + function compactKeys(object) { + const compactedKeys = []; + eachObject(object, (item, key) => { + if (hasValue(item)) { + compactedKeys.push(key); + } + }); + return compactedKeys; + } + + /** + * Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function compactMapAsyncObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with mapped properties that are not null or undefined. + * + * @example + * import { compactMapAsyncObject, assert } from '@universalweb/acid'; + * assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, c: 3}); + */ + async function compactMapAsyncObject( + source, + iteratee = returnValue, + results = {}, + ) { + await eachAsyncObject( + source, + async (item, key, original, propertyCount, objectKeys) => { + const result = await iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + ); + if (hasValue(result)) { + results[key] = result; + } + }, + ); + return results; + } + + /** + * Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function compactMapObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with mapped properties that are not null or undefined. + * + * @example + * import { compactMapObject, assert } from '@universalweb/acid'; + * assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => { + * return item; + * }), {a: 1, c: 3}); + */ + function compactMapObject(source, iteratee = returnValue, results = {}) { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + const result = iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + ); + if (hasValue(result)) { + results[key] = result; + } + }); + return results; + } + + /** + * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. + * + * @function filterObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with properties that passed the test. + * + * @example + * filterObject({a: false, b: true, c: true}, (item) => { + * return item; + * }); + * // => {b: true, c: true} + */ + function filterObject(source, iteratee, results = {}) { + eachObject(source, (item, key, original, propertyCount, objectKeys) => { + if ( + iteratee(item, key, results, original, propertyCount, objectKeys) === + true + ) { + results[key] = item; + } + }); + return results; + } + + /** + * Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee. + * + * @function filterAsyncObject + * @category object + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function} [results = {}] - Object that will be used to assign results. + * @returns {Object|Function} - An object with properties that passed the test. + * + * @example + * filterAsyncObject({a: false, b: true, c: true}, (item) => { + * return item; + * }); + * // => {b: true, c: true} + */ + async function filterAsyncObject(source, iteratee, results = {}) { + await eachAsyncObject( + source, + async (item, key, original, propertyCount, objectKeys) => { + if ( + (await iteratee( + item, + key, + results, + original, + propertyCount, + objectKeys, + )) === true + ) { + results[key] = item; + } + }, + ); + return results; + } + + /** + * Creates an inverted version of a given object by switching it's keys and values. + * + * @function invert + * @type {Function} + * @category object + * @param {Object} source - Object to be inverted. + * @param {Array} [target = {}] - Empty object to be populated with inverted values from source. + * @returns {Object|undefined} - Returns object with keys and values switched. + * + * @example + * import { invert, assert } from '@universalweb/acid'; + * assert(invert({a:1}), {1:'a'}); + */ + function invert(source, target = {}) { + if (!source) { + return; + } + eachObject(source, (item, key) => { + target[item] = key; + }); + return target; + } + + /** + * Performs a shallow strict comparison between two objects. + * + * @function isMatchObject + * @type {Function} + * @category object + * @param {Object} source - Source object. + * @param {Object} target - Object to compare to source. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { assert, isMatchObject } from '@universalweb/acid'; + * assert(isMatchObject({a: 1}, {a: 1}), true); + */ + const isMatchObject = (source, target) => { + if (source === target) { + return true; + } + const sourceKeys = keys(source); + const targetKeys = keys(target); + if (sourceKeys.length === targetKeys.length) { + return everyArray(sourceKeys, (key) => { + return source[key] === target[key]; + }); + } + return false; + }; + + /** + * Returns a regex safe special characters escaped version of a string. + * + * @function regexSafe + * @category regex + * @type {Function} + * @param {Object} source - String to make safe. + * @returns {Object} - Returns a regex safe version of the string. + * + * @example + * import { regexSafe, assert } from '@universalweb/acid'; + * assert(regexSafe(/.+/), '\/\.\+\/'); + */ + const escapeRegexRegex = /[()[\]{}*+?^$|#.,/\\\s-]/g; + function escapeRegex(source) { + return source.replace(escapeRegexRegex, "\\$&"); + } + + /** + * Convert array of strings to regex. + * + * @function arrayToRegex + * @category regex + * @type {Function} + * @param {Object} source - Array of strings. + * @returns {Object} - Returns a regex safe version of the string. + * + * @example + * import { arrayToRegex, assert } from '@universalweb/acid'; + * assert(String(arrayToRegex(['a','b'])), String(/a|b/)); + */ + function arrayToRegex(source, makeSafe) { + if (makeSafe) { + return arrayToRegex(mapArray(source, escapeRegex)); + } + return RegExp(source.join("|")); + } + + /** + * Checks if the value is a RegExp. + * + * @function isRegex + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isRegex, assert } from '@universalweb/acid'; + * assert(isRegex(/test/), true); + */ + const isRegexCall = isConstructorNameFactory("RegExp"); + const isRegex = isTypeFactory(isRegexCall); + + /** + * Returns a clone of the given object without the given properties. + * + * @function omit + * @category object + * @type {Function} + * @param {Object} source - Object from which keys are extracted. + * @param {Array|RegExp|String} blacklist - List of property keys to omit from the returned object. + * @returns {Object|undefined} - A new object with the removed. + * + * @example + * import { omit, assert } from '@universalweb/acid'; + * assert(omit({a:1, b:2}, ['a']), {b:2}); + * assert(omit({a:1, b:2}, 'a'), {b:2}); + * assert(omit({1:'test', b:2}, 1), {b:2}); + */ + function omit(source, blacklist) { + if (!source) { + return {}; + } + if (isArray(blacklist)) { + const blacklistRegex = arrayToRegex(blacklist); + return filterObject(source, (item, key) => { + return !blacklistRegex.test(key); + }); + } + if (isRegex(blacklist)) { + return filterObject(source, (item, key) => { + return !blacklist.test(key); + }); + } + if (isString(blacklist)) { + return filterObject(source, (item, key) => { + return key !== blacklist; + }); + } + if (isNumber(blacklist)) { + const numberToString = blacklist.toString(); + return filterObject(source, (item, key) => { + return key !== numberToString; + }); + } + if (isFunction(blacklist)) { + return filterObject(source, (item, key) => { + return !blacklist(item, key); + }); + } + return objectAssign({}, source); + } + + /** + * Returns a clone of the source object with the plucked properties. + * + * @function pick + * @type {Function} + * @category object + * @param {Object} source - Object to be cloned. + * @param {Array} whitelist - Array of property names used to determine what values to pluck. + * @param {Object} [target = {}] - Object to be populated with plucked values. + * @returns {Object|undefined} - A new object with plucked properties. + * + * @example + * import { pick, assert } from '@universalweb/acid'; + * assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2}); + */ + const pick = (source, whitelist, target = {}) => { + if (!source) { + return; + } + eachArray(whitelist, (item) => { + target[item] = source[item]; + }); + return target; + }; + + /** + * Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object. + * + * @function objectSize + * @category object + * @param {Object} source - The source object. + * @returns {Number|undefined} - The amount of keys. + * + * @example + * import { objectSize, assert } from '@universalweb/acid'; + * assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3); + */ + function objectSize(source) { + if (!source) { + return; + } + if (isPlainObject(source)) { + return keys(source).length; + } + const objectLengthProperty = source.length; + if (hasValue(objectLengthProperty)) { + return objectLengthProperty; + } + const objectSizeProperty = source.size; + if (hasValue(objectLengthProperty)) { + return objectSizeProperty; + } + return keys(source).length; + } + + /** + * Creates an object from two arrays, one of property identifiers and one of corresponding values. + * + * @function zipObject + * @type {Function} + * @category object + * @param {Array} properties - The property identifiers. + * @param {Array} values - The property values. + * @returns {Object} - Returns the new object. + * + * @example + * zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + const zipObject = (properties, values) => { + const source = {}; + eachArray(properties, (item, key) => { + source[item] = values[key]; + }); + return source; + }; + /** + * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. + * + * @function unZipObject + * @type {Function} + * @category object + * @param {Object} object - The object to process. + * @returns {Array} - Returns two arrays one of keys and the other of values inside a single array. + * + * @example + * unZipObject({ 'a': 1, 'b': 2 }); + * // => [['a', 'b'], [1, 2]] + */ + const unZipObject = (object) => { + const objectKeys = []; + const objectValues = []; + eachObject(object, (item, key) => { + objectKeys.push(key); + objectValues.push(item); + }); + return [objectKeys, objectValues]; + }; + + const normalizeCase$4 = /[ _-]+/g; + /** + * Converts a string into Camel case format. + * + * @function camelCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into Camel case. + * @returns {String} - Converted string in Camel case. + * + * @example + * import { camelCase, assert } from '@universalweb/acid'; + * assert(camelCase('camel case'), 'camelCase'); + */ + function camelCase(source) { + let result = ""; + source + .replace(normalizeCase$4, " ") + .trim() + .split(" ") + .forEach((item, index) => { + if (index === 0) { + result += item.toLowerCase(); + } else { + result += item[0].toUpperCase() + item.slice(1).toLowerCase(); + } + }); + return result; + } + + const normalizeCase$3 = /[ _-]+/g; + const space$1 = /[ ]+/g; + /** + * Converts a string into single space sepperated words in Kebab case. + * + * @function kebabCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into Kebab case. + * @returns {String} - Converted string in Kebab case. + * + * @example + * import { kebabCase, assert } from '@universalweb/acid'; + * assert(kebabCase('kebab case'), 'kebab-case'); + */ + function kebabCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase$3, " ") + .trim() + .toLowerCase() + .replace(space$1, "-"); + } + + const normalizeCase$2 = /[ _-]+/g; + const space = /[ ]+/g; + /** + * Converts a string into single space sepperated words in snake case. + * + * @function snakeCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into snake case. + * @returns {String} - Converted string in Snake case. + * + * @example + * import { snakeCase, assert } from '@universalweb/acid'; + * assert(snakeCase('snake case'), 'snake_case'); + */ + function snakeCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase$2, " ") + .trim() + .toLowerCase() + .replace(space, "_"); + } + + const normalizeCase$1 = /[ _-]+/g; + /** + * Converts a string into single space sepperated words in uppercase. + * + * @function upperCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into upper case. + * @returns {String} - Converted string in upper case. + * + * @example + * import { upperCase, assert } from '@universalweb/acid'; + * assert(upperCase('upper-case'), 'UPPER CASE'); + * assert(upperCase('upper_case'), 'UPPER CASE'); + */ + function upperCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase$1, " ") + .trim() + .toUpperCase(); + } + + const normalizeCase = /[ _-]+/g; + /** + * Converts a string into single space sepperated words in lowerCase. + * + * @function lowerCase + * @category string + * @type {Function} + * @param {String} source - String to be converted into upper case. + * @returns {String} - Converted string in upper case. + * + * @example + * import { lowerCase, assert } from '@universalweb/acid'; + * assert(lowerCase('lower-CASE'), 'lower case'); + */ + function lowerCase(source) { + return source + .replace(/([A-Z]+)/g, " $1") + .replace(normalizeCase, " ") + .trim() + .toLowerCase(); + } + + /** + * Inserts text into a string at a given position. + * + * @function insertInRange + * @category string + * @type {Function} + * @param {String} string - String to insert the text into. + * @param {Number} index - Point of insertion. + * @param {String} text - The string to be inserted. + * @returns {String} - The string with the text inserted at the given point. + * + * @example + * import { insertInRange, assert } from '@universalweb/acid'; + * assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.'); + */ + function insertInRange(string, index, text) { + return string.slice(0, index) + text + string.slice(index, string.length); + } + /** + * Plucks a letter using the index starting from the right. + * + * @function rightString + * @category string + * @type {Function} + * @param {String} string - String to extract the letter from. + * @param {Number} [index=1] - The starting position. + * @returns {String} - A letter at the given index. + * + * @example + * import { rightString, assert } from '@universalweb/acid'; + * assert(rightString('rightString'), 'g'); + * assert(rightString('rightString', 2), 'n'); + */ + function rightString(string, index = 1) { + return string[string.length - index]; + } + /** + * Splits up a string into chunks. + * + * @function chunkString + * @category string + * @type {Function} + * @param {String} string - String to chunked. + * @param {Number} [size] - The max string length per chunk. + * @returns {Array} - An array with strings that are <= size parameter. + * + * @example + * import { chunkString, assert } from '@universalweb/acid'; + * assert(chunkString('chunk', 2), ['ch', 'un', 'k']); + */ + function chunkString(string, size) { + return string.match(new RegExp(`(.|[\r\n]){1,${size}}`, "g")); + } + /** + * Truncates everything before the index starting from the right. + * + * @function initialString + * @category string + * @type {Function} + * @param {String} string - String to extract the initial letters from. + * @param {Number} [index=1] - Starting point from the right. + * @returns {String} - A string with the characters before the index starting from the right. + * + * @example + * import { initialString, assert } from '@universalweb/acid'; + * assert(initialString('initialString', 2), 'initialStri'); + */ + function initialString(string, index = 1) { + return string.slice(0, index * -1); + } + /** + * Truncates everything after a index. + * + * @function restString + * @category string + * @type {Function} + * @param {String} string - String to extract the rest of the letters from. + * @param {Number} [index=1] - Starting point. + * @returns {String} - A string without the characters up-to to the index. + * + * @example + * import { restString, assert } from '@universalweb/acid'; + * assert(restString('restString', 2), 'stString'); + */ + function restString(string, index = 1) { + return string.substring(index); + } + + /** + * Replaces all occurrences of strings in an array with a value. + * + * @function replaceList + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @param {Array} words - Strings to replace. + * @param {String} value - The match replacement. + * @returns {String} - The string with the replacement. + * + * @example + * import { replaceList, assert } from '@universalweb/acid'; + * assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.'); + */ + function replaceList(string, words, value) { + return string.replace(new RegExp(`\\b${words.join("|")}\\b`, "gi"), value); + } + + const rawURLDecodeRegex = /%(?![\da-f]{2})/gi; + const andRegex = /&/g; + const lessThanRegex = //g; + const doubleQuoteRegex = /"/g; + /** + * Raw URL decoder. + * + * @function rawURLDecode + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @returns {String} - Converted string into the decoded URI Component . + * + * @example + * import { rawURLDecode, assert } from '@universalweb/acid'; + * assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.'); + */ + function rawURLDecode(string) { + return decodeURIComponent( + string.replace(rawURLDecodeRegex, () => { + return "%25"; + }), + ); + } + /** + * Replaced sensitive characters with their matching html entity. + * + * @function htmlEntities + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @returns {String} - Replaced string. + * + * @example + * import { htmlEntities, assert } from '@universalweb/acid'; + * assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`); + */ + function htmlEntities(string) { + return string + .replace(andRegex, "&") + .replace(lessThanRegex, "<") + .replace(moreThanRegex, ">") + .replace(doubleQuoteRegex, """); + } + /** + * Executes rawURLDecode followd by htmlEntities methods on a string. + * + * @function sanitize + * @category string + * @type {Function} + * @param {String} string - String to be replaced. + * @returns {String} - Replaced string. + * + * @example + * import { sanitize, assert } from '@universalweb/acid'; + * assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`); + */ + function sanitize(string) { + return htmlEntities(rawURLDecode(string)); + } + + const tokenizeRegEx = /\S+/g; + const wordsRegEx = /\w+/g; + /** + * Break string by non-white space characters matches. + * + * @function tokenize + * @type {Function} + * @category string + * @param {String} string - String to be broken up. + * @returns {Array} - Array of words without white space characters. + * + * @example + * import { tokenize, assert } from '@universalweb/acid'; + * assert(tokenize('I am Lucy!'), ["I", "am", "Acid!"]); + */ + function tokenize(string) { + return string.match(tokenizeRegEx) || []; + } + /** + * Break string into word matches. + * + * @function words + * @type {Function} + * @param {String} string - String to be broken up. + * @returns {Array} - Array of words with word characters only. + * + * @example + * import { words, assert } from '@universalweb/acid'; + * assert(words('I am Acid!'), ["I", "am", "Acid"]); + */ + function words(string) { + return string.match(wordsRegEx) || []; + } + + const truncateDown = (string, maxLength, stringLength) => { + const breakAll = string.split(""); + const breakAllLength = breakAll.length; + let item; + let index = stringLength - maxLength; + for (; index < breakAllLength && index >= 0; index--) { + item = breakAll[index]; + if (item === " ") { + break; + } + } + return string.slice(0, index).trim(); + }; + const truncateUp = (string, maxLength, stringLength) => { + const breakAll = string.split(""); + const breakAllLength = breakAll.length; + let item; + let index = maxLength; + for (; index < breakAllLength && index > 0; index++) { + item = breakAll[index]; + if (item === " ") { + break; + } + } + return string.substring(index, stringLength).trim(); + }; + /** + * Truncates the string, accounting for word placement and character count. + * + * @function truncate + * @type {Function} + * @category string + * @param {String} string - String to be truncated. + * @param {Number} maxLength - The desired max length of the string. + * @returns {String} - The mutated string. + * + * @example + * import { truncate, assert } from '@universalweb/acid'; + * assert(truncate('Where is Lucy?', 2), 'Where is'); + */ + function truncate(string, maxLength) { + const stringLength = string.length; + return stringLength > maxLength + ? truncateDown(string, maxLength, stringLength) + : string; + } + /** + * Truncates the string, accounting for word placement and character count from the right. + * + * @function truncateRight + * @type {Function} + * @category string + * @param {String} string - String to be truncated. + * @param {Number} maxLength - The desired max length of the string. + * @returns {String} - The mutated string. + * + * @example + * import { truncateRight, assert } from '@universalweb/acid'; + * assert(truncateRight('Where is Lucy?', 6), 'Lucy?'); + */ + function truncateRight(string, maxLength) { + const stringLength = string.length; + return stringLength > maxLength + ? truncateUp(string, maxLength, stringLength) + : string; + } + + const getWords = /\w+/g; + /** + * Returns the first letter capitalized. + * + * @function upperFirstLetter + * @type {Function} + * @category string + * @param {String} string - String to extract first letter from. + * @returns {String} - An upper case letter. + * + * @example + * import { upperFirstLetter, assert } from '@universalweb/acid'; + * assert(upperFirstLetter('upper'), 'U'); + */ + function upperFirstLetter(string) { + return string[0].toUpperCase(); + } + /** + * Capitalizes the first letter. + * + * @function upperFirst + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with first letter capitalized. + * + * @example + * import { upperFirst, assert } from '@universalweb/acid'; + * assert(upperFirstLetter('upper'), 'U'); + * upperFirst('upper'); + * // => 'Upper' + */ + function upperFirst(string) { + return upperFirstLetter(string) + restString(string); + } + /** + * Capitalize first letter and lower case the rest. + * + * @function upperFirstOnly + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with first letter capitalized. + * + * @example + * import { upperFirstOnly, assert } from '@universalweb/acid'; + * assert(upperFirstOnly('upper'), 'Upper'); + */ + function upperFirstOnly(string) { + return upperFirstLetter(string) + restString(string).toLowerCase(); + } + /** + * Capitalize all first letters. + * + * @function upperFirstAll + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with all first letters capitalized. + * + * @example + * import { upperFirstAll, assert } from '@universalweb/acid'; + * assert(upperFirstAll('uPPer'), 'UPPer'); + */ + function upperFirstAll(string) { + return string.replace(getWords, (match) => { + return upperFirst(match); + }); + } + /** + * Capitalize all first letters and lower case the rest. + * + * @function upperFirstOnlyAll + * @type {Function} + * @category string + * @param {String} string - String to be mutated. + * @returns {String} - String with all first letters capitalized. + * + * @example + * import { upperFirstOnlyAll, assert } from '@universalweb/acid'; + * assert(upperFirstOnlyAll('this is'), 'This Is'); + */ + function upperFirstOnlyAll(string) { + return string.replace(getWords, (match) => { + return upperFirstOnly(match); + }); + } + + /** + * Returns the constructor name of an object. + * + * @function getTypeName + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { getTypeName, assert } from '@universalweb/acid'; + * assert(getTypeName(1), true); + */ + function getTypeName(source) { + return getType(source)?.name; + } + + /** + * Checks if the value is an Arguments object. + * + * @function isArguments + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArguments, assert } from '@universalweb/acid'; + * assert(isArguments((function() { return arguments;})()), true); + * assert(isArguments([]), false); + */ + const objectArguments = "[object Arguments]"; + function isArguments(source) { + return hasValue(source) ? source.toString() === objectArguments : false; + } + + /** + * Checks if an object or objects are a Map. + * + * @function isMap + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isMap } from '@universalweb/acid'; + * isMap(new Map()); + * // => true + */ + const isMapCall = isConstructorNameFactory("Map"); + const isMap = isTypeFactory(isMapCall); + + /** + * Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer. + * + * @function isTypedArray + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isTypedArray, assert } from '@universalweb/acid'; + * assert(isTypedArray([]), false); + * assert(isTypedArray(new Int8Array()), true); + */ + const typedArrayRegex = /Array/; + const arrayConstructorName = "Array"; + function isTypedArray(source) { + if (source) { + const constructorName = getTypeName(source); + if ( + typedArrayRegex.test(constructorName) && + constructorName !== arrayConstructorName + ) { + return true; + } + } + return false; + } + + /** + * Checks if an object is null or undefined. + * + * @function noValue + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { noValue, assert } from '@universalweb/acid'; + * assert(noValue(null), true); + * assert(noValue(undefined), true); + * assert(noValue(1), false); + * assert(noValue(0), false); + */ + function noValue(source) { + return !hasValue(source); + } + + /** + * Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property. + * + * @function isArrayLike + * @category type + * @param {*} source - Object to be checked. + * @param {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArrayLike, assert } from '@universalweb/acid'; + * assert(isArrayLike([]), true); + * assert(isArrayLike(2), false); + */ + function isArrayLike(source, strictFlag) { + if (noValue(source) || isFunction(source)) { + return false; + } + if (isArray(source) || isTypedArray(source)) { + return true; + } + const sourceLength = source.length; + if (!noValue(sourceLength) || !isNumber(sourceLength) || sourceLength < 0) { + return false; + } + if (strictFlag) { + const indexes = keys(source); + if (indexes) { + return every(indexes, (value, index) => { + return index >= 0 && isNumber(index); + }); + } + return false; + } + return true; + } + + /** + * Checks if an object or objects are a BigInt. + * + * @function isBigInt + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isBigInt, assert } from '@universalweb/acid'; + * assert(isBigInt(BigInt(123)), true); + */ + const isBigIntCall = isConstructorNameFactory("BigInt"); + const isBigInt = isTypeFactory(isBigIntCall); + + /** + * Checks if the value is a Boolean. + * + * @function isBoolean + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isBoolean } from '@universalweb/acid'; + * isBoolean(true); + * // => true + */ + const isBooleanCall = isConstructorNameFactory("Boolean"); + const isBoolean = isTypeFactory(isBooleanCall); + + /** + * Checks if an object or objects are a ArrayBuffer. + * + * @function isArrayBuffer + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isArrayBuffer, assert } from '@universalweb/acid'; + * assert(isArrayBuffer(new ArrayBuffer()), true); + */ + const isArrayBufferCall = isConstructorNameFactory("ArrayBuffer"); + const isArrayBuffer = isTypeFactory(isArrayBufferCall); + + /** + * Checks if an object is the child of another. Typically used for classes. + * + * @function isChild + * @category type + * @param {*} sourceChild - Object to be checked as the child. + * @param {*} targetParent - Object to be checked as the parent. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isChild, construct, assert } from '@universalweb/acid'; + * class Grandparent{} + * class Parent extends Grandparent{} + * class Child extends Parent{} + * const child = construct(Child); + * assert(isChild(Child, Grandparent), true); + * assert(isChild(Child, Parent), false); + * assert(isChild(Parent, Grandparent), false); + * assert(isChild(child1, child3), false); + */ + function isChild(sourceChild, targetParent) { + if (!sourceChild || !targetParent) { + return false; + } + return sourceChild instanceof targetParent; + } + + /** + * Checks if an object or objects are a structured-cloneable type. + * + * @function isCloneable + * @category type + * @param {...*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isCloneable, assert } from '@universalweb/acid'; + * assert(isCloneable(function (){}), false); + */ + const constructorNames = RegExp( + "Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError", + ); + function isCloneable(source) { + if (hasValue(source)) { + const constructorName = source?.constructor?.name; + return constructorNames.test(constructorName); + } + return false; + } + + /** + * Checks if the value is a Date. + * + * @function isDate + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isDate, assert } from '@universalweb/acid'; + * assert(isDate(new Date()), true); + */ + const isDateCall = isConstructorNameFactory("Date"); + const isDate = isTypeFactory(isDateCall); + + /** + * Checks if the value is empty. + * + * @function isEmpty + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEmpty, assert } from '@universalweb/acid'; + * assert(isEmpty([]), true); + */ + function isEmpty(source) { + if (isString(source) || isArray(source)) { + return !hasLength(source); + } else if (isPlainObject(source)) { + return !objectSize(source); + } + return !hasValue(source); + } + + /** + * Check if a value equals false using strict comparison. + * + * @function isFalse + * @category Utility + * @type {Function} + * @param {Boolean} source - Item to compare. + * @returns {Boolean} - Returns true if the item equals false. + * + * @example + * import { isFalse, assert } from '@universalweb/acid'; + * assert(isFalse(1), false); + * assert(isFalse(true), false); + * assert(isFalse(false), true); + */ + function isFalse(source) { + return source === false; + } + + /** + * Checks if an object or objects are a Float32Array. + * + * @function isF32 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isF32, assert } from '@universalweb/acid'; + * assert(isF32(new Float32Array()), true); + */ + const isF32Call = isConstructorNameFactory("Float32Array"); + const isF32 = isTypeFactory(isF32Call); + + /** + * Checks if an object or objects are a Float64Array. + * + * @function isF64 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isF64 } from '@universalweb/acid'; + * isF64(new Float64Array()); + * // => true + */ + const isF64Call = isConstructorNameFactory("Float64Array"); + const isF64 = isTypeFactory(isF64Call); + + const { isInteger } = Number; + /** + * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. + * + * @function isFloat + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isFloat } from '@universalweb/acid'; + * isFloat(1.01); + * // => true + */ + const isFloat = isInteger; + + /** + * Checks if an object or objects are a Int16Array. + * + * @function isI16 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isI16 } from '@universalweb/acid'; + * isI16(new Int16Array()); + * // => true + */ + const isI16Call = isConstructorNameFactory("Int16Array"); + const isI16 = isTypeFactory(isI16Call); + + /** + * Checks if an object or objects are a Int32Array. + * + * @function isI32 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isI32, assert } from '@universalweb/acid'; + * assert(isI32(new Int32Array()), true); + */ + const isI32Call = isConstructorNameFactory("Int32Array"); + const isI32 = isTypeFactory(isI32Call); + + /** + * Checks if an object or objects are a Int8Array. + * + * @function isI8 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isInt8 } from '@universalweb/acid'; + * isInt8(new Int8Array()); + * // => true + */ + const isI8Call = isConstructorNameFactory("Int8Array"); + const isI8 = isTypeFactory(isI8Call); + + /** + * Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments. + * + * @function isIterable + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isIterable, assert } from '@universalweb/acid'; + * assert(isIterable([]), true); + * assert(isIterable(new Int8Array()), true); + * assert(isIterable('test'), false); + */ + function isIterable(source) { + return hasValue(source) && typeof source[Symbol.iterator] === "function"; + } + + /** + * Checks if an object is a promise. + * + * @function isPromise + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isPromise } from '@universalweb/acid'; + * isPromise(new Promise(() => {})); + * // => true + */ + function isPromise(source) { + if (source) { + return source instanceof Promise; + } + return false; + } + + /** + * Checks if an object is a kind of async object such as async function, promise, or generator. + * + * @function isKindAsync + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isKindAsync, assert } from '@universalweb/acid'; + * assert(isKindAsync(async() => {}), true); + */ + function isKindAsync(source) { + if (source) { + return isPromise(source) || isAsync(source) || isGenerator(source); + } + return false; + } + + /** + * Checks if an object is the child of another. Typically used for classes. + * + * @function isParent + * @category type + * @param {*} sourceParent - Object to be checked as the child. + * @param {*} targetChild - Object to be checked as the parent. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isParent, construct, assert } from '@universalweb/acid'; + * class parentClass{} + * class otherClass{} + * const child1 = construct(parentClass); + * const child2 = construct(otherClass); + * assert(isParent(child1, parentClass), true); + * assert(isParent(child3, parentClass), false); + * assert(isParent(parentClass, child1), false); + * assert(isParent(child1, child3), false); + */ + function isParent(sourceParent, targetChild) { + if (!sourceParent || !targetChild || !targetChild.call) { + return false; + } + return sourceParent instanceof targetChild; + } + + /** + * Checks if an object is a primitive. + * + * @function isPrimitive + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - True or false. + * + * @example + * import { isPrimitive, assert } from '@universalweb/acid'; + * assert(isPrimitive(1), true); + * assert(isPrimitive(() => {}), false); + */ + function isPrimitive(source) { + const type = typeof value; + return ( + source === null || + source === undefined || + (type !== "object" && type !== "function") + ); + } + + /** + * Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways. + * + * @function isRelated + * @category type + * @param {*} targetOne - Object to be checked. + * @param {*} targetTwo - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isRelated, construct, assert } from '@universalweb/acid'; + * class parentClass{} + * class otherClass{} + * const child1 = construct(parentClass); + * const child2 = construct(parentClass); + * const child3 = construct(otherClass); + * assert(isRelated(child1, child2), true); + * assert(isRelated(child1, parentClass), true); + * assert(isRelated(parentClass, child2), true); + * assert(isRelated(child1, child3), false); + */ + function isRelated(targetOne, targetTwo) { + if (noValue(targetOne) || noValue(targetTwo)) { + return false; + } + if (targetOne.call) { + return targetTwo instanceof targetOne; + } + if (targetTwo.call) { + return targetOne instanceof targetTwo; + } + return targetTwo.constructor === targetOne.constructor; + } + + const { isSafeInteger } = Number; + /** + * Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger. + * + * @function isSafeInt + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isSafeInt } from '@universalweb/acid'; + * isSafeInt(1.01); + * // => true + */ + const isSafeInt = isSafeInteger; + + function isSameType(source, other) { + const sourceType = getType(source); + const otherType = getType(other); + if (sourceType === otherType) { + if (sourceType.name === otherType.name) { + return true; + } + } + return false; + } + + /** + * Check if a value equals true using strict comparison. + * + * @function isTrue + * @category Utility + * @type {Function} + * @param {Boolean} source - Item to check. + * @returns {Boolean} - Returns true if the item is true. + * + * @example + * import { isTrue, assert } from '@universalweb/acid'; + * assert(isTrue(1), false); + * assert(isTrue(true), true); + * assert(isTrue(false), false); + */ + function isTrue(source) { + return source === true; + } + + /** + * Checks if an object or objects are a Uint16Array. + * + * @function isU16 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU16 } from '@universalweb/acid'; + * isU16(new Uint16Array()); + * // => true + */ + const isU16Call = isConstructorNameFactory("Uint16Array"); + const isU16 = isTypeFactory(isU16Call); + + /** + * Checks if an object or objects are a Uint32Array. + * + * @function isU32 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU32 } from '@universalweb/acid'; + * isU32(new Uint32Array()); + * // => true + */ + const isU32Call = isConstructorNameFactory("Uint32Array"); + const isU32 = isTypeFactory(isU32Call); + + /** + * Checks if an object or objects are a Uint8Array. + * + * @function isU8 + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU8 } from '@universalweb/acid'; + * isU8(new Uint8Array()); + * // => true + */ + const isU8Call = isConstructorNameFactory("Uint8Array"); + const isU8 = isTypeFactory(isU8Call); + + /** + * Checks if an object or objects are a Uint8ClampedArray. + * + * @function isU8C + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isU8C } from '@universalweb/acid'; + * isU8C(new Uint8ClampedArray()); + * // => true + */ + const isU8CCall = isConstructorNameFactory("Uint8ClampedArray"); + const isU8C = isTypeFactory(isU8CCall); + + /** + * Checks if an object or objects are a WeakMap. + * + * @function isWeakMap + * @category type + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isWeakMap } from '@universalweb/acid'; + * assert(isWeakMap(new WeakMap()), true); + */ + const isWeakMapCall = isConstructorNameFactory("WeakMap"); + const isWeakMap = isTypeFactory(isWeakMapCall); + + const isDeno = typeof globalThis.Deno !== "undefined"; + + const isNodejs = + typeof globalThis.process !== "undefined" && + process.versions && + process.versions.node; + + /** + * Check if a value is isTruthy which is anything but false, null, 0, "", undefined, and NaN. + * + * @function isTruthy + * @category type + * @type {Function} + * @param {*} source - Item to be isTruthy checked. + * @param {*} [returnIfTrue = true] - Item to be returned if item is isTruthy. + * @returns {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false. + * + * @example + * import { isTruthy, assert } from '@universalweb/acid'; + * assert(isTruthy(1), true); + * assert(isTruthy(0), false); + */ + function isTruthy(source, returnIfTrue = true) { + return Boolean(source) && returnIfTrue; + } + + /** + * Check if a value is isFalsy which are false, null, 0, "", undefined, and NaN. + * + * @function isFalsy + * @category type + * @type {Function} + * @param {*} source - Item to be isFalsy checked. + * @param {*} [returnIfTrue = true] - Item to be returned if item is isFalsy. + * @returns {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false. + * + * @example + * import { isFalsy, assert } from '@universalweb/acid'; + * assert(isFalsy(0), true); + * assert(isFalsy(1), false); + */ + function isFalsy(source, returnIfTrue = true) { + return Boolean(source) === false && returnIfTrue; + } + + /** + * If source has a value then assign it to an object or call a function. + * + * @function ifValue + * @category utility + * @param {*} source - The source object to be hasValue checked. + * @param {Function|Object} target - The target which is either a function or object. + * @param {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target). + * @param {Array} args - The args that would be used if the target is a function and is the params that is applied to the function. + * @returns {source|undefined} The source object if it passes the hasValue check. + * + * @example + * import { ifValue, assert } from '@universalweb/acid'; + * assert(ifValue(1, {}, 'a'), {a:1}); + */ + function ifValue(source, target, optional, args) { + if (hasValue(source)) { + if (isFunction(target)) { + if (optional) { + return apply(target, optional, args); + } + return target(...args); + } else if (isPlainObject(target)) { + target[optional] = source; + return target; + } + } + } + + /** + * Performs a deep comparison between two objects & determines if they're different using strict comparison. + * + * @function notEqual + * @type {Function} + * @category utility + * @param {*} source - Source object. + * @param {*} target - Object to be compared. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { notEqual, assert } from '@universalweb/acid'; + * assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true); + */ + function notEqual(source, target) { + return isFalse(isEqual(source, target)); + } + + const jsonNative = JSON; + /** + * Parses JSON string with safety check for undefined. + * + * @function jsonParse + * @category utility + * @type {Function} + * @param {String} source - String to be parsed. + * @param {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned. + * @returns {Object|undefined} - Returns the parsed object. + * + * @example + * import { jsonParse, assert } from '@universalweb/acid'; + * assert(jsonParse('{a:1}'), {a:1}); + */ + function jsonParse(source, reviver) { + if (source) { + return jsonNative.parse(source, reviver); + } + } + /** + * Stringify an object into a JSON string. + * + * @function stringify + * @category utility + * @type {Function} + * @param {Object} object - Object to Stringify. + * @returns {String} - Returns the object as a valid JSON string. + * + * @example + * import { stringify, assert } from '@universalweb/acid'; + * assert(stringify({a:1}), '{a:1}'); + */ + const stringify = jsonNative.stringify; + + function createAssertError(source, expected, localOptions) { + const options = globalThis.options || localOptions; + let errorTitle; + if (isFunction(options)) { + errorTitle = `${options.name} : ${options.constructor.name}`; + } else if (options) { + errorTitle = `${options.title || options.method.name} -> ${options.file}`; + } + return new Error( + `Test Failed: ${errorTitle} Result: ${stringify(source)} Expected: ${stringify(expected)}`, - options - ); - } - async function assertAsync(sourceArg, expected, options) { - const source = await sourceArg; - const expectedFunction = isFunction(expected) && (await expected(source, options)) === false; - if (expectedFunction || notEqual(source, expected)) { - return createAssertError(source, expected, options); - } - return true; - } - /** - * Check if source value matches the expected value. - * - * @function assert - * @category utility - * @type {Function} - * @param {*} source - The source object to compare to. - * @param {*} expected - The expected result that's compared to the source. - * @param {*} options - Additional options for the Error instance & unit test information. - * @returns {Object} - Returns a deep clone of an object. - * - * @example - * import { assert } from '@universalweb/acid'; - * if (!assert(1,1)) { - * new Error('Assert Method Failed'); - * } - */ - function assert(source, expected, options) { - if (isKindAsync(source) || isKindAsync(expected)) { - return assertAsync(source, expected, options); - } - const expectedFunction = isFunction(expected) && expected(source, options) === false; - if (expectedFunction || notEqual(source, expected)) { - return createAssertError(source, expected, options); - } - return true; - } - - /** - * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to. - * - * @function bindAll - * @category utility - * @type {Function} - * @param {Object|Function|Array} collection - The functions to bind. - * @param {*} bindThis - Object to be bound to functions. - * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to. - * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided. - * - * @example - * import { assert, bindAll } from '@universalweb/acid'; - * const bounded = bindAll([function () { return this;}], 'Bounded'); - * assert(bounded[0](), 'Bounded'); - */ - function bindAll(collection, bindThis, targetAssign) { - const results = map(collection, (item) => { - return isFunction(item) ? item.bind(bindThis) : item; - }); - return targetAssign ? assign(targetAssign, results) : results; - } - - /** - * Clears the values out of an array, buffer, and objects like Map that have a clear method. - * - * @function clear - * @category utility - * @type {Function} - * @param {Array} source - Takes an array to be emptied. - * @returns {Array} - The originally given array. - * - * @example - * import { clear, assert } from '@universalweb/acid'; - * assert(clear(Buffer.from([1,'B', 'Cat'])), []); - */ - function clear(source) { - if (source) { - if (isBuffer(source)) { - return clearBuffer(source); - } else if (isArray(source)) { - return clearArray(source); - } else if (source.clear) { - source.clear(); - } else if (source.length) { - source.length = 0; - } - } - return source; - } - - /** - * Creates a structured clone of an object which is a "structured-cloneable type". - * - * @function clone - * @category utility - * @type {Function} - * @param {Object} source - Any structured-cloneable type object. - * @returns {Object} - Returns a deep clone of an object. - * - * @example - * import { clone, assert } from '@universalweb/acid'; - * assert(clone({a:{b:[2]}}), {a:{b:[2]}}); - */ - const structuredCloneSafe = globalThis.structuredClone; - function clone(source) { - return structuredCloneSafe(source); - } - - /** - * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next. - * - * @function concurrent - * @type {Function} - * @category Utility - * @async - * @param {Array} source - Array of async functions that will be looped through. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. - * @returns {Object} - The originally given array. - * - * @example - * import { concurrent, assert } from '@universalweb/acid'; - * const list = []; - * await concurrent([async (item) => { - * return item; - * }, async (item) => { - * return item; - * }], null, 1); - * assert(list, [1, 1]); - */ - async function concurrent(source, thisBind, ...args) { - const arrayLength = source.length; - const results = []; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = source[index].call(thisBind, ...args, index, results, callable); - } - } else { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = source[index](...args, index, results, callable); - } - } - return Promise.all(results); - } - - /** - * Creates an array with all isFalsy values removed. The values false, null, 0, "", undefined, and NaN are isFalsy. - * - * @function compact - * @category Utility - * @type {Function} - * @param {Array|Object} source - Array or Object to be compacted. - * @returns {Array|Object} - A new object or array containing the filtered values. - * - * @example - * import { compact, assert } from '@universalweb/acid'; - * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']); - */ - function compact(source) { - if (isPlainObject(source)) { - const sourceKeys = keys(source); - const sourceKeysLength = sourceKeys.length; - const targetObject = {}; - for (let i = 0; i < sourceKeysLength; i++) { - const keyName = sourceKeys[i]; - const item = source[keyName]; - const isisTruthy = isTruthy(item); - if (isisTruthy) { - targetObject[keyName] = item; - } - } - return targetObject; - } - return source.filter((item) => { - return isTruthy(item); - }); - } - - /** - * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function forOfCompactMapAsync - * @category utility - * @type {Function} - * @param {Object|Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * import { assert,forOfCompactMapAsync } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = await forOfCompactMapAsync(source, async (item) => { - * return item; - * }); - * assert(temp, {b: 2, c: 3}); - */ - async function forOfCompactMapAsync(source, iteratee = returnValue, resultsObject, generatorArgs) { - if (isGenerator(source)) { - const resultsGenerator = []; - for await (const item of source(...generatorArgs)) { - const result = await iteratee(item, resultsGenerator, source); - if (hasValue(result)) { - resultsGenerator.push(result); - } - } - return resultsGenerator; - } - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = await iteratee(value, results, source); - if (hasValue(result)) { - methodPushBound(result); - } - } - return results; - } - const methodSet = isFunction(results.set); - for await (const [key, value] of source) { - const result = await iteratee(value, key, results, source); - if (hasValue(result)) { - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - } - return results; - } - - /** - * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function forOfCompactMap - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. - * - * @example - * import { assert,forOfCompactMap } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = forOfCompactMap(source, (item) => { - * return item; - * }); - * assert(temp, {b: 2, c: 3}); - */ - function forOfCompactMap(source, iteratee = returnValue, resultsObject) { - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = iteratee(value, results, source); - if (hasValue(result)) { - methodPushBound(result); - } - } - return results; - } - const methodSet = isFunction(results.set); - for (const [key, value] of source) { - const result = iteratee(value, key, results, source); - if (hasValue(result)) { - if (methodSet) { - results.set(key, result); - } else { - results[key] = result; - } - } - } - return results; - } - - /** - * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. - * - * @function compactMap - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {Object | Function} [results = {}] - Object that will be used to assign results. - * @returns {Array | object | Function} - A new object of the same calling object's type. - * - * @example - * import { compactMap, assert } from '@universalweb/acid'; - * assert(compactMap({a: null, b: 2, c: 3}, (item) => { - * return item; - * }), {b: 2, c: 3}); - */ - const compactMap = generateLoop( - compactMapArray, - compactMapAsyncArray, - compactMapObject, - compactMapAsyncObject, - forOfCompactMap, - forOfCompactMapAsync - ); - - function everyArg(...methods) { - if (isAsync(methods[0])) { - return async function (...args) { - return every(methods, async (method) => { - return every(args, async (item) => { - return method(item); - }); - }); - }; - } - return function (...args) { - return every(methods, (method) => { - return every(args, (item) => { - return method(item); - }); - }); - }; - } - - /** - * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. - * - * @function forOfFilter - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. - * - * @example - * import { assert, forOfFilter } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = forOfFilter(source, (item) => { - * return Boolean(item); - * }); - * assert(temp, {b: 2, c: 3}); - */ - function forOfFilter(source, iteratee = returnValue, resultsObject) { - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = iteratee(value, results, source); - if (result === true) { - methodPushBound(value); - } - } - } else { - const methodSet = isFunction(results.set); - for (const [key, value] of source) { - const result = iteratee(value, key, results, source); - if (result === true) { - if (methodSet) { - results.set(key, value); - } else { - results[key] = value; - } - } - } - } - return results; - } - - /** - * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. - * - * @function forOfFilterAsync - * @category utility - * @type {Function} - * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. - * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. - * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. - * - * @example - * import { assert, forOfFilterAsync } from '@universalweb/acid'; - * const source = {a: undefined, b: 2, c: 3}; - * const temp = forOfFilterAsync(source, (item) => { - * return Boolean(item); - * }); - * assert(temp, {b: 2, c: 3}); - */ - async function forOfFilterAsync(source, iteratee = returnValue, resultsObject, generatorArgs) { - if (isGenerator(source)) { - const resultsGenerator = []; - for await (const item of source(...generatorArgs)) { - if ((await iteratee(item, resultsGenerator, source)) === true) { - resultsGenerator.push(item); - } - } - return resultsGenerator; - } - const results = resultsObject || cloneType(source); - if (isArray(source) || isSet(source)) { - const methodPush = results.push || results.add; - const methodPushBound = methodPush && methodPush.bind(results); - for (const value of source) { - const result = await iteratee(value, results, source); - if (result === true) { - methodPushBound(value); - } - } - } else { - const methodSet = isFunction(results.set); - for await (const [key, value] of source) { - const result = await iteratee(value, key, results, source); - if (result === true) { - if (methodSet) { - results.set(key, value); - } else { - results[key] = value; - } - } - } - } - return results; - } - - /** - * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. - * - * @function filter - * @category utility - * @type {Function} - * @param {Array | object | Function} source - Object that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. - * @param {Object | Function} [results = {}] - Object that will be used to assign results. - * @returns {Array | object | Function} - A new object of the same calling object's type. - * - * @example - * import { filter, assert } from '@universalweb/acid'; - * assert(filter({a: false, b: true, c: true}, (item) => { - * return item; - * }), {b: true, c: true}); - */ - const filter = generateLoop(filterArray, filterAsyncArray, filterObject, filterAsyncObject, forOfFilter, forOfFilterAsync); - - function returnFlow$1(callable) { - return (...methods) => { - return (arg) => { - let value = arg; - callable(methods, (item) => { - value = item(value); - }); - return value; - }; - }; - } - /** - * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. - * - * @function flow - * @category utility - * @type {Function} - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flow(increment, increment, deduct)(0); - * // => 1 - */ - const flow = returnFlow$1(eachArray); - /** - * This method is like flow except that it creates a function that invokes the given functions from right to left. - * - * @function flowRight - * @category utility - * @type {Function} - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flowRight(increment, increment, deduct)(0); - * // => 1 - */ - const flowRight = returnFlow$1(eachRight); - - function returnFlow(callable) { - return (...methods) => { - return async (arg) => { - let value = arg; - await callable(methods, async (item) => { - value = await item(value); - }); - return value; - }; - }; - } - /** - * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. - * - * @function flowAsync - * @category utility - * @type {Function} - * @async - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); - * // => 2 - */ - const flowAsync = returnFlow(eachAsyncArray); - /** - * This method is like flow except that it creates a function that invokes the given functions from right to left. - * - * @function flowAsyncRight - * @category utility - * @type {Function} - * @async - * @param {Array} collection - Methods to invoke. - * @returns {Function} - Returns the new composite function. - * - * @example - * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); - * // => 2 - */ - const flowAsyncRight = returnFlow(eachRightAsync); - - function forMap(source, callback) { - const cloned = cloneType(source); - const method = cloned.push || cloned.add; - if (method && isFunction(method)) { - const methodBound = method.bind(cloned); - source.forEach((item) => { - const result = callback(item, cloned); - methodBound(result); - }); - } else if (isFunction(cloned.set)) { - source.forEach((item, key) => { - const result = callback(item, key, cloned); - cloned.set(key, result); - }); - } else { - source.forEach((item, key) => { - const result = callback(item, key, cloned); - cloned[key] = result; - }); - } - return cloned; - } - - /** - * Takes all but the last item in the array. - * - * @function arraysToObject - * @type {Function} - * @category utility - * @param {Array} source - Array to have items extracted from. - * @param {Array} properties - Array to have items extracted from. - * @returns {Array} - Returns a completely flattened array. - * - * @example - * import { arraysToObject, assert } from '@universalweb/acid'; - * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3}); - */ - function arraysToObject(source, properties) { - const sortedObject = {}; - eachArray(source, (item, key) => { - sortedObject[properties[key]] = item; - }); - return sortedObject; - } - - /** - * Checks if an object contains something. For basic searches. - * - * @function has - * @category utility - * @param {Array|String|Object} source - Object to be checked. - * @param {String|Array|Function|RegExp} search - Object that is being searched for. - * @param {Number} position - Index at which to start searching. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { has, assert } from '@universalweb/acid'; - * assert(has('Hello World', 'Hello'), true); - * assert(has(['Hello', 'World'], 'hello'), true); - */ - function has(source, search, position) { - if (noValue(source) || noValue(search)) { - return false; - } - if (source === search) { - return true; - } - if (isString(source)) { - if (isString(search)) { - return source.includes(search, position); - } - if (isRegex(search)) { - return search.test(source); - } - if (isFunction(search)) { - return search(source); - } - if (isArray(search)) { - return everyArray(search, (item) => { - return has(source, item); - }); - } - return every(search, (item) => { - return has(source, item); - }); - } - if (isArray(source)) { - if (isRegex(search)) { - return everyArray(source, (item) => { - return item.test(search); - }); - } - if (isFunction(search)) { - return everyArray(source, search); - } - if (isArray(search)) { - return everyArray(search, (item) => { - return has(source, item); - }); - } - return source.includes(search, position); - } - if (isPlainObject(source)) { - if (isRegex(search)) { - return everyObject(source, (item) => { - return item.test(search); - }); - } - if (isFunction(search)) { - return everyObject(source, search); - } - if (isPlainObject(search)) { - return everyObject(source, (item, key) => { - return item === search[key]; - }); - } - return everyObject(source, (item) => { - return has(item, search); - }); - } - return false; - } - - /** - * Checks if the string has a '.'. - * - * @function hasDot - * @category utility - * @param {*} source - Object to be checked. - * @returns {Boolean} - Returns true or false. - * - * @example - * import { hasDot, assert } from '@universalweb/acid'; - * assert(hasDot('test.js'), true); - */ - const hasDot = regexTestFactory(/\./); - - /** - * Checks if a property on an object has a value. If not, it will assign a value. - * - * @function ifNotAssign - * @category utility - * @type {Function} - * @param {Object} rootObject - The object to check. - * @param {String} property - The property name which is to be checked. - * @param {*} equalThis - The reassignment value for the property being checked. - * @returns {Object} - Returns the provided rootObject. - * - * @example - * import { ifNotAssign, assert } from '@universalweb/acid'; - * assert(ifNotAssign({}, 'a', 1), {a:1}); - */ - const ifNotAssign = (rootObject, property, equalThis) => { - if (property && !hasValue(rootObject[property])) { - rootObject[property] = equalThis; - } - return rootObject; - }; - - class Intervals { - list = construct(Map); - construct() {} - /** - * Remove a setInterval that was created using the intervals function. - * - * @param {Number} id - The id of the setInterval to remove. - * @returns {undefined} - Returns nothing. - * - * @example - * timer(() => {}, 100); - * // => 0 - */ - remove(id) { - clearInterval(id); - this.list.delete(id); - } - has(id) { - return this.list.has(id); - } - get(id) { - return this.list.get(id); - } - /** - * Create a setInterval & add it to the list of interval timers. - * - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setTimeoutId ID. - * - * @example - * timers.set(() => {}, 100); - * // => 0 - */ - set(callable, time) { - const id = setInterval(() => { - callable(); - }, time); - this.list.set(id, true); - return id; - } - /** - * Clear all active setIntervals. - * - * @returns {undefined} - Returns undefined. - * - * @example - * intervals.clear(); - * // => undefined - */ - clear() { - const currentThis = this; - currentThis.list.forEach((id) => { - currentThis.remove(id); - }); - } - } - const intervals = construct(Intervals); - /** - * Create an interval timer. - * - * @function interval - * @category function - * @type {Function} - * @param {Function} callable - The function to be invoked. - * @param {Number} time - The time in milliseconds. - * @returns {Object} - Returns setInterval ID. - * - * @example - * interval(() => {}, 100); - * // => 0 - */ - function interval(callable, time) { - return intervals.set(callable, time); - } - /** - * Clear all active interval timers. - * - * @function clearIntervals - * @category function - * @returns {undefined} - Returns undefined. - * - * @example - * clearIntervals(); - * // => undefined - */ - function clearIntervals() { - const id = setTimeout(noop, 0); - times(id, (index) => { - intervals.remove(index); - }); - } - - function merge(target, ...sources) { - each(sources, (currentSource) => { - each(currentSource, (sourceItem, sourceKey) => { - if (target[sourceKey]) { - if (isPlainObject(sourceItem) || isArray(sourceItem) || sourceItem.forEach) { - return merge(target[sourceKey], sourceItem); - } - } - target[sourceKey] = sourceItem; - }); - }); - return target; - } - - /** - * Returns the model with the given name. - * - * @function Model - * @type {Class} - * @category utility - * @param {String} modelName - The name of the model to return. - * @param {*} modelSource - The value of the model to return. - * @returns {Model} - The model with the given name. - * - * @example - * import { Model, model, assert } from '@universalweb/acid'; - * const test = new Model('test', {a: 1}); - * assert(model('test'), {a: 1}); - */ - class Model { - static models = new Map(); - constructor(modelName, modelSource) { - if (hasValue(modelSource)) { - assign(this, modelSource); - this.modelName = modelName; - Model.models.set(modelName, modelSource); - } else { - assign(this, modelName); - } - } - delete(modelName) { - Model.models.delete(modelName || this.modelName); - } - set(modelName) { - if (modelName) { - this.modelName = modelName; - } - Model.models.set(modelName || this.modelName, this); - } - has(modelName) { - return Model.models.has(modelName || this.modelName); - } - get(modelName) { - return Model.models.get(modelName || this.modelName); - } - } - /** - * Set & Get a model. - * - * @function model - * @type {Function} - * @category utility - * @param {String} modelName - Name of the model. - * @param {Object} modelSource - The model object. - * @returns {Model} - Returns the associated model. - * - * @example - * import { model, assert } from '@universalweb/acid'; - * model('test', {a: 1}); - * assert(model('test'), {a: 1}); - */ - function model(modelName, modelSource) { - if (hasValue(modelSource)) { - return construct(Model, [modelName, modelSource]); - } - return get(modelName, Model.models); - } - - /** - * Takes the first two arguments given and returns them inside a new array. - * - * @function pair - * @category utility - * @param {*} argument1 - The source object. - * @param {*} argument2 - The source object. - * @returns {Array} The array which holds the pair. - * - * @example - * import { pair, assert } from '@universalweb/acid'; - * assert(air(1, 2), [1, 2]); - */ - function pair(argument1, argument2) { - return [argument1, argument2]; - } - - /** - * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee. - * - * @function concurrentStatus - * @category utility - * @type {Function} - * @param {Array} source - Array that will be looped through. - * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. - * @param {*} additionalArgument - An object to be given each time to the iteratee. - * @returns {Array} - The array from Promise.allSettled. - * - * @example - * import { concurrentStatus, assert } from '@universalweb/acid'; - * const tempList = []; - * await concurrentStatus([1, 2], async (item) => { - * return item; - * }); - * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]); - */ - function concurrentStatus(source, iteratee, additionalArgument) { - const arrayLength = source.length; - const queue = []; - for (let index = 0; index < arrayLength; index++) { - queue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument); - } - return Promise.allSettled(queue); - } - - /** - * A wrapper around the promise constructor. - * - * @function promise - * @type {Function} - * @category utility - * @param {Function} callback - Function to be called back. - * @returns {Promise} - A constructor with a callback function.). - * - * @example - * promise((a) => {}); - * // => Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined} - */ - function promise(callback) { - return new Promise(callback); - } - - /** - * Using a deep comparison it checks if properties of two objects using an array are equal. - * - * @function propertyMatch - * @type {Function} - * @category utility - * @param {Object} source - The source object to compare. - * @param {Object} compared - Object to be compared to source. - * @param {Array} properties - List of properties to compare defaults to keys(source). - * @returns {Array} - Returns an array of properties. - * - * @example - * import { propertyMatch, assert } from '@universalweb/acid'; - * assert(propertyMatch({ - * a: 1, - * b: 2 - * }, { - * a: 1, - * b: 2 - * }, ['a', 'b']), true); - */ - const propertyMatch = (source, compared, properties = keys(source)) => { - return everyArray(properties, (property) => { - return isEqual(source[property], compared[property]); - }); - }; - - function setKey(source, key, value) { - if (key && isPlainObject(source)) { - source[key] = value; - } else if (isNumber(key) && isArray(source)) { - source[key] = value; - } else if (source.set) { - source.set(key, value); - } else if (source.push) { - source.push(value); - } else if (source.add) { - source.add(value); - } else { - source[key] = value; - } - return source; - } - - function setValue(source, value, key) { - if (isNumber(key) && isArray(source)) { - source[key] = value; - } else if (source.push) { - source.push(value); - } else if (source.add) { - source.add(value); - } else { - source[key] = value; - } - return source; - } - - class Store { - source; - constructor(source = {}) { - this.source = source; - if (source === null || typeof source !== 'object') { - return source; - } - eachObject(source, (property) => { - source[property] = new Store(source[property]); - }); - this.data = new Proxy(source, { - get(proxySource, property) { - console.log(proxySource, property, proxySource[property]); - return proxySource[property]; - }, - set(proxySource, property, value) { - console.log(proxySource, property, proxySource[property]); - proxySource[property] = new Store(value); - return true; - } - }); - } - } - - /** - * This method returns a new empty array. - * - * @function stubArray - * @category utility - * @type {Function} - * @returns {Array} - Returns the new empty array. - * - * @example - * import { stubArray, assert } from '@universalweb/acid'; - * assert(stubArray(), []); - */ - function stubArray() { - return []; - } - - /** - * This method returns false. - * - * @function stubFalse - * @category utility - * @type {Function} - * @returns {Boolean} - Returns false. - * - * @example - * import { stubFalse, assert } from '@universalweb/acid'; - * assert(stubFalse(), false); - */ - function stubFalse() { - return false; - } - - /** - * This method returns a new empty object. - * - * @function stubObject - * @category utility - * @type {Function} - * @returns {Object} - Returns the new empty object. - * - * @example - * import { stubObject, assert } from '@universalweb/acid'; - * assert(stubObject(), {}); - */ - const stubObject = () => { - return {}; - }; - - /** - * This method returns a new empty string. - * - * @function stubString - * @category utility - * @type {Function} - * @returns {String} - Returns the new empty string. - * - * @example - * import { stubString, assert } from '@universalweb/acid'; - * assert(stubString(), ''); - */ - const stubString = () => { - return ''; - }; - - /** - * This method returns true. - * - * @function stubTrue - * @category utility - * @type {Function} - * @returns {Boolean} - Returns true. - * - * @example - * import { stubTrue, assert } from '@universalweb/acid'; - * assert(stubTrue(), true); - */ - const stubTrue = () => { - return true; - }; - - /** - * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument. - * - * @async - * @function timesAsync - * @category utility - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @returns {undefined} - Nothing. - * - * @example - * import { timesAsync } from '@universalweb/acid'; - * await timesAsync(3, async (item) => { - * console.log(item); - * }); - * // 0 - * // 1 - * // 2 - * // => undefined - */ - async function timesAsync(amount, iteratee) { - for (let index = 0; index < amount; index++) { - await iteratee(amount); - } - } - /** - * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array. - * - * @async - * @function timesMapAsync - * @category array - * @type {Function} - * @param {Number} amount - The amount of times to loop invoking the iteratee. - * @param {Function} iteratee - Transformation function which is passed index and amount. - * @param {Array} [results = []] - Array that will have iteratee return pushed to. - * @returns {Array} - An array with iteratee's returned values. - * - * @example - * import { timesMapAsync } from '@universalweb/acid'; - * await timesMapAsync(3, (item) => { - * return item; - * }); - * // => [0, 1, 2] - */ - async function timesMapAsync(amount, iteratee, results = []) { - for (let index = 0; index < amount; index++) { - results[index] = await iteratee(amount); - } - return results; - } - - /** - * Performs a toggle between 2 values using a deep or strict comparison. - * - * @function toggle - * @type {Function} - * @category utility - * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments. - * @param {(string|number|Object|Array)} on - The first object to be compared to. - * @param {(string|number|Object|Array)} off - The second object to be compared to. - * @returns {(string|number|Object|Array)} - The opposing value to the current. - * - * @example - * import { toggle } from '@universalweb/acid'; - * let toggleMe = true; - * toggleMe = toggle(toggleMe, true, false); - * // => false - */ - function toggle(value, on = true, off = false) { - return isEqual(on, value) ? off : on; - } - - /** - * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available. - * - * @class UniqID - * @type {Class} - * @category utility - * @returns {UniqID} - Returns a new instance of UniqID. - * - * @example - * import { UniqID, construct, assert } from '@universalweb/acid'; - * const gen = construct(UniqID); - * assert(gen.get(), 0); - * assert(gen.get(), 1); - * gen.free(0); - * assert(gen.get(), 0); - */ - class UniqID { - totalActive = 0; - freed = []; - totalFree = 0; - /** - * Generates a new ID or recycle one that is no longer used. - * - * @function get - * @class UniqID - * @category utility - * @type {Function} - * @returns {Number} - Returns a unique id. - * - * @example - * import { UniqID, construct, assert } from '@universalweb/acid'; - * const gen = construct(UniqID); - * assert(gen.get(), 0); - */ - get() { - let result = this.freed.shift(); - if (hasValue(result)) { - this.totalFree--; - } else { - result = this.totalActive; - this.totalActive++; - } - return result; - } - /** - * Frees an UID so that it may be recycled for later use. - * - * @function free - * @class UniqID - * @category utility - * @type {Function} - * @param {Number} id - Number to be freed. - * @returns {undefined} - Nothing is returned. - * - * @example - * import { UniqID, construct, assert } from '@universalweb/acid'; - * const gen = construct(UniqID); - * assert(gen.get(), 0); - * gen.free(0); - * assert(gen.get(), 0); - */ - free(id) { - this.freed.push(id); - this.totalFree++; - const isActive = this.totalActive > 0; - const shouldReset = this.totalActive === this.totalFree; - if (isActive && shouldReset) { - this.reset(); - } - } - reset() { - this.totalActive = 0; - this.freed.length = 0; - this.totalFree = 0; - } - } - /** - * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available. - * - * @function uniqID - * @category utility - * - * @example - * import { uniqID, assert } from '@universalweb/acid'; - * assert(uniqID.get(), 0); - * assert(uniqID.get(), 1); - * uniqID.free(0); - * assert(uniqID.get(), 0); - */ - const uniqID = construct(UniqID); - - /** - * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. - * - * @function VirtualStorage - * @category utility - * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. - * @returns {*} - Returns a new VirtualStorage Object. - * - * @example - * import { VirtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = new VirtualStorage(); - * // => New VirtualStorage Object - */ - class VirtualStorage { - constructor(initialObject = new Map()) { - this.items = initialObject; - } - /** - * Get an item from a virtual storage object. - * - * @param {String} key - The key used to store the data. - * @returns {undefined} - Returns undefined. - * - * @example - * import { VirtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = virtualStorage(); - * myVirtualStorage.setItem('key', 'value'); - * myVirtualStorage.getItem('key'); - * // => 'value' - */ - getItem(key) { - if (this.isMap) { - return this.items.get(key); - } else { - return this.items[key]; - } - } - get(...args) { - return this.getItem(...args); - } - hasItem(key) { - if (this.isMap) { - return this.items.has(key); - } else { - return hasValue(this.items[key]); - } - } - has(...args) { - return this.hasItem(...args); - } - /** - * Save an item to a virtual storage object. - * - * @param {String} key - The key used to store the data. - * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify. - * @returns {undefined} - Returns undefined. - * - * @example - * import { VirtualStorage, assert } from '@universalweb/acid'; - * const vStorage = new VirtualStorage(); - * vStorage.setItem('title', 'value'); - * assert(vStorage.getItem('title'), 'value'); - */ - setItem(key, value) { - if (this.isMap) { - this.items.set(key, value); - } else { - this.items[key] = value; - } - return this; - } - set(...args) { - return this.setItem(...args); - } - /** - * Clears all data from the virtual storage object by replacing with a new object. - * - * @returns {undefined} - Returns undefined. - * - * @example - * import { virtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = virtualStorage(); - * myVirtualStorage.setItem('key', 'value'); - * myVirtualStorage.clear(); - * myVirtualStorage.getItem('key'); - * // => undefined - */ - clear() { - if (this.isMap) { - this.items.clear(); - } else { - this.items = cloneType(this.items); - } - return this; - } - /** - * Remove an item from a virtual storage object. - * - * @param {String} key - The key used to remove data. - * @returns {undefined} - Returns undefined. - * - * @example - * import { virtualStorage } from '@universalweb/acid'; - * const myVirtualStorage = virtualStorage(); - * myVirtualStorage.setItem('key', 'value'); - * myVirtualStorage.removeItem('key'); - * myVirtualStorage.getItem('key'); - * // => undefined - */ - removeItem(key) { - if (this.isMap) { - this.items.delete(key); - } else { - this.items[key] = null; - } - return this; - } - remove(...args) { - return this.removeItem(...args); - } - } - /** - * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. - * - * @function virtualStorage - * @category browser - * @type {Function} - * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. - * @returns {*} - Returns a new VirtualStorage Object. - * - * @example - * import { virtualStorage, assert } from '@universalweb/acid'; - * const vStorage = virtualStorage(); - * vStorage.setItem('title', 'value'); - * assert(vStorage.getItem('title'), 'value'); - */ - function virtualStorage(initialObject) { - return new VirtualStorage(initialObject); - } - - /** - * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object. - * - * @function inAsync - * @type {Function} - * @category Utility - * @async - * @param {Array} source - Array of async functions that will be looped through. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. - * @returns {Object} - The originally given array. - * - * @example - * import { inAsync, assert } from '@universalweb/acid'; - * const list = []; - * await inAsync([async (firstArgument, item, index) => { - * list.push(index + firstArgument.a); - * }, async (firstArgument, item, index) => { - * list.push(index); - * }], {a:1}); - * assert(list, [1, 1]); - */ - async function inAsync(source, thisBind, ...args) { - const arrayLength = source.length; - const results = []; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = await source[index].call(thisBind, ...args, index, callable); - } - } else { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = await source[index](...args, index, callable); - } - } - return results; - } - - /** - * Invoke an array of functions. - * - * @function inSync - * @category Utility - * @type {Function} - * @param {Array} source - Array of functions that will be looped through. - * @param {*} thisBind - Object to use as the "this" within the function. - * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function. - * @returns {undefined} - Returns undefined. - * - * @example - * inSync([() => {console.log(1);}, () => {console.log(2);}]); - * // 1 - * // 2 - * // => undefined - */ - function inSync(source, thisBind, ...args) { - const arrayLength = source.length; - const results = []; - if (thisBind) { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = callable.call(thisBind, ...args, index, callable); - } - } else { - for (let index = 0; index < arrayLength; index++) { - const callable = source[index]; - results[index] = callable(...args, index, callable); - } - } - return results; - } - - async function copyToPath(sourceFolder, destinationFolder, file) { - const sourcePath = path.join(sourceFolder, file); - const destinationPath = path.join(destinationFolder, file); - await promises.copyFile(sourcePath, destinationPath); - } - async function copyFolder(sourceFolder, destinationFolder) { - const files = await promises.readdir(sourceFolder); - await eachAsyncArray(files, async (file) => { - const sourcePath = path.join(sourceFolder, file); - const filestats = await promises.stat(sourcePath); - if (filestats.isDirectory()) { - const folderDestination = path.join(destinationFolder, file.replace(sourceFolder, '')); - await promises.mkdir(folderDestination, { - recursive: true - }); - await copyFolder(sourcePath, folderDestination); - } else { - await copyToPath(sourceFolder, destinationFolder, file); - } - }); - return true; - } - - function currentFile(importMeta) { - if (globalThis.__filename) { - return __filename; - } - return node_url.fileURLToPath(importMeta.url); - } - function currentPath(importMeta) { - if (globalThis.__dirname) { - return __dirname; - } - return path$1.dirname(node_url.fileURLToPath(importMeta.url)); - } - - exports.Chain = Chain; - exports.Intervals = Intervals; - exports.Model = Model; - exports.Store = Store; - exports.Timers = Timers; - exports.UniqID = UniqID; - exports.VirtualStorage = VirtualStorage; - exports.add = add; - exports.after = after; - exports.apply = apply; - exports.arrayToRegex = arrayToRegex; - exports.arraysToObject = arraysToObject; - exports.ary = ary; - exports.assert = assert; - exports.assertAsync = assertAsync; - exports.assign = assign; - exports.assignToClass = assignToClass; - exports.assignToObject = assignToObject; - exports.before = before; - exports.bindAll = bindAll; - exports.cacheNativeMethod = cacheNativeMethod; - exports.calcProgress = calcProgress; - exports.camelCase = camelCase; - exports.chain = chain; - exports.chunk = chunk; - exports.chunkString = chunkString; - exports.clear = clear; - exports.clearArray = clearArray; - exports.clearBuffer = clearBuffer; - exports.clearIntervals = clearIntervals; - exports.clearTimers = clearTimers; - exports.clone = clone; - exports.cloneArray = cloneArray; - exports.cloneType = cloneType; - exports.compact = compact; - exports.compactKeys = compactKeys; - exports.compactMap = compactMap; - exports.compactMapArray = compactMapArray; - exports.compactMapAsyncArray = compactMapAsyncArray; - exports.compactMapAsyncObject = compactMapAsyncObject; - exports.compactMapObject = compactMapObject; - exports.concurrent = concurrent; - exports.concurrentEachArray = concurrentEachArray; - exports.concurrentStatus = concurrentStatus; - exports.construct = construct; - exports.constructorName = constructorName; - exports.copyFolder = copyFolder; - exports.countBy = countBy; - exports.countKey = countKey; - exports.countWithoutKey = countWithoutKey; - exports.currentFile = currentFile; - exports.currentPath = currentPath; - exports.curry = curry; - exports.curryRight = curryRight; - exports.debounce = debounce; - exports.deduct = deduct; - exports.defProp = defProp; - exports.difference = difference; - exports.divide = divide; - exports.drop = drop; - exports.dropRight = dropRight; - exports.each = each; - exports.eachArray = eachArray; - exports.eachAsyncArray = eachAsyncArray; - exports.eachAsyncObject = eachAsyncObject; - exports.eachObject = eachObject; - exports.eachRight = eachRight; - exports.eachRightAsync = eachRightAsync; - exports.ensureArray = ensureArray; - exports.ensureBuffer = ensureBuffer; - exports.equalsZero = isZero; - exports.escapeRegex = escapeRegex; - exports.escapeRegexRegex = escapeRegexRegex; - exports.every = every; - exports.everyArg = everyArg; - exports.everyArray = everyArray; - exports.everyAsyncArray = everyAsyncArray; - exports.everyAsyncObject = everyAsyncObject; - exports.everyObject = everyObject; - exports.extendClass = extendClass; - exports.filter = filter; - exports.filterArray = filterArray; - exports.filterAsyncArray = filterAsyncArray; - exports.filterAsyncObject = filterAsyncObject; - exports.filterObject = filterObject; - exports.findIndex = findIndex; - exports.findIndexCache = findIndexCache; - exports.findItem = findItem; - exports.first = first; - exports.flatten = flatten; - exports.flattenDeep = flattenDeep; - exports.flow = flow; - exports.flowAsync = flowAsync; - exports.flowAsyncRight = flowAsyncRight; - exports.flowRight = flowRight; - exports.forEach = forEach; - exports.forEachAsync = forEachAsync; - exports.forMap = forMap; - exports.forOf = forOf; - exports.forOfAsync = forOfAsync; - exports.forOfCompactMap = forOfCompactMap; - exports.forOfCompactMapAsync = forOfCompactMapAsync; - exports.forOfEvery = forOfEvery; - exports.forOfEveryAsync = forOfEveryAsync; - exports.forOfFilter = forOfFilter; - exports.forOfFilterAsync = forOfFilterAsync; - exports.forOfMap = forOfMap; - exports.forOfMapAsync = forOfMapAsync; - exports.generateLoop = generateLoop; - exports.get = get; - exports.getEntries = getEntries; - exports.getFileExtension = getFileExtension; - exports.getFilename = getFilename; - exports.getHighest = getHighest; - exports.getLowest = getLowest; - exports.getNumberInsertIndex = getNumberInsertIndex; - exports.getPropDesc = getPropDesc; - exports.getPropNames = getPropNames; - exports.getType = getType; - exports.getTypeName = getTypeName; - exports.groupBy = groupBy; - exports.has = has; - exports.hasAnyKeys = hasAnyKeys; - exports.hasDot = hasDot; - exports.hasKeys = hasKeys; - exports.hasLength = hasLength; - exports.hasProp = hasProp; - exports.hasValue = hasValue; - exports.htmlEntities = htmlEntities; - exports.ifInvoke = ifInvoke; - exports.ifNotAssign = ifNotAssign; - exports.ifValue = ifValue; - exports.inAsync = inAsync; - exports.inSync = inSync; - exports.increment = increment; - exports.indexBy = indexBy; - exports.initial = initial; - exports.initialString = initialString; - exports.insertInRange = insertInRange; - exports.intersection = intersection; - exports.interval = interval; - exports.intervals = intervals; - exports.invert = invert; - exports.invokeArray = invokeArray; - exports.invokeCollection = invokeCollection; - exports.invokeCollectionAsync = invokeCollectionAsync; - exports.isArguments = isArguments; - exports.isArray = isArray; - exports.isArrayBuffer = isArrayBuffer; - exports.isArrayBufferCall = isArrayBufferCall; - exports.isArrayLike = isArrayLike; - exports.isAsync = isAsync; - exports.isAsyncCall = isAsyncCall; - exports.isBigInt = isBigInt; - exports.isBigIntCall = isBigIntCall; - exports.isBoolean = isBoolean; - exports.isBooleanCall = isBooleanCall; - exports.isBuffer = isBuffer; - exports.isBufferCall = isBufferCall; - exports.isChild = isChild; - exports.isCloneable = isCloneable; - exports.isConstructor = isConstructor; - exports.isConstructorFactory = isConstructorFactory; - exports.isConstructorNameFactory = isConstructorNameFactory; - exports.isDate = isDate; - exports.isDateCall = isDateCall; - exports.isDeno = isDeno; - exports.isEmpty = isEmpty; - exports.isEqual = isEqual; - exports.isF32 = isF32; - exports.isF32Call = isF32Call; - exports.isF64 = isF64; - exports.isF64Call = isF64Call; - exports.isFalse = isFalse; - exports.isFalsy = isFalsy; - exports.isFileCSS = isFileCSS; - exports.isFileHTML = isFileHTML; - exports.isFileJS = isFileJS; - exports.isFileJSON = isFileJSON; - exports.isFloat = isFloat; - exports.isFunction = isFunction; - exports.isGenerator = isGenerator; - exports.isGeneratorCall = isGeneratorCall; - exports.isI16 = isI16; - exports.isI16Call = isI16Call; - exports.isI32 = isI32; - exports.isI32Call = isI32Call; - exports.isI8 = isI8; - exports.isI8Call = isI8Call; - exports.isIterable = isIterable; - exports.isKindAsync = isKindAsync; - exports.isMap = isMap; - exports.isMapCall = isMapCall; - exports.isMatchArray = isMatchArray; - exports.isMatchObject = isMatchObject; - exports.isNegative = isNegative; - exports.isNodejs = isNodejs; - exports.isNotArray = isNotArray; - exports.isNotNumber = isNotNumber; - exports.isNotString = isNotString; - exports.isNull = isNull; - exports.isNumber = isNumber; - exports.isNumberCall = isNumberCall; - exports.isNumberEqual = isNumberEqual; - exports.isNumberInRange = isNumberInRange; - exports.isNumberNotInRange = isNumberNotInRange; - exports.isParent = isParent; - exports.isPlainObject = isPlainObject; - exports.isPositive = isPositive; - exports.isPrimitive = isPrimitive; - exports.isPromise = isPromise; - exports.isRegex = isRegex; - exports.isRegexCall = isRegexCall; - exports.isRelated = isRelated; - exports.isSafeInt = isSafeInt; - exports.isSame = isSame; - exports.isSameType = isSameType; - exports.isSet = isSet; - exports.isSetCall = isSetCall; - exports.isString = isString; - exports.isTrue = isTrue; - exports.isTruthy = isTruthy; - exports.isTypeFactory = isTypeFactory; - exports.isTypedArray = isTypedArray; - exports.isU16 = isU16; - exports.isU16Call = isU16Call; - exports.isU32 = isU32; - exports.isU32Call = isU32Call; - exports.isU8 = isU8; - exports.isU8C = isU8C; - exports.isU8CCall = isU8CCall; - exports.isU8Call = isU8Call; - exports.isUndefined = isUndefined; - exports.isWeakMap = isWeakMap; - exports.isWeakMapCall = isWeakMapCall; - exports.isZero = isZero; - exports.jsonParse = jsonParse; - exports.kebabCase = kebabCase; - exports.keys = keys; - exports.largest = largest; - exports.last = last; - exports.lowerCase = lowerCase; - exports.map = map; - exports.mapArray = mapArray; - exports.mapAsyncArray = mapAsyncArray; - exports.mapAsyncObject = mapAsyncObject; - exports.mapObject = mapObject; - exports.mapRightArray = mapRightArray; - exports.mapWhile = mapWhile; - exports.merge = merge; - exports.model = model; - exports.multiply = multiply; - exports.negate = negate; - exports.noValue = noValue; - exports.noop = noop; - exports.notEqual = notEqual; - exports.nthArg = nthArg; - exports.objectAssign = objectAssign; - exports.objectEntries = objectEntries; - exports.objectSize = objectSize; - exports.omit = omit; - exports.once = once; - exports.onlyUnique = onlyUnique; - exports.over = over; - exports.overEvery = overEvery; - exports.pair = pair; - exports.partition = partition; - exports.pick = pick; - exports.pluck = pluck; - exports.pluckObject = pluckObject; - exports.promise = promise; - exports.propertyMatch = propertyMatch; - exports.randomFloat = randomFloat; - exports.randomInt = randomInt; - exports.range = range; - exports.rangeDown = rangeDown; - exports.rangeUp = rangeUp; - exports.rawURLDecode = rawURLDecode; - exports.reArg = reArg; - exports.regexTestFactory = regexTestFactory; - exports.remainder = remainder; - exports.remove = remove; - exports.removeBy = removeBy; - exports.replaceList = replaceList; - exports.rest = rest; - exports.restString = restString; - exports.returnValue = returnValue; - exports.right = right; - exports.rightString = rightString; - exports.sample = sample; - exports.sanitize = sanitize; - exports.setKey = setKey; - exports.setValue = setValue; - exports.shuffle = shuffle; - exports.smallest = smallest; - exports.snakeCase = snakeCase; - exports.sortCollectionAlphabetically = sortCollectionAlphabetically; - exports.sortCollectionAlphabeticallyReverse = sortCollectionAlphabeticallyReverse; - exports.sortCollectionAscending = sortCollectionAscending; - exports.sortCollectionAscendingFilter = sortCollectionAscendingFilter; - exports.sortCollectionDescending = sortCollectionDescending; - exports.sortCollectionDescendingFilter = sortCollectionDescendingFilter; - exports.sortNumberAscending = sortNumberAscending; - exports.sortNumberDescening = sortNumberDescening; - exports.sortObjectsAlphabetically = sortObjectsAlphabetically; - exports.sortObjectsAlphabeticallyReverse = sortObjectsAlphabeticallyReverse; - exports.sortUnique = sortUnique; - exports.stringify = stringify; - exports.stubArray = stubArray; - exports.stubFalse = stubFalse; - exports.stubObject = stubObject; - exports.stubString = stubString; - exports.stubTrue = stubTrue; - exports.subtract = subtract; - exports.subtractAll = subtractAll; - exports.subtractReverse = subtractReverse; - exports.sumAll = sumAll; - exports.take = take; - exports.takeRight = takeRight; - exports.throttle = throttle; - exports.timer = timer; - exports.timers = timers; - exports.times = times; - exports.timesAsync = timesAsync; - exports.timesMap = timesMap; - exports.timesMapAsync = timesMapAsync; - exports.toArray = toArray; - exports.toPath = toPath; - exports.toggle = toggle; - exports.tokenize = tokenize; - exports.truncate = truncate; - exports.truncateRight = truncateRight; - exports.unZip = unZip; - exports.unZipObject = unZipObject; - exports.union = union; - exports.uniqID = uniqID; - exports.unique = unique; - exports.untilFalseArray = untilFalseArray; - exports.untilTrueArray = untilTrueArray; - exports.upperCase = upperCase; - exports.upperFirst = upperFirst; - exports.upperFirstAll = upperFirstAll; - exports.upperFirstLetter = upperFirstLetter; - exports.upperFirstOnly = upperFirstOnly; - exports.upperFirstOnlyAll = upperFirstOnlyAll; - exports.virtualStorage = virtualStorage; - exports.whileCompactMap = whileCompactMap; - exports.whileEachArray = whileEachArray; - exports.whileMapArray = whileMapArray; - exports.without = without; - exports.words = words; - exports.wrap = wrap; - exports.xor = xor; - exports.zip = zip; - exports.zipObject = zipObject; + options, + ); + } + async function assertAsync(sourceArg, expected, options) { + const source = await sourceArg; + const expectedFunction = + isFunction(expected) && (await expected(source, options)) === false; + if (expectedFunction || notEqual(source, expected)) { + return createAssertError(source, expected, options); + } + return true; + } + /** + * Check if source value matches the expected value. + * + * @function assert + * @category utility + * @type {Function} + * @param {*} source - The source object to compare to. + * @param {*} expected - The expected result that's compared to the source. + * @param {*} options - Additional options for the Error instance & unit test information. + * @returns {Object} - Returns a deep clone of an object. + * + * @example + * import { assert } from '@universalweb/acid'; + * if (!assert(1,1)) { + * new Error('Assert Method Failed'); + * } + */ + function assert(source, expected, options) { + if (isKindAsync(source) || isKindAsync(expected)) { + return assertAsync(source, expected, options); + } + const expectedFunction = + isFunction(expected) && expected(source, options) === false; + if (expectedFunction || notEqual(source, expected)) { + return createAssertError(source, expected, options); + } + return true; + } + + /** + * Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to. + * + * @function bindAll + * @category utility + * @type {Function} + * @param {Object|Function|Array} collection - The functions to bind. + * @param {*} bindThis - Object to be bound to functions. + * @param {Object|Function|Array} targetAssign - Object to assign newly bound functions to. + * @returns {Object|Function|Array} - Returns the collection of bound functions or the assign target provided. + * + * @example + * import { assert, bindAll } from '@universalweb/acid'; + * const bounded = bindAll([function () { return this;}], 'Bounded'); + * assert(bounded[0](), 'Bounded'); + */ + function bindAll(collection, bindThis, targetAssign) { + const results = map(collection, (item) => { + return isFunction(item) ? item.bind(bindThis) : item; + }); + return targetAssign ? assign(targetAssign, results) : results; + } + + /** + * Clears the values out of an array, buffer, and objects like Map that have a clear method. + * + * @function clear + * @category utility + * @type {Function} + * @param {Array} source - Takes an array to be emptied. + * @returns {Array} - The originally given array. + * + * @example + * import { clear, assert } from '@universalweb/acid'; + * assert(clear(Buffer.from([1,'B', 'Cat'])), []); + */ + function clear(source) { + if (source) { + if (isBuffer(source)) { + return clearBuffer(source); + } else if (isArray(source)) { + return clearArray(source); + } else if (source.clear) { + source.clear(); + } else if (source.length) { + source.length = 0; + } + } + return source; + } + + /** + * Creates a structured clone of an object which is a "structured-cloneable type". + * + * @function clone + * @category utility + * @type {Function} + * @param {Object} source - Any structured-cloneable type object. + * @returns {Object} - Returns a deep clone of an object. + * + * @example + * import { clone, assert } from '@universalweb/acid'; + * assert(clone({a:{b:[2]}}), {a:{b:[2]}}); + */ + const structuredCloneSafe = globalThis.structuredClone; + function clone(source) { + return structuredCloneSafe(source); + } + + /** + * Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next. + * + * @function concurrent + * @type {Function} + * @category Utility + * @async + * @param {Array} source - Array of async functions that will be looped through. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. + * @returns {Object} - The originally given array. + * + * @example + * import { concurrent, assert } from '@universalweb/acid'; + * const list = []; + * await concurrent([async (item) => { + * return item; + * }, async (item) => { + * return item; + * }], null, 1); + * assert(list, [1, 1]); + */ + async function concurrent(source, thisBind, ...args) { + const arrayLength = source.length; + const results = []; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = source[index].call( + thisBind, + ...args, + index, + results, + callable, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = source[index](...args, index, results, callable); + } + } + return Promise.all(results); + } + + /** + * Creates an array with all isFalsy values removed. The values false, null, 0, "", undefined, and NaN are isFalsy. + * + * @function compact + * @category Utility + * @type {Function} + * @param {Array|Object} source - Array or Object to be compacted. + * @returns {Array|Object} - A new object or array containing the filtered values. + * + * @example + * import { compact, assert } from '@universalweb/acid'; + * assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']); + */ + function compact(source) { + if (isPlainObject(source)) { + const sourceKeys = keys(source); + const sourceKeysLength = sourceKeys.length; + const targetObject = {}; + for (let i = 0; i < sourceKeysLength; i++) { + const keyName = sourceKeys[i]; + const item = source[keyName]; + const isisTruthy = isTruthy(item); + if (isisTruthy) { + targetObject[keyName] = item; + } + } + return targetObject; + } + return source.filter((item) => { + return isTruthy(item); + }); + } + + /** + * Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function forOfCompactMapAsync + * @category utility + * @type {Function} + * @param {Object|Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * import { assert,forOfCompactMapAsync } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = await forOfCompactMapAsync(source, async (item) => { + * return item; + * }); + * assert(temp, {b: 2, c: 3}); + */ + async function forOfCompactMapAsync( + source, + iteratee = returnValue, + resultsObject, + generatorArgs, + ) { + if (isGenerator(source)) { + const resultsGenerator = []; + for await (const item of source(...generatorArgs)) { + const result = await iteratee(item, resultsGenerator, source); + if (hasValue(result)) { + resultsGenerator.push(result); + } + } + return resultsGenerator; + } + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = await iteratee(value, results, source); + if (hasValue(result)) { + methodPushBound(result); + } + } + return results; + } + const methodSet = isFunction(results.set); + for await (const [key, value] of source) { + const result = await iteratee(value, key, results, source); + if (hasValue(result)) { + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + } + return results; + } + + /** + * Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function forOfCompactMap + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined. + * + * @example + * import { assert,forOfCompactMap } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = forOfCompactMap(source, (item) => { + * return item; + * }); + * assert(temp, {b: 2, c: 3}); + */ + function forOfCompactMap(source, iteratee = returnValue, resultsObject) { + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = iteratee(value, results, source); + if (hasValue(result)) { + methodPushBound(result); + } + } + return results; + } + const methodSet = isFunction(results.set); + for (const [key, value] of source) { + const result = iteratee(value, key, results, source); + if (hasValue(result)) { + if (methodSet) { + results.set(key, result); + } else { + results[key] = result; + } + } + } + return results; + } + + /** + * Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. + * + * @function compactMap + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {Object | Function} [results = {}] - Object that will be used to assign results. + * @returns {Array | object | Function} - A new object of the same calling object's type. + * + * @example + * import { compactMap, assert } from '@universalweb/acid'; + * assert(compactMap({a: null, b: 2, c: 3}, (item) => { + * return item; + * }), {b: 2, c: 3}); + */ + const compactMap = generateLoop( + compactMapArray, + compactMapAsyncArray, + compactMapObject, + compactMapAsyncObject, + forOfCompactMap, + forOfCompactMapAsync, + ); + + function everyArg(...methods) { + if (isAsync(methods[0])) { + return async function (...args) { + return every(methods, async (method) => { + return every(args, async (item) => { + return method(item); + }); + }); + }; + } + return function (...args) { + return every(methods, (method) => { + return every(args, (item) => { + return method(item); + }); + }); + }; + } + + /** + * Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. + * + * @function forOfFilter + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. + * + * @example + * import { assert, forOfFilter } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = forOfFilter(source, (item) => { + * return Boolean(item); + * }); + * assert(temp, {b: 2, c: 3}); + */ + function forOfFilter(source, iteratee = returnValue, resultsObject) { + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = iteratee(value, results, source); + if (result === true) { + methodPushBound(value); + } + } + } else { + const methodSet = isFunction(results.set); + for (const [key, value] of source) { + const result = iteratee(value, key, results, source); + if (result === true) { + if (methodSet) { + results.set(key, value); + } else { + results[key] = value; + } + } + } + } + return results; + } + + /** + * Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. + * + * @function forOfFilterAsync + * @category utility + * @type {Function} + * @param {Object|Function|Class|Map|Set|Array} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys. + * @param {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned. + * @returns {Object|Function|Class|Map|Set|Array} - An object with mapped properties. + * + * @example + * import { assert, forOfFilterAsync } from '@universalweb/acid'; + * const source = {a: undefined, b: 2, c: 3}; + * const temp = forOfFilterAsync(source, (item) => { + * return Boolean(item); + * }); + * assert(temp, {b: 2, c: 3}); + */ + async function forOfFilterAsync( + source, + iteratee = returnValue, + resultsObject, + generatorArgs, + ) { + if (isGenerator(source)) { + const resultsGenerator = []; + for await (const item of source(...generatorArgs)) { + if ((await iteratee(item, resultsGenerator, source)) === true) { + resultsGenerator.push(item); + } + } + return resultsGenerator; + } + const results = resultsObject || cloneType(source); + if (isArray(source) || isSet(source)) { + const methodPush = results.push || results.add; + const methodPushBound = methodPush && methodPush.bind(results); + for (const value of source) { + const result = await iteratee(value, results, source); + if (result === true) { + methodPushBound(value); + } + } + } else { + const methodSet = isFunction(results.set); + for await (const [key, value] of source) { + const result = await iteratee(value, key, results, source); + if (result === true) { + if (methodSet) { + results.set(key, value); + } else { + results[key] = value; + } + } + } + } + return results; + } + + /** + * Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee. + * + * @function filter + * @category utility + * @type {Function} + * @param {Array | object | Function} source - Object that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type. + * @param {Object | Function} [results = {}] - Object that will be used to assign results. + * @returns {Array | object | Function} - A new object of the same calling object's type. + * + * @example + * import { filter, assert } from '@universalweb/acid'; + * assert(filter({a: false, b: true, c: true}, (item) => { + * return item; + * }), {b: true, c: true}); + */ + const filter = generateLoop( + filterArray, + filterAsyncArray, + filterObject, + filterAsyncObject, + forOfFilter, + forOfFilterAsync, + ); + + function returnFlow$1(callable) { + return (...methods) => { + return (arg) => { + let value = arg; + callable(methods, (item) => { + value = item(value); + }); + return value; + }; + }; + } + /** + * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. + * + * @function flow + * @category utility + * @type {Function} + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flow(increment, increment, deduct)(0); + * // => 1 + */ + const flow = returnFlow$1(eachArray); + /** + * This method is like flow except that it creates a function that invokes the given functions from right to left. + * + * @function flowRight + * @category utility + * @type {Function} + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flowRight(increment, increment, deduct)(0); + * // => 1 + */ + const flowRight = returnFlow$1(eachRight); + + function returnFlow(callable) { + return (...methods) => { + return async (arg) => { + let value = arg; + await callable(methods, async (item) => { + value = await item(value); + }); + return value; + }; + }; + } + /** + * Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous. + * + * @function flowAsync + * @category utility + * @type {Function} + * @async + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); + * // => 2 + */ + const flowAsync = returnFlow(eachAsyncArray); + /** + * This method is like flow except that it creates a function that invokes the given functions from right to left. + * + * @function flowAsyncRight + * @category utility + * @type {Function} + * @async + * @param {Array} collection - Methods to invoke. + * @returns {Function} - Returns the new composite function. + * + * @example + * flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); + * // => 2 + */ + const flowAsyncRight = returnFlow(eachRightAsync); + + function forMap(source, callback) { + const cloned = cloneType(source); + const method = cloned.push || cloned.add; + if (method && isFunction(method)) { + const methodBound = method.bind(cloned); + source.forEach((item) => { + const result = callback(item, cloned); + methodBound(result); + }); + } else if (isFunction(cloned.set)) { + source.forEach((item, key) => { + const result = callback(item, key, cloned); + cloned.set(key, result); + }); + } else { + source.forEach((item, key) => { + const result = callback(item, key, cloned); + cloned[key] = result; + }); + } + return cloned; + } + + /** + * Takes all but the last item in the array. + * + * @function arraysToObject + * @type {Function} + * @category utility + * @param {Array} source - Array to have items extracted from. + * @param {Array} properties - Array to have items extracted from. + * @returns {Array} - Returns a completely flattened array. + * + * @example + * import { arraysToObject, assert } from '@universalweb/acid'; + * assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3}); + */ + function arraysToObject(source, properties) { + const sortedObject = {}; + eachArray(source, (item, key) => { + sortedObject[properties[key]] = item; + }); + return sortedObject; + } + + /** + * Checks if an object contains something. For basic searches. + * + * @function has + * @category utility + * @param {Array|String|Object} source - Object to be checked. + * @param {String|Array|Function|RegExp} search - Object that is being searched for. + * @param {Number} position - Index at which to start searching. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { has, assert } from '@universalweb/acid'; + * assert(has('Hello World', 'Hello'), true); + * assert(has(['Hello', 'World'], 'hello'), true); + */ + function has(source, search, position) { + if (noValue(source) || noValue(search)) { + return false; + } + if (source === search) { + return true; + } + if (isString(source)) { + if (isString(search)) { + return source.includes(search, position); + } + if (isRegex(search)) { + return search.test(source); + } + if (isFunction(search)) { + return search(source); + } + if (isArray(search)) { + return everyArray(search, (item) => { + return has(source, item); + }); + } + return every(search, (item) => { + return has(source, item); + }); + } + if (isArray(source)) { + if (isRegex(search)) { + return everyArray(source, (item) => { + return item.test(search); + }); + } + if (isFunction(search)) { + return everyArray(source, search); + } + if (isArray(search)) { + return everyArray(search, (item) => { + return has(source, item); + }); + } + return source.includes(search, position); + } + if (isPlainObject(source)) { + if (isRegex(search)) { + return everyObject(source, (item) => { + return item.test(search); + }); + } + if (isFunction(search)) { + return everyObject(source, search); + } + if (isPlainObject(search)) { + return everyObject(source, (item, key) => { + return item === search[key]; + }); + } + return everyObject(source, (item) => { + return has(item, search); + }); + } + return false; + } + + /** + * Checks if the string has a '.'. + * + * @function hasDot + * @category utility + * @param {*} source - Object to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { hasDot, assert } from '@universalweb/acid'; + * assert(hasDot('test.js'), true); + */ + const hasDot = regexTestFactory(/\./); + + /** + * Checks if a property on an object has a value. If not, it will assign a value. + * + * @function ifNotAssign + * @category utility + * @type {Function} + * @param {Object} rootObject - The object to check. + * @param {String} property - The property name which is to be checked. + * @param {*} equalThis - The reassignment value for the property being checked. + * @returns {Object} - Returns the provided rootObject. + * + * @example + * import { ifNotAssign, assert } from '@universalweb/acid'; + * assert(ifNotAssign({}, 'a', 1), {a:1}); + */ + const ifNotAssign = (rootObject, property, equalThis) => { + if (property && !hasValue(rootObject[property])) { + rootObject[property] = equalThis; + } + return rootObject; + }; + + class Intervals { + list = construct(Map); + construct() {} + /** + * Remove a setInterval that was created using the intervals function. + * + * @param {Number} id - The id of the setInterval to remove. + * @returns {undefined} - Returns nothing. + * + * @example + * timer(() => {}, 100); + * // => 0 + */ + remove(id) { + clearInterval(id); + this.list.delete(id); + } + has(id) { + return this.list.has(id); + } + get(id) { + return this.list.get(id); + } + /** + * Create a setInterval & add it to the list of interval timers. + * + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setTimeoutId ID. + * + * @example + * timers.set(() => {}, 100); + * // => 0 + */ + set(callable, time) { + const id = setInterval(() => { + callable(); + }, time); + this.list.set(id, true); + return id; + } + /** + * Clear all active setIntervals. + * + * @returns {undefined} - Returns undefined. + * + * @example + * intervals.clear(); + * // => undefined + */ + clear() { + const currentThis = this; + currentThis.list.forEach((id) => { + currentThis.remove(id); + }); + } + } + const intervals = construct(Intervals); + /** + * Create an interval timer. + * + * @function interval + * @category function + * @type {Function} + * @param {Function} callable - The function to be invoked. + * @param {Number} time - The time in milliseconds. + * @returns {Object} - Returns setInterval ID. + * + * @example + * interval(() => {}, 100); + * // => 0 + */ + function interval(callable, time) { + return intervals.set(callable, time); + } + /** + * Clear all active interval timers. + * + * @function clearIntervals + * @category function + * @returns {undefined} - Returns undefined. + * + * @example + * clearIntervals(); + * // => undefined + */ + function clearIntervals() { + const id = setTimeout(noop, 0); + times(id, (index) => { + intervals.remove(index); + }); + } + + function merge(target, ...sources) { + each(sources, (currentSource) => { + each(currentSource, (sourceItem, sourceKey) => { + if (target[sourceKey]) { + if ( + isPlainObject(sourceItem) || + isArray(sourceItem) || + sourceItem.forEach + ) { + return merge(target[sourceKey], sourceItem); + } + } + target[sourceKey] = sourceItem; + }); + }); + return target; + } + + /** + * Returns the model with the given name. + * + * @function Model + * @type {Class} + * @category utility + * @param {String} modelName - The name of the model to return. + * @param {*} modelSource - The value of the model to return. + * @returns {Model} - The model with the given name. + * + * @example + * import { Model, model, assert } from '@universalweb/acid'; + * const test = new Model('test', {a: 1}); + * assert(model('test'), {a: 1}); + */ + class Model { + static models = new Map(); + constructor(modelName, modelSource) { + if (hasValue(modelSource)) { + assign(this, modelSource); + this.modelName = modelName; + Model.models.set(modelName, modelSource); + } else { + assign(this, modelName); + } + } + delete(modelName) { + Model.models.delete(modelName || this.modelName); + } + set(modelName) { + if (modelName) { + this.modelName = modelName; + } + Model.models.set(modelName || this.modelName, this); + } + has(modelName) { + return Model.models.has(modelName || this.modelName); + } + get(modelName) { + return Model.models.get(modelName || this.modelName); + } + } + /** + * Set & Get a model. + * + * @function model + * @type {Function} + * @category utility + * @param {String} modelName - Name of the model. + * @param {Object} modelSource - The model object. + * @returns {Model} - Returns the associated model. + * + * @example + * import { model, assert } from '@universalweb/acid'; + * model('test', {a: 1}); + * assert(model('test'), {a: 1}); + */ + function model(modelName, modelSource) { + if (hasValue(modelSource)) { + return construct(Model, [modelName, modelSource]); + } + return get(modelName, Model.models); + } + + /** + * Takes the first two arguments given and returns them inside a new array. + * + * @function pair + * @category utility + * @param {*} argument1 - The source object. + * @param {*} argument2 - The source object. + * @returns {Array} The array which holds the pair. + * + * @example + * import { pair, assert } from '@universalweb/acid'; + * assert(air(1, 2), [1, 2]); + */ + function pair(argument1, argument2) { + return [argument1, argument2]; + } + + /** + * Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee. + * + * @function concurrentStatus + * @category utility + * @type {Function} + * @param {Array} source - Array that will be looped through. + * @param {Function} iteratee - Transformation function which is passed item, index, calling array, and array length. + * @param {*} additionalArgument - An object to be given each time to the iteratee. + * @returns {Array} - The array from Promise.allSettled. + * + * @example + * import { concurrentStatus, assert } from '@universalweb/acid'; + * const tempList = []; + * await concurrentStatus([1, 2], async (item) => { + * return item; + * }); + * assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]); + */ + function concurrentStatus(source, iteratee, additionalArgument) { + const arrayLength = source.length; + const queue = []; + for (let index = 0; index < arrayLength; index++) { + queue[index] = iteratee( + source[index], + index, + source, + arrayLength, + additionalArgument, + ); + } + return Promise.allSettled(queue); + } + + /** + * A wrapper around the promise constructor. + * + * @function promise + * @type {Function} + * @category utility + * @param {Function} callback - Function to be called back. + * @returns {Promise} - A constructor with a callback function.). + * + * @example + * promise((a) => {}); + * // => Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined} + */ + function promise(callback) { + return new Promise(callback); + } + + /** + * Using a deep comparison it checks if properties of two objects using an array are equal. + * + * @function propertyMatch + * @type {Function} + * @category utility + * @param {Object} source - The source object to compare. + * @param {Object} compared - Object to be compared to source. + * @param {Array} properties - List of properties to compare defaults to keys(source). + * @returns {Array} - Returns an array of properties. + * + * @example + * import { propertyMatch, assert } from '@universalweb/acid'; + * assert(propertyMatch({ + * a: 1, + * b: 2 + * }, { + * a: 1, + * b: 2 + * }, ['a', 'b']), true); + */ + const propertyMatch = (source, compared, properties = keys(source)) => { + return everyArray(properties, (property) => { + return isEqual(source[property], compared[property]); + }); + }; + + function setKey(source, key, value) { + if (key && isPlainObject(source)) { + source[key] = value; + } else if (isNumber(key) && isArray(source)) { + source[key] = value; + } else if (source.set) { + source.set(key, value); + } else if (source.push) { + source.push(value); + } else if (source.add) { + source.add(value); + } else { + source[key] = value; + } + return source; + } + + function setValue(source, value, key) { + if (isNumber(key) && isArray(source)) { + source[key] = value; + } else if (source.push) { + source.push(value); + } else if (source.add) { + source.add(value); + } else { + source[key] = value; + } + return source; + } + + class Store { + source; + constructor(source = {}) { + this.source = source; + if (source === null || typeof source !== "object") { + return source; + } + eachObject(source, (property) => { + source[property] = new Store(source[property]); + }); + this.data = new Proxy(source, { + get(proxySource, property) { + console.log(proxySource, property, proxySource[property]); + return proxySource[property]; + }, + set(proxySource, property, value) { + console.log(proxySource, property, proxySource[property]); + proxySource[property] = new Store(value); + return true; + }, + }); + } + } + + /** + * This method returns a new empty array. + * + * @function stubArray + * @category utility + * @type {Function} + * @returns {Array} - Returns the new empty array. + * + * @example + * import { stubArray, assert } from '@universalweb/acid'; + * assert(stubArray(), []); + */ + function stubArray() { + return []; + } + + /** + * This method returns false. + * + * @function stubFalse + * @category utility + * @type {Function} + * @returns {Boolean} - Returns false. + * + * @example + * import { stubFalse, assert } from '@universalweb/acid'; + * assert(stubFalse(), false); + */ + function stubFalse() { + return false; + } + + /** + * This method returns a new empty object. + * + * @function stubObject + * @category utility + * @type {Function} + * @returns {Object} - Returns the new empty object. + * + * @example + * import { stubObject, assert } from '@universalweb/acid'; + * assert(stubObject(), {}); + */ + const stubObject = () => { + return {}; + }; + + /** + * This method returns a new empty string. + * + * @function stubString + * @category utility + * @type {Function} + * @returns {String} - Returns the new empty string. + * + * @example + * import { stubString, assert } from '@universalweb/acid'; + * assert(stubString(), ''); + */ + const stubString = () => { + return ""; + }; + + /** + * This method returns true. + * + * @function stubTrue + * @category utility + * @type {Function} + * @returns {Boolean} - Returns true. + * + * @example + * import { stubTrue, assert } from '@universalweb/acid'; + * assert(stubTrue(), true); + */ + const stubTrue = () => { + return true; + }; + + /** + * Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument. + * + * @async + * @function timesAsync + * @category utility + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @returns {undefined} - Nothing. + * + * @example + * import { timesAsync } from '@universalweb/acid'; + * await timesAsync(3, async (item) => { + * console.log(item); + * }); + * // 0 + * // 1 + * // 2 + * // => undefined + */ + async function timesAsync(amount, iteratee) { + for (let index = 0; index < amount; index++) { + await iteratee(amount); + } + } + /** + * Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array. + * + * @async + * @function timesMapAsync + * @category array + * @type {Function} + * @param {Number} amount - The amount of times to loop invoking the iteratee. + * @param {Function} iteratee - Transformation function which is passed index and amount. + * @param {Array} [results = []] - Array that will have iteratee return pushed to. + * @returns {Array} - An array with iteratee's returned values. + * + * @example + * import { timesMapAsync } from '@universalweb/acid'; + * await timesMapAsync(3, (item) => { + * return item; + * }); + * // => [0, 1, 2] + */ + async function timesMapAsync(amount, iteratee, results = []) { + for (let index = 0; index < amount; index++) { + results[index] = await iteratee(amount); + } + return results; + } + + /** + * Performs a toggle between 2 values using a deep or strict comparison. + * + * @function toggle + * @type {Function} + * @category utility + * @param {(string|number|Object|Array)} value - Strictly compared against on & off arguments. + * @param {(string|number|Object|Array)} on - The first object to be compared to. + * @param {(string|number|Object|Array)} off - The second object to be compared to. + * @returns {(string|number|Object|Array)} - The opposing value to the current. + * + * @example + * import { toggle } from '@universalweb/acid'; + * let toggleMe = true; + * toggleMe = toggle(toggleMe, true, false); + * // => false + */ + function toggle(value, on = true, off = false) { + return isEqual(on, value) ? off : on; + } + + /** + * Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available. + * + * @class UniqID + * @type {Class} + * @category utility + * @returns {UniqID} - Returns a new instance of UniqID. + * + * @example + * import { UniqID, construct, assert } from '@universalweb/acid'; + * const gen = construct(UniqID); + * assert(gen.get(), 0); + * assert(gen.get(), 1); + * gen.free(0); + * assert(gen.get(), 0); + */ + class UniqID { + totalActive = 0; + freed = []; + totalFree = 0; + /** + * Generates a new ID or recycle one that is no longer used. + * + * @function get + * @class UniqID + * @category utility + * @type {Function} + * @returns {Number} - Returns a unique id. + * + * @example + * import { UniqID, construct, assert } from '@universalweb/acid'; + * const gen = construct(UniqID); + * assert(gen.get(), 0); + */ + get() { + let result = this.freed.shift(); + if (hasValue(result)) { + this.totalFree--; + } else { + result = this.totalActive; + this.totalActive++; + } + return result; + } + /** + * Frees an UID so that it may be recycled for later use. + * + * @function free + * @class UniqID + * @category utility + * @type {Function} + * @param {Number} id - Number to be freed. + * @returns {undefined} - Nothing is returned. + * + * @example + * import { UniqID, construct, assert } from '@universalweb/acid'; + * const gen = construct(UniqID); + * assert(gen.get(), 0); + * gen.free(0); + * assert(gen.get(), 0); + */ + free(id) { + this.freed.push(id); + this.totalFree++; + const isActive = this.totalActive > 0; + const shouldReset = this.totalActive === this.totalFree; + if (isActive && shouldReset) { + this.reset(); + } + } + reset() { + this.totalActive = 0; + this.freed.length = 0; + this.totalFree = 0; + } + } + /** + * A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available. + * + * @function uniqID + * @category utility + * + * @example + * import { uniqID, assert } from '@universalweb/acid'; + * assert(uniqID.get(), 0); + * assert(uniqID.get(), 1); + * uniqID.free(0); + * assert(uniqID.get(), 0); + */ + const uniqID = construct(UniqID); + + /** + * Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. + * + * @function VirtualStorage + * @category utility + * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. + * @returns {*} - Returns a new VirtualStorage Object. + * + * @example + * import { VirtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = new VirtualStorage(); + * // => New VirtualStorage Object + */ + class VirtualStorage { + constructor(initialObject = new Map()) { + this.items = initialObject; + } + /** + * Get an item from a virtual storage object. + * + * @param {String} key - The key used to store the data. + * @returns {undefined} - Returns undefined. + * + * @example + * import { VirtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = virtualStorage(); + * myVirtualStorage.setItem('key', 'value'); + * myVirtualStorage.getItem('key'); + * // => 'value' + */ + getItem(key) { + if (this.isMap) { + return this.items.get(key); + } else { + return this.items[key]; + } + } + get(...args) { + return this.getItem(...args); + } + hasItem(key) { + if (this.isMap) { + return this.items.has(key); + } else { + return hasValue(this.items[key]); + } + } + has(...args) { + return this.hasItem(...args); + } + /** + * Save an item to a virtual storage object. + * + * @param {String} key - The key used to store the data. + * @param {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify. + * @returns {undefined} - Returns undefined. + * + * @example + * import { VirtualStorage, assert } from '@universalweb/acid'; + * const vStorage = new VirtualStorage(); + * vStorage.setItem('title', 'value'); + * assert(vStorage.getItem('title'), 'value'); + */ + setItem(key, value) { + if (this.isMap) { + this.items.set(key, value); + } else { + this.items[key] = value; + } + return this; + } + set(...args) { + return this.setItem(...args); + } + /** + * Clears all data from the virtual storage object by replacing with a new object. + * + * @returns {undefined} - Returns undefined. + * + * @example + * import { virtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = virtualStorage(); + * myVirtualStorage.setItem('key', 'value'); + * myVirtualStorage.clear(); + * myVirtualStorage.getItem('key'); + * // => undefined + */ + clear() { + if (this.isMap) { + this.items.clear(); + } else { + this.items = cloneType(this.items); + } + return this; + } + /** + * Remove an item from a virtual storage object. + * + * @param {String} key - The key used to remove data. + * @returns {undefined} - Returns undefined. + * + * @example + * import { virtualStorage } from '@universalweb/acid'; + * const myVirtualStorage = virtualStorage(); + * myVirtualStorage.setItem('key', 'value'); + * myVirtualStorage.removeItem('key'); + * myVirtualStorage.getItem('key'); + * // => undefined + */ + removeItem(key) { + if (this.isMap) { + this.items.delete(key); + } else { + this.items[key] = null; + } + return this; + } + remove(...args) { + return this.removeItem(...args); + } + } + /** + * Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available. + * + * @function virtualStorage + * @category browser + * @type {Function} + * @param {*} initialObject - Initial object to be used as the storage object the default being a Map. + * @returns {*} - Returns a new VirtualStorage Object. + * + * @example + * import { virtualStorage, assert } from '@universalweb/acid'; + * const vStorage = virtualStorage(); + * vStorage.setItem('title', 'value'); + * assert(vStorage.getItem('title'), 'value'); + */ + function virtualStorage(initialObject) { + return new VirtualStorage(initialObject); + } + + /** + * Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object. + * + * @function inAsync + * @type {Function} + * @category Utility + * @async + * @param {Array} source - Array of async functions that will be looped through. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function. + * @returns {Object} - The originally given array. + * + * @example + * import { inAsync, assert } from '@universalweb/acid'; + * const list = []; + * await inAsync([async (firstArgument, item, index) => { + * list.push(index + firstArgument.a); + * }, async (firstArgument, item, index) => { + * list.push(index); + * }], {a:1}); + * assert(list, [1, 1]); + */ + async function inAsync(source, thisBind, ...args) { + const arrayLength = source.length; + const results = []; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = await source[index].call( + thisBind, + ...args, + index, + callable, + ); + } + } else { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = await source[index](...args, index, callable); + } + } + return results; + } + + /** + * Invoke an array of functions. + * + * @function inSync + * @category Utility + * @type {Function} + * @param {Array} source - Array of functions that will be looped through. + * @param {*} thisBind - Object to use as the "this" within the function. + * @param {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function. + * @returns {undefined} - Returns undefined. + * + * @example + * inSync([() => {console.log(1);}, () => {console.log(2);}]); + * // 1 + * // 2 + * // => undefined + */ + function inSync(source, thisBind, ...args) { + const arrayLength = source.length; + const results = []; + if (thisBind) { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = callable.call(thisBind, ...args, index, callable); + } + } else { + for (let index = 0; index < arrayLength; index++) { + const callable = source[index]; + results[index] = callable(...args, index, callable); + } + } + return results; + } + + async function copyToPath(sourceFolder, destinationFolder, file) { + const sourcePath = path.join(sourceFolder, file); + const destinationPath = path.join(destinationFolder, file); + await promises.copyFile(sourcePath, destinationPath); + } + async function copyFolder(sourceFolder, destinationFolder) { + const files = await promises.readdir(sourceFolder); + await eachAsyncArray(files, async (file) => { + const sourcePath = path.join(sourceFolder, file); + const filestats = await promises.stat(sourcePath); + if (filestats.isDirectory()) { + const folderDestination = path.join( + destinationFolder, + file.replace(sourceFolder, ""), + ); + await promises.mkdir(folderDestination, { + recursive: true, + }); + await copyFolder(sourcePath, folderDestination); + } else { + await copyToPath(sourceFolder, destinationFolder, file); + } + }); + return true; + } + + function currentFile(importMeta) { + if (globalThis.__filename) { + return __filename; + } + return node_url.fileURLToPath(importMeta.url); + } + function currentPath(importMeta) { + if (globalThis.__dirname) { + return __dirname; + } + return path$1.dirname(node_url.fileURLToPath(importMeta.url)); + } + + exports.Chain = Chain; + exports.Intervals = Intervals; + exports.Model = Model; + exports.Store = Store; + exports.Timers = Timers; + exports.UniqID = UniqID; + exports.VirtualStorage = VirtualStorage; + exports.add = add; + exports.after = after; + exports.apply = apply; + exports.arrayToRegex = arrayToRegex; + exports.arraysToObject = arraysToObject; + exports.ary = ary; + exports.assert = assert; + exports.assertAsync = assertAsync; + exports.assign = assign; + exports.assignToClass = assignToClass; + exports.assignToObject = assignToObject; + exports.before = before; + exports.bindAll = bindAll; + exports.cacheNativeMethod = cacheNativeMethod; + exports.calcProgress = calcProgress; + exports.camelCase = camelCase; + exports.chain = chain; + exports.chunk = chunk; + exports.chunkString = chunkString; + exports.clear = clear; + exports.clearArray = clearArray; + exports.clearBuffer = clearBuffer; + exports.clearIntervals = clearIntervals; + exports.clearTimers = clearTimers; + exports.clone = clone; + exports.cloneArray = cloneArray; + exports.cloneType = cloneType; + exports.compact = compact; + exports.compactKeys = compactKeys; + exports.compactMap = compactMap; + exports.compactMapArray = compactMapArray; + exports.compactMapAsyncArray = compactMapAsyncArray; + exports.compactMapAsyncObject = compactMapAsyncObject; + exports.compactMapObject = compactMapObject; + exports.concurrent = concurrent; + exports.concurrentEachArray = concurrentEachArray; + exports.concurrentStatus = concurrentStatus; + exports.construct = construct; + exports.constructorName = constructorName; + exports.copyFolder = copyFolder; + exports.countBy = countBy; + exports.countKey = countKey; + exports.countWithoutKey = countWithoutKey; + exports.currentFile = currentFile; + exports.currentPath = currentPath; + exports.curry = curry; + exports.curryRight = curryRight; + exports.debounce = debounce; + exports.deduct = deduct; + exports.defProp = defProp; + exports.difference = difference; + exports.divide = divide; + exports.drop = drop; + exports.dropRight = dropRight; + exports.each = each; + exports.eachArray = eachArray; + exports.eachAsyncArray = eachAsyncArray; + exports.eachAsyncObject = eachAsyncObject; + exports.eachObject = eachObject; + exports.eachRight = eachRight; + exports.eachRightAsync = eachRightAsync; + exports.ensureArray = ensureArray; + exports.ensureBuffer = ensureBuffer; + exports.equalsZero = isZero; + exports.escapeRegex = escapeRegex; + exports.escapeRegexRegex = escapeRegexRegex; + exports.every = every; + exports.everyArg = everyArg; + exports.everyArray = everyArray; + exports.everyAsyncArray = everyAsyncArray; + exports.everyAsyncObject = everyAsyncObject; + exports.everyObject = everyObject; + exports.extendClass = extendClass; + exports.filter = filter; + exports.filterArray = filterArray; + exports.filterAsyncArray = filterAsyncArray; + exports.filterAsyncObject = filterAsyncObject; + exports.filterObject = filterObject; + exports.findIndex = findIndex; + exports.findIndexCache = findIndexCache; + exports.findItem = findItem; + exports.first = first; + exports.flatten = flatten; + exports.flattenDeep = flattenDeep; + exports.flow = flow; + exports.flowAsync = flowAsync; + exports.flowAsyncRight = flowAsyncRight; + exports.flowRight = flowRight; + exports.forEach = forEach; + exports.forEachAsync = forEachAsync; + exports.forMap = forMap; + exports.forOf = forOf; + exports.forOfAsync = forOfAsync; + exports.forOfCompactMap = forOfCompactMap; + exports.forOfCompactMapAsync = forOfCompactMapAsync; + exports.forOfEvery = forOfEvery; + exports.forOfEveryAsync = forOfEveryAsync; + exports.forOfFilter = forOfFilter; + exports.forOfFilterAsync = forOfFilterAsync; + exports.forOfMap = forOfMap; + exports.forOfMapAsync = forOfMapAsync; + exports.generateLoop = generateLoop; + exports.get = get; + exports.getEntries = getEntries; + exports.getFileExtension = getFileExtension; + exports.getFilename = getFilename; + exports.getHighest = getHighest; + exports.getLowest = getLowest; + exports.getNumberInsertIndex = getNumberInsertIndex; + exports.getPropDesc = getPropDesc; + exports.getPropNames = getPropNames; + exports.getType = getType; + exports.getTypeName = getTypeName; + exports.groupBy = groupBy; + exports.has = has; + exports.hasAnyKeys = hasAnyKeys; + exports.hasDot = hasDot; + exports.hasKeys = hasKeys; + exports.hasLength = hasLength; + exports.hasProp = hasProp; + exports.hasValue = hasValue; + exports.htmlEntities = htmlEntities; + exports.ifInvoke = ifInvoke; + exports.ifNotAssign = ifNotAssign; + exports.ifValue = ifValue; + exports.inAsync = inAsync; + exports.inSync = inSync; + exports.increment = increment; + exports.indexBy = indexBy; + exports.initial = initial; + exports.initialString = initialString; + exports.insertInRange = insertInRange; + exports.intersection = intersection; + exports.interval = interval; + exports.intervals = intervals; + exports.invert = invert; + exports.invokeArray = invokeArray; + exports.invokeCollection = invokeCollection; + exports.invokeCollectionAsync = invokeCollectionAsync; + exports.isArguments = isArguments; + exports.isArray = isArray; + exports.isArrayBuffer = isArrayBuffer; + exports.isArrayBufferCall = isArrayBufferCall; + exports.isArrayLike = isArrayLike; + exports.isAsync = isAsync; + exports.isAsyncCall = isAsyncCall; + exports.isBigInt = isBigInt; + exports.isBigIntCall = isBigIntCall; + exports.isBoolean = isBoolean; + exports.isBooleanCall = isBooleanCall; + exports.isBuffer = isBuffer; + exports.isBufferCall = isBufferCall; + exports.isChild = isChild; + exports.isCloneable = isCloneable; + exports.isConstructor = isConstructor; + exports.isConstructorFactory = isConstructorFactory; + exports.isConstructorNameFactory = isConstructorNameFactory; + exports.isDate = isDate; + exports.isDateCall = isDateCall; + exports.isDeno = isDeno; + exports.isEmpty = isEmpty; + exports.isEqual = isEqual; + exports.isEven = isEven; + exports.isF32 = isF32; + exports.isF32Call = isF32Call; + exports.isF64 = isF64; + exports.isF64Call = isF64Call; + exports.isFalse = isFalse; + exports.isFalsy = isFalsy; + exports.isFileCSS = isFileCSS; + exports.isFileHTML = isFileHTML; + exports.isFileJS = isFileJS; + exports.isFileJSON = isFileJSON; + exports.isFloat = isFloat; + exports.isFunction = isFunction; + exports.isGenerator = isGenerator; + exports.isGeneratorCall = isGeneratorCall; + exports.isI16 = isI16; + exports.isI16Call = isI16Call; + exports.isI32 = isI32; + exports.isI32Call = isI32Call; + exports.isI8 = isI8; + exports.isI8Call = isI8Call; + exports.isIterable = isIterable; + exports.isKindAsync = isKindAsync; + exports.isMap = isMap; + exports.isMapCall = isMapCall; + exports.isMatchArray = isMatchArray; + exports.isMatchObject = isMatchObject; + exports.isNegative = isNegative; + exports.isNodejs = isNodejs; + exports.isNotArray = isNotArray; + exports.isNotNumber = isNotNumber; + exports.isNotString = isNotString; + exports.isNull = isNull; + exports.isNumber = isNumber; + exports.isNumberCall = isNumberCall; + exports.isNumberEqual = isNumberEqual; + exports.isNumberInRange = isNumberInRange; + exports.isNumberNotInRange = isNumberNotInRange; + exports.isOdd = isOdd; + exports.isParent = isParent; + exports.isPlainObject = isPlainObject; + exports.isPositive = isPositive; + exports.isPrimitive = isPrimitive; + exports.isPromise = isPromise; + exports.isRegex = isRegex; + exports.isRegexCall = isRegexCall; + exports.isRelated = isRelated; + exports.isSafeInt = isSafeInt; + exports.isSame = isSame; + exports.isSameType = isSameType; + exports.isSet = isSet; + exports.isSetCall = isSetCall; + exports.isString = isString; + exports.isTrue = isTrue; + exports.isTruthy = isTruthy; + exports.isTypeFactory = isTypeFactory; + exports.isTypedArray = isTypedArray; + exports.isU16 = isU16; + exports.isU16Call = isU16Call; + exports.isU32 = isU32; + exports.isU32Call = isU32Call; + exports.isU8 = isU8; + exports.isU8C = isU8C; + exports.isU8CCall = isU8CCall; + exports.isU8Call = isU8Call; + exports.isUndefined = isUndefined; + exports.isWeakMap = isWeakMap; + exports.isWeakMapCall = isWeakMapCall; + exports.isZero = isZero; + exports.jsonParse = jsonParse; + exports.kebabCase = kebabCase; + exports.keys = keys; + exports.largest = largest; + exports.last = last; + exports.lowerCase = lowerCase; + exports.map = map; + exports.mapArray = mapArray; + exports.mapAsyncArray = mapAsyncArray; + exports.mapAsyncObject = mapAsyncObject; + exports.mapObject = mapObject; + exports.mapRightArray = mapRightArray; + exports.mapWhile = mapWhile; + exports.merge = merge; + exports.model = model; + exports.multiply = multiply; + exports.negate = negate; + exports.noValue = noValue; + exports.noop = noop; + exports.notEqual = notEqual; + exports.nthArg = nthArg; + exports.objectAssign = objectAssign; + exports.objectEntries = objectEntries; + exports.objectSize = objectSize; + exports.omit = omit; + exports.once = once; + exports.onlyUnique = onlyUnique; + exports.over = over; + exports.overEvery = overEvery; + exports.pair = pair; + exports.partition = partition; + exports.pick = pick; + exports.pluck = pluck; + exports.pluckObject = pluckObject; + exports.promise = promise; + exports.propertyMatch = propertyMatch; + exports.randomFloat = randomFloat; + exports.randomInt = randomInt; + exports.range = range; + exports.rangeDown = rangeDown; + exports.rangeUp = rangeUp; + exports.rawURLDecode = rawURLDecode; + exports.reArg = reArg; + exports.regexTestFactory = regexTestFactory; + exports.remainder = remainder; + exports.remove = remove; + exports.removeBy = removeBy; + exports.replaceList = replaceList; + exports.rest = rest; + exports.restString = restString; + exports.returnValue = returnValue; + exports.right = right; + exports.rightString = rightString; + exports.sample = sample; + exports.sanitize = sanitize; + exports.setKey = setKey; + exports.setValue = setValue; + exports.shuffle = shuffle; + exports.smallest = smallest; + exports.snakeCase = snakeCase; + exports.sortCollectionAlphabetically = sortCollectionAlphabetically; + exports.sortCollectionAlphabeticallyReverse = + sortCollectionAlphabeticallyReverse; + exports.sortCollectionAscending = sortCollectionAscending; + exports.sortCollectionAscendingFilter = sortCollectionAscendingFilter; + exports.sortCollectionDescending = sortCollectionDescending; + exports.sortCollectionDescendingFilter = sortCollectionDescendingFilter; + exports.sortNumberAscending = sortNumberAscending; + exports.sortNumberDescening = sortNumberDescening; + exports.sortObjectsAlphabetically = sortObjectsAlphabetically; + exports.sortObjectsAlphabeticallyReverse = sortObjectsAlphabeticallyReverse; + exports.sortUnique = sortUnique; + exports.stringify = stringify; + exports.stubArray = stubArray; + exports.stubFalse = stubFalse; + exports.stubObject = stubObject; + exports.stubString = stubString; + exports.stubTrue = stubTrue; + exports.subtract = subtract; + exports.subtractAll = subtractAll; + exports.subtractReverse = subtractReverse; + exports.sumAll = sumAll; + exports.take = take; + exports.takeRight = takeRight; + exports.throttle = throttle; + exports.timer = timer; + exports.timers = timers; + exports.times = times; + exports.timesAsync = timesAsync; + exports.timesMap = timesMap; + exports.timesMapAsync = timesMapAsync; + exports.toArray = toArray; + exports.toPath = toPath; + exports.toggle = toggle; + exports.tokenize = tokenize; + exports.truncate = truncate; + exports.truncateRight = truncateRight; + exports.unZip = unZip; + exports.unZipObject = unZipObject; + exports.union = union; + exports.uniqID = uniqID; + exports.unique = unique; + exports.untilFalseArray = untilFalseArray; + exports.untilTrueArray = untilTrueArray; + exports.upperCase = upperCase; + exports.upperFirst = upperFirst; + exports.upperFirstAll = upperFirstAll; + exports.upperFirstLetter = upperFirstLetter; + exports.upperFirstOnly = upperFirstOnly; + exports.upperFirstOnlyAll = upperFirstOnlyAll; + exports.virtualStorage = virtualStorage; + exports.whileCompactMap = whileCompactMap; + exports.whileEachArray = whileEachArray; + exports.whileMapArray = whileMapArray; + exports.without = without; + exports.words = words; + exports.wrap = wrap; + exports.xor = xor; + exports.zip = zip; + exports.zipObject = zipObject; }); //# sourceMappingURL=index.bundle.js.map diff --git a/docs/index.js b/docs/index.js index 185e186..2106920 100644 --- a/docs/index.js +++ b/docs/index.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:fs/promises"),require("node:path"),require("node:url"),require("path")):"function"==typeof define&&define.amd?define(["exports","node:fs/promises","node:path","node:url","path"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={},t.promises,t.path,t.node_url,t.path$1)}(this,(function(t,n,e,r,o){"use strict";function i(t){return t.length=0,t}function c(t){return void 0===t}function s(t){return Boolean(t.length)}function u(t){return null===t}function a(t){return!c(t)&&!u(t)}function f(t){return t}function l(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const u=n.call(r,t,i,e,c,s,o);a(u)&&e.push(u)})):l(t,((t,i,c,s)=>{const u=n(t,i,e,c,s,r,o);a(u)&&e.push(u)})),e}async function p(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const i=await n(t,r,e,o);a(i)&&e.push(i)})),e}const{sign:d}=Math;function y(t){return-1===d(t)}function m(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const b=Array.isArray;const w=Reflect.construct;function v(t,n=[],e){const r=b(n)?n:[n];return e?w(t,r,e):w(t,r)}function C(t){return b(t)&&t||a(t)&&[t]||[]}function O(t){return t.flat(1/0)}function I(t,n){return t.forEach(n),t}function j(...t){const n=v(Map),e=[];return l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function F(t,n=1,e=t.length){return t.splice(n,e)}function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function E(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function R(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function T(t,n,e=[],r){return await p(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const N=/\.|\[/,B=/]/g,P="";function U(t){return t.replace(B,P).split(N)}function k(t,n){if(!n)return!1;let e=n;return R(b(t)?t:U(t),(t=>(e=e[t],a(e)))),e}const $=Object.keys;function D(t){if(t)return $(t)}const L=Object.hasOwn;function q(t,...n){if(t)return R(n,(n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}}))}function _(t,n){return t?.constructor===n||!1}function V(t){return n=>_(n,t)}function Z(t){return t?.constructor?.name}function K(t){return n=>Z(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&R(e,t):t(n)}}const W=K("Buffer"),G=z(W),J=t=>!!a(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(G(t))return t.equals(n);if(t.toString()===n.toString())if(J(t)){const e=D(t);if(q(n,e))return R(e,(e=>H(t[e],n[e])))}else if(b(t)&&t.length===n.length)return R(t,((t,e)=>H(t,n[e])));return!1};const Q=Math.max;function X(t,n,e=[],r,o){return a(r)?l(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):l(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function Y(t,n){const e=[];return await p(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function tt(t,n){return t-n}function nt(t,n){return n-t}const{floor:et,random:rt}=Math;function ot(t,n=0){return et(rt()*(t-n))+n}const it=Array.from;function ct(t,n,e){if(a(t))return it(t,n,e)}function st(t,n=t.length){if(t.length<=1)return ct(t);const e=ct(t);let r,o,i=0;for(;i!!a(t)&&t instanceof Function,gt=K("Number"),dt=z(gt);const yt=V(String);const mt=Object.assign;function At(t,n){if(J(n))mt(t,n);else if(pt(n)){const e=n.name;e?t[e]=n:mt(t,n)}else(yt(n)||dt(n))&&(t[n]=n);return t}function bt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function Ot(t,n="id",e){return t.sort(((t,r)=>Ct(t,r,n,e)))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function jt(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))}function Ft(t,n){if(t)return yt(n)?t[n]:X(n,(n=>t[n]))}function Mt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Et(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Rt(t){return n=>!!a(n)&&t.test(n)}const St=Rt(/\.css$/),xt=Rt(/\.html$/),Tt=Rt(/\.js$/),Nt=Rt(/\.json$/);const Bt=async(t,n,e,r)=>{if(!t)return;const o=D(t);return a(e)?await p(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await p(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Pt(t,n,e,r){if(!t)return;const o=D(t);return a(e)?l(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):l(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Ut=K("Set"),kt=z(Ut);function $t(t,n){if(kt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Dt=K("GeneratorFunction"),Lt=z(Dt);async function qt(t,n,e){if(kt(t)){for(const e of t)await n(e,t);return t}if(Lt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const _t=K("AsyncFunction"),Vt=z(_t);function Zt(t,n,e,r,o,i){return(c,s,u,f,l)=>{let h;const p=Vt(s);if(a(c)&&s)return h=b(c)?p?n:t:J(c)||pt(c)?p?r:e:o?p?i:o:Lt(c)?i:p?r:e,h(c,s,u,f,l)}}const Kt=Zt(l,p,Pt,Bt,$t,qt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Kt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Gt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=v(Jt);function Qt(t,n){return Ht.set(t,n)}const Xt=Reflect.apply;function Yt(t,n,e){if(pt(t))return Xt(t,n,e)}function tn(t){return t?.constructor}function nn(t,n=[]){const e=tn(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function en(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function rn(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function on(t,n,e={}){if(t)return await Bt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function cn(t,n,e={},r,o){if(t)return a(r)?Pt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Pt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const sn=Zt(X,Y,cn,on,en,rn);async function un(t,n){if(!t)return;return S(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function an(t,n){if(!t)return;return R(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function fn(t,n=f){if(b(t)||kt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function ln(t,n=f,e){if(Lt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(b(t)||kt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const hn=Zt(R,S,an,un,fn,ln);const pn=Function.prototype;function gn(t){return pn.call.bind(t)}const dn=Object.getOwnPropertyNames,yn=Object.getOwnPropertyDescriptor,mn=Object.defineProperty,An=gn(Object.hasOwnProperty),bn=Object.is;const{random:wn}=Math;const{sign:vn}=Math;function Cn(t){return 0===t}const On=Object.entries;async function In(t,n=f,e={}){return await Bt(t,(async(t,r,o,i,c)=>{const s=await n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function jn(t,n=f,e={}){return Pt(t,((t,r,o,i,c)=>{const s=n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function Fn(t,n,e={}){return Pt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function Mn(t,n,e={}){return await Bt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const En=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Rn(t){return t.replace(En,"\\$&")}function Sn(t,n){return n?Sn(X(t,Rn)):RegExp(t.join("|"))}const xn=K("RegExp"),Tn=z(xn);function Nn(t){if(!t)return;if(J(t))return D(t).length;const n=t.length;if(a(n))return n;const e=t.size;return a(n)?e:D(t).length}const Bn=/[ _-]+/g;const Pn=/[ _-]+/g,Un=/[ ]+/g;const kn=/[ _-]+/g,$n=/[ ]+/g;const Dn=/[ _-]+/g;const Ln=/[ _-]+/g;function qn(t,n=1){return t.substring(n)}const _n=/%(?![\da-f]{2})/gi,Vn=/&/g,Zn=//g,zn=/"/g;function Wn(t){return decodeURIComponent(t.replace(_n,(()=>"%25")))}function Gn(t){return t.replace(Vn,"&").replace(Zn,"<").replace(Kn,">").replace(zn,""")}const Jn=/\S+/g,Hn=/\w+/g;const Qn=/\w+/g;function Xn(t){return t[0].toUpperCase()}function Yn(t){return Xn(t)+qn(t)}function te(t){return Xn(t)+qn(t).toLowerCase()}function ne(t){return tn(t)?.name}const ee=K("Map"),re=z(ee),oe=/Array/,ie="Array";function ce(t){if(t){const n=ne(t);if(oe.test(n)&&n!==ie)return!0}return!1}function se(t){return!a(t)}const ue=K("BigInt"),ae=z(ue),fe=K("Boolean"),le=z(fe),he=K("ArrayBuffer"),pe=z(he);const ge=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const de=K("Date"),ye=z(de);function me(t){return!1===t}const Ae=K("Float32Array"),be=z(Ae),we=K("Float64Array"),ve=z(we),{isInteger:Ce}=Number,Oe=Ce,Ie=K("Int16Array"),je=z(Ie),Fe=K("Int32Array"),Me=z(Fe),Ee=K("Int8Array"),Re=z(Ee);function Se(t){return!!t&&t instanceof Promise}function xe(t){return!!t&&(Se(t)||Vt(t)||Lt(t))}const{isSafeInteger:Te}=Number,Ne=Te;const Be=K("Uint16Array"),Pe=z(Be),Ue=K("Uint32Array"),ke=z(Ue),$e=K("Uint8Array"),De=z($e),Le=K("Uint8ClampedArray"),qe=z(Le),_e=K("WeakMap"),Ve=z(_e),Ze=void 0!==globalThis.Deno,Ke=void 0!==globalThis.process&&process.versions&&process.versions.node;function ze(t,n=!0){return Boolean(t)&&n}function We(t,n){return me(H(t,n))}const Ge=JSON;const Je=Ge.stringify;function He(t,n,e){const r=globalThis.options||e;let o;return pt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Je(t)}\n\t\tExpected: ${Je(n)}`,r)}async function Qe(t,n,e){const r=await t;return!(pt(n)&&!1===await n(r,e))&&!We(r,n)||He(r,n,e)}const Xe=globalThis.structuredClone;async function Ye(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);a(r)&&e.push(r)}return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const i=await n(e,o,t);a(i)&&r(i)}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);a(c)&&(i?o.set(e,c):o[e]=c)}return o}function tr(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const i=n(e,r,t);a(i)&&o(i)}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);a(c)&&(o?r.set(e,c):r[e]=c)}return r}const nr=Zt(h,g,jn,In,tr,Ye);function er(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=pt(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function rr(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=pt(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const or=Zt(x,T,Fn,Mn,er,rr);function ir(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const cr=ir(l),sr=ir(M);function ur(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ar=ur(p),fr=ur(E);const lr=Rt(/\./);class hr{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=v(hr);class gr{static models=new Map;constructor(t,n){a(n)?(bt(this,n),this.modelName=t,gr.models.set(t,n)):bt(this,t)}delete(t){gr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),gr.models.set(t||this.modelName,this)}has(t){return gr.models.has(t||this.modelName)}get(t){return gr.models.get(t||this.modelName)}}class dr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Pt(t,(n=>{t[n]=new dr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new dr(e),!0)})}}class yr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return a(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const mr=v(yr);class Ar{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):a(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=nn(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=zt,t.Intervals=hr,t.Model=gr,t.Store=dr,t.Timers=Jt,t.UniqID=yr,t.VirtualStorage=Ar,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Yt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return l(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return xe(t)||xe(n)?Qe(t,n,e):!(pt(n)&&!1===n(t,e))&&!We(t,n)||He(t,n,e)},t.assertAsync=Qe,t.assign=bt,t.assignToClass=wt,t.assignToObject=At,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=sn(t,(t=>pt(t)?t.bind(n):t));return e?bt(e,r):r},t.cacheNativeMethod=gn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Bn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return v(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(G(t))return ht(t);if(b(t))return i(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=i,t.clearBuffer=ht,t.clearIntervals=function(){Gt(setTimeout(Wt,0),(t=>{pr.remove(t)}))},t.clearTimers=function(){Gt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Xe(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=nn,t.compact=function(t){if(J(t)){const n=D(t),e=n.length,r={};for(let o=0;oze(t)))},t.compactKeys=function(t){const n=[];return Pt(t,((t,e)=>{a(t)&&n.push(e)})),n},t.compactMap=nr,t.compactMapArray=h,t.compactMapAsyncArray=g,t.compactMapAsyncObject=In,t.compactMapObject=jn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{const c=e.join(r,i);if((await n.stat(c)).isDirectory()){const s=e.join(o,i.replace(r,""));await n.mkdir(s,{recursive:!0}),await t(c,s)}else await async function(t,r,o){const i=e.join(t,o),c=e.join(r,o);await n.copyFile(i,c)}(r,o,i)})),!0},t.countBy=function(t,n){const e={};let r;return l(t,(t=>{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return l(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return l(t,(t=>{t[n]||e++})),e},t.currentFile=function(t){return globalThis.__filename?__filename:r.fileURLToPath(t.url)},t.currentPath=function(t){return globalThis.__dirname?__dirname:o.dirname(r.fileURLToPath(t.url))},t.curry=function(t,n=t.length){const e=[],r=(...o)=>{if(e.push(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.curryRight=function(t,n=t.length){const e=[],r=(...o)=>{if(e.unshift(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Qt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=mn,t.difference=j,t.divide=function(t,n){return t/n},t.drop=F,t.dropRight=(t,n=1,e=t.length)=>F(t,0,e-n),t.each=Kt,t.eachArray=l,t.eachAsyncArray=p,t.eachAsyncObject=Bt,t.eachObject=Pt,t.eachRight=M,t.eachRightAsync=E,t.ensureArray=C,t.ensureBuffer=function(t){return G(t)&&t||a(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=Cn,t.escapeRegex=Rn,t.escapeRegexRegex=En,t.every=hn,t.everyArg=function(...t){return Vt(t[0])?async function(...n){return hn(t,(async t=>hn(n,(async n=>t(n)))))}:function(...n){return hn(t,(t=>hn(n,(n=>t(n)))))}},t.everyArray=R,t.everyAsyncArray=S,t.everyAsyncObject=un,t.everyObject=an,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rvt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=vt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>vt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(C(n))),[]);return e},t.flattenDeep=O,t.flow=cr,t.flowAsync=ar,t.flowAsyncRight=fr,t.flowRight=sr,t.forEach=I,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else pt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=$t,t.forOfAsync=qt,t.forOfCompactMap=tr,t.forOfCompactMapAsync=Ye,t.forOfEvery=fn,t.forOfEveryAsync=ln,t.forOfFilter=er,t.forOfFilterAsync=rr,t.forOfMap=en,t.forOfMapAsync=rn,t.generateLoop=Zt,t.get=k,t.getEntries=function(t){if(a(t))return On(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return jt(t,n)[0]},t.getLowest=function(t,n){return Ot(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return R(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=yn,t.getPropNames=dn,t.getType=tn,t.getTypeName=ne,t.groupBy=function(t,n){const e={};return l(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!se(n)&&!se(e)&&(n===e||(yt(n)?yt(e)?n.includes(e,r):Tn(e)?e.test(n):pt(e)?e(n):b(e)?R(e,(e=>t(n,e))):hn(e,(e=>t(n,e))):b(n)?Tn(e)?R(n,(t=>t.test(e))):pt(e)?R(n,e):b(e)?R(e,(e=>t(n,e))):n.includes(e,r):!!J(n)&&(Tn(e)?an(n,(t=>t.test(e))):pt(e)?an(n,e):J(e)?an(n,((t,n)=>t===e[n])):an(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}})))},t.hasDot=lr,t.hasKeys=q,t.hasLength=s,t.hasProp=An,t.hasValue=a,t.htmlEntities=Gn,t.ifInvoke=function(t,n,...e){if(pt(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!a(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(a(t)){if(pt(n))return e?Yt(n,e,r):n(...r);if(J(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return h(t,(t=>{if(R(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return pr.set(t,n)},t.intervals=pr,t.invert=function(t,n={}){if(t)return Pt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(a(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return Y(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!a(t)&&"[object Arguments]"===t.toString()},t.isArray=b,t.isArrayBuffer=pe,t.isArrayBufferCall=he,t.isArrayLike=function(t,n){if(se(t)||pt(t))return!1;if(b(t)||ce(t))return!0;const e=t.length;if(!se(e)||!dt(e)||e<0)return!1;if(n){const n=D(t);return!!n&&hn(n,((t,n)=>n>=0&&dt(n)))}return!0},t.isAsync=Vt,t.isAsyncCall=_t,t.isBigInt=ae,t.isBigIntCall=ue,t.isBoolean=le,t.isBooleanCall=fe,t.isBuffer=G,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(a(t)){const n=t?.constructor?.name;return ge.test(n)}return!1},t.isConstructor=_,t.isConstructorFactory=V,t.isConstructorNameFactory=K,t.isDate=ye,t.isDateCall=de,t.isDeno=Ze,t.isEmpty=function(t){return yt(t)||b(t)?!s(t):J(t)?!Nn(t):!a(t)},t.isEqual=H,t.isF32=be,t.isF32Call=Ae,t.isF64=ve,t.isF64Call=we,t.isFalse=me,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=xt,t.isFileJS=Tt,t.isFileJSON=Nt,t.isFloat=Oe,t.isFunction=pt,t.isGenerator=Lt,t.isGeneratorCall=Dt,t.isI16=je,t.isI16Call=Ie,t.isI32=Me,t.isI32Call=Fe,t.isI8=Re,t.isI8Call=Ee,t.isIterable=function(t){return a(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=xe,t.isMap=re,t.isMapCall=ee,t.isMatchArray=function(t,n){return t.length===n.length&&R(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=D(t),r=D(n);return e.length===r.length&&R(e,(e=>t[e]===n[e]))},t.isNegative=y,t.isNodejs=Ke,t.isNotArray=function(t){return!b(t)},t.isNotNumber=function(t){return!dt(t)},t.isNotString=function(t){return!yt(t)},t.isNull=u,t.isNumber=dt,t.isNumberCall=gt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=J,t.isPositive=function(t){return 1===vn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Se,t.isRegex=Tn,t.isRegexCall=xn,t.isRelated=function(t,n){return!se(t)&&!se(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Ne,t.isSame=bn,t.isSameType=function(t,n){const e=tn(t),r=tn(n);return e===r&&e.name===r.name},t.isSet=kt,t.isSetCall=Ut,t.isString=yt,t.isTrue=function(t){return!0===t},t.isTruthy=ze,t.isTypeFactory=z,t.isTypedArray=ce,t.isU16=Pe,t.isU16Call=Be,t.isU32=ke,t.isU32Call=Ue,t.isU8=De,t.isU8C=qe,t.isU8CCall=Le,t.isU8Call=$e,t.isUndefined=c,t.isWeakMap=Ve,t.isWeakMapCall=_e,t.isZero=Cn,t.jsonParse=function(t,n){if(t)return Ge.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase().replace(Un,"-")},t.keys=D,t.largest=function(t){return Q(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Ln," ").trim().toLowerCase()},t.map=sn,t.mapArray=X,t.mapAsyncArray=Y,t.mapAsyncObject=on,t.mapObject=cn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{Kt(e,((e,r)=>{if(n[r]&&(J(e)||b(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return a(n)?v(gr,[t,n]):k(t,gr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=se,t.noop=Wt,t.notEqual=We,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=mt,t.objectEntries=On,t.objectSize=Nn,t.omit=function(t,n){if(!t)return{};if(b(n)){const e=Sn(n);return Fn(t,((t,n)=>!e.test(n)))}if(Tn(n))return Fn(t,((t,e)=>!n.test(e)));if(yt(n))return Fn(t,((t,e)=>e!==n));if(dt(n)){const e=n.toString();return Fn(t,((t,n)=>n!==e))}return pt(n)?Fn(t,((t,e)=>!n(t,e))):mt({},t)},t.once=t=>{let n;return(...e)=>(a(n)||(n=t(...e)),n)},t.onlyUnique=at,t.over=function(t){return(...n)=>sn(t,(t=>t(...n)))},t.overEvery=function(t){return n=>hn(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[h(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return l(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return X(t,(t=>Ft(t,n)))},t.pluckObject=Ft,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=D(t))=>R(e,(e=>H(t[e],n[e]))),t.randomFloat=function(t,n=0){return wn()*(t-n)+n},t.randomInt=ot,t.range=function(t,n,e=1,r=[]){return y(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Rt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return st(t);if(1===n)return[t[ot(e-1,0)]];const r=[],o={};let i,c=0;for(;cMt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Et(t,r,n,e)))},t.sortCollectionAscending=jt,t.sortCollectionAscendingFilter=It,t.sortCollectionDescending=Ot,t.sortCollectionDescendingFilter=Ct,t.sortNumberAscending=function(t){return t.sort(tt)},t.sortNumberDescening=function(t){return t.sort(nt)},t.sortObjectsAlphabetically=Mt,t.sortObjectsAlphabeticallyReverse=Et,t.sortUnique=ft,t.stringify=Je,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=tt,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=nt,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Qt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Qt,t.timers=Ht,t.times=Gt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Pt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return lt(O(t))},t.uniqID=mr,t.unique=lt,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rYn(t)))},t.upperFirstLetter=Xn,t.upperFirstOnly=te,t.upperFirstOnlyAll=function(t){return t.replace(Qn,(t=>te(t)))},t.virtualStorage=function(t){return new Ar(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Hn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=v(Map),e=[];return 2===t.length?j(t[0],t[1]):(l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return l(t,((t,r)=>{e[t]=n[r]})),e}})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:fs/promises"),require("node:path"),require("node:url"),require("path")):"function"==typeof define&&define.amd?define(["exports","node:fs/promises","node:path","node:url","path"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={},t.promises,t.path,t.node_url,t.path$1)}(this,(function(t,n,e,r,o){"use strict";function i(t){return t.length=0,t}function c(t){return void 0===t}function s(t){return Boolean(t.length)}function u(t){return null===t}function a(t){return!c(t)&&!u(t)}function f(t){return t}function l(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const u=n.call(r,t,i,e,c,s,o);a(u)&&e.push(u)})):l(t,((t,i,c,s)=>{const u=n(t,i,e,c,s,r,o);a(u)&&e.push(u)})),e}async function p(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const i=await n(t,r,e,o);a(i)&&e.push(i)})),e}const{sign:d}=Math;function y(t){return-1===d(t)}function m(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const b=Array.isArray;const w=Reflect.construct;function v(t,n=[],e){const r=b(n)?n:[n];return e?w(t,r,e):w(t,r)}function C(t){return b(t)&&t||a(t)&&[t]||[]}function O(t){return t.flat(1/0)}function I(t,n){return t.forEach(n),t}function j(...t){const n=v(Map),e=[];return l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function F(t,n=1,e=t.length){return t.splice(n,e)}function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function E(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function R(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function T(t,n,e=[],r){return await p(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const N=/\.|\[/,B=/]/g,P="";function U(t){return t.replace(B,P).split(N)}function k(t,n){if(!n)return!1;let e=n;return R(b(t)?t:U(t),(t=>(e=e[t],a(e)))),e}const $=Object.keys;function D(t){if(t)return $(t)}const L=Object.hasOwn;function q(t,...n){if(t)return R(n,(n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}}))}function _(t,n){return t?.constructor===n||!1}function V(t){return n=>_(n,t)}function Z(t){return t?.constructor?.name}function K(t){return n=>Z(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&R(e,t):t(n)}}const W=K("Buffer"),G=z(W),J=t=>!!a(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(G(t))return t.equals(n);if(t.toString()===n.toString())if(J(t)){const e=D(t);if(q(n,e))return R(e,(e=>H(t[e],n[e])))}else if(b(t)&&t.length===n.length)return R(t,((t,e)=>H(t,n[e])));return!1};const Q=Math.max;function X(t,n,e=[],r,o){return a(r)?l(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):l(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function Y(t,n){const e=[];return await p(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function tt(t,n){return t-n}function nt(t,n){return n-t}const{floor:et,random:rt}=Math;function ot(t,n=0){return et(rt()*(t-n))+n}const it=Array.from;function ct(t,n,e){if(a(t))return it(t,n,e)}function st(t,n=t.length){if(t.length<=1)return ct(t);const e=ct(t);let r,o,i=0;for(;i!!a(t)&&t instanceof Function,gt=K("Number"),dt=z(gt);const yt=V(String);const mt=Object.assign;function At(t,n){if(J(n))mt(t,n);else if(pt(n)){const e=n.name;e?t[e]=n:mt(t,n)}else(yt(n)||dt(n))&&(t[n]=n);return t}function bt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function Ot(t,n="id",e){return t.sort(((t,r)=>Ct(t,r,n,e)))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function jt(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))}function Ft(t,n){if(t)return yt(n)?t[n]:X(n,(n=>t[n]))}function Mt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Et(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Rt(t){return n=>!!a(n)&&t.test(n)}const St=Rt(/\.css$/),xt=Rt(/\.html$/),Tt=Rt(/\.js$/),Nt=Rt(/\.json$/);const Bt=async(t,n,e,r)=>{if(!t)return;const o=D(t);return a(e)?await p(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await p(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Pt(t,n,e,r){if(!t)return;const o=D(t);return a(e)?l(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):l(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Ut=K("Set"),kt=z(Ut);function $t(t,n){if(kt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Dt=K("GeneratorFunction"),Lt=z(Dt);async function qt(t,n,e){if(kt(t)){for(const e of t)await n(e,t);return t}if(Lt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const _t=K("AsyncFunction"),Vt=z(_t);function Zt(t,n,e,r,o,i){return(c,s,u,f,l)=>{let h;const p=Vt(s);if(a(c)&&s)return h=b(c)?p?n:t:J(c)||pt(c)?p?r:e:o?p?i:o:Lt(c)?i:p?r:e,h(c,s,u,f,l)}}const Kt=Zt(l,p,Pt,Bt,$t,qt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Kt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Gt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=v(Jt);function Qt(t,n){return Ht.set(t,n)}const Xt=Reflect.apply;function Yt(t,n,e){if(pt(t))return Xt(t,n,e)}function tn(t){return t?.constructor}function nn(t,n=[]){const e=tn(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function en(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function rn(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function on(t,n,e={}){if(t)return await Bt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function cn(t,n,e={},r,o){if(t)return a(r)?Pt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Pt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const sn=Zt(X,Y,cn,on,en,rn);async function un(t,n){if(!t)return;return S(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function an(t,n){if(!t)return;return R(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function fn(t,n=f){if(b(t)||kt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function ln(t,n=f,e){if(Lt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(b(t)||kt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const hn=Zt(R,S,an,un,fn,ln);const pn=Function.prototype;function gn(t){return pn.call.bind(t)}const dn=Object.getOwnPropertyNames,yn=Object.getOwnPropertyDescriptor,mn=Object.defineProperty,An=gn(Object.hasOwnProperty),bn=Object.is;const{random:wn}=Math;const{sign:vn}=Math;function Cn(t){return 0===t}const On=Object.entries;async function In(t,n=f,e={}){return await Bt(t,(async(t,r,o,i,c)=>{const s=await n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function jn(t,n=f,e={}){return Pt(t,((t,r,o,i,c)=>{const s=n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function Fn(t,n,e={}){return Pt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function Mn(t,n,e={}){return await Bt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const En=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Rn(t){return t.replace(En,"\\$&")}function Sn(t,n){return n?Sn(X(t,Rn)):RegExp(t.join("|"))}const xn=K("RegExp"),Tn=z(xn);function Nn(t){if(!t)return;if(J(t))return D(t).length;const n=t.length;if(a(n))return n;const e=t.size;return a(n)?e:D(t).length}const Bn=/[ _-]+/g;const Pn=/[ _-]+/g,Un=/[ ]+/g;const kn=/[ _-]+/g,$n=/[ ]+/g;const Dn=/[ _-]+/g;const Ln=/[ _-]+/g;function qn(t,n=1){return t.substring(n)}const _n=/%(?![\da-f]{2})/gi,Vn=/&/g,Zn=//g,zn=/"/g;function Wn(t){return decodeURIComponent(t.replace(_n,(()=>"%25")))}function Gn(t){return t.replace(Vn,"&").replace(Zn,"<").replace(Kn,">").replace(zn,""")}const Jn=/\S+/g,Hn=/\w+/g;const Qn=/\w+/g;function Xn(t){return t[0].toUpperCase()}function Yn(t){return Xn(t)+qn(t)}function te(t){return Xn(t)+qn(t).toLowerCase()}function ne(t){return tn(t)?.name}const ee=K("Map"),re=z(ee),oe=/Array/,ie="Array";function ce(t){if(t){const n=ne(t);if(oe.test(n)&&n!==ie)return!0}return!1}function se(t){return!a(t)}const ue=K("BigInt"),ae=z(ue),fe=K("Boolean"),le=z(fe),he=K("ArrayBuffer"),pe=z(he);const ge=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const de=K("Date"),ye=z(de);function me(t){return!1===t}const Ae=K("Float32Array"),be=z(Ae),we=K("Float64Array"),ve=z(we),{isInteger:Ce}=Number,Oe=Ce,Ie=K("Int16Array"),je=z(Ie),Fe=K("Int32Array"),Me=z(Fe),Ee=K("Int8Array"),Re=z(Ee);function Se(t){return!!t&&t instanceof Promise}function xe(t){return!!t&&(Se(t)||Vt(t)||Lt(t))}const{isSafeInteger:Te}=Number,Ne=Te;const Be=K("Uint16Array"),Pe=z(Be),Ue=K("Uint32Array"),ke=z(Ue),$e=K("Uint8Array"),De=z($e),Le=K("Uint8ClampedArray"),qe=z(Le),_e=K("WeakMap"),Ve=z(_e),Ze=void 0!==globalThis.Deno,Ke=void 0!==globalThis.process&&process.versions&&process.versions.node;function ze(t,n=!0){return Boolean(t)&&n}function We(t,n){return me(H(t,n))}const Ge=JSON;const Je=Ge.stringify;function He(t,n,e){const r=globalThis.options||e;let o;return pt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Je(t)}\n\t\tExpected: ${Je(n)}`,r)}async function Qe(t,n,e){const r=await t;return!(pt(n)&&!1===await n(r,e))&&!We(r,n)||He(r,n,e)}const Xe=globalThis.structuredClone;async function Ye(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);a(r)&&e.push(r)}return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const i=await n(e,o,t);a(i)&&r(i)}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);a(c)&&(i?o.set(e,c):o[e]=c)}return o}function tr(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const i=n(e,r,t);a(i)&&o(i)}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);a(c)&&(o?r.set(e,c):r[e]=c)}return r}const nr=Zt(h,g,jn,In,tr,Ye);function er(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=pt(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function rr(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=pt(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const or=Zt(x,T,Fn,Mn,er,rr);function ir(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const cr=ir(l),sr=ir(M);function ur(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ar=ur(p),fr=ur(E);const lr=Rt(/\./);class hr{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=v(hr);class gr{static models=new Map;constructor(t,n){a(n)?(bt(this,n),this.modelName=t,gr.models.set(t,n)):bt(this,t)}delete(t){gr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),gr.models.set(t||this.modelName,this)}has(t){return gr.models.has(t||this.modelName)}get(t){return gr.models.get(t||this.modelName)}}class dr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Pt(t,(n=>{t[n]=new dr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new dr(e),!0)})}}class yr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return a(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const mr=v(yr);class Ar{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):a(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=nn(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=zt,t.Intervals=hr,t.Model=gr,t.Store=dr,t.Timers=Jt,t.UniqID=yr,t.VirtualStorage=Ar,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Yt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return l(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return xe(t)||xe(n)?Qe(t,n,e):!(pt(n)&&!1===n(t,e))&&!We(t,n)||He(t,n,e)},t.assertAsync=Qe,t.assign=bt,t.assignToClass=wt,t.assignToObject=At,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=sn(t,(t=>pt(t)?t.bind(n):t));return e?bt(e,r):r},t.cacheNativeMethod=gn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Bn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return v(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(G(t))return ht(t);if(b(t))return i(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=i,t.clearBuffer=ht,t.clearIntervals=function(){Gt(setTimeout(Wt,0),(t=>{pr.remove(t)}))},t.clearTimers=function(){Gt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Xe(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=nn,t.compact=function(t){if(J(t)){const n=D(t),e=n.length,r={};for(let o=0;oze(t)))},t.compactKeys=function(t){const n=[];return Pt(t,((t,e)=>{a(t)&&n.push(e)})),n},t.compactMap=nr,t.compactMapArray=h,t.compactMapAsyncArray=g,t.compactMapAsyncObject=In,t.compactMapObject=jn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{const c=e.join(r,i);if((await n.stat(c)).isDirectory()){const s=e.join(o,i.replace(r,""));await n.mkdir(s,{recursive:!0}),await t(c,s)}else await async function(t,r,o){const i=e.join(t,o),c=e.join(r,o);await n.copyFile(i,c)}(r,o,i)})),!0},t.countBy=function(t,n){const e={};let r;return l(t,(t=>{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return l(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return l(t,(t=>{t[n]||e++})),e},t.currentFile=function(t){return globalThis.__filename?__filename:r.fileURLToPath(t.url)},t.currentPath=function(t){return globalThis.__dirname?__dirname:o.dirname(r.fileURLToPath(t.url))},t.curry=function(t,n=t.length){const e=[],r=(...o)=>{if(e.push(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.curryRight=function(t,n=t.length){const e=[],r=(...o)=>{if(e.unshift(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Qt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=mn,t.difference=j,t.divide=function(t,n){return t/n},t.drop=F,t.dropRight=(t,n=1,e=t.length)=>F(t,0,e-n),t.each=Kt,t.eachArray=l,t.eachAsyncArray=p,t.eachAsyncObject=Bt,t.eachObject=Pt,t.eachRight=M,t.eachRightAsync=E,t.ensureArray=C,t.ensureBuffer=function(t){return G(t)&&t||a(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=Cn,t.escapeRegex=Rn,t.escapeRegexRegex=En,t.every=hn,t.everyArg=function(...t){return Vt(t[0])?async function(...n){return hn(t,(async t=>hn(n,(async n=>t(n)))))}:function(...n){return hn(t,(t=>hn(n,(n=>t(n)))))}},t.everyArray=R,t.everyAsyncArray=S,t.everyAsyncObject=un,t.everyObject=an,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rvt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=vt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>vt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(C(n))),[]);return e},t.flattenDeep=O,t.flow=cr,t.flowAsync=ar,t.flowAsyncRight=fr,t.flowRight=sr,t.forEach=I,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else pt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=$t,t.forOfAsync=qt,t.forOfCompactMap=tr,t.forOfCompactMapAsync=Ye,t.forOfEvery=fn,t.forOfEveryAsync=ln,t.forOfFilter=er,t.forOfFilterAsync=rr,t.forOfMap=en,t.forOfMapAsync=rn,t.generateLoop=Zt,t.get=k,t.getEntries=function(t){if(a(t))return On(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return jt(t,n)[0]},t.getLowest=function(t,n){return Ot(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return R(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=yn,t.getPropNames=dn,t.getType=tn,t.getTypeName=ne,t.groupBy=function(t,n){const e={};return l(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!se(n)&&!se(e)&&(n===e||(yt(n)?yt(e)?n.includes(e,r):Tn(e)?e.test(n):pt(e)?e(n):b(e)?R(e,(e=>t(n,e))):hn(e,(e=>t(n,e))):b(n)?Tn(e)?R(n,(t=>t.test(e))):pt(e)?R(n,e):b(e)?R(e,(e=>t(n,e))):n.includes(e,r):!!J(n)&&(Tn(e)?an(n,(t=>t.test(e))):pt(e)?an(n,e):J(e)?an(n,((t,n)=>t===e[n])):an(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}})))},t.hasDot=lr,t.hasKeys=q,t.hasLength=s,t.hasProp=An,t.hasValue=a,t.htmlEntities=Gn,t.ifInvoke=function(t,n,...e){if(pt(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!a(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(a(t)){if(pt(n))return e?Yt(n,e,r):n(...r);if(J(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return h(t,(t=>{if(R(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return pr.set(t,n)},t.intervals=pr,t.invert=function(t,n={}){if(t)return Pt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(a(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return Y(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!a(t)&&"[object Arguments]"===t.toString()},t.isArray=b,t.isArrayBuffer=pe,t.isArrayBufferCall=he,t.isArrayLike=function(t,n){if(se(t)||pt(t))return!1;if(b(t)||ce(t))return!0;const e=t.length;if(!se(e)||!dt(e)||e<0)return!1;if(n){const n=D(t);return!!n&&hn(n,((t,n)=>n>=0&&dt(n)))}return!0},t.isAsync=Vt,t.isAsyncCall=_t,t.isBigInt=ae,t.isBigIntCall=ue,t.isBoolean=le,t.isBooleanCall=fe,t.isBuffer=G,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(a(t)){const n=t?.constructor?.name;return ge.test(n)}return!1},t.isConstructor=_,t.isConstructorFactory=V,t.isConstructorNameFactory=K,t.isDate=ye,t.isDateCall=de,t.isDeno=Ze,t.isEmpty=function(t){return yt(t)||b(t)?!s(t):J(t)?!Nn(t):!a(t)},t.isEqual=H,t.isEven=function(t){return!(1&t)},t.isF32=be,t.isF32Call=Ae,t.isF64=ve,t.isF64Call=we,t.isFalse=me,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=xt,t.isFileJS=Tt,t.isFileJSON=Nt,t.isFloat=Oe,t.isFunction=pt,t.isGenerator=Lt,t.isGeneratorCall=Dt,t.isI16=je,t.isI16Call=Ie,t.isI32=Me,t.isI32Call=Fe,t.isI8=Re,t.isI8Call=Ee,t.isIterable=function(t){return a(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=xe,t.isMap=re,t.isMapCall=ee,t.isMatchArray=function(t,n){return t.length===n.length&&R(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=D(t),r=D(n);return e.length===r.length&&R(e,(e=>t[e]===n[e]))},t.isNegative=y,t.isNodejs=Ke,t.isNotArray=function(t){return!b(t)},t.isNotNumber=function(t){return!dt(t)},t.isNotString=function(t){return!yt(t)},t.isNull=u,t.isNumber=dt,t.isNumberCall=gt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=J,t.isPositive=function(t){return 1===vn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Se,t.isRegex=Tn,t.isRegexCall=xn,t.isRelated=function(t,n){return!se(t)&&!se(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Ne,t.isSame=bn,t.isSameType=function(t,n){const e=tn(t),r=tn(n);return e===r&&e.name===r.name},t.isSet=kt,t.isSetCall=Ut,t.isString=yt,t.isTrue=function(t){return!0===t},t.isTruthy=ze,t.isTypeFactory=z,t.isTypedArray=ce,t.isU16=Pe,t.isU16Call=Be,t.isU32=ke,t.isU32Call=Ue,t.isU8=De,t.isU8C=qe,t.isU8CCall=Le,t.isU8Call=$e,t.isUndefined=c,t.isWeakMap=Ve,t.isWeakMapCall=_e,t.isZero=Cn,t.jsonParse=function(t,n){if(t)return Ge.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase().replace(Un,"-")},t.keys=D,t.largest=function(t){return Q(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Ln," ").trim().toLowerCase()},t.map=sn,t.mapArray=X,t.mapAsyncArray=Y,t.mapAsyncObject=on,t.mapObject=cn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{Kt(e,((e,r)=>{if(n[r]&&(J(e)||b(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return a(n)?v(gr,[t,n]):k(t,gr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=se,t.noop=Wt,t.notEqual=We,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=mt,t.objectEntries=On,t.objectSize=Nn,t.omit=function(t,n){if(!t)return{};if(b(n)){const e=Sn(n);return Fn(t,((t,n)=>!e.test(n)))}if(Tn(n))return Fn(t,((t,e)=>!n.test(e)));if(yt(n))return Fn(t,((t,e)=>e!==n));if(dt(n)){const e=n.toString();return Fn(t,((t,n)=>n!==e))}return pt(n)?Fn(t,((t,e)=>!n(t,e))):mt({},t)},t.once=t=>{let n;return(...e)=>(a(n)||(n=t(...e)),n)},t.onlyUnique=at,t.over=function(t){return(...n)=>sn(t,(t=>t(...n)))},t.overEvery=function(t){return n=>hn(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[h(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return l(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return X(t,(t=>Ft(t,n)))},t.pluckObject=Ft,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=D(t))=>R(e,(e=>H(t[e],n[e]))),t.randomFloat=function(t,n=0){return wn()*(t-n)+n},t.randomInt=ot,t.range=function(t,n,e=1,r=[]){return y(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Rt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return st(t);if(1===n)return[t[ot(e-1,0)]];const r=[],o={};let i,c=0;for(;cMt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Et(t,r,n,e)))},t.sortCollectionAscending=jt,t.sortCollectionAscendingFilter=It,t.sortCollectionDescending=Ot,t.sortCollectionDescendingFilter=Ct,t.sortNumberAscending=function(t){return t.sort(tt)},t.sortNumberDescening=function(t){return t.sort(nt)},t.sortObjectsAlphabetically=Mt,t.sortObjectsAlphabeticallyReverse=Et,t.sortUnique=ft,t.stringify=Je,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=tt,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=nt,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Qt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Qt,t.timers=Ht,t.times=Gt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Pt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return lt(O(t))},t.uniqID=mr,t.unique=lt,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rYn(t)))},t.upperFirstLetter=Xn,t.upperFirstOnly=te,t.upperFirstOnlyAll=function(t){return t.replace(Qn,(t=>te(t)))},t.virtualStorage=function(t){return new Ar(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Hn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=v(Map),e=[];return 2===t.length?j(t[0],t[1]):(l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return l(t,((t,r)=>{e[t]=n[r]})),e}})); //# sourceMappingURL=index.js.map diff --git a/docs/sourceMap.js b/docs/sourceMap.js index 751415e..7f5d3e2 100644 --- a/docs/sourceMap.js +++ b/docs/sourceMap.js @@ -1 +1 @@ -window.docMap = {"categories":[{"title":"array","items":["chunk","clearArray","cloneArray","compactMapArray","compactMapAsyncArray","concurrentEachArray","difference","drop","dropRight","eachArray","eachAsyncArray","eachRight","eachRightAsync","ensureArray","everyArray","everyAsyncArray","filterArray","filterAsyncArray","first","flatten","flattenDeep","getNumberInsertIndex","initial","intersection","invokeArray","isMatchArray","largest","last","mapArray","mapAsyncArray","mapRightArray","mapWhile","partition","range","remove","removeBy","rest","right","sample","shuffle","smallest","sortNumberAscending","sortNumberDescening","take","takeRight","timesMapAsync","toArray","unZip","union","unique","untilFalseArray","untilTrueArray","whileCompactMap","whileEachArray","whileMapArray","without","xor","zip"]},{"title":"browser","items":["BrowserStorage","BrowserStorage.clear","BrowserStorage.getItem","BrowserStorage.removeItem","BrowserStorage.setItem","browserStorage","eventAdd","eventRemove","importjs","isAgent","isEnter","virtualStorage"]},{"title":"buffer","items":["clearBuffer","ensureBuffer"]},{"title":"class","items":["construct"]},{"title":"collection","items":["countBy","countKey","countWithoutKey","findIndex","findItem","getHighest","getLowest","groupBy","indexBy","invokeCollection","invokeCollectionAsync","pluck","sortCollectionAlphabetically","sortCollectionAlphabeticallyReverse","sortCollectionAscending","sortCollectionDescending"]},{"title":"file","items":["getFileExtension","getFilename","isFileCSS","isFileHTML","isFileJS","isFileJSON"]},{"title":"function","items":["after","apply","ary","before","chain","clearIntervals","clearTimers","curry","debounce","ifInvoke","interval","negate","noop","nthArg","once","over","overEvery","reArg","throttle","timer","wrap"]},{"title":"math","items":["add","deduct","divide","increment","multiply","randomFloat","remainder","subtract","subtractAll","subtractReverse","sumAll"]},{"title":"number","items":["isNegative","isNumberEqual","isNumberInRange","isNumberNotInRange","isPositive","isZero","randomInt"]},{"title":"object","items":["assign","compactKeys","compactMapAsyncObject","compactMapObject","defProp","eachAsyncObject","eachObject","everyAsyncObject","everyObject","filterAsyncObject","filterObject","getEntries","getPropDesc","getPropNames","hasAnyKeys","hasKeys","invert","isMatchObject","isSame","keys","mapObject","mapObjectAsync","objectSize","omit","pick","pluckObject","unZipObject","zipObject"]},{"title":"regex","items":["arrayToRegex","regexSafe"]},{"title":"string","items":["camelCase","chunkString","htmlEntities","initialString","insertInRange","kebabCase","lowerCase","rawURLDecode","replaceList","restString","rightString","sanitize","snakeCase","tokenize","truncate","truncateRight","upperCase","upperFirst","upperFirstAll","upperFirstLetter","upperFirstOnly","upperFirstOnlyAll"]},{"title":"type","items":["cloneType","getType","getTypeName","hasValue","isArguments","isArray","isArrayBuffer","isArrayLike","isAsync","isBigInt","isBoolean","isBuffer","isChild","isCloneable","isConstructor","isDate","isEmpty","isF32","isF64","isFalsy","isFloat","isFunction","isGenerator","isI16","isI32","isI8","isIterable","isKindAsync","isMap","isNotArray","isNotNumber","isNotString","isNull","isNumber","isParent","isPlainObject","isPrimitive","isPromise","isRegex","isRelated","isSafeInt","isSet","isString","isTruthy","isTypedArray","isU16","isU32","isU8","isU8C","isUndefined","isWeakMap","noValue"]},{"title":"utility","items":["Model","UniqID","UniqID.free","UniqID.get","VirtualStorage","arraysToObject","assert","bindAll","cacheNativeMethod","calcProgress","clear","clone","compact","compactMap","concurrent","concurrentStatus","each","every","filter","flow","flowAsync","flowAsyncRight","flowRight","forOfCompactMap","forOfCompactMap","forOfCompactMapAsync","forOfCompactMapAsync","forOfEvery","forOfEveryAsync","forOfFilter","forOfFilterAsync","get","has","hasDot","hasLength","ifNotAssign","ifValue","inAsync","inSync","isEqual","isFalse","isTrue","jsonParse","map","model","notEqual","pair","promise","propertyMatch","returnValue","stringify","stubArray","stubFalse","stubObject","stubString","stubTrue","times","timesAsync","timesMap","toPath","toggle","uniqID"]}],"items":{"chunk":{"category":"array","description":"Chunks an array according to a user defined number.","examples":[{"tag":"example","optional":false,"description":"import { chunk, assert } from '@universalweb/acid'; assert(chunk([1,2,3], 1), [[1],[2],[3]]);","source":"import { chunk, assert } from \"@universalweb/acid\";\nassert(chunk([1, 2, 3], 1), [[1], [2], [3]]);\n"}],"name":"chunk","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to be chunked.","source":"* {Array} array - Array to be chunked."},{"tag":"param","name":"size","type":"Number","optional":false,"description":"- Number which determines the size of each chunk.","source":"* {Number} size - Number which determines the size of each chunk."}],"type":"function","functionTag":"chunk","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"A chunked version of the source array.","source":"* {Array} - A chunked version of the source array.\n\t *"}},"clearArray":{"category":"array","description":"Clears the values out of an array.","examples":[{"tag":"example","optional":false,"description":"import { clearArray, assert } from '@universalweb/acid'; assert(clearArray([1,'B', 'Cat']), []);","source":"import { clearArray, assert } from \"@universalweb/acid\";\nassert(clearArray([1, \"B\", \"Cat\"]), []);\n"}],"name":"clearArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Takes an array to be emptied.","source":"* {Array} source - Takes an array to be emptied."}],"type":"function","functionTag":"clearArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The originally given array.","source":"* {Array} - The originally given array.\n\t *"}},"cloneArray":{"category":"array","description":"Clone an array (uses .slice()) and assign the source arrays values to the new array.","examples":[{"tag":"example","optional":false,"description":"import { cloneArray, assert } from '@universalweb/acid'; assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);","source":"import { cloneArray, assert } from \"@universalweb/acid\";\nassert(cloneArray([1, \"B\", \"Cat\"]), [1, \"B\", \"Cat\"]);\n"}],"name":"cloneArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The array to be quick cloned.","source":"* {Array} source - The array to be quick cloned."}],"type":"function","functionTag":"cloneArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The newly cloned array with assigned items.","source":"* {Array} - The newly cloned array with assigned items.\n\t *"}},"isUndefined":{"category":"type","description":"Checks if the value is undefined.","examples":[{"tag":"example","optional":false,"description":"import { isUndefined, assert } from '@universalweb/acid'; assert(isUndefined(undefined), true);","source":"import { isUndefined, assert } from \"@universalweb/acid\";\nassert(isUndefined(undefined), true);\n"}],"name":"isUndefined","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isUndefined","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"hasLength":{"category":"utility","description":"Checks if the value has length greater than 0.","examples":[{"tag":"example","optional":false,"description":"import { hasLength, assert } from '@universalweb/acid'; assert(hasLength([1]), true);","source":"import { hasLength, assert } from \"@universalweb/acid\";\nassert(hasLength([1]), true);\n"}],"name":"hasLength","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"hasLength","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isNull":{"category":"type","description":"Checks if the value is null.","examples":[{"tag":"example","optional":false,"description":"import { isNull, assert } from '@universalweb/acid'; assert(isNull(null), true);","source":"import { isNull, assert } from \"@universalweb/acid\";\nassert(isNull(null), true);\n"}],"name":"isNull","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isNull","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"hasValue":{"category":"type","description":"Checks if the value is not null or undefined.","examples":[{"tag":"example","optional":false,"description":"import { hasValue, assert } from '@universalweb/acid'; assert(hasValue(1), true);","source":"import { hasValue, assert } from \"@universalweb/acid\";\nassert(hasValue(1), true);\n"}],"name":"hasValue","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"hasValue","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"returnValue":{"category":"utility","description":"A simple function which returns the value it's given.","name":"returnValue","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- The source object.","source":"* {*} source - The source object."}],"type":"function","functionTag":"returnValue","returns":{"tag":"returns","name":"The","type":"source","optional":false,"description":"source object.","source":"* {source} The source object.\n\t */"}},"eachArray":{"category":"array","description":"Iterates through the given array.","examples":[{"tag":"example","optional":false,"description":"import { eachArray, assert } from '@universalweb/acid'; const list = []; eachArray([1, 2, 3], (item, index) => { list[index] = item; }); assert(list, [1, 2, 3]);","source":"import { eachArray, assert } from \"@universalweb/acid\";\nconst list = [];\neachArray([1, 2, 3], (item, index) => {\n list[index] = item;\n});\nassert(list, [1, 2, 3]);\n"}],"name":"eachArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, array length, and additionalArg.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg."},{"tag":"param","name":"thisBind","type":"*","optional":false,"description":"- Iteratee called with thisBind as this.","source":"* {*} thisBind - Iteratee called with thisBind as this."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"eachArray","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"The originally given array.","source":"* {Array|undefined} - The originally given array.\n\t *"}},"compactMapArray":{"category":"array","description":"Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.","examples":[{"tag":"example","optional":false,"description":"import { compactMapArray, assert } from '@universalweb/acid'; assert(compactMapArray([null, 2, 3], (item) => { return item; }), [2, 3]);","source":"import { compactMapArray, assert } from \"@universalweb/acid\";\nassert(\n compactMapArray([null, 2, 3], (item) => {\n return item;\n }),\n [2, 3],\n);\n"}],"name":"compactMapArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created array, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length."},{"tag":"param","name":"results","type":"Array = []","optional":false,"description":"- Array that will be used to assign results. Default value is a new empty array.","source":"* {Array = []} results - Array that will be used to assign results. Default value is a new empty array."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} thisCall - An object to be given each time to the iteratee."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"compactMapArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with mapped properties that are not null or undefined.","source":"* {Array} - An array with mapped properties that are not null or undefined.\n\t *"}},"eachAsyncArray":{"category":"array","description":"Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.","examples":[{"tag":"example","optional":false,"description":"import { eachAsyncArray, assert } from '@universalweb/acid'; const tempList = []; await eachAsyncArray([1, 2, 3], async (item) => { tempList.push(item); }); assert(tempList, [1, 2, 3]);","source":"import { eachAsyncArray, assert } from \"@universalweb/acid\";\nconst tempList = [];\nawait eachAsyncArray([1, 2, 3], async (item) => {\n tempList.push(item);\n});\nassert(tempList, [1, 2, 3]);\n"}],"name":"eachAsyncArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, array length, and additionalArg.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- Iteratee called with thisCall as this.","source":"* {*} thisCall - Iteratee called with thisCall as this."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","isAsync":true,"functionTag":"eachAsyncArray","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"Returns source the originally given array.","source":"* {Array|undefined} - Returns source the originally given array.\n\t *"}},"compactMapAsyncArray":{"category":"array","description":"Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.","examples":[{"tag":"example","optional":false,"description":"import { compactMapAsync, assert } from '@universalweb/acid'; assert(await compactMapAsync([1, 2, 3, null], async (item) => { return item; }), [1, 2, 3]);","source":"import { compactMapAsync, assert } from \"@universalweb/acid\";\nassert(\n await compactMapAsync([1, 2, 3, null], async (item) => {\n return item;\n }),\n [1, 2, 3],\n);\n"}],"name":"compactMapAsyncArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to be compacted.","source":"* {Array} source - Array to be compacted."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Iteratee to be performed on array.","source":"* {Function} iteratee - Iteratee to be performed on array."}],"type":"function","isAsync":true,"functionTag":"compactMapAsyncArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Array values after being put through an iterator.","source":"* {Array} - Array values after being put through an iterator.\n\t *"}},"isNegative":{"category":"number","description":"Checks if a number is negative & returns true or false.","examples":[{"tag":"example","optional":false,"description":"import { isNegative, assert } from '@universalweb/acid'; assert(isNegative(-1), true);","source":"import { isNegative, assert } from \"@universalweb/acid\";\nassert(isNegative(-1), true);\n"}],"name":"isNegative","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."}],"type":"function","functionTag":"isNegative","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"range":{"category":"array","description":"Create a numbered list of integers.","examples":[{"tag":"example","optional":false,"description":"import { range, assert } from '@universalweb/acid'; assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);","source":"import { range, assert } from \"@universalweb/acid\";\nassert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n"}],"name":"range","params":[{"tag":"param","name":"start","type":"Number","optional":false,"description":"- Value which determines the start of the range.","source":"* {Number} start - Value which determines the start of the range."},{"tag":"param","name":"end","type":"Number","optional":false,"description":"- Value which determines the end of the range.","source":"* {Number} end - Value which determines the end of the range."},{"tag":"param","name":"step","type":"Number","optional":false,"description":"- Value used to step between integers.","source":"* {Number} step - Value used to step between integers."}],"type":"function","functionTag":"range","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array of integers.","source":"* {Array} - An array of integers.\n\t *"}},"isArray":{"category":"type","description":"Checks if the value is an array. This references Array.isArray.","examples":[{"tag":"example","optional":false,"description":"import { isArray, assert } from '@universalweb/acid'; assert(isArray([]), true); assert(isArray(2), false);","source":"import { isArray, assert } from \"@universalweb/acid\";\nassert(isArray([]), true);\nassert(isArray(2), false);\n"}],"name":"isArray","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isArray","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isNotArray":{"category":"type","description":"Checks if the value is not an array. This references Array.isArray.","examples":[{"tag":"example","optional":false,"description":"import { isNotArray, assert } from '@universalweb/acid'; assert(isNotArray([]), false); assert(isNotArray(2), true);","source":"import { isNotArray, assert } from \"@universalweb/acid\";\nassert(isNotArray([]), false);\nassert(isNotArray(2), true);\n"}],"name":"isNotArray","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isNotArray","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"construct":{"category":"class","description":"A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.","examples":[{"tag":"example","optional":false,"description":"import { construct, assert } from '@universalweb/acid'; class test { constructor(a) { return 1; } } const newClass = construct(test, [1]); assert(test, 1);","source":"import { construct, assert } from \"@universalweb/acid\";\nclass test {\n constructor(a) {\n return 1;\n }\n}\nconst newClass = construct(test, [1]);\nassert(test, 1);\n"}],"name":"construct","params":[{"tag":"param","name":"target","type":"Function","optional":false,"description":"- The target function or class.","source":"* {Function} target - The target function or class."},{"tag":"param","name":"argumentsList","type":"Array","optional":true,"description":"- An array-like object specifying the arguments with which target should be called. Default value is a new empty array.","source":"* {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.","default":"[]"},{"tag":"param","name":"newTarget","type":"Array","optional":false,"description":"- The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.","source":"* {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target."}],"type":"function","functionTag":"construct","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.","source":"* {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n\t *"}},"ensureArray":{"category":"array","description":"Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.","examples":[{"tag":"example","optional":false,"description":"import { isArray, ensureArray, assert } from '@universalweb/acid'; assert(isArray(ensureArray('test')), ['test']);","source":"import { isArray, ensureArray, assert } from \"@universalweb/acid\";\nassert(isArray(ensureArray(\"test\")), [\"test\"]);\n"}],"name":"ensureArray","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"ensureArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns an array.","source":"* {Array} - Returns an array.\n\t *"}},"flattenDeep":{"category":"array","description":"Flattens an array to a single level.","examples":[{"tag":"example","optional":false,"description":"import { flattenDeep, assert } from '@universalweb/acid'; assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);","source":"import { flattenDeep, assert } from \"@universalweb/acid\";\nassert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n"}],"name":"flattenDeep","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to flatten.","source":"* {Array} source - Array to flatten."}],"type":"function","functionTag":"flattenDeep","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns a completely flattened array.","source":"* {Array} - Returns a completely flattened array.\n\t *"}},"difference":{"category":"array","description":"Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.","examples":[{"tag":"example","optional":false,"description":"import { difference, assert } from '@universalweb/acid'; assert(difference([1, 2, 3], [1, 2]), [3]);","source":"import { difference, assert } from \"@universalweb/acid\";\nassert(difference([1, 2, 3], [1, 2]), [3]);\n"}],"name":"difference","params":[{"tag":"param","name":"sources","type":"...Array","optional":false,"description":"- List of arrays to be compared.","source":"* {...Array} sources - List of arrays to be compared."}],"type":"function","functionTag":"difference","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"An array which contains the differences between the source and compare array.","source":"* {Array|undefined} - An array which contains the differences between the source and compare array.\n\t *"}},"drop":{"category":"array","description":"Removes all items from an array after a specified index.","examples":[{"tag":"example","optional":false,"description":"import { drop, assert } from '@universalweb/acid'; assert(drop([1, 2, 3]), [2, 3]); assert(drop([1, 2, 3], 2), [3]);","source":"import { drop, assert } from \"@universalweb/acid\";\nassert(drop([1, 2, 3]), [2, 3]);\nassert(drop([1, 2, 3], 2), [3]);\n"}],"name":"drop","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Source array.","source":"* {Array} array - Source array."},{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- Amount of items to drop from the array.","source":"* {Number} amount - Amount of items to drop from the array."},{"tag":"param","name":"upTo","type":"Number","optional":true,"description":"- Index to stop at.","source":"* {Number} [upTo = array.length] - Index to stop at.","default":"array.length"}],"type":"function","functionTag":"drop","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with all values removed after a user defined index.","source":"* {Array} - An array with all values removed after a user defined index.\n\t *"}},"dropRight":{"category":"array","description":"Removes all items from an array before a specified index.","examples":[{"tag":"example","optional":false,"description":"import { dropRight, assert } from '@universalweb/acid'; assert(dropRight([1, 2, 3]), [1, 2]); assert(dropRight([1, 2, 3], 2), [1]);","source":"import { dropRight, assert } from \"@universalweb/acid\";\nassert(dropRight([1, 2, 3]), [1, 2]);\nassert(dropRight([1, 2, 3], 2), [1]);\n"}],"name":"dropRight","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Source array.","source":"* {Array} array - Source array."},{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- Amount of items to drop from the array.","source":"* {Number} amount - Amount of items to drop from the array."},{"tag":"param","name":"upTo","type":"Number","optional":true,"description":"- Index to stop at.","source":"* {Number} [upTo = array.length] - Index to stop at.","default":"array.length"}],"type":"function","functionTag":"dropRight","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with all values removed before a user defined index.","source":"* {Array} - An array with all values removed before a user defined index.\n\t *"}},"eachRight":{"category":"array","description":"Iterates through the given array in reverse.","examples":[{"tag":"example","optional":false,"description":"import { eachRight, assert } from '@universalweb/acid'; const tempList = []; eachRight([1, 2, 3], (item) => { tempList.push(item); }); assert(tempList, [3, 2, 1]);","source":"import { eachRight, assert } from \"@universalweb/acid\";\nconst tempList = [];\neachRight([1, 2, 3], (item) => {\n tempList.push(item);\n});\nassert(tempList, [3, 2, 1]);\n"}],"name":"eachRight","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, and array length."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"eachRight","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"The originally given array.","source":"* {Array|undefined} - The originally given array.\n\t *"}},"eachRightAsync":{"category":"array","description":"Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.","examples":[{"tag":"example","optional":false,"description":"import { eachRightAsync, assert } from '@universalweb/acid'; const tempList = []; await eachRightAsync([1, 2, 3], async (item) => { tempList.push(item); }); assert(tempList, [3, 2, 1]);","source":"import { eachRightAsync, assert } from \"@universalweb/acid\";\nconst tempList = [];\nawait eachRightAsync([1, 2, 3], async (item) => {\n tempList.push(item);\n});\nassert(tempList, [3, 2, 1]);\n"}],"name":"eachRightAsync","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, and array length."}],"type":"function","isAsync":true,"functionTag":"eachRightAsync","returns":{"tag":"returns","name":"-","type":"Object|undefined","optional":false,"description":"The originally given array.","source":"* {Object|undefined} - The originally given array.\n\t *"}},"everyArray":{"category":"array","description":"Iterates through the given array while the iteratee returns true else the loop exits & returns false.","examples":[{"tag":"example","optional":false,"description":"import { everyArray, assert } from '@universalweb/acid'; assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { return item; }), false); assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { return item; }), true);","source":"import { everyArray, assert } from \"@universalweb/acid\";\nassert(\n everyArray(\n [true, true, false],\n (item, index, source, sourceLength, additionalArgument) => {\n return item;\n },\n ),\n false,\n);\nassert(\n everyArray(\n [true, true, true],\n (item, index, source, sourceLength, additionalArgument) => {\n return item;\n },\n ),\n true,\n);\n"}],"name":"everyArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling array, and array length."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"everyArray","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"Returns true if all returns are true or false if one value returns false.","source":"* {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n\t *"}},"everyAsyncArray":{"category":"array","description":"Iterates through the given array while the iteratee returns true else the loop exits & returns false.","examples":[{"tag":"example","optional":false,"description":"import { everyAsyncArray, assert } from '@universalweb/acid'; assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { return item; }), false); assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { return item; }), true);","source":"import { everyAsyncArray, assert } from \"@universalweb/acid\";\nassert(\n everyAsyncArray(\n [true, true, false],\n (item, index, source, sourceLength, additionalArgument) => {\n return item;\n },\n ),\n false,\n);\nassert(\n everyAsyncArray(\n [true, true, true],\n (item, index, source, sourceLength, additionalArgument) => {\n return item;\n },\n ),\n true,\n);\n"}],"name":"everyAsyncArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling array, and array length."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"everyAsyncArray","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"Returns true if all returns are true or false if one value returns false.","source":"* {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n\t *"}},"filterArray":{"category":"array","description":"Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"import { filterArray, assert } from '@universalweb/acid'; assert(filterArray([false, true, true], (item) => { return item; }), [true, true]);","source":"import { filterArray, assert } from \"@universalweb/acid\";\nassert(\n filterArray([false, true, true], (item) => {\n return item;\n }),\n [true, true],\n);\n"}],"name":"filterArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created object, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results.","source":"* {Array} results - Array that will be used to assign results."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"filterArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with properties that passed the test.","source":"* {Array} - An array with properties that passed the test.\n\t *"}},"filterAsyncArray":{"category":"array","description":"Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"import { filterAsyncArray, assert } from '@universalweb/acid'; assert(filterAsyncArray([false, true, true], (item) => { return item; }), [true, true]);","source":"import { filterAsyncArray, assert } from \"@universalweb/acid\";\nassert(\n filterAsyncArray([false, true, true], (item) => {\n return item;\n }),\n [true, true],\n);\n"}],"name":"filterAsyncArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created object, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results.","source":"* {Array} results - Array that will be used to assign results."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"filterAsyncArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with properties that passed the test.","source":"* {Array} - An array with properties that passed the test.\n\t *"}},"first":{"category":"array","description":"Takes the first or multiple items from an array.","examples":[{"tag":"example","optional":false,"description":"import { first, assert } from '@universalweb/acid'; assert(first([1, 2, 3]), 1);","source":"import { first, assert } from \"@universalweb/acid\";\nassert(first([1, 2, 3]), 1);\n"}],"name":"first","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to extract from.","source":"* {Array} array - Array to extract from."},{"tag":"param","name":"upTo","type":"Number","optional":false,"description":"- Number which determines how many items after the first item are extracted from the array.","source":"* {Number} upTo - Number which determines how many items after the first item are extracted from the array."}],"type":"function","functionTag":"first","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns an array.","source":"* {Array} - Returns an array.\n\t *"}},"flatten":{"category":"array","description":"Flattens an array up to the provided level.","examples":[{"tag":"example","optional":false,"description":"import { flatten, assert } from '@universalweb/acid'; assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);","source":"import { flatten, assert } from \"@universalweb/acid\";\nassert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n"}],"name":"flatten","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to flatten.","source":"* {Array} source - Array to flatten."},{"tag":"param","name":"level","type":"Number","optional":true,"description":"- Number which determines how deep the array nest can be.","source":"* {Number} [level = 1] - Number which determines how deep the array nest can be.","default":"1"}],"type":"function","functionTag":"flatten","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"Returns an array.","source":"* {Array|undefined} - Returns an array.\n\t *"}},"initial":{"category":"array","description":"Takes all but the last item in the array.","examples":[{"tag":"example","optional":false,"description":"import { initial, assert } from '@universalweb/acid'; assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);","source":"import { initial, assert } from \"@universalweb/acid\";\nassert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n"}],"name":"initial","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to have items extracted from.","source":"* {Array} array - Array to have items extracted from."}],"type":"function","functionTag":"initial","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns a completely flattened array.","source":"* {Array} - Returns a completely flattened array.\n\t *"}},"intersection":{"category":"array","description":"Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory)) of the array and the input array(s).","examples":[{"tag":"example","optional":false,"description":"import { intersection, assert } from '@universalweb/acid'; assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);","source":"import { intersection, assert } from \"@universalweb/acid\";\nassert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n"}],"name":"intersection","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to compare other arrays to.","source":"* {Array} array - Array to compare other arrays to."},{"tag":"param","name":"arrays","type":"...Array","optional":false,"description":"- A variable number of arrays.","source":"* {...Array} arrays - A variable number of arrays."}],"type":"function","functionTag":"intersection","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The new array of unique values shared by all of the arrays.","source":"* {Array} - The new array of unique values shared by all of the arrays.\n\t *"}},"invokeArray":{"category":"array","description":"Invoke each function in the given array.","examples":[{"tag":"example","optional":false,"description":"import { invokeArray, assert } from '@universalweb/acid'; function test(arg){ return [this, arg]; } const results = invokeArray([test], 1, test); assert(results, [test, 1]);","source":"import { invokeArray, assert } from \"@universalweb/acid\";\nfunction test(arg) {\n return [this, arg];\n}\nconst results = invokeArray([test], 1, test);\nassert(results, [test, 1]);\n"}],"name":"invokeArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"additionalArg","type":"Function","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {Function} additionalArg - An object to be given each time to the iteratee."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- Iteratee called with thisCall as this.","source":"* {*} thisCall - Iteratee called with thisCall as this."}],"type":"function","functionTag":"invokeArray","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"The originally given array.","source":"* {Array|undefined} - The originally given array.\n\t *"}},"toPath":{"category":"utility","description":"Breaks up string into object chain list.","examples":[{"tag":"example","optional":false,"description":"import { toPath, assert } from '@universalweb/acid'; assert(toPath('post.like[2]'), ['post', 'like', '2']);","source":"import { toPath, assert } from \"@universalweb/acid\";\nassert(toPath(\"post.like[2]\"), [\"post\", \"like\", \"2\"]);\n"}],"name":"toPath","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be broken up.","source":"* {String} source - String to be broken up."}],"type":"function","functionTag":"toPath","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Array used to go through object chain.","source":"* {Array} - Array used to go through object chain.\n\t *"}},"get":{"category":"utility","description":"Returns property on an object.","examples":[{"tag":"example","optional":false,"description":"import { get, assert } from '@universalweb/acid'; const objectTarget = { post: { like: ['a','b','c'] } }; assert(get('post.like[2]', objectTarget), 'c');","source":"import { get, assert } from \"@universalweb/acid\";\nconst objectTarget = { post: { like: [\"a\", \"b\", \"c\"] } };\nassert(get(\"post.like[2]\", objectTarget), \"c\");\n"}],"name":"get","params":[{"tag":"param","name":"propertyString","type":"String","optional":false,"description":"- String used to retrieve properties.","source":"* {String} propertyString - String used to retrieve properties."},{"tag":"param","name":"target","type":"Object","optional":false,"description":"- Object which has a property retrieved from it.","source":"* {Object} target - Object which has a property retrieved from it."}],"type":"function","functionTag":"get","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns property from the given object.","source":"* {Object} - Returns property from the given object.\n\t *"}},"keys":{"category":"object","description":"Get object's keys.","examples":[{"tag":"example","optional":false,"description":"keys({a: 1, b: 2}); // => ['a', 'b']","source":"keys({ a: 1, b: 2 });\n// => ['a', 'b']\n"}],"name":"keys","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- The source object to pull keys from.","source":"* {*} source - The source object to pull keys from."}],"type":"function","functionTag":"keys","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Array of keys.","source":"* {Array} - Array of keys.\n\t *"}},"hasKeys":{"category":"object","description":"Checks to see if an object has all of the given property names.","examples":[{"tag":"example","optional":false,"description":"import { hasKeys, assert } from '@universalweb/acid'; assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);","source":"import { hasKeys, assert } from \"@universalweb/acid\";\nassert(hasKeys({ a: { b: { c: 1 } } }, \"a\", \"a.b\", \"a.b.c\"), true);\n"}],"name":"hasKeys","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Source object to check for keys.","source":"* {Object} source - Source object to check for keys."},{"tag":"param","name":"properties","type":"...String","optional":false,"description":"- List of strings to check.","source":"* {...String} properties - List of strings to check."}],"type":"function","functionTag":"hasKeys","returns":{"tag":"returns","name":"-","type":"Boolean|undefined","optional":false,"description":"Returns true or false.","source":"* {Boolean|undefined} - Returns true or false.\n\t *"}},"hasAnyKeys":{"category":"object","description":"Checks to see if an object has any of the given property names.","examples":[{"tag":"example","optional":false,"description":"import { hasAnyKeys, assert } from '@universalweb/acid'; assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true); assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);","source":"import { hasAnyKeys, assert } from \"@universalweb/acid\";\nassert(hasAnyKeys({ a: { b: { yes: 1 } } }, \"no\", \"nope\", \"a.b.yes\"), true);\nassert(hasAnyKeys({ a: { b: { yes: 1 } } }, \"no\", \"nope\", \"a.b.noped\"), false);\n"}],"name":"hasAnyKeys","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Source object to check for keys.","source":"* {Object} source - Source object to check for keys."},{"tag":"param","name":"properties","type":"Array","optional":false,"description":"- List of strings to check.","source":"* {Array} properties - List of strings to check."}],"type":"function","functionTag":"hasAnyKeys","returns":{"tag":"returns","name":"-","type":"Boolean|undefined","optional":false,"description":"Returns true or false.","source":"* {Boolean|undefined} - Returns true or false.\n\t *"}},"isConstructor":{"category":"type","description":"Checks to see if the constructor is that of a native object.","examples":[{"tag":"example","optional":false,"description":"import { isConstructor, assert } from '@universalweb/acid'; assert(isConstructor(2, Number), true);","source":"import { isConstructor, assert } from \"@universalweb/acid\";\nassert(isConstructor(2, Number), true);\n"}],"name":"isConstructor","params":[{"tag":"param","name":"target","type":"Object","optional":false,"description":"- The object to be checked.","source":"* {Object} target - The object to be checked."},{"tag":"param","name":"source","type":"Object","optional":false,"description":"- The source constructor object.","source":"* {Object} source - The source constructor object."}],"type":"function","functionTag":"isConstructor","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the target object.","source":"* {Object} - Returns the target object.\n\t *"}},"isBuffer":{"category":"type","description":"Checks if an object or objects are a Buffer.","examples":[{"tag":"example","optional":false,"description":"import { isBuffer, assert } from '@universalweb/acid'; assert(isBuffer(Buffer.from('test')), true);","source":"import { isBuffer, assert } from \"@universalweb/acid\";\nassert(isBuffer(Buffer.from(\"test\")), true);\n"}],"name":"isBuffer","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isBuffer","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isPlainObject":{"category":"type","description":"Checks if the value is a plain object.","examples":[{"tag":"example","optional":false,"description":"import { isPlainObject } from '@universalweb/acid'; isPlainObject({}); // => true","source":"import { isPlainObject } from \"@universalweb/acid\";\nisPlainObject({});\n// => true\n"}],"name":"isPlainObject","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isPlainObject","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isEqual":{"category":"utility","description":"Performs a deep comparison between two objects & determines if the value is the same using strict comparison.","examples":[{"tag":"example","optional":false,"description":"import { isEqual, assert } from '@universalweb/acid'; assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);","source":"import { isEqual, assert } from \"@universalweb/acid\";\nassert(isEqual({ a: [1, 2, 3] }, { a: [1, 2, 3] }), true);\n"}],"name":"isEqual","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Source object.","source":"* {*} source - Source object."},{"tag":"param","name":"target","type":"*","optional":false,"description":"- Object to be compared.","source":"* {*} target - Object to be compared."}],"type":"function","functionTag":"isEqual","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isMatchArray":{"category":"array","description":"Performs a shallow strict comparison between two objects.","examples":[{"tag":"example","optional":false,"description":"import { isMatchArray, assert } from '@universalweb/acid'; assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);","source":"import { isMatchArray, assert } from \"@universalweb/acid\";\nassert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n"}],"name":"isMatchArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Source object.","source":"* {Array} source - Source object."},{"tag":"param","name":"compareArray","type":"Array","optional":false,"description":"- Object to compare to source.","source":"* {Array} compareArray - Object to compare to source."}],"type":"function","functionTag":"isMatchArray","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"largest":{"category":"array","description":"Plucks the largest value from an array.","examples":[{"tag":"example","optional":false,"description":"import { largest, assert } from '@universalweb/acid'; assert(largest([1,2,3]), 3);","source":"import { largest, assert } from \"@universalweb/acid\";\nassert(largest([1, 2, 3]), 3);\n"}],"name":"largest","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array from which largest number is taken.","source":"* {Array} array - Array from which largest number is taken."}],"type":"function","functionTag":"largest","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The largest number.","source":"* {Number} - The largest number.\n\t *"}},"last":{"category":"array","description":"Extracts item(s) from an array starting from the last item in the array.","examples":[{"tag":"example","optional":false,"description":"import { last, assert } from '@universalweb/acid'; assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);","source":"import { last, assert } from \"@universalweb/acid\";\nassert(last([1, 2, 3, 4, 5], 2), [4, 5]);\n"}],"name":"last","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to have items extracted from.","source":"* {Array} array - Array to have items extracted from."},{"tag":"param","name":"indexFrom","type":"Number","optional":true,"description":"- Value which determines how many items are extracted from the array.","source":"* {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.","default":"0"}],"type":"function","functionTag":"last","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Items from the array.","source":"* {Array} - Items from the array.\n\t *"}},"mapArray":{"category":"array","description":"Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.","examples":[{"tag":"example","optional":false,"description":"import { mapArray, assert } from '@universalweb/acid'; assert(mapArray([1, 2, 3], (item) => { return item * 2; }), [2, 4, 6]);","source":"import { mapArray, assert } from \"@universalweb/acid\";\nassert(\n mapArray([1, 2, 3], (item) => {\n return item * 2;\n }),\n [2, 4, 6],\n);\n"}],"name":"mapArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created array, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results.","source":"* {Array} results - Array that will be used to assign results."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} thisCall - An object to be given each time to the iteratee."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"mapArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array of the same calling array's type.","source":"* {Array} - An array of the same calling array's type.\n\t *"}},"concurrentEachArray":{"category":"array","description":"Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.","examples":[{"tag":"example","optional":false,"description":"import { concurrentEachArray, has, assert } from '@universalweb/acid'; const results = await concurrentEachArray([1, 2, 3], async (item) => { return item * 2; }); assert(has(results, [2, 4, 6]), true);","source":"import { concurrentEachArray, has, assert } from \"@universalweb/acid\";\nconst results = await concurrentEachArray([1, 2, 3], async (item) => {\n return item * 2;\n});\nassert(has(results, [2, 4, 6]), true);\n"}],"name":"concurrentEachArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created array, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length."},{"tag":"param","name":"thisBind","type":"*","optional":false,"description":"- Object to use as the \"this\" within the function.","source":"* {*} thisBind - Object to use as the \"this\" within the function."}],"type":"function","isAsync":true,"functionTag":"concurrentEachArray","returns":{"tag":"returns","name":"-","type":"Promise|Array|undefined","optional":false,"description":"An array of the same calling array's type.","source":"* {Promise|Array|undefined} - An array of the same calling array's type.\n\t *"}},"mapAsyncArray":{"category":"array","description":"Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.","examples":[{"tag":"example","optional":false,"description":"import { mapAsyncArray, assert } from '@universalweb/acid'; assert(await mapAsyncArray([1, 2, 3], async (item) => { return item * 2; }), [2, 4, 6]);","source":"import { mapAsyncArray, assert } from \"@universalweb/acid\";\nassert(\n await mapAsyncArray([1, 2, 3], async (item) => {\n return item * 2;\n }),\n [2, 4, 6],\n);\n"}],"name":"mapAsyncArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created array, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length."}],"type":"function","isAsync":true,"functionTag":"mapAsyncArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array of the same calling array's type.","source":"* {Array} - An array of the same calling array's type.\n\t *"}},"mapRightArray":{"category":"array","description":"Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.","examples":[{"tag":"example","optional":false,"description":"import { mapRightArray, assert } from '@universalweb/acid'; assert(mapRightArray([1, 2, 3], (item) => { return item * 2; }), [6, 4, 2]);","source":"import { mapRightArray, assert } from \"@universalweb/acid\";\nassert(\n mapRightArray([1, 2, 3], (item) => {\n return item * 2;\n }),\n [6, 4, 2],\n);\n"}],"name":"mapRightArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created array, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results. Default value is a new empty array.","source":"* {Array} results - Array that will be used to assign results. Default value is a new empty array."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"mapRightArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array of the same calling array's type.","source":"* {Array} - An array of the same calling array's type.\n\t *"}},"mapWhile":{"category":"array","description":"Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"import { mapWhile, assert } from '@universalweb/acid'; assert(mapWhile([1, 2, 0], (item) => { return Boolean(item); }), [1, 2]);","source":"import { mapWhile, assert } from \"@universalweb/acid\";\nassert(\n mapWhile([1, 2, 0], (item) => {\n return Boolean(item);\n }),\n [1, 2],\n);\n"}],"name":"mapWhile","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created array, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results. Default value is a new empty array.","source":"* {Array} results - Array that will be used to assign results. Default value is a new empty array."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"mapWhile","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with properties that passed the test.","source":"* {Array} - An array with properties that passed the test.\n\t *"}},"subtract":{"category":"math","description":"Subtracts the subtrahend (second argument) from the minuend (first argument).","examples":[{"tag":"example","optional":false,"description":"import { subtract, assert } from '@universalweb/acid'; assert(subtract(3, 1), 2);","source":"import { subtract, assert } from \"@universalweb/acid\";\nassert(subtract(3, 1), 2);\n"}],"name":"subtract","params":[{"tag":"param","name":"minuend","type":"Number","optional":false,"description":"- The minuend.","source":"* {Number} minuend - The minuend."},{"tag":"param","name":"subtrahend","type":"Number","optional":false,"description":"- The subtrahend.","source":"* {Number} subtrahend - The subtrahend."}],"type":"function","functionTag":"subtract","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the difference.","source":"* {Number} - Returns the difference.\n\t *"}},"sortNumberAscending":{"category":"array","description":"Sorts an array of numbers in ascending order. Smallest to largest.","examples":[{"tag":"example","optional":false,"description":"import { sortNumberAscending, assert } from '@universalweb/acid'; assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);","source":"import { sortNumberAscending, assert } from \"@universalweb/acid\";\nassert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n"}],"name":"sortNumberAscending","params":[{"tag":"param","name":"numberList","type":"Array","optional":false,"description":"- Array of numbers.","source":"* {Array} numberList - Array of numbers."}],"type":"function","functionTag":"sortNumberAscending","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The array this method was called on.","source":"* {Array} - The array this method was called on.\n\t *"}},"partition":{"category":"array","description":"Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.","examples":[{"tag":"example","optional":false,"description":"import { partition, assert } from '@universalweb/acid'; const result = partition([ {user: 'barney', age: 36, active: false}, {user: 'fred', age: 40, active: true}, {user: 'pebbles', age: 1, active: false} ], (item) => { return item.active; }); assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}], [{\"user\":\"barney\",\"age\":36,\"active\":false}, {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);","source":"import { partition, assert } from \"@universalweb/acid\";\nconst result = partition(\n [\n { user: \"barney\", age: 36, active: false },\n { user: \"fred\", age: 40, active: true },\n { user: \"pebbles\", age: 1, active: false },\n ],\n (item) => {\n return item.active;\n },\n);\nassert(\n result,\n [{ user: \"fred\", age: 40, active: true }],\n [\n { user: \"barney\", age: 36, active: false },\n { user: \"pebbles\", age: 1, active: false },\n ],\n);\n"}],"name":"partition","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Takes an array to split.","source":"* {Array} array - Takes an array to split."},{"tag":"param","name":"predicate","type":"Function","optional":false,"description":"- Function run on each item in the array.","source":"* {Function} predicate - Function run on each item in the array."}],"type":"function","functionTag":"partition","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"One array split into two arrays.","source":"* {Array} - One array split into two arrays.\n\t *"}},"subtractReverse":{"category":"math","description":"Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.","examples":[{"tag":"example","optional":false,"description":"import { subtractReverse, assert } from '@universalweb/acid'; assert(subtractReverse(1, 3), 2);","source":"import { subtractReverse, assert } from \"@universalweb/acid\";\nassert(subtractReverse(1, 3), 2);\n"}],"name":"subtractReverse","params":[{"tag":"param","name":"subtrahend","type":"Number","optional":false,"description":"- The subtrahend.","source":"* {Number} subtrahend - The subtrahend."},{"tag":"param","name":"minuend","type":"Number","optional":false,"description":"- The minuend.","source":"* {Number} minuend - The minuend."}],"type":"function","functionTag":"subtractReverse","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the difference.","source":"* {Number} - Returns the difference.\n\t *"}},"sortNumberDescening":{"category":"array","description":"Sorts an array of numbers in descending order. Largest to smallest.","examples":[{"tag":"example","optional":false,"description":"import { sortNumberDescening, assert } from '@universalweb/acid'; assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);","source":"import { sortNumberDescening, assert } from \"@universalweb/acid\";\nassert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n"}],"name":"sortNumberDescening","params":[{"tag":"param","name":"numberList","type":"Array","optional":false,"description":"- Array of numbers.","source":"* {Array} numberList - Array of numbers."}],"type":"function","functionTag":"sortNumberDescening","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The array this method was called on.","source":"* {Array} - The array this method was called on.\n\t *"}},"remove":{"category":"array","description":"Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.","examples":[{"tag":"example","optional":false,"description":"remove([1, 2, 3, 3, 4, 3, 5], 1); // => [2, 3, 3, 4, 3, 5]","source":"remove([1, 2, 3, 3, 4, 3, 5], 1);\n// => [2, 3, 3, 4, 3, 5]\n"},{"tag":"example","optional":false,"description":"remove([3, 3, 4, 5], 3, 4); // => [5]","source":"remove([3, 3, 4, 5], 3, 4);\n// => [5]\n"}],"name":"remove","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to be mutated.","source":"* {Array} array - Array to be mutated."},{"tag":"param","name":"removeThese","type":"String|Array","optional":false,"description":"- Items to remove from the array.","source":"* {String|Array} removeThese - Items to remove from the array."}],"type":"function","functionTag":"remove","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The array this method was called on.","source":"* {Array} - The array this method was called on.\n\t *"}},"removeBy":{"category":"array","description":"Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.","examples":[{"tag":"example","optional":false,"description":"removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);}); // => [2, 4]","source":"removeBy([1, 2, 3, 3, 4, 3, 5], (item) => {\n return Boolean(item % 2);\n});\n// => [2, 4]\n"}],"name":"removeBy","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to be mutated.","source":"* {Array} source - Array to be mutated."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Function used to check object. Return true to remove the value.","source":"* {Function} iteratee - Function used to check object. Return true to remove the value."}],"type":"function","functionTag":"removeBy","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The array this method was called on.","source":"* {Array} - The array this method was called on.\n\t *"}},"rest":{"category":"array","description":"Extracts all items in array except the first and last item.","examples":[{"tag":"example","optional":false,"description":"rest([1, 2, 3, 4, 5]); // => [2, 3, 4, 5]","source":"rest([1, 2, 3, 4, 5]);\n// => [2, 3, 4, 5]\n"}],"name":"rest","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to be sliced.","source":"* {Array} array - Array to be sliced."}],"type":"function","functionTag":"rest","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns the aggregated array.","source":"* {Array} - Returns the aggregated array.\n\t *"}},"right":{"category":"array","description":"Get the item at the supplied index starting at the end of the array.","examples":[{"tag":"example","optional":false,"description":"right([1, 2, 3, 4, 5] , 1); // => 4","source":"right([1, 2, 3, 4, 5], 1);\n// => 4\n"}],"name":"right","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to be sliced.","source":"* {Array} source - Array to be sliced."},{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- Amount from the right.","source":"* {Number} amount - Amount from the right."}],"type":"function","functionTag":"right","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns the object at the evaluated position.","source":"* {*} - Returns the object at the evaluated position.\n\t *"}},"randomInt":{"category":"number","description":"Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..","examples":[{"tag":"example","optional":false,"description":"import { randomInt, assert } from '@universalweb/acid'; assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});","source":"import { randomInt, assert } from \"@universalweb/acid\";\nassert(randomInt(10, 0), (value) => {\n return value > 0 && value < 10;\n});\n"}],"name":"randomInt","params":[{"tag":"param","name":"max","type":"Number","optional":false,"description":"- The highest possible value for the random number.","source":"* {Number} max - The highest possible value for the random number."},{"tag":"param","name":"min","type":"Number","optional":true,"description":"- Establishes lowest possible value for the random number.","source":"* {Number} [min = 0] - Establishes lowest possible value for the random number.","default":"0"}],"type":"function","functionTag":"randomInt","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns random integer between the max and min range.","source":"* {Number} - Returns random integer between the max and min range.\n\t *"}},"isNumberEqual":{"category":"number","description":"Checks if two numbers are the same.","examples":[{"tag":"example","optional":false,"description":"import { isNumberEqual, assert } from '@universalweb/acid'; assert(isNumberEqual(0, 0), true);","source":"import { isNumberEqual, assert } from \"@universalweb/acid\";\nassert(isNumberEqual(0, 0), true);\n"}],"name":"isNumberEqual","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."},{"tag":"param","name":"target","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} target - Number to be checked."}],"type":"function","functionTag":"isNumberEqual","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"toArray":{"category":"array","description":"The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.","examples":[{"tag":"example","optional":false,"description":"import { toArray, assert } from '@universalweb/acid'; assert(toArray(new Map([[1, 2]])), [[1, 2]]);","source":"import { toArray, assert } from \"@universalweb/acid\";\nassert(toArray(new Map([[1, 2]])), [[1, 2]]);\n"}],"name":"toArray","params":[{"tag":"param","name":"arrayLike","type":"*","optional":false,"description":"- Array like object.","source":"* {*} arrayLike - Array like object."},{"tag":"param","name":"mapFn","type":"Function","optional":false,"description":"- Function to map over the array.","source":"* {Function} mapFn - Function to map over the array."},{"tag":"param","name":"thisArg","type":"*","optional":false,"description":"- MapFn's \"this\".","source":"* {*} thisArg - MapFn's \"this\"."}],"type":"function","functionTag":"toArray","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"New array.","source":"* {Array|undefined} - New array.\n\t *"}},"shuffle":{"category":"array","description":"Shuffle an array and return a new array.","examples":[{"tag":"example","optional":false,"description":"import { shuffle, assert } from '@universalweb/acid'; assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);","source":"import { shuffle, assert } from \"@universalweb/acid\";\nassert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n"}],"name":"shuffle","params":[{"tag":"param","name":"target","type":"Array","optional":false,"description":"- Target Array to be shuffled.","source":"* {Array} target - Target Array to be shuffled."},{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The amount of times to shuffle the array.","source":"* {Number} amount - The amount of times to shuffle the array."}],"type":"function","functionTag":"shuffle","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with the shuffled results.","source":"* {Array} - An array with the shuffled results.\n\t *"}},"sample":{"category":"array","description":"Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.","examples":[{"tag":"example","optional":false,"description":"sample([1, 2, 3, 4] , 2); // => [1, 3]","source":"sample([1, 2, 3, 4], 2);\n// => [1, 3]\n"}],"name":"sample","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The array to pull sample(s) from.","source":"* {Array} source - The array to pull sample(s) from."},{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The amount of samples to take.","source":"* {Number} amount - The amount of samples to take."}],"type":"function","functionTag":"sample","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array of randomly pulled samples.","source":"* {Array} - An array of randomly pulled samples.\n\t *"}},"smallest":{"category":"array","description":"Plucks the smallest value from an array.","examples":[{"tag":"example","optional":false,"description":"smallest([1,2,3]); // => 1","source":"smallest([1, 2, 3]);\n// => 1\n"}],"name":"smallest","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array from which smallest number is taken.","source":"* {Array} array - Array from which smallest number is taken."}],"type":"function","functionTag":"smallest","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The smallest number.","source":"* {Number} - The smallest number.\n\t *"}},"getNumberInsertIndex":{"category":"array","description":"What index should the number be inserted at to keep a sorted array still sorted.","examples":[{"tag":"example","optional":false,"description":"import { getNumberInsertIndex, assert } from '@universalweb/acid'; assert(getNumberInsertIndex([30, 39, 50], 40), 1);","source":"import { getNumberInsertIndex, assert } from \"@universalweb/acid\";\nassert(getNumberInsertIndex([30, 39, 50], 40), 1);\n"}],"name":"getNumberInsertIndex","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to be checked.","source":"* {Array} source - Array to be checked."},{"tag":"param","name":"target","type":"Number","optional":false,"description":"- Number to check where to be inserted.","source":"* {Number} target - Number to check where to be inserted."}],"type":"function","functionTag":"getNumberInsertIndex","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The index at which to insert.","source":"* {Number} - The index at which to insert.\n\t *"}},"take":{"category":"array","description":"Returns a shallow copy of the array up to an amount.","examples":[{"tag":"example","optional":false,"description":"import { take, assert } from '@universalweb/acid'; assert(take([1,2,3], 2), [1, 2]);","source":"import { take, assert } from \"@universalweb/acid\";\nassert(take([1, 2, 3], 2), [1, 2]);\n"}],"name":"take","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The source array to take from.","source":"* {Array} source - The source array to take from."},{"tag":"param","name":"endIndex","type":"Array","optional":true,"description":"- Zero-based index before which to end extraction.","source":"* {Array} [endIndex = 1] - Zero-based index before which to end extraction.","default":"1"}],"type":"function","functionTag":"take","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The aggregated array.","source":"* {Array} - The aggregated array.\n\t *"}},"takeRight":{"category":"array","description":"Returns a shallow copy of the array up to an amount starting from the right.","examples":[{"tag":"example","optional":false,"description":"import { takeRight, assert } from '@universalweb/acid'; assert(takeRight([1,2,3], 2), [2, 3]);","source":"import { takeRight, assert } from \"@universalweb/acid\";\nassert(takeRight([1, 2, 3], 2), [2, 3]);\n"}],"name":"takeRight","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The source array to take right from.","source":"* {Array} source - The source array to take right from."},{"tag":"param","name":"indexRight","type":"Array","optional":true,"description":"- Zero-based index from the right to begin extraction.","source":"* {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.","default":"1"}],"type":"function","functionTag":"takeRight","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The aggregated array.","source":"* {Array} - The aggregated array.\n\t *"}},"unique":{"category":"array","description":"Filters the array down to unique elements.","examples":[{"tag":"example","optional":false,"description":"unique([1, 2, 2, 4]); // => [1, 2, 4]","source":"unique([1, 2, 2, 4]);\n// => [1, 2, 4]\n"}],"name":"unique","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The array to be filtered.","source":"* {Array} source - The array to be filtered."},{"tag":"param","name":"isSorted","type":"Boolean","optional":false,"description":"- Flag which means the array is already sorted.","source":"* {Boolean} isSorted - Flag which means the array is already sorted."}],"type":"function","functionTag":"unique","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The filtered array.","source":"* {Array} - The filtered array.\n\t *"}},"union":{"category":"array","description":"Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.","examples":[{"tag":"example","optional":false,"description":"union([1,2,4], [1,2,3]); // => [1, 2, 4, 3]","source":"union([1, 2, 4], [1, 2, 3]);\n// => [1, 2, 4, 3]\n"}],"name":"union","params":[{"tag":"param","name":"arrays","type":"...Array","optional":false,"description":"- The arrays to be evaluated.","source":"* {...Array} arrays - The arrays to be evaluated."}],"type":"function","functionTag":"union","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The aggregated array.","source":"* {Array} - The aggregated array.\n\t *"}},"untilFalseArray":{"category":"array","description":"Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned. If and when the iteratee yields false the loop stops & false is returned.","examples":[{"tag":"example","optional":false,"description":"import { untilFalseArray, assert } from '@universalweb/acid'; assert(untilFalseArray([true, true, false], (item) => { return item; }), false); assert(untilFalseArray([true, true, true], (item) => { return item; }), true);","source":"import { untilFalseArray, assert } from \"@universalweb/acid\";\nassert(\n untilFalseArray([true, true, false], (item) => {\n return item;\n }),\n false,\n);\nassert(\n untilFalseArray([true, true, true], (item) => {\n return item;\n }),\n true,\n);\n"}],"name":"untilFalseArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The array to iterate over.","source":"* {Array} source - The array to iterate over."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item & key and expects a boolean to be returned.","source":"* {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned."}],"type":"function","functionTag":"untilFalseArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns true if all returns are true or false if one value returns false.","source":"* {Array} - Returns true if all returns are true or false if one value returns false.\n\t *"}},"untilTrueArray":{"category":"array","description":"Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned. If and when the iteratee yields true the loop stops & false is returned.","examples":[{"tag":"example","optional":false,"description":"import { untilTrueArray, assert } from '@universalweb/acid'; assert(untilTrueArray([true], (item) => { return item; }), false); assert(untilTrueArray([true, true, true], (item) => { return item; }), true);","source":"import { untilTrueArray, assert } from \"@universalweb/acid\";\nassert(\n untilTrueArray([true], (item) => {\n return item;\n }),\n false,\n);\nassert(\n untilTrueArray([true, true, true], (item) => {\n return item;\n }),\n true,\n);\n"}],"name":"untilTrueArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The array to iterate over.","source":"* {Array} source - The array to iterate over."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item & key and expects a boolean to be returned.","source":"* {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned."}],"type":"function","functionTag":"untilTrueArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns true if all returns are false or false if one value returns true.","source":"* {Array} - Returns true if all returns are false or false if one value returns true.\n\t *"}},"whileCompactMap":{"category":"array","description":"Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. Re-checks the length each loop.","examples":[{"tag":"example","optional":false,"description":"import { whileCompactMap, assert } from '@universalweb/acid'; assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => { return item; }), [1, 2, 3, false]);","source":"import { whileCompactMap, assert } from \"@universalweb/acid\";\nassert(\n whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n return item;\n }),\n [1, 2, 3, false],\n);\n"}],"name":"whileCompactMap","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results. Default value is a new empty array.","source":"* {Array} results - Array that will be used to assign results. Default value is a new empty array."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"whileCompactMap","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The originally given array.","source":"* {Array} - The originally given array.\n\t *"}},"whileEachArray":{"category":"array","description":"Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.","examples":[{"tag":"example","optional":false,"description":"import { whileEachArray, assert } from '@universalweb/acid'; const list = []; whileEachArray([1, 2, 3], (item, index) => { list[index] = item; }); assert(list, [1, 2, 3]);","source":"import { whileEachArray, assert } from \"@universalweb/acid\";\nconst list = [];\nwhileEachArray([1, 2, 3], (item, index) => {\n list[index] = item;\n});\nassert(list, [1, 2, 3]);\n"}],"name":"whileEachArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, and array length."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"whileEachArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The originally given array.","source":"* {Array} - The originally given array.\n\t *"}},"whileMapArray":{"category":"array","description":"Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. Re-checks the length each loop.","examples":[{"tag":"example","optional":false,"description":"import { whileMapArray, assert } from '@universalweb/acid'; assert(whileMapArray([1, 2, 3], (item, index, source) => { if (index === 0) { source.push(4); } return item; }), [1, 2, 3, 4]);","source":"import { whileMapArray, assert } from \"@universalweb/acid\";\nassert(\n whileMapArray([1, 2, 3], (item, index, source) => {\n if (index === 0) {\n source.push(4);\n }\n return item;\n }),\n [1, 2, 3, 4],\n);\n"}],"name":"whileMapArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results. Default value is a new empty array.","source":"* {Array} results - Array that will be used to assign results. Default value is a new empty array."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"whileMapArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The originally given array.","source":"* {Array} - The originally given array.\n\t *"}},"without":{"category":"array","description":"Returns a copy of the array with all instances of the values removed.","examples":[{"tag":"example","optional":false,"description":"import { without, assert } from '@universalweb/acid'; assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);","source":"import { without, assert } from \"@universalweb/acid\";\nassert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n"}],"name":"without","params":[{"tag":"param","name":"target","type":"Array","optional":false,"description":"- The target array to be filtered.","source":"* {Array} target - The target array to be filtered."},{"tag":"param","name":"sources","type":"Array","optional":false,"description":"- Items to be removed.","source":"* {Array} sources - Items to be removed."}],"type":"function","functionTag":"without","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The target array filtered.","source":"* {Array} - The target array filtered.\n\t *"}},"xor":{"category":"array","description":"Creates an array that is the symmetric difference of the provided arrays.","examples":[{"tag":"example","optional":false,"description":"xor([2, 1], [2, 3, 5], [6]); // => [1, 3, 5, 6]","source":"xor([2, 1], [2, 3, 5], [6]);\n// => [1, 3, 5, 6]\n"}],"name":"xor","params":[{"tag":"param","name":"sources","type":"...Array","optional":false,"description":"- The array(s) to be filtered.","source":"* {...Array} sources - The array(s) to be filtered."}],"type":"function","functionTag":"xor","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"The filtered array.","source":"* {Array|undefined} - The filtered array.\n\t *"}},"zip":{"category":"array","description":"Merges together the values of each of the arrays with the values at the corresponding position.","examples":[{"tag":"example","optional":false,"description":"zip(['a', 'b'], [1, 2], [true, false]); // => [['a', 1, true], ['b', 2, false]]","source":"zip([\"a\", \"b\"], [1, 2], [true, false]);\n// => [['a', 1, true], ['b', 2, false]]\n"}],"name":"zip","params":[{"tag":"param","name":"arrays","type":"Array","optional":false,"description":"- The arrays to process.","source":"* {Array} arrays - The arrays to process."}],"type":"function","functionTag":"zip","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns the new array of regrouped elements.","source":"* {Array} - Returns the new array of regrouped elements.\n\t *"}},"unZip":{"category":"array","description":"Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.","examples":[{"tag":"example","optional":false,"description":"unZip([['a', 1, true], ['b', 2, false]]); // => [['a', 'b'], [1, 2], [true, false]]","source":"unZip([\n [\"a\", 1, true],\n [\"b\", 2, false],\n]);\n// => [['a', 'b'], [1, 2], [true, false]]\n"}],"name":"unZip","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The array of grouped elements to process.","source":"* {Array} source - The array of grouped elements to process."}],"type":"function","functionTag":"unZip","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns the new array of regrouped elements.","source":"* {Array} - Returns the new array of regrouped elements.\n\t *"}},"ensureBuffer":{"category":"buffer","description":"Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.","examples":[{"tag":"example","optional":false,"description":"import { isBuffer, ensureBuffer, assert } from '@universalweb/acid'; assert(isBuffer(ensureBuffer('test')), true);","source":"import { isBuffer, ensureBuffer, assert } from \"@universalweb/acid\";\nassert(isBuffer(ensureBuffer(\"test\")), true);\n"}],"name":"ensureBuffer","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"ensureBuffer","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns an array.","source":"* {Array} - Returns an array.\n\t *"}},"clearBuffer":{"category":"buffer","description":"Clears the values out of a buffer.","examples":[{"tag":"example","optional":false,"description":"import { clearBuffer, assert } from '@universalweb/acid'; assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));","source":"import { clearBuffer, assert } from \"@universalweb/acid\";\nassert(clearBuffer(Buffer.from([1, \"B\", \"Cat\"])), Buffer.from([]));\n"}],"name":"clearBuffer","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Takes an array to be emptied.","source":"* {Array} source - Takes an array to be emptied."}],"type":"function","functionTag":"clearBuffer","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The originally given array.","source":"* {Array} - The originally given array.\n\t *"}},"isFunction":{"category":"type","description":"Checks if an object or objects are a plain object.","examples":[{"tag":"example","optional":false,"description":"import { isFunction } from '@universalweb/acid'; isFunction(() => {}); // => true","source":"import { isFunction } from \"@universalweb/acid\";\nisFunction(() => {});\n// => true\n"}],"name":"isFunction","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isFunction","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isNumber":{"category":"type","description":"Checks if the value is a number.","examples":[{"tag":"example","optional":false,"description":"import { isNumber, assert } from '@universalweb/acid'; assert(isNumber(1), true);","source":"import { isNumber, assert } from \"@universalweb/acid\";\nassert(isNumber(1), true);\n"}],"name":"isNumber","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isNumber","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isNotNumber":{"category":"type","description":"Checks if the value is not a number.","examples":[{"tag":"example","optional":false,"description":"import { isNotNumber, assert } from '@universalweb/acid'; assert(isNotNumber(1), false);","source":"import { isNotNumber, assert } from \"@universalweb/acid\";\nassert(isNotNumber(1), false);\n"}],"name":"isNotNumber","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isNotNumber","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isString":{"category":"type","description":"Checks if the value is a string.","examples":[{"tag":"example","optional":false,"description":"import { isString, assert } from '@universalweb/acid'; assert(isString('hello'), true); assert(isString(1), false);","source":"import { isString, assert } from \"@universalweb/acid\";\nassert(isString(\"hello\"), true);\nassert(isString(1), false);\n"}],"name":"isString","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isString","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isNotString":{"category":"type","description":"Checks if the value is not a string.","examples":[{"tag":"example","optional":false,"description":"import { isNotString, assert } from '@universalweb/acid'; assert(isNotString(1), true); assert(isNotString('hello'), false);","source":"import { isNotString, assert } from \"@universalweb/acid\";\nassert(isNotString(1), true);\nassert(isNotString(\"hello\"), false);\n"}],"name":"isNotString","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isNotString","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"assign":{"category":"object","description":"Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.","examples":[{"tag":"example","optional":false,"description":"import { assign, assert } from '@universalweb/acid'; assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});","source":"import { assign, assert } from \"@universalweb/acid\";\nassert(\n assign(\n { a: 1 },\n { b: 2 },\n function c() {\n return 3;\n },\n \"d\",\n 5,\n ),\n { a: 1, b: 2, c, d: \"d\", 5: 5 },\n);\n"}],"name":"assign","params":[{"tag":"param","name":"target","type":"Object","optional":false,"description":"- The target object.","source":"* {Object} target - The target object."},{"tag":"param","name":"sources","type":"...Object","optional":false,"description":"- The source object(s).","source":"* {...Object} sources - The source object(s)."}],"type":"function","functionTag":"assign","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the target object.","source":"* {Object} - Returns the target object.\n\t *"}},"countBy":{"category":"collection","description":"Creates an object composed of keys generated from the results of running each element of collection through iteratee.","examples":[{"tag":"example","optional":false,"description":"import { countBy, assert } from '@universalweb/acid'; assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});","source":"import { countBy, assert } from \"@universalweb/acid\";\nassert(\n countBy([{ a: 1 }, { a: 3 }], (item) => {\n return \"a\";\n }),\n { a: 2 },\n);\n"}],"name":"countBy","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Array of objects.","source":"* {Array} collection - Array of objects."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- The iteratee to transform keys.","source":"* {Function} iteratee - The iteratee to transform keys."}],"type":"function","functionTag":"countBy","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the composed aggregate object.","source":"* {Object} - Returns the composed aggregate object.\n\t *"}},"countKey":{"category":"collection","description":"Count the amount of times a key is present in a collection.","examples":[{"tag":"example","optional":false,"description":"import { countKey, assert } from '@universalweb/acid'; assert(countKey([{a:1}, {a:3}], 'a'), 2);","source":"import { countKey, assert } from \"@universalweb/acid\";\nassert(countKey([{ a: 1 }, { a: 3 }], \"a\"), 2);\n"}],"name":"countKey","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Array of objects.","source":"* {Array} collection - Array of objects."},{"tag":"param","name":"propertyName","type":"Function","optional":false,"description":"- The name of the key.","source":"* {Function} propertyName - The name of the key."}],"type":"function","functionTag":"countKey","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The count.","source":"* {Number} - The count.\n\t *"}},"countWithoutKey":{"category":"collection","description":"Count the amount of times a key is not present in a collection.","examples":[{"tag":"example","optional":false,"description":"import { countWithoutKey, assert } from '@universalweb/acid'; assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);","source":"import { countWithoutKey, assert } from \"@universalweb/acid\";\nassert(countWithoutKey([{ a: 1 }, { a: 3 }], \"b\"), 2);\n"}],"name":"countWithoutKey","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Array of objects.","source":"* {Array} collection - Array of objects."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- The name of the key.","source":"* {String} propertyName - The name of the key."}],"type":"function","functionTag":"countWithoutKey","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The count.","source":"* {Number} - The count.\n\t *"}},"findIndex":{"category":"collection","description":"Finds an object in a collection by the given id and property name and returns the array index of the object.","examples":[{"tag":"example","optional":false,"description":"findIndex([{id: 1}, {id: 2}], 1); // => 0","source":"findIndex([{ id: 1 }, { id: 2 }], 1);\n// => 0\n"}],"name":"findIndex","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be checked for an item.","source":"* {Array} collection - Collection to be checked for an item."},{"tag":"param","name":"id","type":"Number|string","optional":false,"description":"- The value to look for.","source":"* {Number|string} id - The value to look for."},{"tag":"param","name":"propertyName","type":"String","optional":true,"description":"- The name of the property to compare.","source":"* {String} [propertyName = 'id'] - The name of the property to compare.","default":"'id'"}],"type":"function","functionTag":"findIndex","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The index of the object.","source":"* {Number} - The index of the object.\n\t *"}},"findItem":{"category":"collection","description":"Finds an object in a collection by the given id and property name.","examples":[{"tag":"example","optional":false,"description":"findItem([{id: 1}, {id: 2}], 1); // => {id: 1}","source":"findItem([{ id: 1 }, { id: 2 }], 1);\n// => {id: 1}\n"}],"name":"findItem","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be checked for an item.","source":"* {Array} collection - Collection to be checked for an item."},{"tag":"param","name":"id","type":"Number|string","optional":false,"description":"- The value to look for.","source":"* {Number|string} id - The value to look for."},{"tag":"param","name":"propertyName","type":"String","optional":true,"description":"- The name of the property to compare.","source":"* {String} [propertyName = 'id'] - The name of the property to compare.","default":"'id'"}],"type":"function","functionTag":"findItem","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"The found object.","source":"* {Object} - The found object.\n\t *"}},"sortCollectionDescending":{"category":"collection","description":"Sorts an array in place using a key in descending order.","examples":[{"tag":"example","optional":false,"description":"import { sortCollectionDescending, assert } from '@universalweb/acid'; const result = [{id: 1}, {id: 0}]; const collect = [{id: 0}, {id: 1}]; const prop = 'id'; assert(sortCollectionDescending(collect, prop), result);","source":"import { sortCollectionDescending, assert } from \"@universalweb/acid\";\nconst result = [{ id: 1 }, { id: 0 }];\nconst collect = [{ id: 0 }, { id: 1 }];\nconst prop = \"id\";\nassert(sortCollectionDescending(collect, prop), result);\n"}],"name":"sortCollectionDescending","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be sorted.","source":"* {Array} collection - Collection to be sorted."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- The property name to sort by based on it's value.","source":"* {String} propertyName - The property name to sort by based on it's value."},{"tag":"param","name":"ifMatch","type":"Function","optional":false,"description":"- A function which returns a number for the sort function if two object properties match.","source":"* {Function} ifMatch - A function which returns a number for the sort function if two object properties match."}],"type":"function","functionTag":"sortCollectionDescending","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The sorted array and or a clone of the array sorted.","source":"* {Array} - The sorted array and or a clone of the array sorted.\n\t *"}},"getLowest":{"category":"collection","description":"Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.","examples":[{"tag":"example","optional":false,"description":"import { getLowest, assert } from '@universalweb/acid'; assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});","source":"import { getLowest, assert } from \"@universalweb/acid\";\nassert(getLowest([{ id: 1 }, { id: 0 }], \"id\"), { id: 1 });\n"}],"name":"getLowest","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be sorted.","source":"* {Array} collection - Collection to be sorted."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- The property name to sort by based on it's value.","source":"* {String} propertyName - The property name to sort by based on it's value."}],"type":"function","functionTag":"getLowest","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"The newest object in the collection.","source":"* {Object} - The newest object in the collection.\n\t *"}},"sortCollectionAscending":{"category":"collection","description":"Sorts an array in place using a key in ascending order.","examples":[{"tag":"example","optional":false,"description":"import { sortCollectionAscending, assert } from '@universalweb/acid'; const result = [{id: 0}, {id: 1}]; const collect = [{id: 1}, {id: 0}]; const prop = 'id'; assert(sortCollectionAscending(collect, prop), result);","source":"import { sortCollectionAscending, assert } from \"@universalweb/acid\";\nconst result = [{ id: 0 }, { id: 1 }];\nconst collect = [{ id: 1 }, { id: 0 }];\nconst prop = \"id\";\nassert(sortCollectionAscending(collect, prop), result);\n"}],"name":"sortCollectionAscending","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be sorted.","source":"* {Array} collection - Collection to be sorted."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- The property name to sort by based on it's value.","source":"* {String} propertyName - The property name to sort by based on it's value."},{"tag":"param","name":"ifMatch","type":"Function","optional":false,"description":"- A function which returns a number for the sort function if two object properties match.","source":"* {Function} ifMatch - A function which returns a number for the sort function if two object properties match."}],"type":"function","functionTag":"sortCollectionAscending","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The sorted array and or a clone of the array sorted.","source":"* {Array} - The sorted array and or a clone of the array sorted.\n\t *"}},"getHighest":{"category":"collection","description":"Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.","examples":[{"tag":"example","optional":false,"description":"import { getHighest, assert } from '@universalweb/acid'; assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});","source":"import { getHighest, assert } from \"@universalweb/acid\";\nassert(getHighest([{ id: 1 }, { id: 0 }], \"id\"), { id: 0 });\n"}],"name":"getHighest","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be sorted.","source":"* {Array} collection - Collection to be sorted."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- The property name to sort by based on it's value.","source":"* {String} propertyName - The property name to sort by based on it's value."}],"type":"function","functionTag":"getHighest","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"The newest object in the collection.","source":"* {Object} - The newest object in the collection.\n\t *"}},"groupBy":{"category":"collection","description":"Creates an object composed of keys generated from the results of running each element of collection thru iteratee. The order of grouped values is determined by the order they occur in collection. The corresponding value of each key is an array of elements responsible for generating the key.","examples":[{"tag":"example","optional":false,"description":"groupBy([6.1, 4.2, 6.3], Math.floor); // => { '4': [4.2], '6': [6.1, 6.3] }","source":"groupBy([6.1, 4.2, 6.3], Math.floor);\n// => { '4': [4.2], '6': [6.1, 6.3] }\n"}],"name":"groupBy","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Array of objects.","source":"* {Array} collection - Array of objects."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- The iteratee to transform keys.","source":"* {Function} iteratee - The iteratee to transform keys."}],"type":"function","functionTag":"groupBy","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the composed aggregate object.","source":"* {Object} - Returns the composed aggregate object.\n\t *"}},"indexBy":{"category":"collection","description":"Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.","examples":[{"tag":"example","optional":false,"description":"import { indexBy, assert } from '@universalweb/acid'; const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}}; const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id'); assert(indexed, result);","source":"import { indexBy, assert } from \"@universalweb/acid\";\nconst result = { 0: { name: \"test\", id: 0 }, 1: { name: \"test2\", id: 1 } };\nconst indexed = indexBy(\n [\n { name: \"test\", id: 0 },\n { name: \"test2\", id: 1 },\n ],\n \"id\",\n);\nassert(indexed, result);\n"}],"name":"indexBy","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Array of objects.","source":"* {Array} collection - Array of objects."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- The property name to index by.","source":"* {String} propertyName - The property name to index by."}],"type":"function","functionTag":"indexBy","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the composed aggregate object.","source":"* {Object} - Returns the composed aggregate object.\n\t *"}},"invokeCollection":{"category":"collection","description":"Invokes a function on the provided property name in each object in the collection.","examples":[{"tag":"example","optional":false,"description":"import { invokeCollection, assert } from '@universalweb/acid'; const results = invokeCollection([{ test(item, index) { return [item, index];} }], 'test', ['EXAMPLE']); assert(results, [['EXAMPLE', 0]]);","source":"import { invokeCollection, assert } from \"@universalweb/acid\";\nconst results = invokeCollection(\n [\n {\n test(item, index) {\n return [item, index];\n },\n },\n ],\n \"test\",\n [\"EXAMPLE\"],\n);\nassert(results, [[\"EXAMPLE\", 0]]);\n"}],"name":"invokeCollection","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection from which method will be taken.","source":"* {Array} collection - Collection from which method will be taken."},{"tag":"param","name":"property","type":"String","optional":false,"description":"- Value used to pluck method from object.","source":"* {String} property - Value used to pluck method from object."},{"tag":"param","name":"value","type":"*","optional":false,"description":"- Value to be passed to callable property.","source":"* {*} value - Value to be passed to callable property."}],"type":"function","functionTag":"invokeCollection","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns the results of the invoked method.","source":"* {Array} - Returns the results of the invoked method.\n\t *"}},"invokeCollectionAsync":{"category":"collection","description":"Asynchronously awaits & invokes a function on the provided property name in each object in the collection.","examples":[{"tag":"example","optional":false,"description":"import { invokeCollectionAsync, assert } from '@universalweb/acid'; const results = await invokeCollectionAsync([{ async test(item, index) { return [item, index];} }], 'test', ['EXAMPLE']); assert(results, [['EXAMPLE', 0]]);","source":"import { invokeCollectionAsync, assert } from \"@universalweb/acid\";\nconst results = await invokeCollectionAsync(\n [\n {\n async test(item, index) {\n return [item, index];\n },\n },\n ],\n \"test\",\n [\"EXAMPLE\"],\n);\nassert(results, [[\"EXAMPLE\", 0]]);\n"}],"name":"invokeCollectionAsync","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection from which method will be taken.","source":"* {Array} collection - Collection from which method will be taken."},{"tag":"param","name":"property","type":"String","optional":false,"description":"- Value used to pluck method from object.","source":"* {String} property - Value used to pluck method from object."},{"tag":"param","name":"value","type":"*","optional":false,"description":"- Value to be passed to callable property.","source":"* {*} value - Value to be passed to callable property."}],"type":"function","isAsync":true,"functionTag":"invokeCollectionAsync","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns the results of the invoked method.","source":"* {Array} - Returns the results of the invoked method.\n\t *"}},"pluckObject":{"category":"object","description":"Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.","examples":[{"tag":"example","optional":false,"description":"import { pluckObject, assert } from '@universalweb/acid'; assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);","source":"import { pluckObject, assert } from \"@universalweb/acid\";\nassert(pluckObject({ a: 1, b: 3 }, [\"a\", \"b\"]), [1, 3]);\n"}],"name":"pluckObject","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Array used to determine what sources to be plucked.","source":"* {Object} source - Array used to determine what sources to be plucked."},{"tag":"param","name":"targets","type":"String|Array","optional":false,"description":"- Property name.","source":"* {String|Array} targets - Property name."}],"type":"function","functionTag":"pluckObject","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"An array of plucked sources.","source":"* {Array|undefined} - An array of plucked sources.\n\t *"}},"pluck":{"category":"collection","description":"Returns an array of the plucked values from the collection.","examples":[{"tag":"example","optional":false,"description":"import { pluck, assert } from '@universalweb/acid'; assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]); assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);","source":"import { pluck, assert } from \"@universalweb/acid\";\nassert(pluck([{ a: 1 }, { a: 2 }], \"a\"), [1, 2]);\nassert(\n pluck(\n [\n { a: 1, b: 3 },\n { a: 1, b: 3 },\n ],\n [\"a\", \"b\"],\n ),\n [\n [1, 3],\n [1, 3],\n ],\n);\n"}],"name":"pluck","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Array used to determine what value to be plucked.","source":"* {Array} collection - Array used to determine what value to be plucked."},{"tag":"param","name":"targets","type":"(String|Number|Array.)","optional":false,"description":"- Property name.","source":"* {(String|Number|Array.)} targets - Property name."}],"type":"function","functionTag":"pluck","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array of plucked values.","source":"* {Array} - An array of plucked values.\n\t *"}},"sortCollectionAlphabetically":{"category":"collection","description":"Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.","examples":[{"tag":"example","optional":false,"description":"import { sortCollectionAlphabetically, assert } from '@universalweb/acid'; const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}]; const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}]; const prop = 'letter'; function ifMatchSort(c, n) { if (c.g < n.g) { return -1; } if (c.g > n.g) { return 1; } } assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);","source":"import { sortCollectionAlphabetically, assert } from \"@universalweb/acid\";\nconst result = [\n { letter: \"a\" },\n { letter: \"c\", g: 0 },\n { letter: \"c\", g: 2 },\n { letter: \"f\" },\n];\nconst collect = [\n { letter: \"a\" },\n { letter: \"f\" },\n { letter: \"c\", g: 2 },\n { letter: \"c\", g: 0 },\n];\nconst prop = \"letter\";\nfunction ifMatchSort(c, n) {\n if (c.g < n.g) {\n return -1;\n }\n if (c.g > n.g) {\n return 1;\n }\n}\nassert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n"}],"name":"sortCollectionAlphabetically","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be sorted.","source":"* {Array} collection - Collection to be sorted."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- Name of property to compare.","source":"* {String} propertyName - Name of property to compare."},{"tag":"param","name":"ifMatch","type":"Function","optional":false,"description":"- A function which returns a number for the sort function if two object properties match.","source":"* {Function} ifMatch - A function which returns a number for the sort function if two object properties match."}],"type":"function","functionTag":"sortCollectionAlphabetically","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The sorted array.","source":"* {Array} - The sorted array.\n\t *"}},"sortCollectionAlphabeticallyReverse":{"category":"collection","description":"Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.","examples":[{"tag":"example","optional":false,"description":"import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid'; const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}]; const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}]; const prop = 'letter'; assert(sortCollectionAlphabeticallyReverse(collect, prop), result);","source":"import {\n sortCollectionAlphabeticallyReverse,\n assert,\n} from \"@universalweb/acid\";\nconst result = [{ letter: \"f\" }, { letter: \"c\" }, { letter: \"a\" }];\nconst collect = [{ letter: \"a\" }, { letter: \"f\" }, { letter: \"c\" }];\nconst prop = \"letter\";\nassert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n"}],"name":"sortCollectionAlphabeticallyReverse","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be sorted.","source":"* {Array} collection - Collection to be sorted."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- Name of property to compare.","source":"* {String} propertyName - Name of property to compare."},{"tag":"param","name":"ifMatch","type":"Function","optional":false,"description":"- A function which returns a number for the sort function if two object properties match.","source":"* {Function} ifMatch - A function which returns a number for the sort function if two object properties match."}],"type":"function","functionTag":"sortCollectionAlphabeticallyReverse","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The sorted array.","source":"* {Array} - The sorted array.\n\t *"}},"getFileExtension":{"category":"file","description":"Return the file extension.","examples":[{"tag":"example","optional":false,"description":"import { getFileExtension, assert } from '@universalweb/acid'; assert(getFileExtension('test.js'),'js');","source":"import { getFileExtension, assert } from \"@universalweb/acid\";\nassert(getFileExtension(\"test.js\"), \"js\");\n"}],"name":"getFileExtension","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"getFileExtension","returns":{"tag":"returns","name":"-","type":"String|undefined","optional":false,"description":"Returns the extension.","source":"* {String|undefined} - Returns the extension.\n\t *"}},"getFilename":{"category":"file","description":"Return the file extension.","examples":[{"tag":"example","optional":false,"description":"import { getFilename, assert } from '@universalweb/acid'; assert(getFilename('./universalweb/test.js'),'test.js');","source":"import { getFilename, assert } from \"@universalweb/acid\";\nassert(getFilename(\"./universalweb/test.js\"), \"test.js\");\n"}],"name":"getFilename","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"getFilename","returns":{"tag":"returns","name":"-","type":"String|undefined","optional":false,"description":"Returns the extension.","source":"* {String|undefined} - Returns the extension.\n\t *"}},"isFileCSS":{"category":"file","description":"Checks if the string has a .css extension.","examples":[{"tag":"example","optional":false,"description":"import { isFileCSS, assert } from '@universalweb/acid'; assert(isFileCSS('test.css'), true);","source":"import { isFileCSS, assert } from \"@universalweb/acid\";\nassert(isFileCSS(\"test.css\"), true);\n"}],"name":"isFileCSS","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- Object to be checked.","source":"* {String} source - Object to be checked."}],"type":"function","functionTag":"isFileCSS","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isFileHTML":{"category":"file","description":"Checks if the string has a .html extension.","examples":[{"tag":"example","optional":false,"description":"import { isFileHTML, assert } from '@universalweb/acid'; assert(isFileHTML('test.html'), true);","source":"import { isFileHTML, assert } from \"@universalweb/acid\";\nassert(isFileHTML(\"test.html\"), true);\n"}],"name":"isFileHTML","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- Object to be checked.","source":"* {String} source - Object to be checked."}],"type":"function","functionTag":"isFileHTML","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isFileJS":{"category":"file","description":"Checks if the string has a .js extension.","examples":[{"tag":"example","optional":false,"description":"import { isFileJS, assert } from '@universalweb/acid'; assert(isFileJS('test.js'), true);","source":"import { isFileJS, assert } from \"@universalweb/acid\";\nassert(isFileJS(\"test.js\"), true);\n"}],"name":"isFileJS","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- Object to be checked.","source":"* {String} source - Object to be checked."}],"type":"function","functionTag":"isFileJS","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isFileJSON":{"category":"file","description":"Checks if the string has a .json extension.","examples":[{"tag":"example","optional":false,"description":"import { isFileJSON, assert } from '@universalweb/acid'; assert(isFileJSON('test.json'), true);","source":"import { isFileJSON, assert } from \"@universalweb/acid\";\nassert(isFileJSON(\"test.json\"), true);\n"}],"name":"isFileJSON","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- Object to be checked.","source":"* {String} source - Object to be checked."}],"type":"function","functionTag":"isFileJSON","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"after":{"category":"function","description":"Creates a function that executes callable, only after being called n times.","examples":[{"tag":"example","optional":false,"description":"import { after, assert } from '@universalweb/acid'; const onlyAfter = after(1, (item) => { return item;}); assert(onlyAfter(1), undefined); assert(onlyAfter(2), 2);","source":"import { after, assert } from \"@universalweb/acid\";\nconst onlyAfter = after(1, (item) => {\n return item;\n});\nassert(onlyAfter(1), undefined);\nassert(onlyAfter(2), 2);\n"}],"name":"after","params":[{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The number of calls until method is invoked.","source":"* {Number} amount - The number of calls until method is invoked."},{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be called.","source":"* {Function} callable - The function to be called."}],"type":"function","functionTag":"after","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new pass-thru function.","source":"* {Function} - Returns the new pass-thru function.\n\t *"}},"ary":{"category":"function","description":"Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.","examples":[{"tag":"example","optional":false,"description":"import { ary, assert } from '@universalweb/acid'; assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);","source":"import { ary, assert } from \"@universalweb/acid\";\nassert(\n ary((...args) => {\n return args;\n }, 2)(1, 2, 3),\n [1, 2],\n);\n"}],"name":"ary","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to cap arguments for.","source":"* {Function} callable - The function to cap arguments for."},{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The arity cap.","source":"* {Number} amount - The arity cap."}],"type":"function","functionTag":"ary","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the new capped function.","source":"* {Object} - Returns the new capped function.\n\t *"}},"before":{"category":"function","description":"Creates a function that executes callable, only before n times.","examples":[{"tag":"example","optional":false,"description":"import { before, assert } from '@universalweb/acid'; const onlyBefore = before(3, () => { return 1;}); assert(onlyBefore(1), 1);","source":"import { before, assert } from \"@universalweb/acid\";\nconst onlyBefore = before(3, () => {\n return 1;\n});\nassert(onlyBefore(1), 1);\n"}],"name":"before","params":[{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The number of calls before n.","source":"* {Number} amount - The number of calls before n."},{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be called.","source":"* {Function} callable - The function to be called."}],"type":"function","functionTag":"before","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new pass-thru function.","source":"* {Function} - Returns the new pass-thru function.\n\t *"}},"eachAsyncObject":{"category":"object","description":"Asynchronously iterates through the given object.","examples":[{"tag":"example","optional":false,"description":"import { eachAsyncObject, assert } from '@universalweb/acid'; const tempList = []; await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => { tempList[key] = item; }); assert(tempList, {a: 1, b: 2, c: 3});","source":"import { eachAsyncObject, assert } from \"@universalweb/acid\";\nconst tempList = [];\nawait eachAsyncObject({ a: 1, b: 2, c: 3 }, async (item, key) => {\n tempList[key] = item;\n});\nassert(tempList, { a: 1, b: 2, c: 3 });\n"}],"name":"eachAsyncObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- Iteratee called with thisCall as this.","source":"* {*} thisCall - Iteratee called with thisCall as this."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"eachAsyncObject","returns":{"tag":"returns","name":"-","type":"Object|Function|undefined","optional":false,"description":"Returns source.","source":"* {Object|Function|undefined} - Returns source.\n\t *"}},"eachObject":{"category":"object","description":"Iterates through the given object.","examples":[{"tag":"example","optional":false,"description":"import { eachObject, assert } from '@universalweb/acid'; assert(eachObject({a: 1, b: 2, c: 3}, (item) => { console.log(item); }), {a: 1, b: 2, c: 3});","source":"import { eachObject, assert } from \"@universalweb/acid\";\nassert(\n eachObject({ a: 1, b: 2, c: 3 }, (item) => {\n console.log(item);\n }),\n { a: 1, b: 2, c: 3 },\n);\n"}],"name":"eachObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} thisCall - An object to be given each time to the iteratee."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"eachObject","returns":{"tag":"returns","name":"-","type":"Object|Function|undefined","optional":false,"description":"Returns the calling object.","source":"* {Object|Function|undefined} - Returns the calling object.\n\t *"}},"isSet":{"category":"type","description":"Checks if an object(s) is a Set.","examples":[{"tag":"example","optional":false,"description":"import { isSet, assert } from '@universalweb/acid'; assert(isSet(new Set()), true);","source":"import { isSet, assert } from \"@universalweb/acid\";\nassert(isSet(new Set()), true);\n"}],"name":"isSet","params":[{"tag":"param","name":"sources","type":"...*","optional":false,"description":"- Objects to be checked.","source":"* {...*} sources - Objects to be checked."}],"type":"function","functionTag":"isSet","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isGenerator":{"category":"type","description":"Checks if an object or objects are a Int16Array.","examples":[{"tag":"example","optional":false,"description":"import { isGenerator } from '@universalweb/acid'; isGenerator(function* (){}); // => true","source":"import { isGenerator } from \"@universalweb/acid\";\nisGenerator(function* () {});\n// => true\n"}],"name":"isGenerator","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isGenerator","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isAsync":{"category":"type","description":"Checks if an object is an async function.","examples":[{"tag":"example","optional":false,"description":"import { isAsync, assert } from '@universalweb/acid'; assert(isAsync(async() => {}), true);","source":"import { isAsync, assert } from \"@universalweb/acid\";\nassert(\n isAsync(async () => {}),\n true,\n);\n"}],"name":"isAsync","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isAsync","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"True or false.","source":"* {Boolean} - True or false.\n\t *"}},"each":{"category":"utility","description":"Iterates through the given object.","examples":[{"tag":"example","optional":false,"description":"import { each, assert } from '@universalweb/acid'; const list = {}; each({a: 1, b: 2, c: 3}, (item, key) => { list[key] = item; }); assert(list, {a: 1, b: 2, c: 3});","source":"import { each, assert } from \"@universalweb/acid\";\nconst list = {};\neach({ a: 1, b: 2, c: 3 }, (item, key) => {\n list[key] = item;\n});\nassert(list, { a: 1, b: 2, c: 3 });\n"}],"name":"each","params":[{"tag":"param","name":"source","type":"Array | object | Function","optional":false,"description":"- Object that will be looped through.","source":"* {Array | object | Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} thisCall - An object to be given each time to the iteratee."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"each","returns":{"tag":"returns","name":"-","type":"Array | object | Function","optional":false,"description":"The originally given object.","source":"* {Array | object | Function} - The originally given object.\n\t *"}},"chain":{"category":"function","description":"Creates a chainable set of functions.","examples":[{"tag":"example","optional":false,"description":"import { chain, assert } from '@universalweb/acid'; const chained = chain({ a(value, c) { return value + c; } }).setValue(2).a(1).done(); assert(chained, 3);","source":"import { chain, assert } from \"@universalweb/acid\";\nconst chained = chain({\n a(value, c) {\n return value + c;\n },\n})\n .setValue(2)\n .a(1)\n .done();\nassert(chained, 3);\n"}],"name":"chain","params":[{"tag":"param","name":"config","type":"Array|Object","optional":false,"description":"- The object to take methods from.","source":"* {Array|Object} config - The object to take methods from."}],"type":"function","functionTag":"chain","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.","source":"* {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n\t *"}},"curry":{"category":"function","description":"Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.","examples":[{"tag":"example","optional":false,"description":"import { curry, assert } from '@universalweb/acid'; const result = curry((a, b, c) => { return [a, b, c]; })(1)(2)(3); assert(result, [1, 2, 3]);","source":"import { curry, assert } from \"@universalweb/acid\";\nconst result = curry((a, b, c) => {\n return [a, b, c];\n})(1)(2)(3);\nassert(result, [1, 2, 3]);\n"}],"name":"curry","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to curry.","source":"* {Function} callable - The function to curry."},{"tag":"param","name":"arity","type":"Number","optional":false,"description":"- The arity of method.","source":"* {Number} arity - The arity of method."}],"type":"function","functionTag":"curry","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns the new curried function.","source":"* {*} - Returns the new curried function.\n\t *"}},"curryRight":{"description":"Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.","examples":[{"tag":"example","optional":false,"description":"import { curryRight, assert } from '@universalweb/acid'; const result = curryRight((a, b, c) => { return [a, b, c]; })(1)(2)(3); assert(result, [3, 2, 1]);","source":"import { curryRight, assert } from \"@universalweb/acid\";\nconst result = curryRight((a, b, c) => {\n return [a, b, c];\n})(1)(2)(3);\nassert(result, [3, 2, 1]);\n"}],"name":"curryRight","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to curry.","source":"* {Function} callable - The function to curry."},{"tag":"param","name":"arity","type":"Number","optional":false,"description":"- The arity of method.","source":"* {Number} arity - The arity of method."}],"type":"function","functionTag":"curryRight","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns the new curried function.","source":"* {*} - Returns the new curried function.\n\t *"}},"noop":{"category":"function","description":"This method returns undefined.","examples":[{"tag":"example","optional":false,"description":"import { noop, assert } from '@universalweb/acid'; assert(noop(), undefined);","source":"import { noop, assert } from \"@universalweb/acid\";\nassert(noop(), undefined);\n"}],"name":"noop","type":"function","functionTag":"noop","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n\t *"}},"times":{"category":"utility","description":"Iterates based on the amount given invoking the iteratee with the current index as an argument.","examples":[{"tag":"example","optional":false,"description":"import { times } from '@universalweb/acid'; times(3, (item) => { console.log(item); }); // 0 // 1 // 2 // => undefined","source":"import { times } from \"@universalweb/acid\";\ntimes(3, (item) => {\n console.log(item);\n}); // 0 // 1 // 2\n// => undefined\n"}],"name":"times","params":[{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The amount of times to loop invoking the iteratee.","source":"* {Number} amount - The amount of times to loop invoking the iteratee."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed index and amount.","source":"* {Function} iteratee - Transformation function which is passed index and amount."}],"type":"function","functionTag":"times","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Nothing.","source":"* {undefined} - Nothing.\n\t *"}},"timesMap":{"category":"utility","description":"Iterates based on the amount given and maps the results returned by the iteratee each time to an array.","examples":[{"tag":"example","optional":false,"description":"import { timesMap } from '@universalweb/acid'; timesMap(3, (item) => { return item; }); // => [0, 1, 2]","source":"import { timesMap } from \"@universalweb/acid\";\ntimesMap(3, (item) => {\n return item;\n});\n// => [0, 1, 2]\n"}],"name":"timesMap","params":[{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The amount of times to loop invoking the iteratee.","source":"* {Number} amount - The amount of times to loop invoking the iteratee."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed index and amount.","source":"* {Function} iteratee - Transformation function which is passed index and amount."},{"tag":"param","name":"results","type":"Array","optional":true,"description":"- Array that will have iteratee return pushed to.","source":"* {Array} [results = []] - Array that will have iteratee return pushed to.","default":"[]"}],"type":"function","functionTag":"timesMap","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with iteratee's returned values.","source":"* {Array} - An array with iteratee's returned values.\n\t *"}},"timer":{"category":"function","description":"Timer wrapper.","examples":[{"tag":"example","optional":false,"description":"import { timer, assert } from '@universalweb/acid'; timer(() => {}, 100); // => 0","source":"import { timer, assert } from \"@universalweb/acid\";\ntimer(() => {}, 100);\n// => 0\n"}],"name":"timer","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked.","source":"* {Function} callable - The function to be invoked."},{"tag":"param","name":"time","type":"Number","optional":false,"description":"- The time in milliseconds.","source":"* {Number} time - The time in milliseconds."}],"type":"function","functionTag":"timer","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns setTimeoutId ID.","source":"* {Object} - Returns setTimeoutId ID.\n\t *"}},"clearTimers":{"category":"function","description":"Clear all active timers.","examples":[{"tag":"example","optional":false,"description":"import { clearTimers, assert } from '@universalweb/acid'; clearTimers(); // => undefined","source":"import { clearTimers, assert } from \"@universalweb/acid\";\nclearTimers();\n// => undefined\n"}],"name":"clearTimers","type":"function","functionTag":"clearTimers","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n\t *"}},"apply":{"category":"function","description":"Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.","examples":[{"tag":"example","optional":false,"description":"import { apply, assert } from '@universalweb/acid'; assert(apply(function (a) {return a;}, undefined, [2]), 2);","source":"import { apply, assert } from \"@universalweb/acid\";\nassert(\n apply(\n function (a) {\n return a;\n },\n undefined,\n [2],\n ),\n 2,\n);\n"}],"name":"apply","params":[{"tag":"param","name":"target","type":"Function","optional":false,"description":"- The target function to call.","source":"* {Function} target - The target function to call."},{"tag":"param","name":"thisArgument","type":"*","optional":false,"description":"- Array like object.","source":"* {*} thisArgument - Array like object."},{"tag":"param","name":"argumentsList","type":"Array","optional":false,"description":"- An array-like object specifying the arguments with which target should be called.","source":"* {Array} argumentsList - An array-like object specifying the arguments with which target should be called."}],"type":"function","functionTag":"apply","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"The result of calling the given target function with the specified this value and arguments.","source":"* {*} - The result of calling the given target function with the specified this value and arguments.\n\t *"}},"debounce":{"category":"function","description":"Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.","examples":[{"tag":"example","optional":false,"description":"import { debounce, promise, assert } from '@universalweb/acid'; const promised = promise((a) => { const debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0); }); assert(await promised(), 'debounced');","source":"import { debounce, promise, assert } from \"@universalweb/acid\";\nconst promised = promise((a) => {\n const debounced = debounce(() => {\n debounced.clear();\n a(\"debounced\");\n }, 0);\n});\nassert(await promised(), \"debounced\");\n"}],"name":"debounce","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked.","source":"* {Function} callable - The function to be invoked."},{"tag":"param","name":"time","type":"Number","optional":false,"description":"- The time in milliseconds.","source":"* {Number} time - The time in milliseconds."}],"type":"function","functionTag":"debounce","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"The debounced function.","source":"* {Function} - The debounced function.\n\t *"}},"ifInvoke":{"category":"function","description":"Checks if the given method is a function. If it is then it invokes it with the given arguments.","examples":[{"tag":"example","optional":false,"description":"import { ifInvoke, assert } from '@universalweb/acid'; assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);","source":"import { ifInvoke, assert } from \"@universalweb/acid\";\nassert(\n ifInvoke(\n (...args) => {\n return args;\n },\n 1,\n 2,\n ),\n [1, 2],\n);\n"}],"name":"ifInvoke","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked if possible.","source":"* {Function} callable - The function to be invoked if possible."},{"tag":"param","name":"thisBind","type":"*","optional":false,"description":"- Object to use as the \"this\" within the function.","source":"* {*} thisBind - Object to use as the \"this\" within the function."},{"tag":"param","name":"args","type":"...*","optional":false,"description":"- Arguments to pass to the function.","source":"* {...*} args - Arguments to pass to the function."}],"type":"function","functionTag":"ifInvoke","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns the method invoked or undefined.","source":"* {*} - Returns the method invoked or undefined.\n\t *"}},"negate":{"category":"function","description":"Creates a function that negates the result of the predicate callable.","examples":[{"tag":"example","optional":false,"description":"negate(() => { return false;})(); // => true","source":"negate(() => {\n return false;\n})();\n// => true\n"}],"name":"negate","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked.","source":"* {Function} callable - The function to be invoked."}],"type":"function","functionTag":"negate","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns the given methods result.","source":"* {*} - Returns the given methods result.\n\t *"}},"nthArg":{"category":"function","description":"Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.","examples":[{"tag":"example","optional":false,"description":"nthArg(1)('a', 'b'); // => 'b'","source":"nthArg(1)(\"a\", \"b\");\n// => 'b'\n"}],"name":"nthArg","params":[{"tag":"param","name":"index","type":"Number","optional":true,"description":"- The index of the argument to return.","source":"* {Number} [index = 0] - The index of the argument to return.","default":"0"}],"type":"function","functionTag":"nthArg","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new pass-thru function.","source":"* {Function} - Returns the new pass-thru function.\n\t *"}},"once":{"category":"function","description":"Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.","examples":[{"tag":"example","optional":false,"description":"const onceOnly = once((item) => { return item;}); onceOnly(5); onceOnly(3); // => 5","source":"const onceOnly = once((item) => {\n return item;\n});\nonceOnly(5);\nonceOnly(3);\n// => 5\n"}],"name":"once","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be called.","source":"* {Function} callable - The function to be called."}],"type":"function","functionTag":"once","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new pass-thru function.","source":"* {Function} - Returns the new pass-thru function.\n\t *"}},"getType":{"category":"type","description":"Returns the constructor of an object.","examples":[{"tag":"example","optional":false,"description":"import { getType, assert } from '@universalweb/acid'; assert(getType(1), true);","source":"import { getType, assert } from \"@universalweb/acid\";\nassert(getType(1), true);\n"}],"name":"getType","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"getType","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"cloneType":{"category":"type","description":"Returns a new empty object of the same type.","examples":[{"tag":"example","optional":false,"description":"import { cloneType, assert } from '@universalweb/acid'; assert(cloneType([1]), []);","source":"import { cloneType, assert } from \"@universalweb/acid\";\nassert(cloneType([1]), []);\n"}],"name":"cloneType","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"cloneType","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"forOfCompactMap":{"category":"utility","description":"Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { assert,forOfCompactMap } from '@universalweb/acid'; const source = {a: undefined, b: 2, c: 3}; const temp = forOfCompactMap(source, (item) => { return item; }); assert(temp, {b: 2, c: 3});","source":"import { assert, forOfCompactMap } from \"@universalweb/acid\";\nconst source = { a: undefined, b: 2, c: 3 };\nconst temp = forOfCompactMap(source, (item) => {\n return item;\n});\nassert(temp, { b: 2, c: 3 });\n"}],"name":"forOfCompactMap","params":[{"tag":"param","name":"source","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function|Class|Map|Set|Array} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"resultsObject","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be used to assign results else source is type cloned.","source":"* {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned."}],"type":"function","functionTag":"forOfCompactMap","returns":{"tag":"returns","name":"-","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"An object with mapped properties that are not null or undefined.","source":"* {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n\t *"}},"forOfCompactMapAsync":{"category":"utility","description":"Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { assert,forOfCompactMapAsync } from '@universalweb/acid'; const source = {a: undefined, b: 2, c: 3}; const temp = await forOfCompactMapAsync(source, async (item) => { return item; }); assert(temp, {b: 2, c: 3});","source":"import { assert, forOfCompactMapAsync } from \"@universalweb/acid\";\nconst source = { a: undefined, b: 2, c: 3 };\nconst temp = await forOfCompactMapAsync(source, async (item) => {\n return item;\n});\nassert(temp, { b: 2, c: 3 });\n"}],"name":"forOfCompactMapAsync","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"resultsObject","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be used to assign results else source is type cloned.","source":"* {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned."}],"type":"function","functionTag":"forOfCompactMapAsync","returns":{"tag":"returns","name":"-","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"An object with mapped properties that are not null or undefined.","source":"* {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n\t *"}},"mapObjectAsync":{"category":"object","description":"Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { mapAsyncObject, assert } from '@universalweb/acid'; assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { return item; }), {a: 1, b: undefined, c: 3});","source":"import { mapAsyncObject, assert } from \"@universalweb/acid\";\nassert(\n await mapAsyncObject({ a: 1, b: undefined, c: 3 }, (item) => {\n return item;\n }),\n { a: 1, b: undefined, c: 3 },\n);\n"}],"name":"mapObjectAsync","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"results","type":"Object|Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object|Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"mapObjectAsync","returns":{"tag":"returns","name":"-","type":"Object|Function|undefined","optional":false,"description":"An object of the same calling object's type.","source":"* {Object|Function|undefined} - An object of the same calling object's type.\n\t *"}},"mapObject":{"category":"object","description":"Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { mapObject, assert } from '@universalweb/acid'; assert(mapObject({a: 1, b: undefined, c: 3}, (item) => { return item; }), {a: 1, b: undefined, c: 3});","source":"import { mapObject, assert } from \"@universalweb/acid\";\nassert(\n mapObject({ a: 1, b: undefined, c: 3 }, (item) => {\n return item;\n }),\n { a: 1, b: undefined, c: 3 },\n);\n"}],"name":"mapObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"results","type":"Object|Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object|Function} [results = {}] - Object that will be used to assign results.","default":"{}"},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} thisCall - An object to be given each time to the iteratee."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"mapObject","returns":{"tag":"returns","name":"-","type":"Object|Function|undefined","optional":false,"description":"An object of the same calling object's type.","source":"* {Object|Function|undefined} - An object of the same calling object's type.\n\t *"}},"map":{"category":"utility","description":"Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { map, assert } from '@universalweb/acid'; assert(map({a: 1, b: 2, c: 3}, (item) => { return item * 2; }), {a: 2, b: 4, c: 6});","source":"import { map, assert } from \"@universalweb/acid\";\nassert(\n map({ a: 1, b: 2, c: 3 }, (item) => {\n return item * 2;\n }),\n { a: 2, b: 4, c: 6 },\n);\n"}],"name":"map","params":[{"tag":"param","name":"source","type":"Array | object | Function","optional":false,"description":"- Object that will be looped through.","source":"* {Array | object | Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type."},{"tag":"param","name":"results","type":"Object | Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object | Function} [results = {}] - Object that will be used to assign results.","default":"{}"},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} thisCall - An object to be given each time to the iteratee."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"map","returns":{"tag":"returns","name":"-","type":"Array | object | Function","optional":false,"description":"A new object of the same calling object's type.","source":"* {Array | object | Function} - A new object of the same calling object's type.\n\t *"}},"over":{"category":"function","description":"Creates a function that invokes iteratee with the arguments it receives and returns their results.","examples":[{"tag":"example","optional":false,"description":"import { overEvery, assert } from '@universalweb/acid'; assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);","source":"import { overEvery, assert } from \"@universalweb/acid\";\nassert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n"}],"name":"over","params":[{"tag":"param","name":"iteratees","type":"(Array.|Object.)","optional":false,"description":"- The list of functions to loop through.","source":"* {(Array.|Object.)} iteratees - The list of functions to loop through."}],"type":"function","functionTag":"over","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new over wrapped function.","source":"* {Function} - Returns the new over wrapped function.\n\t *"}},"everyAsyncObject":{"category":"object","description":"Iterates through the given object while the iteratee returns true.","examples":[{"tag":"example","optional":false,"description":"import { everyAsyncObject, assert } from '@universalweb/acid'; const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => { return item; }); assert(result, true);","source":"import { everyAsyncObject, assert } from \"@universalweb/acid\";\nconst result = await everyAsyncObject({ a: true, b: true, c: true }, (item) => {\n return item;\n});\nassert(result, true);\n"}],"name":"everyAsyncObject","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Object that will be looped through.","source":"* {Object} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling array, and array length."}],"type":"function","functionTag":"everyAsyncObject","returns":{"tag":"returns","name":"-","type":"Boolean|undefined","optional":false,"description":"Returns true if all values returned are true or false if one value returns false.","source":"* {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n\t *"}},"everyObject":{"category":"object","description":"Iterates through the given object while the iteratee returns true.","examples":[{"tag":"example","optional":false,"description":"import { everyObject, assert } from '@universalweb/acid'; const result = everyObject({a: true, b: true, c: true}, (item) => { return item; }); assert(result, true);","source":"import { everyObject, assert } from \"@universalweb/acid\";\nconst result = everyObject({ a: true, b: true, c: true }, (item) => {\n return item;\n});\nassert(result, true);\n"}],"name":"everyObject","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Object that will be looped through.","source":"* {Object} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling array, and array length."}],"type":"function","functionTag":"everyObject","returns":{"tag":"returns","name":"-","type":"Boolean|undefined","optional":false,"description":"Returns true if all values returned are true or false if one value returns false.","source":"* {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n\t *"}},"forOfEvery":{"category":"utility","description":"Iterates (for of) through the given object while the iteratee returns true using a for of loop.","examples":[{"tag":"example","optional":false,"description":"import { every, assert } from '@universalweb/acid'; assert(forOfEvery({a: false, b: true, c: true}, (item) => { return item; }), false);","source":"import { every, assert } from \"@universalweb/acid\";\nassert(\n forOfEvery({ a: false, b: true, c: true }, (item) => {\n return item;\n }),\n false,\n);\n"}],"name":"forOfEvery","params":[{"tag":"param","name":"source","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function|Class|Map|Set|Array} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."}],"type":"function","functionTag":"forOfEvery","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true if all values returned are true or false if one value returns false.","source":"* {Boolean} - Returns true if all values returned are true or false if one value returns false.\n\t *"}},"forOfEveryAsync":{"category":"utility","description":"Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.","examples":[{"tag":"example","optional":false,"description":"import { every, assert } from '@universalweb/acid'; assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => { return item; }), false);","source":"import { every, assert } from \"@universalweb/acid\";\nassert(\n forOfEveryAsync({ a: false, b: true, c: true }, (item) => {\n return item;\n }),\n false,\n);\n"}],"name":"forOfEveryAsync","params":[{"tag":"param","name":"source","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function|Class|Map|Set|Array} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."}],"type":"function","functionTag":"forOfEveryAsync","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true if all values returned are true or false if one value returns false.","source":"* {Boolean} - Returns true if all values returned are true or false if one value returns false.\n\t *"}},"every":{"category":"utility","description":"Iterates through the given object while the iteratee returns true.","examples":[{"tag":"example","optional":false,"description":"import { every, assert } from '@universalweb/acid'; assert(every({a: false, b: true, c: true}, (item) => { return item; }), false);","source":"import { every, assert } from \"@universalweb/acid\";\nassert(\n every({ a: false, b: true, c: true }, (item) => {\n return item;\n }),\n false,\n);\n"}],"name":"every","params":[{"tag":"param","name":"source","type":"Object | Array | Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object | Array | Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling array, and array length."}],"type":"function","functionTag":"every","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true if all values returned are true or false if one value returns false.","source":"* {Boolean} - Returns true if all values returned are true or false if one value returns false.\n\t *"}},"overEvery":{"category":"function","description":"Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.","examples":[{"tag":"example","optional":false,"description":"import { overEvery, assert } from '@universalweb/acid'; assert(overEvery([Boolean, isFinite])('1'), true);","source":"import { overEvery, assert } from \"@universalweb/acid\";\nassert(overEvery([Boolean, isFinite])(\"1\"), true);\n"}],"name":"overEvery","params":[{"tag":"param","name":"predicates","type":"(Array.|Object.)","optional":false,"description":"- The list of functions to loop through.","source":"* {(Array.|Object.)} predicates - The list of functions to loop through."}],"type":"function","functionTag":"overEvery","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new overEvery wrapped function.","source":"* {Function} - Returns the new overEvery wrapped function.\n\t *"}},"reArg":{"category":"function","description":"Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.","examples":[{"tag":"example","optional":false,"description":"reArg((a, b, c) => { return [a, b, c]; }, [1,2,0])(1,2,3); // => [2, 3, 1]","source":"reArg(\n (a, b, c) => {\n return [a, b, c];\n },\n [1, 2, 0],\n)(1, 2, 3);\n// => [2, 3, 1]\n"}],"name":"reArg","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked.","source":"* {Function} callable - The function to be invoked."},{"tag":"param","name":"indexes","type":"Array","optional":false,"description":"- The arranged argument indexes.","source":"* {Array} indexes - The arranged argument indexes."}],"type":"function","functionTag":"reArg","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new function.","source":"* {Function} - Returns the new function.\n\t *"}},"throttle":{"category":"function","description":"Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.","examples":[{"tag":"example","optional":false,"description":"const throttled = throttle(() => { console.log('throttle'); }, 0)(); throttled(); // 'throttle'","source":"const throttled = throttle(() => {\n console.log(\"throttle\");\n}, 0)();\nthrottled(); // 'throttle'\n"}],"name":"throttle","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked.","source":"* {Function} callable - The function to be invoked."},{"tag":"param","name":"time","type":"Number","optional":false,"description":"- The time in milliseconds.","source":"* {Number} time - The time in milliseconds."}],"type":"function","functionTag":"throttle","returns":{"tag":"returns","name":"-","type":"Function|undefined","optional":false,"description":"The throttled function.","source":"* {Function|undefined} - The throttled function.\n\t *"}},"wrap":{"category":"function","description":"Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.","examples":[{"tag":"example","optional":false,"description":"wrap('Lucy', (firstName, lastName) => { return `My name is ${firstName} ${lastName}.`; })('Diamonds'); // => 'My name is Lucy Diamonds.'","source":"wrap(\"Lucy\", (firstName, lastName) => {\n return `My name is ${firstName} ${lastName}.`;\n})(\"Diamonds\");\n// => 'My name is Lucy Diamonds.'\n"}],"name":"wrap","params":[{"tag":"param","name":"value","type":"*","optional":false,"description":"- The value to wrap.","source":"* {*} value - The value to wrap."},{"tag":"param","name":"wrapper","type":"Function","optional":false,"description":"- The wrapper function.","source":"* {Function} wrapper - The wrapper function."}],"type":"function","functionTag":"wrap","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"The new function.","source":"* {Function} - The new function.\n\t *"}},"cacheNativeMethod":{"category":"utility","description":"Caches a prototype method.","examples":[{"tag":"example","optional":false,"description":"import { cacheNativeMethod, assert } from '@universalweb/acid'; assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);","source":"import { cacheNativeMethod, assert } from \"@universalweb/acid\";\nassert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n"}],"name":"cacheNativeMethod","params":[{"tag":"param","name":"method","type":"Function","optional":false,"description":"- Prototype method.","source":"* {Function} method - Prototype method."}],"type":"function","functionTag":"cacheNativeMethod","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Cached method.","source":"* {Function} - Cached method.\n\t *"}},"getPropNames":{"category":"object","description":"Returns an array of all properties (enumerable or not) found directly upon a given object.","examples":[{"tag":"example","optional":false,"description":"import { getPropNames, assert } from '@universalweb/acid'; assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);","source":"import { getPropNames, assert } from \"@universalweb/acid\";\nassert(getPropNames({ 0: \"a\", 1: \"b\", 2: \"c\" }), [\"0\", \"1\", \"2\"]);\n"}],"name":"getPropNames","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- The object whose enumerable and non-enumerable own properties are to be returned.","source":"* {Object} source - The object whose enumerable and non-enumerable own properties are to be returned."}],"type":"function","functionTag":"getPropNames","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"An array of strings that correspond to the properties found directly upon the given object.","source":"* {Object} - An array of strings that correspond to the properties found directly upon the given object.\n\t *"}},"getPropDesc":{"category":"object","description":"Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.","examples":[{"tag":"example","optional":false,"description":"getPropDesc({ bar: 42 }, 'bar'); // => { configurable: true, enumerable: true, value: 42, writable: true }","source":"getPropDesc({ bar: 42 }, \"bar\");\n// => { configurable: true, enumerable: true, value: 42, writable: true }\n"}],"name":"getPropDesc","params":[{"tag":"param","name":"target","type":"Object","optional":false,"description":"- The target object.","source":"* {Object} target - The target object."},{"tag":"param","name":"property","type":"String","optional":false,"description":"- The name of the property whose description is to be retrieved.","source":"* {String} property - The name of the property whose description is to be retrieved."}],"type":"function","functionTag":"getPropDesc","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"A property descriptor of the given property if it exists on the object, undefined otherwise.","source":"* {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n\t *"}},"defProp":{"category":"object","description":"Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.","examples":[{"tag":"example","optional":false,"description":"defProp({}, 'key', { enumerable: false, configurable: false, writable: false, value: 'static' }).key; // => 'static'","source":"defProp({}, \"key\", {\n enumerable: false,\n configurable: false,\n writable: false,\n value: \"static\",\n}).key;\n// => 'static'\n"}],"name":"defProp","params":[{"tag":"param","name":"target","type":"Object","optional":false,"description":"- The object on which to define the property.","source":"* {Object} target - The object on which to define the property."},{"tag":"param","name":"property","type":"String","optional":false,"description":"- The name of the property whose description is to be retrieved.","source":"* {String} property - The name of the property whose description is to be retrieved."},{"tag":"param","name":"descriptor","type":"Object","optional":false,"description":"- The descriptor for the property being defined or modified.","source":"* {Object} descriptor - The descriptor for the property being defined or modified."}],"type":"function","functionTag":"defProp","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"The object that was passed to the function.","source":"* {Object} - The object that was passed to the function.\n\t *"}},"isSame":{"category":"object","description":"Determines whether two values are the same value.","examples":[{"tag":"example","optional":false,"description":"import { isSame, assert } from '@universalweb/acid'; assert(isSame('foo', 'foo'), true);","source":"import { isSame, assert } from \"@universalweb/acid\";\nassert(isSame(\"foo\", \"foo\"), true);\n"}],"name":"isSame","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Value to compare to.","source":"* {*} source - Value to compare to."},{"tag":"param","name":"target","type":"*","optional":false,"description":"- A value to compare.","source":"* {*} target - A value to compare."}],"type":"function","functionTag":"isSame","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"A Boolean indicating whether or not the two arguments are the same value.","source":"* {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n\t *"}},"add":{"category":"math","description":"Adds two numbers.","examples":[{"tag":"example","optional":false,"description":"import { add, assert } from '@universalweb/acid'; assert(add(1, 1), 2);","source":"import { add, assert } from \"@universalweb/acid\";\nassert(add(1, 1), 2);\n"}],"name":"add","params":[{"tag":"param","name":"augend","type":"Number","optional":false,"description":"- First number.","source":"* {Number} augend - First number."},{"tag":"param","name":"addend","type":"Number","optional":false,"description":"- Second number which is being added to another (augend).","source":"* {Number} addend - Second number which is being added to another (augend)."}],"type":"function","functionTag":"add","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the sum of the arguments.","source":"* {Number} - Returns the sum of the arguments.\n\t *"}},"deduct":{"category":"math","description":"Decrements a number.","examples":[{"tag":"example","optional":false,"description":"import { multiply, assert } from '@universalweb/acid'; assert(multiply(10, 5), 50); deduct(10); // => 9","source":"import { multiply, assert } from \"@universalweb/acid\";\nassert(multiply(10, 5), 50);\ndeduct(10);\n// => 9\n"}],"name":"deduct","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- First number.","source":"* {Number} source - First number."}],"type":"function","functionTag":"deduct","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns a decremented version of the number.","source":"* {Number} - Returns a decremented version of the number.\n\t *"}},"divide":{"category":"math","description":"Divides two numbers.","examples":[{"tag":"example","optional":false,"description":"import { divide, assert } from '@universalweb/acid'; assert(divide(10, 5), 2);","source":"import { divide, assert } from \"@universalweb/acid\";\nassert(divide(10, 5), 2);\n"}],"name":"divide","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- First number.","source":"* {Number} source - First number."},{"tag":"param","name":"value","type":"Number","optional":false,"description":"- Second number.","source":"* {Number} value - Second number."}],"type":"function","functionTag":"divide","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the quotient of the arguments.","source":"* {Number} - Returns the quotient of the arguments.\n\t *"}},"increment":{"category":"math","description":"Increments a number.","examples":[{"tag":"example","optional":false,"description":"import { multiply, assert } from '@universalweb/acid'; assert(multiply(10, 5), 50); increment(10); // => 11","source":"import { multiply, assert } from \"@universalweb/acid\";\nassert(multiply(10, 5), 50);\nincrement(10);\n// => 11\n"}],"name":"increment","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- First number.","source":"* {Number} source - First number."}],"type":"function","functionTag":"increment","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns an incremented version of the number.","source":"* {Number} - Returns an incremented version of the number.\n\t *"}},"multiply":{"category":"math","description":"Multiplies two numbers.","examples":[{"tag":"example","optional":false,"description":"import { multiply, assert } from '@universalweb/acid'; assert(multiply(10, 5), 50);","source":"import { multiply, assert } from \"@universalweb/acid\";\nassert(multiply(10, 5), 50);\n"}],"name":"multiply","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- First number.","source":"* {Number} source - First number."},{"tag":"param","name":"value","type":"Number","optional":false,"description":"- Second number.","source":"* {Number} value - Second number."}],"type":"function","functionTag":"multiply","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the product of the arguments.","source":"* {Number} - Returns the product of the arguments.\n\t *"}},"calcProgress":{"category":"utility","description":"Calculate the progress from a given total and current amount.","examples":[{"tag":"example","optional":false,"description":"import { calcProgress, assert } from '@universalweb/acid'; assert(calcProgress(100, 1), 1);","source":"import { calcProgress, assert } from \"@universalweb/acid\";\nassert(calcProgress(100, 1), 1);\n"}],"name":"calcProgress","params":[{"tag":"param","name":"total","type":"Number","optional":false,"description":"- The total amount.","source":"* {Number} total - The total amount."},{"tag":"param","name":"currentAmount","type":"Number","optional":false,"description":"- The current amount.","source":"* {Number} currentAmount - The current amount."}],"type":"function","functionTag":"calcProgress","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The progress as a percentage.","source":"* {Number} - The progress as a percentage.\n\t *"}},"randomFloat":{"category":"math","description":"Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..","examples":[{"tag":"example","optional":false,"description":"import { randomFloat, assert } from '@universalweb/acid'; assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;}); // => 9.1","source":"import { randomFloat, assert } from \"@universalweb/acid\";\nassert(randomFloat(10, 0), (value) => {\n return value > 0 && value < 10;\n});\n// => 9.1\n"}],"name":"randomFloat","params":[{"tag":"param","name":"max","type":"Number","optional":false,"description":"- Establishes highest possible value for the random number.","source":"* {Number} max - Establishes highest possible value for the random number."},{"tag":"param","name":"min","type":"Number","optional":true,"description":"- Establishes lowest possible value for the random number.","source":"* {Number} [min = 0] - Establishes lowest possible value for the random number.","default":"0"}],"type":"function","functionTag":"randomFloat","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns random integer between the max and min range.","source":"* {Number} - Returns random integer between the max and min range.\n\t *"}},"remainder":{"category":"math","description":"Extracts the remainder between two numbers.","examples":[{"tag":"example","optional":false,"description":"import { multiply, assert } from '@universalweb/acid'; assert(multiply(10, 5), 50); remainder(10, 6); // => 4","source":"import { multiply, assert } from \"@universalweb/acid\";\nassert(multiply(10, 5), 50);\nremainder(10, 6);\n// => 4\n"}],"name":"remainder","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- First number.","source":"* {Number} source - First number."},{"tag":"param","name":"value","type":"Number","optional":false,"description":"- Second number.","source":"* {Number} value - Second number."}],"type":"function","functionTag":"remainder","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the remainder of the arguments.","source":"* {Number} - Returns the remainder of the arguments.\n\t *"}},"subtractAll":{"category":"math","description":"Subtract all numbers in the array starting from left to right & return the difference.","examples":[{"tag":"example","optional":false,"description":"import { subtractAll, assert } from '@universalweb/acid'; assert(subtractAll([10, 1, 2, 3]), 5);","source":"import { subtractAll, assert } from \"@universalweb/acid\";\nassert(subtractAll([10, 1, 2, 3]), 5);\n"}],"name":"subtractAll","params":[{"tag":"param","name":"source","type":"Number[]","optional":false,"description":"- Array of numbers.","source":"* {Number[]} source - Array of numbers."}],"type":"function","functionTag":"subtractAll","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the final difference.","source":"* {Number} - Returns the final difference.\n\t *"}},"sumAll":{"category":"math","description":"Sum all numbers in a given array.","examples":[{"tag":"example","optional":false,"description":"import { sumAll, assert } from '@universalweb/acid'; assert(sumAll([10, 1, 2, 3]), 5);","source":"import { sumAll, assert } from \"@universalweb/acid\";\nassert(sumAll([10, 1, 2, 3]), 5);\n"}],"name":"sumAll","params":[{"tag":"param","name":"source","type":"Number[]","optional":false,"description":"- Array of numbers.","source":"* {Number[]} source - Array of numbers."}],"type":"function","functionTag":"sumAll","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns a single number.","source":"* {Number} - Returns a single number.\n\t *"}},"isNumberInRange":{"category":"number","description":"Checks if a number is within a range.","examples":[{"tag":"example","optional":false,"description":"import { isNumberInRange, assert } from '@universalweb/acid'; assert(isNumberInRange(1, 0, 2), true); assert(isNumberInRange(1, 2, 5), false);","source":"import { isNumberInRange, assert } from \"@universalweb/acid\";\nassert(isNumberInRange(1, 0, 2), true);\nassert(isNumberInRange(1, 2, 5), false);\n"}],"name":"isNumberInRange","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."},{"tag":"param","name":"start","type":"Number","optional":false,"description":"- Beginning of range.","source":"* {Number} start - Beginning of range."},{"tag":"param","name":"end","type":"Number","optional":false,"description":"- End of range.","source":"* {Number} end - End of range."}],"type":"function","functionTag":"isNumberInRange","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isNumberNotInRange":{"category":"number","description":"Checks if a number is within a range.","examples":[{"tag":"example","optional":false,"description":"import { isNumberNotInRange, assert } from '@universalweb/acid'; assert(isNumberNotInRange(1, 0, 2), false); assert(isNumberNotInRange(1, 2, 5), true);","source":"import { isNumberNotInRange, assert } from \"@universalweb/acid\";\nassert(isNumberNotInRange(1, 0, 2), false);\nassert(isNumberNotInRange(1, 2, 5), true);\n"}],"name":"isNumberNotInRange","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."},{"tag":"param","name":"start","type":"Number","optional":false,"description":"- Beginning of range.","source":"* {Number} start - Beginning of range."},{"tag":"param","name":"end","type":"Number","optional":false,"description":"- End of range.","source":"* {Number} end - End of range."}],"type":"function","functionTag":"isNumberNotInRange","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isPositive":{"category":"number","description":"Checks if a number is negative & returns true or false.","examples":[{"tag":"example","optional":false,"description":"import { isPositive, assert } from '@universalweb/acid'; assert(isPositive(1), true);","source":"import { isPositive, assert } from \"@universalweb/acid\";\nassert(isPositive(1), true);\n"}],"name":"isPositive","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."}],"type":"function","functionTag":"isPositive","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isZero":{"category":"number","description":"Strictly checks if a number is zero.","examples":[{"tag":"example","optional":false,"description":"import { isZero, assert } from '@universalweb/acid'; assert(isZero(0), true);","source":"import { isZero, assert } from \"@universalweb/acid\";\nassert(isZero(0), true);\n"}],"name":"isZero","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."}],"type":"function","functionTag":"isZero","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"getEntries":{"category":"object","description":"Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.","examples":[{"tag":"example","optional":false,"description":"import { getEntries, assert } from '@universalweb/acid'; assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);","source":"import { getEntries, assert } from \"@universalweb/acid\";\nassert(getEntries({ b: 2, a: 1 }), [\n [\"b\", 2],\n [\"a\", 1],\n]);\n"}],"name":"getEntries","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- The source object.","source":"* {Object} source - The source object."}],"type":"function","functionTag":"getEntries","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"Returns the Object.entries of the source object.","source":"* {Array|undefined} - Returns the Object.entries of the source object.\n\t *"}},"compactKeys":{"category":"object","description":"Extracts all keys from an object whose values are not null or undefined.","examples":[{"tag":"example","optional":false,"description":"import { compactKeys, assert } from '@universalweb/acid'; assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);","source":"import { compactKeys, assert } from \"@universalweb/acid\";\nassert(compactKeys({ a: 1, b: 0, c: undefined, d: false, e: null }), [\n \"a\",\n \"b\",\n \"d\",\n]);\n"}],"name":"compactKeys","params":[{"tag":"param","name":"object","type":"Object","optional":false,"description":"- Object from which keys are extracted.","source":"* {Object} object - Object from which keys are extracted."}],"type":"function","functionTag":"compactKeys","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns an array of key values.","source":"* {Array} - Returns an array of key values.\n\t *"}},"compactMapAsyncObject":{"category":"object","description":"Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { compactMapAsyncObject, assert } from '@universalweb/acid'; assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { return item; }), {a: 1, c: 3});","source":"import { compactMapAsyncObject, assert } from \"@universalweb/acid\";\nassert(\n await compactMapAsyncObject({ a: 1, b: undefined, c: 3 }, (item) => {\n return item;\n }),\n { a: 1, c: 3 },\n);\n"}],"name":"compactMapAsyncObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"results","type":"Object|Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object|Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"compactMapAsyncObject","returns":{"tag":"returns","name":"-","type":"Object|Function","optional":false,"description":"An object with mapped properties that are not null or undefined.","source":"* {Object|Function} - An object with mapped properties that are not null or undefined.\n\t *"}},"compactMapObject":{"category":"object","description":"Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { compactMapObject, assert } from '@universalweb/acid'; assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => { return item; }), {a: 1, c: 3});","source":"import { compactMapObject, assert } from \"@universalweb/acid\";\nassert(\n compactMapObject({ a: 1, b: undefined, c: 3 }, (item) => {\n return item;\n }),\n { a: 1, c: 3 },\n);\n"}],"name":"compactMapObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"results","type":"Object|Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object|Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"compactMapObject","returns":{"tag":"returns","name":"-","type":"Object|Function","optional":false,"description":"An object with mapped properties that are not null or undefined.","source":"* {Object|Function} - An object with mapped properties that are not null or undefined.\n\t *"}},"filterObject":{"category":"object","description":"Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"filterObject({a: false, b: true, c: true}, (item) => { return item; }); // => {b: true, c: true}","source":"filterObject({ a: false, b: true, c: true }, (item) => {\n return item;\n});\n// => {b: true, c: true}\n"}],"name":"filterObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"results","type":"Object|Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object|Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"filterObject","returns":{"tag":"returns","name":"-","type":"Object|Function","optional":false,"description":"An object with properties that passed the test.","source":"* {Object|Function} - An object with properties that passed the test.\n\t *"}},"filterAsyncObject":{"category":"object","description":"Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"filterAsyncObject({a: false, b: true, c: true}, (item) => { return item; }); // => {b: true, c: true}","source":"filterAsyncObject({ a: false, b: true, c: true }, (item) => {\n return item;\n});\n// => {b: true, c: true}\n"}],"name":"filterAsyncObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"results","type":"Object|Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object|Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"filterAsyncObject","returns":{"tag":"returns","name":"-","type":"Object|Function","optional":false,"description":"An object with properties that passed the test.","source":"* {Object|Function} - An object with properties that passed the test.\n\t *"}},"invert":{"category":"object","description":"Creates an inverted version of a given object by switching it's keys and values.","examples":[{"tag":"example","optional":false,"description":"import { invert, assert } from '@universalweb/acid'; assert(invert({a:1}), {1:'a'});","source":"import { invert, assert } from \"@universalweb/acid\";\nassert(invert({ a: 1 }), { 1: \"a\" });\n"}],"name":"invert","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Object to be inverted.","source":"* {Object} source - Object to be inverted."},{"tag":"param","name":"target","type":"Array","optional":true,"description":"- Empty object to be populated with inverted values from source.","source":"* {Array} [target = {}] - Empty object to be populated with inverted values from source.","default":"{}"}],"type":"function","functionTag":"invert","returns":{"tag":"returns","name":"-","type":"Object|undefined","optional":false,"description":"Returns object with keys and values switched.","source":"* {Object|undefined} - Returns object with keys and values switched.\n\t *"}},"isMatchObject":{"category":"object","description":"Performs a shallow strict comparison between two objects.","examples":[{"tag":"example","optional":false,"description":"import { assert, isMatchObject } from '@universalweb/acid'; assert(isMatchObject({a: 1}, {a: 1}), true);","source":"import { assert, isMatchObject } from \"@universalweb/acid\";\nassert(isMatchObject({ a: 1 }, { a: 1 }), true);\n"}],"name":"isMatchObject","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Source object.","source":"* {Object} source - Source object."},{"tag":"param","name":"target","type":"Object","optional":false,"description":"- Object to compare to source.","source":"* {Object} target - Object to compare to source."}],"type":"function","functionTag":"isMatchObject","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"regexSafe":{"category":"regex","description":"Returns a regex safe special characters escaped version of a string.","examples":[{"tag":"example","optional":false,"description":"import { regexSafe, assert } from '@universalweb/acid'; assert(regexSafe(/.+/), '\\/\\.\\+\\/');","source":"import { regexSafe, assert } from \"@universalweb/acid\";\nassert(regexSafe(/.+/), \"/.+/\");\n"}],"name":"regexSafe","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- String to make safe.","source":"* {Object} source - String to make safe."}],"type":"function","functionTag":"regexSafe","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns a regex safe version of the string.","source":"* {Object} - Returns a regex safe version of the string.\n\t *"}},"arrayToRegex":{"category":"regex","description":"Convert array of strings to regex.","examples":[{"tag":"example","optional":false,"description":"import { arrayToRegex, assert } from '@universalweb/acid'; assert(String(arrayToRegex(['a','b'])), String(/a|b/));","source":"import { arrayToRegex, assert } from \"@universalweb/acid\";\nassert(String(arrayToRegex([\"a\", \"b\"])), String(/a|b/));\n"}],"name":"arrayToRegex","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Array of strings.","source":"* {Object} source - Array of strings."}],"type":"function","functionTag":"arrayToRegex","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns a regex safe version of the string.","source":"* {Object} - Returns a regex safe version of the string.\n\t *"}},"isRegex":{"category":"type","description":"Checks if the value is a RegExp.","examples":[{"tag":"example","optional":false,"description":"import { isRegex, assert } from '@universalweb/acid'; assert(isRegex(/test/), true);","source":"import { isRegex, assert } from \"@universalweb/acid\";\nassert(isRegex(/test/), true);\n"}],"name":"isRegex","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isRegex","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"omit":{"category":"object","description":"Returns a clone of the given object without the given properties.","examples":[{"tag":"example","optional":false,"description":"import { omit, assert } from '@universalweb/acid'; assert(omit({a:1, b:2}, ['a']), {b:2}); assert(omit({a:1, b:2}, 'a'), {b:2}); assert(omit({1:'test', b:2}, 1), {b:2});","source":"import { omit, assert } from \"@universalweb/acid\";\nassert(omit({ a: 1, b: 2 }, [\"a\"]), { b: 2 });\nassert(omit({ a: 1, b: 2 }, \"a\"), { b: 2 });\nassert(omit({ 1: \"test\", b: 2 }, 1), { b: 2 });\n"}],"name":"omit","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Object from which keys are extracted.","source":"* {Object} source - Object from which keys are extracted."},{"tag":"param","name":"blacklist","type":"Array|RegExp|String","optional":false,"description":"- List of property keys to omit from the returned object.","source":"* {Array|RegExp|String} blacklist - List of property keys to omit from the returned object."}],"type":"function","functionTag":"omit","returns":{"tag":"returns","name":"-","type":"Object|undefined","optional":false,"description":"A new object with the removed.","source":"* {Object|undefined} - A new object with the removed.\n\t *"}},"pick":{"category":"object","description":"Returns a clone of the source object with the plucked properties.","examples":[{"tag":"example","optional":false,"description":"import { pick, assert } from '@universalweb/acid'; assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});","source":"import { pick, assert } from \"@universalweb/acid\";\nassert(pick({ a: 1, b: 2, c: 3 }, [\"a\", \"b\"]), { a: 1, b: 2 });\n"}],"name":"pick","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Object to be cloned.","source":"* {Object} source - Object to be cloned."},{"tag":"param","name":"whitelist","type":"Array","optional":false,"description":"- Array of property names used to determine what values to pluck.","source":"* {Array} whitelist - Array of property names used to determine what values to pluck."},{"tag":"param","name":"target","type":"Object","optional":true,"description":"- Object to be populated with plucked values.","source":"* {Object} [target = {}] - Object to be populated with plucked values.","default":"{}"}],"type":"function","functionTag":"pick","returns":{"tag":"returns","name":"-","type":"Object|undefined","optional":false,"description":"A new object with plucked properties.","source":"* {Object|undefined} - A new object with plucked properties.\n\t *"}},"objectSize":{"category":"object","description":"Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.","examples":[{"tag":"example","optional":false,"description":"import { objectSize, assert } from '@universalweb/acid'; assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);","source":"import { objectSize, assert } from \"@universalweb/acid\";\nassert(objectSize({ 0: \"a\", 1: \"b\", 2: \"c\" }), 3);\n"}],"name":"objectSize","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- The source object.","source":"* {Object} source - The source object."}],"type":"function","functionTag":"objectSize","returns":{"tag":"returns","name":"-","type":"Number|undefined","optional":false,"description":"The amount of keys.","source":"* {Number|undefined} - The amount of keys.\n\t *"}},"zipObject":{"category":"object","description":"Creates an object from two arrays, one of property identifiers and one of corresponding values.","examples":[{"tag":"example","optional":false,"description":"zipObject(['a', 'b'], [1, 2]); // => { 'a': 1, 'b': 2 }","source":"zipObject([\"a\", \"b\"], [1, 2]);\n// => { 'a': 1, 'b': 2 }\n"}],"name":"zipObject","params":[{"tag":"param","name":"properties","type":"Array","optional":false,"description":"- The property identifiers.","source":"* {Array} properties - The property identifiers."},{"tag":"param","name":"values","type":"Array","optional":false,"description":"- The property values.","source":"* {Array} values - The property values."}],"type":"function","functionTag":"zipObject","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the new object.","source":"* {Object} - Returns the new object.\n\t *"}},"unZipObject":{"category":"object","description":"Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.","examples":[{"tag":"example","optional":false,"description":"unZipObject({ 'a': 1, 'b': 2 }); // => [['a', 'b'], [1, 2]]","source":"unZipObject({ a: 1, b: 2 });\n// => [['a', 'b'], [1, 2]]\n"}],"name":"unZipObject","params":[{"tag":"param","name":"object","type":"Object","optional":false,"description":"- The object to process.","source":"* {Object} object - The object to process."}],"type":"function","functionTag":"unZipObject","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns two arrays one of keys and the other of values inside a single array.","source":"* {Array} - Returns two arrays one of keys and the other of values inside a single array.\n\t *"}},"camelCase":{"category":"string","description":"Converts a string into Camel case format.","examples":[{"tag":"example","optional":false,"description":"import { camelCase, assert } from '@universalweb/acid'; assert(camelCase('camel case'), 'camelCase');","source":"import { camelCase, assert } from \"@universalweb/acid\";\nassert(camelCase(\"camel case\"), \"camelCase\");\n"}],"name":"camelCase","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be converted into Camel case.","source":"* {String} source - String to be converted into Camel case."}],"type":"function","functionTag":"camelCase","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Converted string in Camel case.","source":"* {String} - Converted string in Camel case.\n\t *"}},"kebabCase":{"category":"string","description":"Converts a string into single space sepperated words in Kebab case.","examples":[{"tag":"example","optional":false,"description":"import { kebabCase, assert } from '@universalweb/acid'; assert(kebabCase('kebab case'), 'kebab-case');","source":"import { kebabCase, assert } from \"@universalweb/acid\";\nassert(kebabCase(\"kebab case\"), \"kebab-case\");\n"}],"name":"kebabCase","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be converted into Kebab case.","source":"* {String} source - String to be converted into Kebab case."}],"type":"function","functionTag":"kebabCase","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Converted string in Kebab case.","source":"* {String} - Converted string in Kebab case.\n\t *"}},"snakeCase":{"category":"string","description":"Converts a string into single space sepperated words in snake case.","examples":[{"tag":"example","optional":false,"description":"import { snakeCase, assert } from '@universalweb/acid'; assert(snakeCase('snake case'), 'snake_case');","source":"import { snakeCase, assert } from \"@universalweb/acid\";\nassert(snakeCase(\"snake case\"), \"snake_case\");\n"}],"name":"snakeCase","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be converted into snake case.","source":"* {String} source - String to be converted into snake case."}],"type":"function","functionTag":"snakeCase","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Converted string in Snake case.","source":"* {String} - Converted string in Snake case.\n\t *"}},"upperCase":{"category":"string","description":"Converts a string into single space sepperated words in uppercase.","examples":[{"tag":"example","optional":false,"description":"import { upperCase, assert } from '@universalweb/acid'; assert(upperCase('upper-case'), 'UPPER CASE'); assert(upperCase('upper_case'), 'UPPER CASE');","source":"import { upperCase, assert } from \"@universalweb/acid\";\nassert(upperCase(\"upper-case\"), \"UPPER CASE\");\nassert(upperCase(\"upper_case\"), \"UPPER CASE\");\n"}],"name":"upperCase","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be converted into upper case.","source":"* {String} source - String to be converted into upper case."}],"type":"function","functionTag":"upperCase","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Converted string in upper case.","source":"* {String} - Converted string in upper case.\n\t *"}},"lowerCase":{"category":"string","description":"Converts a string into single space sepperated words in lowerCase.","examples":[{"tag":"example","optional":false,"description":"import { lowerCase, assert } from '@universalweb/acid'; assert(lowerCase('lower-CASE'), 'lower case');","source":"import { lowerCase, assert } from \"@universalweb/acid\";\nassert(lowerCase(\"lower-CASE\"), \"lower case\");\n"}],"name":"lowerCase","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be converted into upper case.","source":"* {String} source - String to be converted into upper case."}],"type":"function","functionTag":"lowerCase","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Converted string in upper case.","source":"* {String} - Converted string in upper case.\n\t *"}},"insertInRange":{"category":"string","description":"Inserts text into a string at a given position.","examples":[{"tag":"example","optional":false,"description":"import { insertInRange, assert } from '@universalweb/acid'; assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');","source":"import { insertInRange, assert } from \"@universalweb/acid\";\nassert(insertInRange(\"A from Lucy.\", 1, \" tab\"), \"A tab from Lucy.\");\n"}],"name":"insertInRange","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to insert the text into.","source":"* {String} string - String to insert the text into."},{"tag":"param","name":"index","type":"Number","optional":false,"description":"- Point of insertion.","source":"* {Number} index - Point of insertion."},{"tag":"param","name":"text","type":"String","optional":false,"description":"- The string to be inserted.","source":"* {String} text - The string to be inserted."}],"type":"function","functionTag":"insertInRange","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"The string with the text inserted at the given point.","source":"* {String} - The string with the text inserted at the given point.\n\t *"}},"rightString":{"category":"string","description":"Plucks a letter using the index starting from the right.","examples":[{"tag":"example","optional":false,"description":"import { rightString, assert } from '@universalweb/acid'; assert(rightString('rightString'), 'g'); assert(rightString('rightString', 2), 'n');","source":"import { rightString, assert } from \"@universalweb/acid\";\nassert(rightString(\"rightString\"), \"g\");\nassert(rightString(\"rightString\", 2), \"n\");\n"}],"name":"rightString","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to extract the letter from.","source":"* {String} string - String to extract the letter from."},{"tag":"param","name":"index","type":"Number","optional":true,"description":"- The starting position.","source":"* {Number} [index=1] - The starting position.","default":"1"}],"type":"function","functionTag":"rightString","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"A letter at the given index.","source":"* {String} - A letter at the given index.\n\t *"}},"chunkString":{"category":"string","description":"Splits up a string into chunks.","examples":[{"tag":"example","optional":false,"description":"import { chunkString, assert } from '@universalweb/acid'; assert(chunkString('chunk', 2), ['ch', 'un', 'k']);","source":"import { chunkString, assert } from \"@universalweb/acid\";\nassert(chunkString(\"chunk\", 2), [\"ch\", \"un\", \"k\"]);\n"}],"name":"chunkString","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to chunked.","source":"* {String} string - String to chunked."},{"tag":"param","name":"size","type":"Number","optional":true,"description":"- The max string length per chunk.","source":"* {Number} [size] - The max string length per chunk."}],"type":"function","functionTag":"chunkString","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with strings that are <= size parameter.","source":"* {Array} - An array with strings that are <= size parameter.\n\t *"}},"initialString":{"category":"string","description":"Truncates everything before the index starting from the right.","examples":[{"tag":"example","optional":false,"description":"import { initialString, assert } from '@universalweb/acid'; assert(initialString('initialString', 2), 'initialStri');","source":"import { initialString, assert } from \"@universalweb/acid\";\nassert(initialString(\"initialString\", 2), \"initialStri\");\n"}],"name":"initialString","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to extract the initial letters from.","source":"* {String} string - String to extract the initial letters from."},{"tag":"param","name":"index","type":"Number","optional":true,"description":"- Starting point from the right.","source":"* {Number} [index=1] - Starting point from the right.","default":"1"}],"type":"function","functionTag":"initialString","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"A string with the characters before the index starting from the right.","source":"* {String} - A string with the characters before the index starting from the right.\n\t *"}},"restString":{"category":"string","description":"Truncates everything after a index.","examples":[{"tag":"example","optional":false,"description":"import { restString, assert } from '@universalweb/acid'; assert(restString('restString', 2), 'stString');","source":"import { restString, assert } from \"@universalweb/acid\";\nassert(restString(\"restString\", 2), \"stString\");\n"}],"name":"restString","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to extract the rest of the letters from.","source":"* {String} string - String to extract the rest of the letters from."},{"tag":"param","name":"index","type":"Number","optional":true,"description":"- Starting point.","source":"* {Number} [index=1] - Starting point.","default":"1"}],"type":"function","functionTag":"restString","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"A string without the characters up-to to the index.","source":"* {String} - A string without the characters up-to to the index.\n\t *"}},"replaceList":{"category":"string","description":"Replaces all occurrences of strings in an array with a value.","examples":[{"tag":"example","optional":false,"description":"import { replaceList, assert } from '@universalweb/acid'; assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');","source":"import { replaceList, assert } from \"@universalweb/acid\";\nassert(\n replaceList(\"user name was user.\", [\"user\"], \"this\"),\n \"this name was this.\",\n);\n"}],"name":"replaceList","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be replaced.","source":"* {String} string - String to be replaced."},{"tag":"param","name":"words","type":"Array","optional":false,"description":"- Strings to replace.","source":"* {Array} words - Strings to replace."},{"tag":"param","name":"value","type":"String","optional":false,"description":"- The match replacement.","source":"* {String} value - The match replacement."}],"type":"function","functionTag":"replaceList","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"The string with the replacement.","source":"* {String} - The string with the replacement.\n\t *"}},"rawURLDecode":{"category":"string","description":"Raw URL decoder.","examples":[{"tag":"example","optional":false,"description":"import { rawURLDecode, assert } from '@universalweb/acid'; assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');","source":"import { rawURLDecode, assert } from \"@universalweb/acid\";\nassert(\n rawURLDecode(\"Lucy%20saw%20diamonds%20in%20the%20sky.\"),\n \"Lucy saw diamonds in the sky.\",\n);\n"}],"name":"rawURLDecode","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be replaced.","source":"* {String} string - String to be replaced."}],"type":"function","functionTag":"rawURLDecode","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Converted string into the decoded URI Component .","source":"* {String} - Converted string into the decoded URI Component .\n\t *"}},"htmlEntities":{"category":"string","description":"Replaced sensitive characters with their matching html entity.","examples":[{"tag":"example","optional":false,"description":"import { htmlEntities, assert } from '@universalweb/acid'; assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);","source":"import { htmlEntities, assert } from \"@universalweb/acid\";\nassert(\n htmlEntities(``),\n `<script>console.log('Lucy & diamonds.')</script>`,\n);\n"}],"name":"htmlEntities","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be replaced.","source":"* {String} string - String to be replaced."}],"type":"function","functionTag":"htmlEntities","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Replaced string.","source":"* {String} - Replaced string.\n\t *"}},"sanitize":{"category":"string","description":"Executes rawURLDecode followd by htmlEntities methods on a string.","examples":[{"tag":"example","optional":false,"description":"import { sanitize, assert } from '@universalweb/acid'; assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);","source":"import { sanitize, assert } from \"@universalweb/acid\";\nassert(\n sanitize(``),\n `<script>console.log('Lucy & diamonds.')</script>`,\n);\n"}],"name":"sanitize","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be replaced.","source":"* {String} string - String to be replaced."}],"type":"function","functionTag":"sanitize","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Replaced string.","source":"* {String} - Replaced string.\n\t *"}},"tokenize":{"category":"string","description":"Break string by non-white space characters matches.","examples":[{"tag":"example","optional":false,"description":"import { tokenize, assert } from '@universalweb/acid'; assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);","source":"import { tokenize, assert } from \"@universalweb/acid\";\nassert(tokenize(\"I am Lucy!\"), [\"I\", \"am\", \"Acid!\"]);\n"}],"name":"tokenize","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be broken up.","source":"* {String} string - String to be broken up."}],"type":"function","functionTag":"tokenize","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Array of words without white space characters.","source":"* {Array} - Array of words without white space characters.\n\t *"}},"words":{"description":"Break string into word matches.","examples":[{"tag":"example","optional":false,"description":"import { words, assert } from '@universalweb/acid'; assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);","source":"import { words, assert } from \"@universalweb/acid\";\nassert(words(\"I am Acid!\"), [\"I\", \"am\", \"Acid\"]);\n"}],"name":"words","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be broken up.","source":"* {String} string - String to be broken up."}],"type":"function","functionTag":"words","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Array of words with word characters only.","source":"* {Array} - Array of words with word characters only.\n\t *"}},"truncate":{"category":"string","description":"Truncates the string, accounting for word placement and character count.","examples":[{"tag":"example","optional":false,"description":"import { truncate, assert } from '@universalweb/acid'; assert(truncate('Where is Lucy?', 2), 'Where is');","source":"import { truncate, assert } from \"@universalweb/acid\";\nassert(truncate(\"Where is Lucy?\", 2), \"Where is\");\n"}],"name":"truncate","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be truncated.","source":"* {String} string - String to be truncated."},{"tag":"param","name":"maxLength","type":"Number","optional":false,"description":"- The desired max length of the string.","source":"* {Number} maxLength - The desired max length of the string."}],"type":"function","functionTag":"truncate","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"The mutated string.","source":"* {String} - The mutated string.\n\t *"}},"truncateRight":{"category":"string","description":"Truncates the string, accounting for word placement and character count from the right.","examples":[{"tag":"example","optional":false,"description":"import { truncateRight, assert } from '@universalweb/acid'; assert(truncateRight('Where is Lucy?', 6), 'Lucy?');","source":"import { truncateRight, assert } from \"@universalweb/acid\";\nassert(truncateRight(\"Where is Lucy?\", 6), \"Lucy?\");\n"}],"name":"truncateRight","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be truncated.","source":"* {String} string - String to be truncated."},{"tag":"param","name":"maxLength","type":"Number","optional":false,"description":"- The desired max length of the string.","source":"* {Number} maxLength - The desired max length of the string."}],"type":"function","functionTag":"truncateRight","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"The mutated string.","source":"* {String} - The mutated string.\n\t *"}},"upperFirstLetter":{"category":"string","description":"Returns the first letter capitalized.","examples":[{"tag":"example","optional":false,"description":"import { upperFirstLetter, assert } from '@universalweb/acid'; assert(upperFirstLetter('upper'), 'U');","source":"import { upperFirstLetter, assert } from \"@universalweb/acid\";\nassert(upperFirstLetter(\"upper\"), \"U\");\n"}],"name":"upperFirstLetter","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to extract first letter from.","source":"* {String} string - String to extract first letter from."}],"type":"function","functionTag":"upperFirstLetter","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"An upper case letter.","source":"* {String} - An upper case letter.\n\t *"}},"upperFirst":{"category":"string","description":"Capitalizes the first letter.","examples":[{"tag":"example","optional":false,"description":"import { upperFirst, assert } from '@universalweb/acid'; assert(upperFirstLetter('upper'), 'U'); upperFirst('upper'); // => 'Upper'","source":"import { upperFirst, assert } from \"@universalweb/acid\";\nassert(upperFirstLetter(\"upper\"), \"U\");\nupperFirst(\"upper\");\n// => 'Upper'\n"}],"name":"upperFirst","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be mutated.","source":"* {String} string - String to be mutated."}],"type":"function","functionTag":"upperFirst","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"String with first letter capitalized.","source":"* {String} - String with first letter capitalized.\n\t *"}},"upperFirstOnly":{"category":"string","description":"Capitalize first letter and lower case the rest.","examples":[{"tag":"example","optional":false,"description":"import { upperFirstOnly, assert } from '@universalweb/acid'; assert(upperFirstOnly('upper'), 'Upper');","source":"import { upperFirstOnly, assert } from \"@universalweb/acid\";\nassert(upperFirstOnly(\"upper\"), \"Upper\");\n"}],"name":"upperFirstOnly","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be mutated.","source":"* {String} string - String to be mutated."}],"type":"function","functionTag":"upperFirstOnly","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"String with first letter capitalized.","source":"* {String} - String with first letter capitalized.\n\t *"}},"upperFirstAll":{"category":"string","description":"Capitalize all first letters.","examples":[{"tag":"example","optional":false,"description":"import { upperFirstAll, assert } from '@universalweb/acid'; assert(upperFirstAll('uPPer'), 'UPPer');","source":"import { upperFirstAll, assert } from \"@universalweb/acid\";\nassert(upperFirstAll(\"uPPer\"), \"UPPer\");\n"}],"name":"upperFirstAll","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be mutated.","source":"* {String} string - String to be mutated."}],"type":"function","functionTag":"upperFirstAll","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"String with all first letters capitalized.","source":"* {String} - String with all first letters capitalized.\n\t *"}},"upperFirstOnlyAll":{"category":"string","description":"Capitalize all first letters and lower case the rest.","examples":[{"tag":"example","optional":false,"description":"import { upperFirstOnlyAll, assert } from '@universalweb/acid'; assert(upperFirstOnlyAll('this is'), 'This Is');","source":"import { upperFirstOnlyAll, assert } from \"@universalweb/acid\";\nassert(upperFirstOnlyAll(\"this is\"), \"This Is\");\n"}],"name":"upperFirstOnlyAll","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be mutated.","source":"* {String} string - String to be mutated."}],"type":"function","functionTag":"upperFirstOnlyAll","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"String with all first letters capitalized.","source":"* {String} - String with all first letters capitalized.\n\t *"}},"getTypeName":{"category":"type","description":"Returns the constructor name of an object.","examples":[{"tag":"example","optional":false,"description":"import { getTypeName, assert } from '@universalweb/acid'; assert(getTypeName(1), true);","source":"import { getTypeName, assert } from \"@universalweb/acid\";\nassert(getTypeName(1), true);\n"}],"name":"getTypeName","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"getTypeName","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isArguments":{"category":"type","description":"Checks if the value is an Arguments object.","examples":[{"tag":"example","optional":false,"description":"import { isArguments, assert } from '@universalweb/acid'; assert(isArguments((function() { return arguments;})()), true); assert(isArguments([]), false);","source":"import { isArguments, assert } from \"@universalweb/acid\";\nassert(\n isArguments(\n (function () {\n return arguments;\n })(),\n ),\n true,\n);\nassert(isArguments([]), false);\n"}],"name":"isArguments","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isArguments","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isMap":{"category":"type","description":"Checks if an object or objects are a Map.","examples":[{"tag":"example","optional":false,"description":"import { isMap } from '@universalweb/acid'; isMap(new Map()); // => true","source":"import { isMap } from \"@universalweb/acid\";\nisMap(new Map());\n// => true\n"}],"name":"isMap","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isMap","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isTypedArray":{"category":"type","description":"Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.","examples":[{"tag":"example","optional":false,"description":"import { isTypedArray, assert } from '@universalweb/acid'; assert(isTypedArray([]), false); assert(isTypedArray(new Int8Array()), true);","source":"import { isTypedArray, assert } from \"@universalweb/acid\";\nassert(isTypedArray([]), false);\nassert(isTypedArray(new Int8Array()), true);\n"}],"name":"isTypedArray","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isTypedArray","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"noValue":{"category":"type","description":"Checks if an object is null or undefined.","examples":[{"tag":"example","optional":false,"description":"import { noValue, assert } from '@universalweb/acid'; assert(noValue(null), true); assert(noValue(undefined), true); assert(noValue(1), false); assert(noValue(0), false);","source":"import { noValue, assert } from \"@universalweb/acid\";\nassert(noValue(null), true);\nassert(noValue(undefined), true);\nassert(noValue(1), false);\nassert(noValue(0), false);\n"}],"name":"noValue","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"noValue","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isArrayLike":{"category":"type","description":"Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.","examples":[{"tag":"example","optional":false,"description":"import { isArrayLike, assert } from '@universalweb/acid'; assert(isArrayLike([]), true); assert(isArrayLike(2), false);","source":"import { isArrayLike, assert } from \"@universalweb/acid\";\nassert(isArrayLike([]), true);\nassert(isArrayLike(2), false);\n"}],"name":"isArrayLike","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."},{"tag":"param","name":"strictFlag","type":"*","optional":false,"description":"- Strict flag to also check to see if keys are whole intigers greater than or equal to 0.","source":"* {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0."}],"type":"function","functionTag":"isArrayLike","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isBigInt":{"category":"type","description":"Checks if an object or objects are a BigInt.","examples":[{"tag":"example","optional":false,"description":"import { isBigInt, assert } from '@universalweb/acid'; assert(isBigInt(BigInt(123)), true);","source":"import { isBigInt, assert } from \"@universalweb/acid\";\nassert(isBigInt(BigInt(123)), true);\n"}],"name":"isBigInt","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isBigInt","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isBoolean":{"category":"type","description":"Checks if the value is a Boolean.","examples":[{"tag":"example","optional":false,"description":"import { isBoolean } from '@universalweb/acid'; isBoolean(true); // => true","source":"import { isBoolean } from \"@universalweb/acid\";\nisBoolean(true);\n// => true\n"}],"name":"isBoolean","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isBoolean","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isArrayBuffer":{"category":"type","description":"Checks if an object or objects are a ArrayBuffer.","examples":[{"tag":"example","optional":false,"description":"import { isArrayBuffer, assert } from '@universalweb/acid'; assert(isArrayBuffer(new ArrayBuffer()), true);","source":"import { isArrayBuffer, assert } from \"@universalweb/acid\";\nassert(isArrayBuffer(new ArrayBuffer()), true);\n"}],"name":"isArrayBuffer","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isArrayBuffer","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isChild":{"category":"type","description":"Checks if an object is the child of another. Typically used for classes.","examples":[{"tag":"example","optional":false,"description":"import { isChild, construct, assert } from '@universalweb/acid'; class Grandparent{} class Parent extends Grandparent{} class Child extends Parent{} const child = construct(Child); assert(isChild(Child, Grandparent), true); assert(isChild(Child, Parent), false); assert(isChild(Parent, Grandparent), false); assert(isChild(child1, child3), false);","source":"import { isChild, construct, assert } from \"@universalweb/acid\";\nclass Grandparent {}\nclass Parent extends Grandparent {}\nclass Child extends Parent {}\nconst child = construct(Child);\nassert(isChild(Child, Grandparent), true);\nassert(isChild(Child, Parent), false);\nassert(isChild(Parent, Grandparent), false);\nassert(isChild(child1, child3), false);\n"}],"name":"isChild","params":[{"tag":"param","name":"sourceChild","type":"*","optional":false,"description":"- Object to be checked as the child.","source":"* {*} sourceChild - Object to be checked as the child."},{"tag":"param","name":"targetParent","type":"*","optional":false,"description":"- Object to be checked as the parent.","source":"* {*} targetParent - Object to be checked as the parent."}],"type":"function","functionTag":"isChild","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isCloneable":{"category":"type","description":"Checks if an object or objects are a structured-cloneable type.","examples":[{"tag":"example","optional":false,"description":"import { isCloneable, assert } from '@universalweb/acid'; assert(isCloneable(function (){}), false);","source":"import { isCloneable, assert } from \"@universalweb/acid\";\nassert(\n isCloneable(function () {}),\n false,\n);\n"}],"name":"isCloneable","params":[{"tag":"param","name":"source","type":"...*","optional":false,"description":"- Object to be checked.","source":"* {...*} source - Object to be checked."}],"type":"function","functionTag":"isCloneable","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isDate":{"category":"type","description":"Checks if the value is a Date.","examples":[{"tag":"example","optional":false,"description":"import { isDate, assert } from '@universalweb/acid'; assert(isDate(new Date()), true);","source":"import { isDate, assert } from \"@universalweb/acid\";\nassert(isDate(new Date()), true);\n"}],"name":"isDate","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isDate","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isEmpty":{"category":"type","description":"Checks if the value is empty.","examples":[{"tag":"example","optional":false,"description":"import { isEmpty, assert } from '@universalweb/acid'; assert(isEmpty([]), true);","source":"import { isEmpty, assert } from \"@universalweb/acid\";\nassert(isEmpty([]), true);\n"}],"name":"isEmpty","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isEmpty","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isFalse":{"category":"utility","description":"Check if a value equals false using strict comparison.","examples":[{"tag":"example","optional":false,"description":"import { isFalse, assert } from '@universalweb/acid'; assert(isFalse(1), false); assert(isFalse(true), false); assert(isFalse(false), true);","source":"import { isFalse, assert } from \"@universalweb/acid\";\nassert(isFalse(1), false);\nassert(isFalse(true), false);\nassert(isFalse(false), true);\n"}],"name":"isFalse","params":[{"tag":"param","name":"source","type":"Boolean","optional":false,"description":"- Item to compare.","source":"* {Boolean} source - Item to compare."}],"type":"function","functionTag":"isFalse","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true if the item equals false.","source":"* {Boolean} - Returns true if the item equals false.\n\t *"}},"isF32":{"category":"type","description":"Checks if an object or objects are a Float32Array.","examples":[{"tag":"example","optional":false,"description":"import { isF32, assert } from '@universalweb/acid'; assert(isF32(new Float32Array()), true);","source":"import { isF32, assert } from \"@universalweb/acid\";\nassert(isF32(new Float32Array()), true);\n"}],"name":"isF32","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isF32","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isF64":{"category":"type","description":"Checks if an object or objects are a Float64Array.","examples":[{"tag":"example","optional":false,"description":"import { isF64 } from '@universalweb/acid'; isF64(new Float64Array()); // => true","source":"import { isF64 } from \"@universalweb/acid\";\nisF64(new Float64Array());\n// => true\n"}],"name":"isF64","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isF64","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isFloat":{"category":"type","description":"Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.","examples":[{"tag":"example","optional":false,"description":"import { isFloat } from '@universalweb/acid'; isFloat(1.01); // => true","source":"import { isFloat } from \"@universalweb/acid\";\nisFloat(1.01);\n// => true\n"}],"name":"isFloat","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isFloat","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isI16":{"category":"type","description":"Checks if an object or objects are a Int16Array.","examples":[{"tag":"example","optional":false,"description":"import { isI16 } from '@universalweb/acid'; isI16(new Int16Array()); // => true","source":"import { isI16 } from \"@universalweb/acid\";\nisI16(new Int16Array());\n// => true\n"}],"name":"isI16","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isI16","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isI32":{"category":"type","description":"Checks if an object or objects are a Int32Array.","examples":[{"tag":"example","optional":false,"description":"import { isI32, assert } from '@universalweb/acid'; assert(isI32(new Int32Array()), true);","source":"import { isI32, assert } from \"@universalweb/acid\";\nassert(isI32(new Int32Array()), true);\n"}],"name":"isI32","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isI32","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isI8":{"category":"type","description":"Checks if an object or objects are a Int8Array.","examples":[{"tag":"example","optional":false,"description":"import { isInt8 } from '@universalweb/acid'; isInt8(new Int8Array()); // => true","source":"import { isInt8 } from \"@universalweb/acid\";\nisInt8(new Int8Array());\n// => true\n"}],"name":"isI8","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isI8","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isIterable":{"category":"type","description":"Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.","examples":[{"tag":"example","optional":false,"description":"import { isIterable, assert } from '@universalweb/acid'; assert(isIterable([]), true); assert(isIterable(new Int8Array()), true); assert(isIterable('test'), false);","source":"import { isIterable, assert } from \"@universalweb/acid\";\nassert(isIterable([]), true);\nassert(isIterable(new Int8Array()), true);\nassert(isIterable(\"test\"), false);\n"}],"name":"isIterable","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isIterable","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isPromise":{"category":"type","description":"Checks if an object is a promise.","examples":[{"tag":"example","optional":false,"description":"import { isPromise } from '@universalweb/acid'; isPromise(new Promise(() => {})); // => true","source":"import { isPromise } from \"@universalweb/acid\";\nisPromise(new Promise(() => {}));\n// => true\n"}],"name":"isPromise","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isPromise","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"True or false.","source":"* {Boolean} - True or false.\n\t *"}},"isKindAsync":{"category":"type","description":"Checks if an object is a kind of async object such as async function, promise, or generator.","examples":[{"tag":"example","optional":false,"description":"import { isKindAsync, assert } from '@universalweb/acid'; assert(isKindAsync(async() => {}), true);","source":"import { isKindAsync, assert } from \"@universalweb/acid\";\nassert(\n isKindAsync(async () => {}),\n true,\n);\n"}],"name":"isKindAsync","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isKindAsync","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"True or false.","source":"* {Boolean} - True or false.\n\t *"}},"isParent":{"category":"type","description":"Checks if an object is the child of another. Typically used for classes.","examples":[{"tag":"example","optional":false,"description":"import { isParent, construct, assert } from '@universalweb/acid'; class parentClass{} class otherClass{} const child1 = construct(parentClass); const child2 = construct(otherClass); assert(isParent(child1, parentClass), true); assert(isParent(child3, parentClass), false); assert(isParent(parentClass, child1), false); assert(isParent(child1, child3), false);","source":"import { isParent, construct, assert } from \"@universalweb/acid\";\nclass parentClass {}\nclass otherClass {}\nconst child1 = construct(parentClass);\nconst child2 = construct(otherClass);\nassert(isParent(child1, parentClass), true);\nassert(isParent(child3, parentClass), false);\nassert(isParent(parentClass, child1), false);\nassert(isParent(child1, child3), false);\n"}],"name":"isParent","params":[{"tag":"param","name":"sourceParent","type":"*","optional":false,"description":"- Object to be checked as the child.","source":"* {*} sourceParent - Object to be checked as the child."},{"tag":"param","name":"targetChild","type":"*","optional":false,"description":"- Object to be checked as the parent.","source":"* {*} targetChild - Object to be checked as the parent."}],"type":"function","functionTag":"isParent","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isPrimitive":{"category":"type","description":"Checks if an object is a primitive.","examples":[{"tag":"example","optional":false,"description":"import { isPrimitive, assert } from '@universalweb/acid'; assert(isPrimitive(1), true); assert(isPrimitive(() => {}), false);","source":"import { isPrimitive, assert } from \"@universalweb/acid\";\nassert(isPrimitive(1), true);\nassert(\n isPrimitive(() => {}),\n false,\n);\n"}],"name":"isPrimitive","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isPrimitive","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"True or false.","source":"* {Boolean} - True or false.\n\t *"}},"isRelated":{"category":"type","description":"Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.","examples":[{"tag":"example","optional":false,"description":"import { isRelated, construct, assert } from '@universalweb/acid'; class parentClass{} class otherClass{} const child1 = construct(parentClass); const child2 = construct(parentClass); const child3 = construct(otherClass); assert(isRelated(child1, child2), true); assert(isRelated(child1, parentClass), true); assert(isRelated(parentClass, child2), true); assert(isRelated(child1, child3), false);","source":"import { isRelated, construct, assert } from \"@universalweb/acid\";\nclass parentClass {}\nclass otherClass {}\nconst child1 = construct(parentClass);\nconst child2 = construct(parentClass);\nconst child3 = construct(otherClass);\nassert(isRelated(child1, child2), true);\nassert(isRelated(child1, parentClass), true);\nassert(isRelated(parentClass, child2), true);\nassert(isRelated(child1, child3), false);\n"}],"name":"isRelated","params":[{"tag":"param","name":"targetOne","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} targetOne - Object to be checked."},{"tag":"param","name":"targetTwo","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} targetTwo - Object to be checked."}],"type":"function","functionTag":"isRelated","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isSafeInt":{"category":"type","description":"Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.","examples":[{"tag":"example","optional":false,"description":"import { isSafeInt } from '@universalweb/acid'; isSafeInt(1.01); // => true","source":"import { isSafeInt } from \"@universalweb/acid\";\nisSafeInt(1.01);\n// => true\n"}],"name":"isSafeInt","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isSafeInt","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isTrue":{"category":"utility","description":"Check if a value equals true using strict comparison.","examples":[{"tag":"example","optional":false,"description":"import { isTrue, assert } from '@universalweb/acid'; assert(isTrue(1), false); assert(isTrue(true), true); assert(isTrue(false), false);","source":"import { isTrue, assert } from \"@universalweb/acid\";\nassert(isTrue(1), false);\nassert(isTrue(true), true);\nassert(isTrue(false), false);\n"}],"name":"isTrue","params":[{"tag":"param","name":"source","type":"Boolean","optional":false,"description":"- Item to check.","source":"* {Boolean} source - Item to check."}],"type":"function","functionTag":"isTrue","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true if the item is true.","source":"* {Boolean} - Returns true if the item is true.\n\t *"}},"isU16":{"category":"type","description":"Checks if an object or objects are a Uint16Array.","examples":[{"tag":"example","optional":false,"description":"import { isU16 } from '@universalweb/acid'; isU16(new Uint16Array()); // => true","source":"import { isU16 } from \"@universalweb/acid\";\nisU16(new Uint16Array());\n// => true\n"}],"name":"isU16","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isU16","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isU32":{"category":"type","description":"Checks if an object or objects are a Uint32Array.","examples":[{"tag":"example","optional":false,"description":"import { isU32 } from '@universalweb/acid'; isU32(new Uint32Array()); // => true","source":"import { isU32 } from \"@universalweb/acid\";\nisU32(new Uint32Array());\n// => true\n"}],"name":"isU32","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isU32","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isU8":{"category":"type","description":"Checks if an object or objects are a Uint8Array.","examples":[{"tag":"example","optional":false,"description":"import { isU8 } from '@universalweb/acid'; isU8(new Uint8Array()); // => true","source":"import { isU8 } from \"@universalweb/acid\";\nisU8(new Uint8Array());\n// => true\n"}],"name":"isU8","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isU8","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isU8C":{"category":"type","description":"Checks if an object or objects are a Uint8ClampedArray.","examples":[{"tag":"example","optional":false,"description":"import { isU8C } from '@universalweb/acid'; isU8C(new Uint8ClampedArray()); // => true","source":"import { isU8C } from \"@universalweb/acid\";\nisU8C(new Uint8ClampedArray());\n// => true\n"}],"name":"isU8C","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isU8C","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isWeakMap":{"category":"type","description":"Checks if an object or objects are a WeakMap.","examples":[{"tag":"example","optional":false,"description":"import { isWeakMap } from '@universalweb/acid'; assert(isWeakMap(new WeakMap()), true);","source":"import { isWeakMap } from \"@universalweb/acid\";\nassert(isWeakMap(new WeakMap()), true);\n"}],"name":"isWeakMap","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isWeakMap","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"isTruthy":{"category":"type","description":"Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.","examples":[{"tag":"example","optional":false,"description":"import { isTruthy, assert } from '@universalweb/acid'; assert(isTruthy(1), true); assert(isTruthy(0), false);","source":"import { isTruthy, assert } from \"@universalweb/acid\";\nassert(isTruthy(1), true);\nassert(isTruthy(0), false);\n"}],"name":"isTruthy","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Item to be isTruthy checked.","source":"* {*} source - Item to be isTruthy checked."},{"tag":"param","name":"returnIfTrue","type":"*","optional":true,"description":"- Item to be returned if item is isTruthy.","source":"* {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.","default":"true"}],"type":"function","functionTag":"isTruthy","returns":{"tag":"returns","name":"-","type":"Boolean|*","optional":false,"description":"Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.","source":"* {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n\t *"}},"isFalsy":{"category":"type","description":"Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.","examples":[{"tag":"example","optional":false,"description":"import { isFalsy, assert } from '@universalweb/acid'; assert(isFalsy(0), true); assert(isFalsy(1), false);","source":"import { isFalsy, assert } from \"@universalweb/acid\";\nassert(isFalsy(0), true);\nassert(isFalsy(1), false);\n"}],"name":"isFalsy","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Item to be isFalsy checked.","source":"* {*} source - Item to be isFalsy checked."},{"tag":"param","name":"returnIfTrue","type":"*","optional":true,"description":"- Item to be returned if item is isFalsy.","source":"* {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.","default":"true"}],"type":"function","functionTag":"isFalsy","returns":{"tag":"returns","name":"-","type":"Boolean|*","optional":false,"description":"Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.","source":"* {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n\t *"}},"ifValue":{"category":"utility","description":"If source has a value then assign it to an object or call a function.","examples":[{"tag":"example","optional":false,"description":"import { ifValue, assert } from '@universalweb/acid'; assert(ifValue(1, {}, 'a'), {a:1});","source":"import { ifValue, assert } from \"@universalweb/acid\";\nassert(ifValue(1, {}, \"a\"), { a: 1 });\n"}],"name":"ifValue","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- The source object to be hasValue checked.","source":"* {*} source - The source object to be hasValue checked."},{"tag":"param","name":"target","type":"Function|Object","optional":false,"description":"- The target which is either a function or object.","source":"* {Function|Object} target - The target which is either a function or object."},{"tag":"param","name":"optional","type":"*|String","optional":false,"description":"- If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).","source":"* {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target)."},{"tag":"param","name":"args","type":"Array","optional":false,"description":"- The args that would be used if the target is a function and is the params that is applied to the function.","source":"* {Array} args - The args that would be used if the target is a function and is the params that is applied to the function."}],"type":"function","functionTag":"ifValue","returns":{"tag":"returns","name":"The","type":"source|undefined","optional":false,"description":"source object if it passes the hasValue check.","source":"* {source|undefined} The source object if it passes the hasValue check.\n\t *"}},"notEqual":{"category":"utility","description":"Performs a deep comparison between two objects & determines if they're different using strict comparison.","examples":[{"tag":"example","optional":false,"description":"import { notEqual, assert } from '@universalweb/acid'; assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);","source":"import { notEqual, assert } from \"@universalweb/acid\";\nassert(notEqual({ a: [1, 2, 3] }, { a: [1, 3, 3] }), true);\n"}],"name":"notEqual","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Source object.","source":"* {*} source - Source object."},{"tag":"param","name":"target","type":"*","optional":false,"description":"- Object to be compared.","source":"* {*} target - Object to be compared."}],"type":"function","functionTag":"notEqual","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"jsonParse":{"category":"utility","description":"Parses JSON string with safety check for undefined.","examples":[{"tag":"example","optional":false,"description":"import { jsonParse, assert } from '@universalweb/acid'; assert(jsonParse('{a:1}'), {a:1});","source":"import { jsonParse, assert } from \"@universalweb/acid\";\nassert(jsonParse(\"{a:1}\"), { a: 1 });\n"}],"name":"jsonParse","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be parsed.","source":"* {String} source - String to be parsed."},{"tag":"param","name":"reviver","type":"Function","optional":false,"description":"- A function that prescribes how each value originally produced by parsing is transformed before being returned.","source":"* {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned."}],"type":"function","functionTag":"jsonParse","returns":{"tag":"returns","name":"-","type":"Object|undefined","optional":false,"description":"Returns the parsed object.","source":"* {Object|undefined} - Returns the parsed object.\n\t *"}},"stringify":{"category":"utility","description":"Stringify an object into a JSON string.","examples":[{"tag":"example","optional":false,"description":"import { stringify, assert } from '@universalweb/acid'; assert(stringify({a:1}), '{a:1}');","source":"import { stringify, assert } from \"@universalweb/acid\";\nassert(stringify({ a: 1 }), \"{a:1}\");\n"}],"name":"stringify","params":[{"tag":"param","name":"object","type":"Object","optional":false,"description":"- Object to Stringify.","source":"* {Object} object - Object to Stringify."}],"type":"function","functionTag":"stringify","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Returns the object as a valid JSON string.","source":"* {String} - Returns the object as a valid JSON string.\n\t *"}},"assert":{"category":"utility","description":"Check if source value matches the expected value.","examples":[{"tag":"example","optional":false,"description":"import { assert } from '@universalweb/acid'; if (!assert(1,1)) { new Error('Assert Method Failed'); }","source":"import { assert } from \"@universalweb/acid\";\nif (!assert(1, 1)) {\n new Error(\"Assert Method Failed\");\n}\n"}],"name":"assert","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- The source object to compare to.","source":"* {*} source - The source object to compare to."},{"tag":"param","name":"expected","type":"*","optional":false,"description":"- The expected result that's compared to the source.","source":"* {*} expected - The expected result that's compared to the source."},{"tag":"param","name":"options","type":"*","optional":false,"description":"- Additional options for the Error instance & unit test information.","source":"* {*} options - Additional options for the Error instance & unit test information."}],"type":"function","functionTag":"assert","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns a deep clone of an object.","source":"* {Object} - Returns a deep clone of an object.\n\t *"}},"bindAll":{"category":"utility","description":"Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.","examples":[{"tag":"example","optional":false,"description":"import { assert, bindAll } from '@universalweb/acid'; const bounded = bindAll([function () { return this;}], 'Bounded'); assert(bounded[0](), 'Bounded');","source":"import { assert, bindAll } from \"@universalweb/acid\";\nconst bounded = bindAll(\n [\n function () {\n return this;\n },\n ],\n \"Bounded\",\n);\nassert(bounded[0](), \"Bounded\");\n"}],"name":"bindAll","params":[{"tag":"param","name":"collection","type":"Object|Function|Array","optional":false,"description":"- The functions to bind.","source":"* {Object|Function|Array} collection - The functions to bind."},{"tag":"param","name":"bindThis","type":"*","optional":false,"description":"- Object to be bound to functions.","source":"* {*} bindThis - Object to be bound to functions."},{"tag":"param","name":"targetAssign","type":"Object|Function|Array","optional":false,"description":"- Object to assign newly bound functions to.","source":"* {Object|Function|Array} targetAssign - Object to assign newly bound functions to."}],"type":"function","functionTag":"bindAll","returns":{"tag":"returns","name":"-","type":"Object|Function|Array","optional":false,"description":"Returns the collection of bound functions or the assign target provided.","source":"* {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n\t *"}},"clear":{"category":"utility","description":"Clears the values out of an array, buffer, and objects like Map that have a clear method.","examples":[{"tag":"example","optional":false,"description":"import { clear, assert } from '@universalweb/acid'; assert(clear(Buffer.from([1,'B', 'Cat'])), []);","source":"import { clear, assert } from \"@universalweb/acid\";\nassert(clear(Buffer.from([1, \"B\", \"Cat\"])), []);\n"}],"name":"clear","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Takes an array to be emptied.","source":"* {Array} source - Takes an array to be emptied."}],"type":"function","functionTag":"clear","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The originally given array.","source":"* {Array} - The originally given array.\n\t *"}},"clone":{"category":"utility","description":"Creates a structured clone of an object which is a \"structured-cloneable type\".","examples":[{"tag":"example","optional":false,"description":"import { clone, assert } from '@universalweb/acid'; assert(clone({a:{b:[2]}}), {a:{b:[2]}});","source":"import { clone, assert } from \"@universalweb/acid\";\nassert(clone({ a: { b: [2] } }), { a: { b: [2] } });\n"}],"name":"clone","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Any structured-cloneable type object.","source":"* {Object} source - Any structured-cloneable type object."}],"type":"function","functionTag":"clone","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns a deep clone of an object.","source":"* {Object} - Returns a deep clone of an object.\n\t *"}},"concurrent":{"category":"utility","description":"Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.","examples":[{"tag":"example","optional":false,"description":"import { concurrent, assert } from '@universalweb/acid'; const list = []; await concurrent([async (item) => { return item; }, async (item) => { return item; }], null, 1); assert(list, [1, 1]);","source":"import { concurrent, assert } from \"@universalweb/acid\";\nconst list = [];\nawait concurrent(\n [\n async (item) => {\n return item;\n },\n async (item) => {\n return item;\n },\n ],\n null,\n 1,\n);\nassert(list, [1, 1]);\n"}],"name":"concurrent","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array of async functions that will be looped through.","source":"* {Array} source - Array of async functions that will be looped through."},{"tag":"param","name":"thisBind","type":"*","optional":false,"description":"- Object to use as the \"this\" within the function.","source":"* {*} thisBind - Object to use as the \"this\" within the function."},{"tag":"param","name":"args","type":"...*","optional":false,"description":"- Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.","source":"* {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function."}],"type":"function","isAsync":true,"functionTag":"concurrent","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"The originally given array.","source":"* {Object} - The originally given array.\n\t *"}},"compact":{"category":"utility","description":"Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.","examples":[{"tag":"example","optional":false,"description":"import { compact, assert } from '@universalweb/acid'; assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);","source":"import { compact, assert } from \"@universalweb/acid\";\nassert(compact([1, \"B\", \"Cat\", false, null, 0, \"\", undefined, NaN]), [\n 1,\n \"B\",\n \"Cat\",\n]);\n"}],"name":"compact","params":[{"tag":"param","name":"source","type":"Array|Object","optional":false,"description":"- Array or Object to be compacted.","source":"* {Array|Object} source - Array or Object to be compacted."}],"type":"function","functionTag":"compact","returns":{"tag":"returns","name":"-","type":"Array|Object","optional":false,"description":"A new object or array containing the filtered values.","source":"* {Array|Object} - A new object or array containing the filtered values.\n\t *"}},"compactMap":{"category":"utility","description":"Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { compactMap, assert } from '@universalweb/acid'; assert(compactMap({a: null, b: 2, c: 3}, (item) => { return item; }), {b: 2, c: 3});","source":"import { compactMap, assert } from \"@universalweb/acid\";\nassert(\n compactMap({ a: null, b: 2, c: 3 }, (item) => {\n return item;\n }),\n { b: 2, c: 3 },\n);\n"}],"name":"compactMap","params":[{"tag":"param","name":"source","type":"Array | object | Function","optional":false,"description":"- Object that will be looped through.","source":"* {Array | object | Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type."},{"tag":"param","name":"results","type":"Object | Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object | Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"compactMap","returns":{"tag":"returns","name":"-","type":"Array | object | Function","optional":false,"description":"A new object of the same calling object's type.","source":"* {Array | object | Function} - A new object of the same calling object's type.\n\t *"}},"forOfFilter":{"category":"utility","description":"Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"import { assert, forOfFilter } from '@universalweb/acid'; const source = {a: undefined, b: 2, c: 3}; const temp = forOfFilter(source, (item) => { return Boolean(item); }); assert(temp, {b: 2, c: 3});","source":"import { assert, forOfFilter } from \"@universalweb/acid\";\nconst source = { a: undefined, b: 2, c: 3 };\nconst temp = forOfFilter(source, (item) => {\n return Boolean(item);\n});\nassert(temp, { b: 2, c: 3 });\n"}],"name":"forOfFilter","params":[{"tag":"param","name":"source","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function|Class|Map|Set|Array} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"resultsObject","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be used to assign results else source is type cloned.","source":"* {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned."}],"type":"function","functionTag":"forOfFilter","returns":{"tag":"returns","name":"-","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"An object with mapped properties.","source":"* {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n\t *"}},"forOfFilterAsync":{"category":"utility","description":"Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"import { assert, forOfFilterAsync } from '@universalweb/acid'; const source = {a: undefined, b: 2, c: 3}; const temp = forOfFilterAsync(source, (item) => { return Boolean(item); }); assert(temp, {b: 2, c: 3});","source":"import { assert, forOfFilterAsync } from \"@universalweb/acid\";\nconst source = { a: undefined, b: 2, c: 3 };\nconst temp = forOfFilterAsync(source, (item) => {\n return Boolean(item);\n});\nassert(temp, { b: 2, c: 3 });\n"}],"name":"forOfFilterAsync","params":[{"tag":"param","name":"source","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function|Class|Map|Set|Array} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"resultsObject","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be used to assign results else source is type cloned.","source":"* {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned."}],"type":"function","functionTag":"forOfFilterAsync","returns":{"tag":"returns","name":"-","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"An object with mapped properties.","source":"* {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n\t *"}},"filter":{"category":"utility","description":"Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"import { filter, assert } from '@universalweb/acid'; assert(filter({a: false, b: true, c: true}, (item) => { return item; }), {b: true, c: true});","source":"import { filter, assert } from \"@universalweb/acid\";\nassert(\n filter({ a: false, b: true, c: true }, (item) => {\n return item;\n }),\n { b: true, c: true },\n);\n"}],"name":"filter","params":[{"tag":"param","name":"source","type":"Array | object | Function","optional":false,"description":"- Object that will be looped through.","source":"* {Array | object | Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type."},{"tag":"param","name":"results","type":"Object | Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object | Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"filter","returns":{"tag":"returns","name":"-","type":"Array | object | Function","optional":false,"description":"A new object of the same calling object's type.","source":"* {Array | object | Function} - A new object of the same calling object's type.\n\t *"}},"flow":{"category":"utility","description":"Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.","examples":[{"tag":"example","optional":false,"description":"flow(increment, increment, deduct)(0); // => 1","source":"flow(increment, increment, deduct)(0);\n// => 1\n"}],"name":"flow","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Methods to invoke.","source":"* {Array} collection - Methods to invoke."}],"type":"function","functionTag":"flow","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new composite function.","source":"* {Function} - Returns the new composite function.\n\t *"}},"flowRight":{"category":"utility","description":"This method is like flow except that it creates a function that invokes the given functions from right to left.","examples":[{"tag":"example","optional":false,"description":"flowRight(increment, increment, deduct)(0); // => 1","source":"flowRight(increment, increment, deduct)(0);\n// => 1\n"}],"name":"flowRight","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Methods to invoke.","source":"* {Array} collection - Methods to invoke."}],"type":"function","functionTag":"flowRight","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new composite function.","source":"* {Function} - Returns the new composite function.\n\t *"}},"flowAsync":{"category":"utility","description":"Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.","examples":[{"tag":"example","optional":false,"description":"flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); // => 2","source":"flowAsync(\n async (item) => {\n return increment(item);\n },\n async (item) => {\n return increment(item);\n },\n)(0);\n// => 2\n"}],"name":"flowAsync","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Methods to invoke.","source":"* {Array} collection - Methods to invoke."}],"type":"function","isAsync":true,"functionTag":"flowAsync","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new composite function.","source":"* {Function} - Returns the new composite function.\n\t *"}},"flowAsyncRight":{"category":"utility","description":"This method is like flow except that it creates a function that invokes the given functions from right to left.","examples":[{"tag":"example","optional":false,"description":"flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); // => 2","source":"flowAsyncRight(\n async (item) => {\n return increment(item);\n },\n async (item) => {\n return increment(item);\n },\n)(0);\n// => 2\n"}],"name":"flowAsyncRight","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Methods to invoke.","source":"* {Array} collection - Methods to invoke."}],"type":"function","isAsync":true,"functionTag":"flowAsyncRight","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new composite function.","source":"* {Function} - Returns the new composite function.\n\t *"}},"arraysToObject":{"category":"utility","description":"Takes all but the last item in the array.","examples":[{"tag":"example","optional":false,"description":"import { arraysToObject, assert } from '@universalweb/acid'; assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});","source":"import { arraysToObject, assert } from \"@universalweb/acid\";\nassert(arraysToObject([1, 2, 3], [\"a\", \"b\", \"c\"]), { a: 1, b: 2, c: 3 });\n"}],"name":"arraysToObject","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to have items extracted from.","source":"* {Array} source - Array to have items extracted from."},{"tag":"param","name":"properties","type":"Array","optional":false,"description":"- Array to have items extracted from.","source":"* {Array} properties - Array to have items extracted from."}],"type":"function","functionTag":"arraysToObject","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns a completely flattened array.","source":"* {Array} - Returns a completely flattened array.\n\t *"}},"has":{"category":"utility","description":"Checks if an object contains something. For basic searches.","examples":[{"tag":"example","optional":false,"description":"import { has, assert } from '@universalweb/acid'; assert(has('Hello World', 'Hello'), true); assert(has(['Hello', 'World'], 'hello'), true);","source":"import { has, assert } from \"@universalweb/acid\";\nassert(has(\"Hello World\", \"Hello\"), true);\nassert(has([\"Hello\", \"World\"], \"hello\"), true);\n"}],"name":"has","params":[{"tag":"param","name":"source","type":"Array|String|Object","optional":false,"description":"- Object to be checked.","source":"* {Array|String|Object} source - Object to be checked."},{"tag":"param","name":"search","type":"String|Array|Function|RegExp","optional":false,"description":"- Object that is being searched for.","source":"* {String|Array|Function|RegExp} search - Object that is being searched for."},{"tag":"param","name":"position","type":"Number","optional":false,"description":"- Index at which to start searching.","source":"* {Number} position - Index at which to start searching."}],"type":"function","functionTag":"has","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"hasDot":{"category":"utility","description":"Checks if the string has a '.'.","examples":[{"tag":"example","optional":false,"description":"import { hasDot, assert } from '@universalweb/acid'; assert(hasDot('test.js'), true);","source":"import { hasDot, assert } from \"@universalweb/acid\";\nassert(hasDot(\"test.js\"), true);\n"}],"name":"hasDot","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"hasDot","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"ifNotAssign":{"category":"utility","description":"Checks if a property on an object has a value. If not, it will assign a value.","examples":[{"tag":"example","optional":false,"description":"import { ifNotAssign, assert } from '@universalweb/acid'; assert(ifNotAssign({}, 'a', 1), {a:1});","source":"import { ifNotAssign, assert } from \"@universalweb/acid\";\nassert(ifNotAssign({}, \"a\", 1), { a: 1 });\n"}],"name":"ifNotAssign","params":[{"tag":"param","name":"rootObject","type":"Object","optional":false,"description":"- The object to check.","source":"* {Object} rootObject - The object to check."},{"tag":"param","name":"property","type":"String","optional":false,"description":"- The property name which is to be checked.","source":"* {String} property - The property name which is to be checked."},{"tag":"param","name":"equalThis","type":"*","optional":false,"description":"- The reassignment value for the property being checked.","source":"* {*} equalThis - The reassignment value for the property being checked."}],"type":"function","functionTag":"ifNotAssign","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the provided rootObject.","source":"* {Object} - Returns the provided rootObject.\n\t *"}},"interval":{"category":"function","description":"Create an interval timer.","examples":[{"tag":"example","optional":false,"description":"interval(() => {}, 100); // => 0","source":"interval(() => {}, 100);\n// => 0\n"}],"name":"interval","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked.","source":"* {Function} callable - The function to be invoked."},{"tag":"param","name":"time","type":"Number","optional":false,"description":"- The time in milliseconds.","source":"* {Number} time - The time in milliseconds."}],"type":"function","functionTag":"interval","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns setInterval ID.","source":"* {Object} - Returns setInterval ID.\n\t *"}},"clearIntervals":{"category":"function","description":"Clear all active interval timers.","examples":[{"tag":"example","optional":false,"description":"clearIntervals(); // => undefined","source":"clearIntervals();\n// => undefined\n"}],"name":"clearIntervals","type":"function","functionTag":"clearIntervals","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n\t *"}},"Model":{"category":"utility","description":"Returns the model with the given name.","examples":[{"tag":"example","optional":false,"description":"import { Model, model, assert } from '@universalweb/acid'; const test = new Model('test', {a: 1}); assert(model('test'), {a: 1});","source":"import { Model, model, assert } from \"@universalweb/acid\";\nconst test = new Model(\"test\", { a: 1 });\nassert(model(\"test\"), { a: 1 });\n"}],"name":"Model","params":[{"tag":"param","name":"modelName","type":"String","optional":false,"description":"- The name of the model to return.","source":"* {String} modelName - The name of the model to return."},{"tag":"param","name":"modelSource","type":"*","optional":false,"description":"- The value of the model to return.","source":"* {*} modelSource - The value of the model to return."}],"type":"function","functionTag":"Model","returns":{"tag":"returns","name":"-","type":"Model","optional":false,"description":"The model with the given name.","source":"* {Model} - The model with the given name.\n\t *"}},"model":{"category":"utility","description":"Set & Get a model.","examples":[{"tag":"example","optional":false,"description":"import { model, assert } from '@universalweb/acid'; model('test', {a: 1}); assert(model('test'), {a: 1});","source":"import { model, assert } from \"@universalweb/acid\";\nmodel(\"test\", { a: 1 });\nassert(model(\"test\"), { a: 1 });\n"}],"name":"model","params":[{"tag":"param","name":"modelName","type":"String","optional":false,"description":"- Name of the model.","source":"* {String} modelName - Name of the model."},{"tag":"param","name":"modelSource","type":"Object","optional":false,"description":"- The model object.","source":"* {Object} modelSource - The model object."}],"type":"function","functionTag":"model","returns":{"tag":"returns","name":"-","type":"Model","optional":false,"description":"Returns the associated model.","source":"* {Model} - Returns the associated model.\n\t *"}},"pair":{"category":"utility","description":"Takes the first two arguments given and returns them inside a new array.","examples":[{"tag":"example","optional":false,"description":"import { pair, assert } from '@universalweb/acid'; assert(air(1, 2), [1, 2]);","source":"import { pair, assert } from \"@universalweb/acid\";\nassert(air(1, 2), [1, 2]);\n"}],"name":"pair","params":[{"tag":"param","name":"argument1","type":"*","optional":false,"description":"- The source object.","source":"* {*} argument1 - The source object."},{"tag":"param","name":"argument2","type":"*","optional":false,"description":"- The source object.","source":"* {*} argument2 - The source object."}],"type":"function","functionTag":"pair","returns":{"tag":"returns","name":"The","type":"Array","optional":false,"description":"array which holds the pair.","source":"* {Array} The array which holds the pair.\n\t *"}},"concurrentStatus":{"category":"utility","description":"Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.","examples":[{"tag":"example","optional":false,"description":"import { concurrentStatus, assert } from '@universalweb/acid'; const tempList = []; await concurrentStatus([1, 2], async (item) => { return item; }); assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);","source":"import { concurrentStatus, assert } from \"@universalweb/acid\";\nconst tempList = [];\nawait concurrentStatus([1, 2], async (item) => {\n return item;\n});\nassert(tempList, [\n { status: \"fulfilled\", value: 1 },\n { status: \"fulfilled\", value: 2 },\n]);\n"}],"name":"concurrentStatus","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, and array length."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"concurrentStatus","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The array from Promise.allSettled.","source":"* {Array} - The array from Promise.allSettled.\n\t *"}},"promise":{"category":"utility","description":"A wrapper around the promise constructor.","examples":[{"tag":"example","optional":false,"description":"promise((a) => {}); // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}","source":"promise((a) => {});\n// => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n"}],"name":"promise","params":[{"tag":"param","name":"callback","type":"Function","optional":false,"description":"- Function to be called back.","source":"* {Function} callback - Function to be called back."}],"type":"function","functionTag":"promise","returns":{"tag":"returns","name":"-","type":"Promise","optional":false,"description":"A constructor with a callback function.).","source":"* {Promise} - A constructor with a callback function.).\n\t *"}},"propertyMatch":{"category":"utility","description":"Using a deep comparison it checks if properties of two objects using an array are equal.","examples":[{"tag":"example","optional":false,"description":"import { propertyMatch, assert } from '@universalweb/acid'; assert(propertyMatch({ a: 1, b: 2 }, { a: 1, b: 2 }, ['a', 'b']), true);","source":"import { propertyMatch, assert } from \"@universalweb/acid\";\nassert(propertyMatch({ a: 1, b: 2 }, { a: 1, b: 2 }, [\"a\", \"b\"]), true);\n"}],"name":"propertyMatch","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- The source object to compare.","source":"* {Object} source - The source object to compare."},{"tag":"param","name":"compared","type":"Object","optional":false,"description":"- Object to be compared to source.","source":"* {Object} compared - Object to be compared to source."},{"tag":"param","name":"properties","type":"Array","optional":false,"description":"- List of properties to compare defaults to keys(source).","source":"* {Array} properties - List of properties to compare defaults to keys(source)."}],"type":"function","functionTag":"propertyMatch","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns an array of properties.","source":"* {Array} - Returns an array of properties.\n\t *"}},"stubArray":{"category":"utility","description":"This method returns a new empty array.","examples":[{"tag":"example","optional":false,"description":"import { stubArray, assert } from '@universalweb/acid'; assert(stubArray(), []);","source":"import { stubArray, assert } from \"@universalweb/acid\";\nassert(stubArray(), []);\n"}],"name":"stubArray","type":"function","functionTag":"stubArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns the new empty array.","source":"* {Array} - Returns the new empty array.\n\t *"}},"stubFalse":{"category":"utility","description":"This method returns false.","examples":[{"tag":"example","optional":false,"description":"import { stubFalse, assert } from '@universalweb/acid'; assert(stubFalse(), false);","source":"import { stubFalse, assert } from \"@universalweb/acid\";\nassert(stubFalse(), false);\n"}],"name":"stubFalse","type":"function","functionTag":"stubFalse","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns false.","source":"* {Boolean} - Returns false.\n\t *"}},"stubObject":{"category":"utility","description":"This method returns a new empty object.","examples":[{"tag":"example","optional":false,"description":"import { stubObject, assert } from '@universalweb/acid'; assert(stubObject(), {});","source":"import { stubObject, assert } from \"@universalweb/acid\";\nassert(stubObject(), {});\n"}],"name":"stubObject","type":"function","functionTag":"stubObject","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the new empty object.","source":"* {Object} - Returns the new empty object.\n\t *"}},"stubString":{"category":"utility","description":"This method returns a new empty string.","examples":[{"tag":"example","optional":false,"description":"import { stubString, assert } from '@universalweb/acid'; assert(stubString(), '');","source":"import { stubString, assert } from \"@universalweb/acid\";\nassert(stubString(), \"\");\n"}],"name":"stubString","type":"function","functionTag":"stubString","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Returns the new empty string.","source":"* {String} - Returns the new empty string.\n\t *"}},"stubTrue":{"category":"utility","description":"This method returns true.","examples":[{"tag":"example","optional":false,"description":"import { stubTrue, assert } from '@universalweb/acid'; assert(stubTrue(), true);","source":"import { stubTrue, assert } from \"@universalweb/acid\";\nassert(stubTrue(), true);\n"}],"name":"stubTrue","type":"function","functionTag":"stubTrue","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true.","source":"* {Boolean} - Returns true.\n\t *"}},"timesAsync":{"category":"utility","description":"Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.","examples":[{"tag":"example","optional":false,"description":"import { timesAsync } from '@universalweb/acid'; await timesAsync(3, async (item) => { console.log(item); }); // 0 // 1 // 2 // => undefined","source":"import { timesAsync } from \"@universalweb/acid\";\nawait timesAsync(3, async (item) => {\n console.log(item);\n}); // 0 // 1 // 2\n// => undefined\n"}],"name":"timesAsync","params":[{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The amount of times to loop invoking the iteratee.","source":"* {Number} amount - The amount of times to loop invoking the iteratee."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed index and amount.","source":"* {Function} iteratee - Transformation function which is passed index and amount."}],"type":"function","isAsync":true,"functionTag":"timesAsync","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Nothing.","source":"* {undefined} - Nothing.\n\t *"}},"timesMapAsync":{"category":"array","description":"Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.","examples":[{"tag":"example","optional":false,"description":"import { timesMapAsync } from '@universalweb/acid'; await timesMapAsync(3, (item) => { return item; }); // => [0, 1, 2]","source":"import { timesMapAsync } from \"@universalweb/acid\";\nawait timesMapAsync(3, (item) => {\n return item;\n});\n// => [0, 1, 2]\n"}],"name":"timesMapAsync","params":[{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The amount of times to loop invoking the iteratee.","source":"* {Number} amount - The amount of times to loop invoking the iteratee."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed index and amount.","source":"* {Function} iteratee - Transformation function which is passed index and amount."},{"tag":"param","name":"results","type":"Array","optional":true,"description":"- Array that will have iteratee return pushed to.","source":"* {Array} [results = []] - Array that will have iteratee return pushed to.","default":"[]"}],"type":"function","isAsync":true,"functionTag":"timesMapAsync","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with iteratee's returned values.","source":"* {Array} - An array with iteratee's returned values.\n\t *"}},"toggle":{"category":"utility","description":"Performs a toggle between 2 values using a deep or strict comparison.","examples":[{"tag":"example","optional":false,"description":"import { toggle } from '@universalweb/acid'; let toggleMe = true; toggleMe = toggle(toggleMe, true, false); // => false","source":"import { toggle } from \"@universalweb/acid\";\nlet toggleMe = true;\ntoggleMe = toggle(toggleMe, true, false);\n// => false\n"}],"name":"toggle","params":[{"tag":"param","name":"value","type":"(string|number|Object|Array)","optional":false,"description":"- Strictly compared against on & off arguments.","source":"* {(string|number|Object|Array)} value - Strictly compared against on & off arguments."},{"tag":"param","name":"on","type":"(string|number|Object|Array)","optional":false,"description":"- The first object to be compared to.","source":"* {(string|number|Object|Array)} on - The first object to be compared to."},{"tag":"param","name":"off","type":"(string|number|Object|Array)","optional":false,"description":"- The second object to be compared to.","source":"* {(string|number|Object|Array)} off - The second object to be compared to."}],"type":"function","functionTag":"toggle","returns":{"tag":"returns","name":"-","type":"(string|number|Object|Array)","optional":false,"description":"The opposing value to the current.","source":"* {(string|number|Object|Array)} - The opposing value to the current.\n\t *"}},"UniqID":{"category":"utility","description":"Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.","examples":[{"tag":"example","optional":false,"description":"import { UniqID, construct, assert } from '@universalweb/acid'; const gen = construct(UniqID); assert(gen.get(), 0); assert(gen.get(), 1); gen.free(0); assert(gen.get(), 0);","source":"import { UniqID, construct, assert } from \"@universalweb/acid\";\nconst gen = construct(UniqID);\nassert(gen.get(), 0);\nassert(gen.get(), 1);\ngen.free(0);\nassert(gen.get(), 0);\n"}],"name":"UniqID","type":"class","classTag":"UniqID","returns":{"tag":"returns","name":"-","type":"UniqID","optional":false,"description":"Returns a new instance of UniqID.","source":"* {UniqID} - Returns a new instance of UniqID.\n\t *"}},"UniqID.get":{"category":"utility","description":"Generates a new ID or recycle one that is no longer used.","examples":[{"tag":"example","optional":false,"description":"import { UniqID, construct, assert } from '@universalweb/acid'; const gen = construct(UniqID); assert(gen.get(), 0);","source":"import { UniqID, construct, assert } from \"@universalweb/acid\";\nconst gen = construct(UniqID);\nassert(gen.get(), 0);\n"}],"name":"UniqID.get","type":"class","classTag":"UniqID","functionTag":"get","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns a unique id.","source":"* {Number} - Returns a unique id.\n\t\t *"}},"UniqID.free":{"category":"utility","description":"Frees an UID so that it may be recycled for later use.","examples":[{"tag":"example","optional":false,"description":"import { UniqID, construct, assert } from '@universalweb/acid'; const gen = construct(UniqID); assert(gen.get(), 0); gen.free(0); assert(gen.get(), 0);","source":"import { UniqID, construct, assert } from \"@universalweb/acid\";\nconst gen = construct(UniqID);\nassert(gen.get(), 0);\ngen.free(0);\nassert(gen.get(), 0);\n"}],"name":"UniqID.free","params":[{"tag":"param","name":"id","type":"Number","optional":false,"description":"- Number to be freed.","source":"* {Number} id - Number to be freed."}],"type":"class","classTag":"UniqID","functionTag":"free","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Nothing is returned.","source":"* {undefined} - Nothing is returned.\n\t\t *"}},"uniqID":{"category":"utility","description":"A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.","examples":[{"tag":"example","optional":false,"description":"import { uniqID, assert } from '@universalweb/acid'; assert(uniqID.get(), 0); assert(uniqID.get(), 1); uniqID.free(0); assert(uniqID.get(), 0);","source":"import { uniqID, assert } from \"@universalweb/acid\";\nassert(uniqID.get(), 0);\nassert(uniqID.get(), 1);\nuniqID.free(0);\nassert(uniqID.get(), 0);\n"}],"name":"uniqID","type":"function","functionTag":"uniqID"},"VirtualStorage":{"category":"utility","description":"Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.","examples":[{"tag":"example","optional":false,"description":"import { VirtualStorage } from '@universalweb/acid'; const myVirtualStorage = new VirtualStorage(); // => New VirtualStorage Object","source":"import { VirtualStorage } from \"@universalweb/acid\";\nconst myVirtualStorage = new VirtualStorage();\n// => New VirtualStorage Object\n"}],"name":"VirtualStorage","params":[{"tag":"param","name":"initialObject","type":"*","optional":false,"description":"- Initial object to be used as the storage object the default being a Map.","source":"* {*} initialObject - Initial object to be used as the storage object the default being a Map."}],"type":"function","functionTag":"VirtualStorage","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns a new VirtualStorage Object.","source":"* {*} - Returns a new VirtualStorage Object.\n\t *"}},"virtualStorage":{"category":"browser","description":"Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.","examples":[{"tag":"example","optional":false,"description":"import { virtualStorage, assert } from '@universalweb/acid'; const vStorage = virtualStorage(); vStorage.setItem('title', 'value'); assert(vStorage.getItem('title'), 'value');","source":"import { virtualStorage, assert } from \"@universalweb/acid\";\nconst vStorage = virtualStorage();\nvStorage.setItem(\"title\", \"value\");\nassert(vStorage.getItem(\"title\"), \"value\");\n"}],"name":"virtualStorage","params":[{"tag":"param","name":"initialObject","type":"*","optional":false,"description":"- Initial object to be used as the storage object the default being a Map.","source":"* {*} initialObject - Initial object to be used as the storage object the default being a Map."}],"type":"function","functionTag":"virtualStorage","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns a new VirtualStorage Object.","source":"* {*} - Returns a new VirtualStorage Object.\n\t *"}},"inAsync":{"category":"utility","description":"Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.","examples":[{"tag":"example","optional":false,"description":"import { inAsync, assert } from '@universalweb/acid'; const list = []; await inAsync([async (firstArgument, item, index) => { list.push(index + firstArgument.a); }, async (firstArgument, item, index) => { list.push(index); }], {a:1}); assert(list, [1, 1]);","source":"import { inAsync, assert } from \"@universalweb/acid\";\nconst list = [];\nawait inAsync(\n [\n async (firstArgument, item, index) => {\n list.push(index + firstArgument.a);\n },\n async (firstArgument, item, index) => {\n list.push(index);\n },\n ],\n { a: 1 },\n);\nassert(list, [1, 1]);\n"}],"name":"inAsync","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array of async functions that will be looped through.","source":"* {Array} source - Array of async functions that will be looped through."},{"tag":"param","name":"thisBind","type":"*","optional":false,"description":"- Object to use as the \"this\" within the function.","source":"* {*} thisBind - Object to use as the \"this\" within the function."},{"tag":"param","name":"args","type":"...*","optional":false,"description":"- Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.","source":"* {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function."}],"type":"function","isAsync":true,"functionTag":"inAsync","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"The originally given array.","source":"* {Object} - The originally given array.\n\t *"}},"inSync":{"category":"utility","description":"Invoke an array of functions.","examples":[{"tag":"example","optional":false,"description":"inSync([() => {console.log(1);}, () => {console.log(2);}]); // 1 // 2 // => undefined","source":"inSync([\n () => {\n console.log(1);\n },\n () => {\n console.log(2);\n },\n]); // 1 // 2\n// => undefined\n"}],"name":"inSync","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array of functions that will be looped through.","source":"* {Array} source - Array of functions that will be looped through."},{"tag":"param","name":"thisBind","type":"*","optional":false,"description":"- Object to use as the \"this\" within the function.","source":"* {*} thisBind - Object to use as the \"this\" within the function."},{"tag":"param","name":"args","type":"...*","optional":false,"description":"-The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.","source":"* {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function."}],"type":"function","functionTag":"inSync","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n\t *"}},"isAgent":{"category":"browser","description":"Checks to see of the browser agent has a string.","examples":[{"tag":"example","optional":false,"description":"import { isAgent, assert } from '@universalweb/acid'; assert(isAgent('NotThere'), false);","source":"import { isAgent, assert } from \"@universalweb/acid\";\nassert(isAgent(\"NotThere\"), false);\n"}],"name":"isAgent","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- The string to search for.","source":"* {String} source - The string to search for."}],"type":"function","functionTag":"isAgent","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n\t *"}},"eventAdd":{"category":"browser","description":"Attaches an event listener to a node.","examples":[{"tag":"example","optional":false,"description":"eventAdd(document.body, 'click', () => {console.log('CLICKED');}); // = > document.body","source":"eventAdd(document.body, \"click\", () => {\n console.log(\"CLICKED\");\n}); // = > document.body\n"}],"name":"eventAdd","params":[{"tag":"param","name":"node","type":"Node","optional":false,"description":"- Given node.","source":"* {Node} node - Given node."},{"tag":"param","name":"eventName","type":"String","optional":false,"description":"- A string representing the event type.","source":"* {String} eventName - A string representing the event type."},{"tag":"param","name":"callback","type":"Object|Function","optional":false,"description":"- The object which receives a notification when an event of the specified type occurs.","source":"* {Object|Function} callback - The object which receives a notification when an event of the specified type occurs."},{"tag":"param","name":"useCapture","type":"Boolean","optional":false,"description":"- The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.","source":"* {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation."}],"type":"function","functionTag":"eventAdd","returns":{"tag":"returns","name":"-","type":"Node","optional":false,"description":"Returns given node.","source":"* {Node} - Returns given node.\n\t *"}},"eventRemove":{"category":"browser","description":"Attaches an event listener to a node.","examples":[{"tag":"example","optional":false,"description":"eventRemove(document.body, () => {console.log('CLICKED');}); // = > Undefined","source":"eventRemove(document.body, () => {\n console.log(\"CLICKED\");\n}); // = > Undefined\n"}],"name":"eventRemove","params":[{"tag":"param","name":"node","type":"Node","optional":false,"description":"- Given node.","source":"* {Node} node - Given node."},{"tag":"param","name":"eventName","type":"String","optional":false,"description":"- A string representing the event type.","source":"* {String} eventName - A string representing the event type."},{"tag":"param","name":"callback","type":"Object|Function","optional":false,"description":"- The object which receives a notification when an event of the specified type occurs.","source":"* {Object|Function} callback - The object which receives a notification when an event of the specified type occurs."},{"tag":"param","name":"useCapture","type":"Boolean","optional":false,"description":"- The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.","source":"* {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation."}],"type":"function","functionTag":"eventRemove","returns":{"tag":"returns","name":"-","type":"Node","optional":false,"description":"Returns given node.","source":"* {Node} - Returns given node.\n\t *"}},"isEnter":{"category":"browser","description":"Checks if the keycode of the event is strictly equal to 13.","examples":[{"tag":"example","optional":false,"description":"isEnter('click'); // => false","source":"isEnter(\"click\");\n// => false\n"}],"name":"isEnter","params":[{"tag":"param","name":"eventObject","type":"Object","optional":false,"description":"- Object to be checked.","source":"* {Object} eventObject - Object to be checked."}],"type":"function","functionTag":"isEnter","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true if the keycode property of the object equals 13.","source":"* {Boolean} - Returns true if the keycode property of the object equals 13.\n\t *"}},"importjs":{"category":"browser","description":"Asynchronously import a js file and append it to the head node. If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity.","examples":[{"tag":"example","optional":false,"description":"importjs('core.js'); importjs('core');","source":"importjs(\"core.js\");\nimportjs(\"core\");\n"}],"name":"importjs","params":[{"tag":"param","name":"url","type":"*","optional":false,"description":"- URL of the script to import. If not \".\" is found in the file name \".js\" will be appended.","source":"* {*} url - URL of the script to import. If not \".\" is found in the file name \".js\" will be appended."}],"type":"function","isAsync":true,"functionTag":"importjs","returns":{"tag":"returns","name":"-","type":"Promise","optional":false,"description":"Returns a promise which returns a \"load\" or \"error\" event associated with the script.","source":"* {Promise} - Returns a promise which returns a \"load\" or \"error\" event associated with the script.\n\t *"}},"BrowserStorage":{"category":"browser","description":"Constructs a virtual storage container with localStorage support. BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported. If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed. BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed.","examples":[{"tag":"example","optional":false,"description":"import { BrowserStorage, construct, assert } from '@universalweb/acid'; const storageBrowserStorage = construct(BrowserStorage); storageBrowserStorage.setItem('key', 'value'); assert(storageBrowserStorage.getItem('key'), 'value');","source":"import { BrowserStorage, construct, assert } from \"@universalweb/acid\";\nconst storageBrowserStorage = construct(BrowserStorage);\nstorageBrowserStorage.setItem(\"key\", \"value\");\nassert(storageBrowserStorage.getItem(\"key\"), \"value\");\n"}],"name":"BrowserStorage","type":"class","classTag":"BrowserStorage","returns":{"tag":"returns","name":"-","type":"BrowserStorage","optional":false,"description":"Returns a new instance of BrowserStorage.","source":"* {BrowserStorage} - Returns a new instance of BrowserStorage.\n\t *"}},"BrowserStorage.setItem":{"category":"browser","description":"Save an item to a browserStorage.","examples":[{"tag":"example","optional":false,"description":"import { BrowserStorage, construct, assert } from '@universalweb/acid'; const storageBrowserStorage = construct(BrowserStorage); storageBrowserStorage.setItem('key', 'value'); assert(storageBrowserStorage.getItem('key'), 'value');","source":"import { BrowserStorage, construct, assert } from \"@universalweb/acid\";\nconst storageBrowserStorage = construct(BrowserStorage);\nstorageBrowserStorage.setItem(\"key\", \"value\");\nassert(storageBrowserStorage.getItem(\"key\"), \"value\");\n"}],"name":"BrowserStorage.setItem","params":[{"tag":"param","name":"key","type":"String","optional":false,"description":"- The key used to store the data.","source":"* {String} key - The key used to store the data."},{"tag":"param","name":"value","type":"*","optional":false,"description":"- If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.","source":"* {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify."}],"type":"class","classTag":"BrowserStorage","functionTag":"setItem","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n\t\t *"}},"BrowserStorage.getItem":{"category":"browser","description":"Get an item from a browserStorage.","examples":[{"tag":"example","optional":false,"description":"import { BrowserStorage, construct, assert } from '@universalweb/acid'; const storageBrowserStorage = construct(BrowserStorage); storageBrowserStorage.setItem('key', 'value'); assert(storageBrowserStorage.getItem('key'), 'value');","source":"import { BrowserStorage, construct, assert } from \"@universalweb/acid\";\nconst storageBrowserStorage = construct(BrowserStorage);\nstorageBrowserStorage.setItem(\"key\", \"value\");\nassert(storageBrowserStorage.getItem(\"key\"), \"value\");\n"}],"name":"BrowserStorage.getItem","params":[{"tag":"param","name":"key","type":"String","optional":false,"description":"- The key used to store the data.","source":"* {String} key - The key used to store the data."}],"type":"class","classTag":"BrowserStorage","functionTag":"getItem","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n\t\t *"}},"BrowserStorage.clear":{"category":"browser","description":"Clears all data for the browserStorage including all of localStorage if supported.","examples":[{"tag":"example","optional":false,"description":"import { BrowserStorage, construct, assert } from '@universalweb/acid'; const storageBrowserStorage = construct(BrowserStorage); storageBrowserStorage.setItem('key', 'value'); assert(storageBrowserStorage.getItem('key'), 'value'); storageBrowserStorage.clear(); assert(storageBrowserStorage.getItem('key'), undefined);","source":"import { BrowserStorage, construct, assert } from \"@universalweb/acid\";\nconst storageBrowserStorage = construct(BrowserStorage);\nstorageBrowserStorage.setItem(\"key\", \"value\");\nassert(storageBrowserStorage.getItem(\"key\"), \"value\");\nstorageBrowserStorage.clear();\nassert(storageBrowserStorage.getItem(\"key\"), undefined);\n"}],"name":"BrowserStorage.clear","type":"class","classTag":"BrowserStorage","functionTag":"clear","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n\t\t *"}},"BrowserStorage.removeItem":{"category":"browser","description":"Remove an item from a browserStorage.","examples":[{"tag":"example","optional":false,"description":"import { BrowserStorage, construct, assert } from '@universalweb/acid'; const storageBrowserStorage = construct(BrowserStorage); storageBrowserStorage.setItem('key', 'value'); assert(storageBrowserStorage.getItem('key'), 'value'); storageBrowserStorage.removeItem('key'); assert(storageBrowserStorage.getItem('key'), undefined);","source":"import { BrowserStorage, construct, assert } from \"@universalweb/acid\";\nconst storageBrowserStorage = construct(BrowserStorage);\nstorageBrowserStorage.setItem(\"key\", \"value\");\nassert(storageBrowserStorage.getItem(\"key\"), \"value\");\nstorageBrowserStorage.removeItem(\"key\");\nassert(storageBrowserStorage.getItem(\"key\"), undefined);\n"}],"name":"BrowserStorage.removeItem","params":[{"tag":"param","name":"key","type":"String","optional":false,"description":"- The key used to remove data.","source":"* {String} key - The key used to remove data."}],"type":"class","classTag":"BrowserStorage","functionTag":"removeItem","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n\t\t *"}},"browserStorage":{"category":"browser","description":"The browserStorage function is a factory which wraps the BrowserStorage class constructor.","examples":[{"tag":"example","optional":false,"description":"const storageBrowserStorage = browserStorage(); // => New BrowserStorage Object","source":"const storageBrowserStorage = browserStorage();\n// => New BrowserStorage Object\n"}],"name":"browserStorage","type":"function","functionTag":"browserStorage","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns a new BrowserStorage Object.","source":"* {*} - Returns a new BrowserStorage Object.\n\t *"}}}} \ No newline at end of file +window.docMap = {"categories":[{"title":"array","items":["chunk","clearArray","cloneArray","compactMapArray","compactMapAsyncArray","concurrentEachArray","difference","drop","dropRight","eachArray","eachAsyncArray","eachRight","eachRightAsync","ensureArray","everyArray","everyAsyncArray","filterArray","filterAsyncArray","first","flatten","flattenDeep","getNumberInsertIndex","initial","intersection","invokeArray","isMatchArray","largest","last","mapArray","mapAsyncArray","mapRightArray","mapWhile","partition","range","remove","removeBy","rest","right","sample","shuffle","smallest","sortNumberAscending","sortNumberDescening","take","takeRight","timesMapAsync","toArray","unZip","union","unique","untilFalseArray","untilTrueArray","whileCompactMap","whileEachArray","whileMapArray","without","xor","zip"]},{"title":"browser","items":["BrowserStorage","BrowserStorage.clear","BrowserStorage.getItem","BrowserStorage.removeItem","BrowserStorage.setItem","browserStorage","eventAdd","eventRemove","importjs","isAgent","isEnter","virtualStorage"]},{"title":"buffer","items":["clearBuffer","ensureBuffer"]},{"title":"class","items":["construct"]},{"title":"collection","items":["countBy","countKey","countWithoutKey","findIndex","findItem","getHighest","getLowest","groupBy","indexBy","invokeCollection","invokeCollectionAsync","pluck","sortCollectionAlphabetically","sortCollectionAlphabeticallyReverse","sortCollectionAscending","sortCollectionDescending"]},{"title":"file","items":["getFileExtension","getFilename","isFileCSS","isFileHTML","isFileJS","isFileJSON"]},{"title":"function","items":["after","apply","ary","before","chain","clearIntervals","clearTimers","curry","debounce","ifInvoke","interval","negate","noop","nthArg","once","over","overEvery","reArg","throttle","timer","wrap"]},{"title":"math","items":["add","deduct","divide","increment","multiply","randomFloat","remainder","subtract","subtractAll","subtractReverse","sumAll"]},{"title":"number","items":["isEven","isNegative","isNumberEqual","isNumberInRange","isNumberNotInRange","isOdd","isPositive","isZero","randomInt"]},{"title":"object","items":["assign","compactKeys","compactMapAsyncObject","compactMapObject","defProp","eachAsyncObject","eachObject","everyAsyncObject","everyObject","filterAsyncObject","filterObject","getEntries","getPropDesc","getPropNames","hasAnyKeys","hasKeys","invert","isMatchObject","isSame","keys","mapObject","mapObjectAsync","objectSize","omit","pick","pluckObject","unZipObject","zipObject"]},{"title":"regex","items":["arrayToRegex","regexSafe"]},{"title":"string","items":["camelCase","chunkString","htmlEntities","initialString","insertInRange","kebabCase","lowerCase","rawURLDecode","replaceList","restString","rightString","sanitize","snakeCase","tokenize","truncate","truncateRight","upperCase","upperFirst","upperFirstAll","upperFirstLetter","upperFirstOnly","upperFirstOnlyAll"]},{"title":"type","items":["cloneType","getType","getTypeName","hasValue","isArguments","isArray","isArrayBuffer","isArrayLike","isAsync","isBigInt","isBoolean","isBuffer","isChild","isCloneable","isConstructor","isDate","isEmpty","isF32","isF64","isFalsy","isFloat","isFunction","isGenerator","isI16","isI32","isI8","isIterable","isKindAsync","isMap","isNotArray","isNotNumber","isNotString","isNull","isNumber","isParent","isPlainObject","isPrimitive","isPromise","isRegex","isRelated","isSafeInt","isSet","isString","isTruthy","isTypedArray","isU16","isU32","isU8","isU8C","isUndefined","isWeakMap","noValue"]},{"title":"utility","items":["Model","UniqID","UniqID.free","UniqID.get","VirtualStorage","arraysToObject","assert","bindAll","cacheNativeMethod","calcProgress","clear","clone","compact","compactMap","concurrent","concurrentStatus","each","every","filter","flow","flowAsync","flowAsyncRight","flowRight","forOfCompactMap","forOfCompactMap","forOfCompactMapAsync","forOfCompactMapAsync","forOfEvery","forOfEveryAsync","forOfFilter","forOfFilterAsync","get","has","hasDot","hasLength","ifNotAssign","ifValue","inAsync","inSync","isEqual","isFalse","isTrue","jsonParse","map","model","notEqual","pair","promise","propertyMatch","returnValue","stringify","stubArray","stubFalse","stubObject","stubString","stubTrue","times","timesAsync","timesMap","toPath","toggle","uniqID"]}],"items":{"chunk":{"category":"array","description":"Chunks an array according to a user defined number.","examples":[{"tag":"example","optional":false,"description":"import { chunk, assert } from '@universalweb/acid'; assert(chunk([1,2,3], 1), [[1],[2],[3]]);","source":"import { chunk, assert } from \"@universalweb/acid\";\nassert(chunk([1, 2, 3], 1), [[1], [2], [3]]);\n"}],"name":"chunk","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to be chunked.","source":"* {Array} array - Array to be chunked."},{"tag":"param","name":"size","type":"Number","optional":false,"description":"- Number which determines the size of each chunk.","source":"* {Number} size - Number which determines the size of each chunk."}],"type":"function","functionTag":"chunk","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"A chunked version of the source array.","source":"* {Array} - A chunked version of the source array.\n *"}},"clearArray":{"category":"array","description":"Clears the values out of an array.","examples":[{"tag":"example","optional":false,"description":"import { clearArray, assert } from '@universalweb/acid'; assert(clearArray([1,'B', 'Cat']), []);","source":"import { clearArray, assert } from \"@universalweb/acid\";\nassert(clearArray([1, \"B\", \"Cat\"]), []);\n"}],"name":"clearArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Takes an array to be emptied.","source":"* {Array} source - Takes an array to be emptied."}],"type":"function","functionTag":"clearArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The originally given array.","source":"* {Array} - The originally given array.\n *"}},"cloneArray":{"category":"array","description":"Clone an array (uses .slice()) and assign the source arrays values to the new array.","examples":[{"tag":"example","optional":false,"description":"import { cloneArray, assert } from '@universalweb/acid'; assert(cloneArray([1,'B', 'Cat']), [1, 'B', 'Cat']);","source":"import { cloneArray, assert } from \"@universalweb/acid\";\nassert(cloneArray([1, \"B\", \"Cat\"]), [1, \"B\", \"Cat\"]);\n"}],"name":"cloneArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The array to be quick cloned.","source":"* {Array} source - The array to be quick cloned."}],"type":"function","functionTag":"cloneArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The newly cloned array with assigned items.","source":"* {Array} - The newly cloned array with assigned items.\n *"}},"isUndefined":{"category":"type","description":"Checks if the value is undefined.","examples":[{"tag":"example","optional":false,"description":"import { isUndefined, assert } from '@universalweb/acid'; assert(isUndefined(undefined), true);","source":"import { isUndefined, assert } from \"@universalweb/acid\";\nassert(isUndefined(undefined), true);\n"}],"name":"isUndefined","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isUndefined","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"hasLength":{"category":"utility","description":"Checks if the value has length greater than 0.","examples":[{"tag":"example","optional":false,"description":"import { hasLength, assert } from '@universalweb/acid'; assert(hasLength([1]), true);","source":"import { hasLength, assert } from \"@universalweb/acid\";\nassert(hasLength([1]), true);\n"}],"name":"hasLength","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"hasLength","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isNull":{"category":"type","description":"Checks if the value is null.","examples":[{"tag":"example","optional":false,"description":"import { isNull, assert } from '@universalweb/acid'; assert(isNull(null), true);","source":"import { isNull, assert } from \"@universalweb/acid\";\nassert(isNull(null), true);\n"}],"name":"isNull","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isNull","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"hasValue":{"category":"type","description":"Checks if the value is not null or undefined.","examples":[{"tag":"example","optional":false,"description":"import { hasValue, assert } from '@universalweb/acid'; assert(hasValue(1), true);","source":"import { hasValue, assert } from \"@universalweb/acid\";\nassert(hasValue(1), true);\n"}],"name":"hasValue","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"hasValue","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"returnValue":{"category":"utility","description":"A simple function which returns the value it's given.","name":"returnValue","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- The source object.","source":"* {*} source - The source object."}],"type":"function","functionTag":"returnValue","returns":{"tag":"returns","name":"The","type":"source","optional":false,"description":"source object.","source":"* {source} The source object.\n */"}},"eachArray":{"category":"array","description":"Iterates through the given array.","examples":[{"tag":"example","optional":false,"description":"import { eachArray, assert } from '@universalweb/acid'; const list = []; eachArray([1, 2, 3], (item, index) => { list[index] = item; }); assert(list, [1, 2, 3]);","source":"import { eachArray, assert } from \"@universalweb/acid\";\nconst list = [];\neachArray([1, 2, 3], (item, index) => {\n list[index] = item;\n});\nassert(list, [1, 2, 3]);\n"}],"name":"eachArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, array length, and additionalArg.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg."},{"tag":"param","name":"thisBind","type":"*","optional":false,"description":"- Iteratee called with thisBind as this.","source":"* {*} thisBind - Iteratee called with thisBind as this."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"eachArray","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"The originally given array.","source":"* {Array|undefined} - The originally given array.\n *"}},"compactMapArray":{"category":"array","description":"Iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.","examples":[{"tag":"example","optional":false,"description":"import { compactMapArray, assert } from '@universalweb/acid'; assert(compactMapArray([null, 2, 3], (item) => { return item; }), [2, 3]);","source":"import { compactMapArray, assert } from \"@universalweb/acid\";\nassert(\n compactMapArray([null, 2, 3], (item) => {\n return item;\n }),\n [2, 3],\n);\n"}],"name":"compactMapArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created array, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length."},{"tag":"param","name":"results","type":"Array = []","optional":false,"description":"- Array that will be used to assign results. Default value is a new empty array.","source":"* {Array = []} results - Array that will be used to assign results. Default value is a new empty array."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} thisCall - An object to be given each time to the iteratee."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"compactMapArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with mapped properties that are not null or undefined.","source":"* {Array} - An array with mapped properties that are not null or undefined.\n *"}},"eachAsyncArray":{"category":"array","description":"Asynchronously Iterates through the given array. Each async function is awaited as to ensure synchronous order.","examples":[{"tag":"example","optional":false,"description":"import { eachAsyncArray, assert } from '@universalweb/acid'; const tempList = []; await eachAsyncArray([1, 2, 3], async (item) => { tempList.push(item); }); assert(tempList, [1, 2, 3]);","source":"import { eachAsyncArray, assert } from \"@universalweb/acid\";\nconst tempList = [];\nawait eachAsyncArray([1, 2, 3], async (item) => {\n tempList.push(item);\n});\nassert(tempList, [1, 2, 3]);\n"}],"name":"eachAsyncArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, array length, and additionalArg.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, array length, and additionalArg."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- Iteratee called with thisCall as this.","source":"* {*} thisCall - Iteratee called with thisCall as this."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","isAsync":true,"functionTag":"eachAsyncArray","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"Returns source the originally given array.","source":"* {Array|undefined} - Returns source the originally given array.\n *"}},"compactMapAsyncArray":{"category":"array","description":"Asynchronously iterates through the calling array and creates an array with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling array.","examples":[{"tag":"example","optional":false,"description":"import { compactMapAsync, assert } from '@universalweb/acid'; assert(await compactMapAsync([1, 2, 3, null], async (item) => { return item; }), [1, 2, 3]);","source":"import { compactMapAsync, assert } from \"@universalweb/acid\";\nassert(\n await compactMapAsync([1, 2, 3, null], async (item) => {\n return item;\n }),\n [1, 2, 3],\n);\n"}],"name":"compactMapAsyncArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to be compacted.","source":"* {Array} source - Array to be compacted."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Iteratee to be performed on array.","source":"* {Function} iteratee - Iteratee to be performed on array."}],"type":"function","isAsync":true,"functionTag":"compactMapAsyncArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Array values after being put through an iterator.","source":"* {Array} - Array values after being put through an iterator.\n *"}},"isNegative":{"category":"number","description":"Checks if a number is negative & returns true or false.","examples":[{"tag":"example","optional":false,"description":"import { isNegative, assert } from '@universalweb/acid'; assert(isNegative(-1), true);","source":"import { isNegative, assert } from \"@universalweb/acid\";\nassert(isNegative(-1), true);\n"}],"name":"isNegative","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."}],"type":"function","functionTag":"isNegative","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"range":{"category":"array","description":"Create a numbered list of integers.","examples":[{"tag":"example","optional":false,"description":"import { range, assert } from '@universalweb/acid'; assert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);","source":"import { range, assert } from \"@universalweb/acid\";\nassert(range(0, 30, 5), [0, 5, 10, 15, 20, 25]);\n"}],"name":"range","params":[{"tag":"param","name":"start","type":"Number","optional":false,"description":"- Value which determines the start of the range.","source":"* {Number} start - Value which determines the start of the range."},{"tag":"param","name":"end","type":"Number","optional":false,"description":"- Value which determines the end of the range.","source":"* {Number} end - Value which determines the end of the range."},{"tag":"param","name":"step","type":"Number","optional":false,"description":"- Value used to step between integers.","source":"* {Number} step - Value used to step between integers."}],"type":"function","functionTag":"range","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array of integers.","source":"* {Array} - An array of integers.\n *"}},"isArray":{"category":"type","description":"Checks if the value is an array. This references Array.isArray.","examples":[{"tag":"example","optional":false,"description":"import { isArray, assert } from '@universalweb/acid'; assert(isArray([]), true); assert(isArray(2), false);","source":"import { isArray, assert } from \"@universalweb/acid\";\nassert(isArray([]), true);\nassert(isArray(2), false);\n"}],"name":"isArray","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isArray","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isNotArray":{"category":"type","description":"Checks if the value is not an array. This references Array.isArray.","examples":[{"tag":"example","optional":false,"description":"import { isNotArray, assert } from '@universalweb/acid'; assert(isNotArray([]), false); assert(isNotArray(2), true);","source":"import { isNotArray, assert } from \"@universalweb/acid\";\nassert(isNotArray([]), false);\nassert(isNotArray(2), true);\n"}],"name":"isNotArray","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isNotArray","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"construct":{"category":"class","description":"A function which acts like the \"new\" operator and can pass arguments. This is a safe version of the original which will error if given undefined This is useful when working with classes and prefering to avoid the new operator and it's potential side effects.","examples":[{"tag":"example","optional":false,"description":"import { construct, assert } from '@universalweb/acid'; class test { constructor(a) { return 1; } } const newClass = construct(test, [1]); assert(test, 1);","source":"import { construct, assert } from \"@universalweb/acid\";\nclass test {\n constructor(a) {\n return 1;\n }\n}\nconst newClass = construct(test, [1]);\nassert(test, 1);\n"}],"name":"construct","params":[{"tag":"param","name":"target","type":"Function","optional":false,"description":"- The target function or class.","source":"* {Function} target - The target function or class."},{"tag":"param","name":"argumentsList","type":"Array","optional":true,"description":"- An array-like object specifying the arguments with which target should be called. Default value is a new empty array.","source":"* {Array} [argumentsList =[]] - An array-like object specifying the arguments with which target should be called. Default value is a new empty array.","default":"[]"},{"tag":"param","name":"newTarget","type":"Array","optional":false,"description":"- The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target.","source":"* {Array} newTarget - The constructor whose prototype should be used. See also the new.target operator. If newTarget is not present, its value defaults to target."}],"type":"function","functionTag":"construct","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.","source":"* {*} - A new instance of target (or newTarget, if present), initialized by target as a constructor with the given argumentsList.\n *"}},"ensureArray":{"category":"array","description":"Ensures the source is an array if not the source is wrapped in a array or an empty array is returned.","examples":[{"tag":"example","optional":false,"description":"import { isArray, ensureArray, assert } from '@universalweb/acid'; assert(isArray(ensureArray('test')), ['test']);","source":"import { isArray, ensureArray, assert } from \"@universalweb/acid\";\nassert(isArray(ensureArray(\"test\")), [\"test\"]);\n"}],"name":"ensureArray","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"ensureArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns an array.","source":"* {Array} - Returns an array.\n *"}},"flattenDeep":{"category":"array","description":"Flattens an array to a single level.","examples":[{"tag":"example","optional":false,"description":"import { flattenDeep, assert } from '@universalweb/acid'; assert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);","source":"import { flattenDeep, assert } from \"@universalweb/acid\";\nassert(flattenDeep([1, [2, [3, [4]], 5]]), [1, 2, 3, 4, 5]);\n"}],"name":"flattenDeep","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to flatten.","source":"* {Array} source - Array to flatten."}],"type":"function","functionTag":"flattenDeep","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns a completely flattened array.","source":"* {Array} - Returns a completely flattened array.\n *"}},"difference":{"category":"array","description":"Checks for primitive differences between a source array to other arrays, then returns a new array containing those differences.","examples":[{"tag":"example","optional":false,"description":"import { difference, assert } from '@universalweb/acid'; assert(difference([1, 2, 3], [1, 2]), [3]);","source":"import { difference, assert } from \"@universalweb/acid\";\nassert(difference([1, 2, 3], [1, 2]), [3]);\n"}],"name":"difference","params":[{"tag":"param","name":"sources","type":"...Array","optional":false,"description":"- List of arrays to be compared.","source":"* {...Array} sources - List of arrays to be compared."}],"type":"function","functionTag":"difference","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"An array which contains the differences between the source and compare array.","source":"* {Array|undefined} - An array which contains the differences between the source and compare array.\n *"}},"drop":{"category":"array","description":"Removes all items from an array after a specified index.","examples":[{"tag":"example","optional":false,"description":"import { drop, assert } from '@universalweb/acid'; assert(drop([1, 2, 3]), [2, 3]); assert(drop([1, 2, 3], 2), [3]);","source":"import { drop, assert } from \"@universalweb/acid\";\nassert(drop([1, 2, 3]), [2, 3]);\nassert(drop([1, 2, 3], 2), [3]);\n"}],"name":"drop","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Source array.","source":"* {Array} array - Source array."},{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- Amount of items to drop from the array.","source":"* {Number} amount - Amount of items to drop from the array."},{"tag":"param","name":"upTo","type":"Number","optional":true,"description":"- Index to stop at.","source":"* {Number} [upTo = array.length] - Index to stop at.","default":"array.length"}],"type":"function","functionTag":"drop","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with all values removed after a user defined index.","source":"* {Array} - An array with all values removed after a user defined index.\n *"}},"dropRight":{"category":"array","description":"Removes all items from an array before a specified index.","examples":[{"tag":"example","optional":false,"description":"import { dropRight, assert } from '@universalweb/acid'; assert(dropRight([1, 2, 3]), [1, 2]); assert(dropRight([1, 2, 3], 2), [1]);","source":"import { dropRight, assert } from \"@universalweb/acid\";\nassert(dropRight([1, 2, 3]), [1, 2]);\nassert(dropRight([1, 2, 3], 2), [1]);\n"}],"name":"dropRight","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Source array.","source":"* {Array} array - Source array."},{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- Amount of items to drop from the array.","source":"* {Number} amount - Amount of items to drop from the array."},{"tag":"param","name":"upTo","type":"Number","optional":true,"description":"- Index to stop at.","source":"* {Number} [upTo = array.length] - Index to stop at.","default":"array.length"}],"type":"function","functionTag":"dropRight","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with all values removed before a user defined index.","source":"* {Array} - An array with all values removed before a user defined index.\n *"}},"eachRight":{"category":"array","description":"Iterates through the given array in reverse.","examples":[{"tag":"example","optional":false,"description":"import { eachRight, assert } from '@universalweb/acid'; const tempList = []; eachRight([1, 2, 3], (item) => { tempList.push(item); }); assert(tempList, [3, 2, 1]);","source":"import { eachRight, assert } from \"@universalweb/acid\";\nconst tempList = [];\neachRight([1, 2, 3], (item) => {\n tempList.push(item);\n});\nassert(tempList, [3, 2, 1]);\n"}],"name":"eachRight","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, and array length."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"eachRight","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"The originally given array.","source":"* {Array|undefined} - The originally given array.\n *"}},"eachRightAsync":{"category":"array","description":"Asynchronously Iterates through the given array in reverse. Each async function is awaited as to ensure synchronous order.","examples":[{"tag":"example","optional":false,"description":"import { eachRightAsync, assert } from '@universalweb/acid'; const tempList = []; await eachRightAsync([1, 2, 3], async (item) => { tempList.push(item); }); assert(tempList, [3, 2, 1]);","source":"import { eachRightAsync, assert } from \"@universalweb/acid\";\nconst tempList = [];\nawait eachRightAsync([1, 2, 3], async (item) => {\n tempList.push(item);\n});\nassert(tempList, [3, 2, 1]);\n"}],"name":"eachRightAsync","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, and array length."}],"type":"function","isAsync":true,"functionTag":"eachRightAsync","returns":{"tag":"returns","name":"-","type":"Object|undefined","optional":false,"description":"The originally given array.","source":"* {Object|undefined} - The originally given array.\n *"}},"everyArray":{"category":"array","description":"Iterates through the given array while the iteratee returns true else the loop exits & returns false.","examples":[{"tag":"example","optional":false,"description":"import { everyArray, assert } from '@universalweb/acid'; assert(everyArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { return item; }), false); assert(everyArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { return item; }), true);","source":"import { everyArray, assert } from \"@universalweb/acid\";\nassert(\n everyArray(\n [true, true, false],\n (item, index, source, sourceLength, additionalArgument) => {\n return item;\n },\n ),\n false,\n);\nassert(\n everyArray(\n [true, true, true],\n (item, index, source, sourceLength, additionalArgument) => {\n return item;\n },\n ),\n true,\n);\n"}],"name":"everyArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling array, and array length."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"everyArray","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"Returns true if all returns are true or false if one value returns false.","source":"* {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *"}},"everyAsyncArray":{"category":"array","description":"Iterates through the given array while the iteratee returns true else the loop exits & returns false.","examples":[{"tag":"example","optional":false,"description":"import { everyAsyncArray, assert } from '@universalweb/acid'; assert(everyAsyncArray([true, true, false], (item, index, source, sourceLength, additionalArgument) => { return item; }), false); assert(everyAsyncArray([true, true, true], (item, index, source, sourceLength, additionalArgument) => { return item; }), true);","source":"import { everyAsyncArray, assert } from \"@universalweb/acid\";\nassert(\n everyAsyncArray(\n [true, true, false],\n (item, index, source, sourceLength, additionalArgument) => {\n return item;\n },\n ),\n false,\n);\nassert(\n everyAsyncArray(\n [true, true, true],\n (item, index, source, sourceLength, additionalArgument) => {\n return item;\n },\n ),\n true,\n);\n"}],"name":"everyAsyncArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling array, and array length."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"everyAsyncArray","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"Returns true if all returns are true or false if one value returns false.","source":"* {Array|undefined} - Returns true if all returns are true or false if one value returns false.\n *"}},"filterArray":{"category":"array","description":"Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"import { filterArray, assert } from '@universalweb/acid'; assert(filterArray([false, true, true], (item) => { return item; }), [true, true]);","source":"import { filterArray, assert } from \"@universalweb/acid\";\nassert(\n filterArray([false, true, true], (item) => {\n return item;\n }),\n [true, true],\n);\n"}],"name":"filterArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created object, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results.","source":"* {Array} results - Array that will be used to assign results."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"filterArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with properties that passed the test.","source":"* {Array} - An array with properties that passed the test.\n *"}},"filterAsyncArray":{"category":"array","description":"Iterates through the calling array and creates an array with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"import { filterAsyncArray, assert } from '@universalweb/acid'; assert(filterAsyncArray([false, true, true], (item) => { return item; }), [true, true]);","source":"import { filterAsyncArray, assert } from \"@universalweb/acid\";\nassert(\n filterAsyncArray([false, true, true], (item) => {\n return item;\n }),\n [true, true],\n);\n"}],"name":"filterAsyncArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created object, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created object, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results.","source":"* {Array} results - Array that will be used to assign results."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"filterAsyncArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with properties that passed the test.","source":"* {Array} - An array with properties that passed the test.\n *"}},"first":{"category":"array","description":"Takes the first or multiple items from an array.","examples":[{"tag":"example","optional":false,"description":"import { first, assert } from '@universalweb/acid'; assert(first([1, 2, 3]), 1);","source":"import { first, assert } from \"@universalweb/acid\";\nassert(first([1, 2, 3]), 1);\n"}],"name":"first","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to extract from.","source":"* {Array} array - Array to extract from."},{"tag":"param","name":"upTo","type":"Number","optional":false,"description":"- Number which determines how many items after the first item are extracted from the array.","source":"* {Number} upTo - Number which determines how many items after the first item are extracted from the array."}],"type":"function","functionTag":"first","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns an array.","source":"* {Array} - Returns an array.\n *"}},"flatten":{"category":"array","description":"Flattens an array up to the provided level.","examples":[{"tag":"example","optional":false,"description":"import { flatten, assert } from '@universalweb/acid'; assert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);","source":"import { flatten, assert } from \"@universalweb/acid\";\nassert(flatten([1, [2, [3, [4]], 5]]), [1, 2, [3, [4]], 5]);\n"}],"name":"flatten","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to flatten.","source":"* {Array} source - Array to flatten."},{"tag":"param","name":"level","type":"Number","optional":true,"description":"- Number which determines how deep the array nest can be.","source":"* {Number} [level = 1] - Number which determines how deep the array nest can be.","default":"1"}],"type":"function","functionTag":"flatten","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"Returns an array.","source":"* {Array|undefined} - Returns an array.\n *"}},"initial":{"category":"array","description":"Takes all but the last item in the array.","examples":[{"tag":"example","optional":false,"description":"import { initial, assert } from '@universalweb/acid'; assert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);","source":"import { initial, assert } from \"@universalweb/acid\";\nassert(initial([1, 2, 3, 4, 5]), [1, 2, 3, 4]);\n"}],"name":"initial","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to have items extracted from.","source":"* {Array} array - Array to have items extracted from."}],"type":"function","functionTag":"initial","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns a completely flattened array.","source":"* {Array} - Returns a completely flattened array.\n *"}},"intersection":{"category":"array","description":"Returns an new array that is the [set intersection](http://en.wikipedia.org/wiki/Intersection_(set_theory)) of the array and the input array(s).","examples":[{"tag":"example","optional":false,"description":"import { intersection, assert } from '@universalweb/acid'; assert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);","source":"import { intersection, assert } from \"@universalweb/acid\";\nassert(intersection([1, 2, 3], [2, 3, 4]), [2, 3]);\n"}],"name":"intersection","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to compare other arrays to.","source":"* {Array} array - Array to compare other arrays to."},{"tag":"param","name":"arrays","type":"...Array","optional":false,"description":"- A variable number of arrays.","source":"* {...Array} arrays - A variable number of arrays."}],"type":"function","functionTag":"intersection","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The new array of unique values shared by all of the arrays.","source":"* {Array} - The new array of unique values shared by all of the arrays.\n *"}},"invokeArray":{"category":"array","description":"Invoke each function in the given array.","examples":[{"tag":"example","optional":false,"description":"import { invokeArray, assert } from '@universalweb/acid'; function test(arg){ return [this, arg]; } const results = invokeArray([test], 1, test); assert(results, [test, 1]);","source":"import { invokeArray, assert } from \"@universalweb/acid\";\nfunction test(arg) {\n return [this, arg];\n}\nconst results = invokeArray([test], 1, test);\nassert(results, [test, 1]);\n"}],"name":"invokeArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"additionalArg","type":"Function","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {Function} additionalArg - An object to be given each time to the iteratee."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- Iteratee called with thisCall as this.","source":"* {*} thisCall - Iteratee called with thisCall as this."}],"type":"function","functionTag":"invokeArray","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"The originally given array.","source":"* {Array|undefined} - The originally given array.\n *"}},"toPath":{"category":"utility","description":"Breaks up string into object chain list.","examples":[{"tag":"example","optional":false,"description":"import { toPath, assert } from '@universalweb/acid'; assert(toPath('post.like[2]'), ['post', 'like', '2']);","source":"import { toPath, assert } from \"@universalweb/acid\";\nassert(toPath(\"post.like[2]\"), [\"post\", \"like\", \"2\"]);\n"}],"name":"toPath","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be broken up.","source":"* {String} source - String to be broken up."}],"type":"function","functionTag":"toPath","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Array used to go through object chain.","source":"* {Array} - Array used to go through object chain.\n *"}},"get":{"category":"utility","description":"Returns property on an object.","examples":[{"tag":"example","optional":false,"description":"import { get, assert } from '@universalweb/acid'; const objectTarget = { post: { like: ['a','b','c'] } }; assert(get('post.like[2]', objectTarget), 'c');","source":"import { get, assert } from \"@universalweb/acid\";\nconst objectTarget = { post: { like: [\"a\", \"b\", \"c\"] } };\nassert(get(\"post.like[2]\", objectTarget), \"c\");\n"}],"name":"get","params":[{"tag":"param","name":"propertyString","type":"String","optional":false,"description":"- String used to retrieve properties.","source":"* {String} propertyString - String used to retrieve properties."},{"tag":"param","name":"target","type":"Object","optional":false,"description":"- Object which has a property retrieved from it.","source":"* {Object} target - Object which has a property retrieved from it."}],"type":"function","functionTag":"get","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns property from the given object.","source":"* {Object} - Returns property from the given object.\n *"}},"keys":{"category":"object","description":"Get object's keys.","examples":[{"tag":"example","optional":false,"description":"keys({a: 1, b: 2}); // => ['a', 'b']","source":"keys({ a: 1, b: 2 });\n// => ['a', 'b']\n"}],"name":"keys","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- The source object to pull keys from.","source":"* {*} source - The source object to pull keys from."}],"type":"function","functionTag":"keys","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Array of keys.","source":"* {Array} - Array of keys.\n *"}},"hasKeys":{"category":"object","description":"Checks to see if an object has all of the given property names.","examples":[{"tag":"example","optional":false,"description":"import { hasKeys, assert } from '@universalweb/acid'; assert(hasKeys({a: {b: { c: 1}}}, 'a', 'a.b', 'a.b.c'), true);","source":"import { hasKeys, assert } from \"@universalweb/acid\";\nassert(hasKeys({ a: { b: { c: 1 } } }, \"a\", \"a.b\", \"a.b.c\"), true);\n"}],"name":"hasKeys","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Source object to check for keys.","source":"* {Object} source - Source object to check for keys."},{"tag":"param","name":"properties","type":"...String","optional":false,"description":"- List of strings to check.","source":"* {...String} properties - List of strings to check."}],"type":"function","functionTag":"hasKeys","returns":{"tag":"returns","name":"-","type":"Boolean|undefined","optional":false,"description":"Returns true or false.","source":"* {Boolean|undefined} - Returns true or false.\n *"}},"hasAnyKeys":{"category":"object","description":"Checks to see if an object has any of the given property names.","examples":[{"tag":"example","optional":false,"description":"import { hasAnyKeys, assert } from '@universalweb/acid'; assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.yes'), true); assert(hasAnyKeys({a: {b: { yes : 1}}}, 'no', 'nope', 'a.b.noped'), false);","source":"import { hasAnyKeys, assert } from \"@universalweb/acid\";\nassert(hasAnyKeys({ a: { b: { yes: 1 } } }, \"no\", \"nope\", \"a.b.yes\"), true);\nassert(hasAnyKeys({ a: { b: { yes: 1 } } }, \"no\", \"nope\", \"a.b.noped\"), false);\n"}],"name":"hasAnyKeys","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Source object to check for keys.","source":"* {Object} source - Source object to check for keys."},{"tag":"param","name":"properties","type":"Array","optional":false,"description":"- List of strings to check.","source":"* {Array} properties - List of strings to check."}],"type":"function","functionTag":"hasAnyKeys","returns":{"tag":"returns","name":"-","type":"Boolean|undefined","optional":false,"description":"Returns true or false.","source":"* {Boolean|undefined} - Returns true or false.\n *"}},"isConstructor":{"category":"type","description":"Checks to see if the constructor is that of a native object.","examples":[{"tag":"example","optional":false,"description":"import { isConstructor, assert } from '@universalweb/acid'; assert(isConstructor(2, Number), true);","source":"import { isConstructor, assert } from \"@universalweb/acid\";\nassert(isConstructor(2, Number), true);\n"}],"name":"isConstructor","params":[{"tag":"param","name":"target","type":"Object","optional":false,"description":"- The object to be checked.","source":"* {Object} target - The object to be checked."},{"tag":"param","name":"source","type":"Object","optional":false,"description":"- The source constructor object.","source":"* {Object} source - The source constructor object."}],"type":"function","functionTag":"isConstructor","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the target object.","source":"* {Object} - Returns the target object.\n *"}},"isBuffer":{"category":"type","description":"Checks if an object or objects are a Buffer.","examples":[{"tag":"example","optional":false,"description":"import { isBuffer, assert } from '@universalweb/acid'; assert(isBuffer(Buffer.from('test')), true);","source":"import { isBuffer, assert } from \"@universalweb/acid\";\nassert(isBuffer(Buffer.from(\"test\")), true);\n"}],"name":"isBuffer","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isBuffer","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isPlainObject":{"category":"type","description":"Checks if the value is a plain object.","examples":[{"tag":"example","optional":false,"description":"import { isPlainObject } from '@universalweb/acid'; isPlainObject({}); // => true","source":"import { isPlainObject } from \"@universalweb/acid\";\nisPlainObject({});\n// => true\n"}],"name":"isPlainObject","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isPlainObject","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isEqual":{"category":"utility","description":"Performs a deep comparison between two objects & determines if the value is the same using strict comparison.","examples":[{"tag":"example","optional":false,"description":"import { isEqual, assert } from '@universalweb/acid'; assert(isEqual({a: [1,2,3]}, {a: [1,2,3]}), true);","source":"import { isEqual, assert } from \"@universalweb/acid\";\nassert(isEqual({ a: [1, 2, 3] }, { a: [1, 2, 3] }), true);\n"}],"name":"isEqual","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Source object.","source":"* {*} source - Source object."},{"tag":"param","name":"target","type":"*","optional":false,"description":"- Object to be compared.","source":"* {*} target - Object to be compared."}],"type":"function","functionTag":"isEqual","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isMatchArray":{"category":"array","description":"Performs a shallow strict comparison between two objects.","examples":[{"tag":"example","optional":false,"description":"import { isMatchArray, assert } from '@universalweb/acid'; assert(isMatchArray([1, 2, 3], [1, 2, 3]), true);","source":"import { isMatchArray, assert } from \"@universalweb/acid\";\nassert(isMatchArray([1, 2, 3], [1, 2, 3]), true);\n"}],"name":"isMatchArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Source object.","source":"* {Array} source - Source object."},{"tag":"param","name":"compareArray","type":"Array","optional":false,"description":"- Object to compare to source.","source":"* {Array} compareArray - Object to compare to source."}],"type":"function","functionTag":"isMatchArray","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"largest":{"category":"array","description":"Plucks the largest value from an array.","examples":[{"tag":"example","optional":false,"description":"import { largest, assert } from '@universalweb/acid'; assert(largest([1,2,3]), 3);","source":"import { largest, assert } from \"@universalweb/acid\";\nassert(largest([1, 2, 3]), 3);\n"}],"name":"largest","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array from which largest number is taken.","source":"* {Array} array - Array from which largest number is taken."}],"type":"function","functionTag":"largest","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The largest number.","source":"* {Number} - The largest number.\n *"}},"last":{"category":"array","description":"Extracts item(s) from an array starting from the last item in the array.","examples":[{"tag":"example","optional":false,"description":"import { last, assert } from '@universalweb/acid'; assert(last([1, 2, 3, 4, 5] , 2), [4, 5]);","source":"import { last, assert } from \"@universalweb/acid\";\nassert(last([1, 2, 3, 4, 5], 2), [4, 5]);\n"}],"name":"last","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to have items extracted from.","source":"* {Array} array - Array to have items extracted from."},{"tag":"param","name":"indexFrom","type":"Number","optional":true,"description":"- Value which determines how many items are extracted from the array.","source":"* {Number} [indexFrom = 0] - Value which determines how many items are extracted from the array.","default":"0"}],"type":"function","functionTag":"last","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Items from the array.","source":"* {Array} - Items from the array.\n *"}},"mapArray":{"category":"array","description":"Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array.","examples":[{"tag":"example","optional":false,"description":"import { mapArray, assert } from '@universalweb/acid'; assert(mapArray([1, 2, 3], (item) => { return item * 2; }), [2, 4, 6]);","source":"import { mapArray, assert } from \"@universalweb/acid\";\nassert(\n mapArray([1, 2, 3], (item) => {\n return item * 2;\n }),\n [2, 4, 6],\n);\n"}],"name":"mapArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created array, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results.","source":"* {Array} results - Array that will be used to assign results."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} thisCall - An object to be given each time to the iteratee."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"mapArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array of the same calling array's type.","source":"* {Array} - An array of the same calling array's type.\n *"}},"concurrentEachArray":{"category":"array","description":"Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.all on the queue returning the values from each promise. Does not await on the async iteratee.","examples":[{"tag":"example","optional":false,"description":"import { concurrentEachArray, has, assert } from '@universalweb/acid'; const results = await concurrentEachArray([1, 2, 3], async (item) => { return item * 2; }); assert(has(results, [2, 4, 6]), true);","source":"import { concurrentEachArray, has, assert } from \"@universalweb/acid\";\nconst results = await concurrentEachArray([1, 2, 3], async (item) => {\n return item * 2;\n});\nassert(has(results, [2, 4, 6]), true);\n"}],"name":"concurrentEachArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created array, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length."},{"tag":"param","name":"thisBind","type":"*","optional":false,"description":"- Object to use as the \"this\" within the function.","source":"* {*} thisBind - Object to use as the \"this\" within the function."}],"type":"function","isAsync":true,"functionTag":"concurrentEachArray","returns":{"tag":"returns","name":"-","type":"Promise|Array|undefined","optional":false,"description":"An array of the same calling array's type.","source":"* {Promise|Array|undefined} - An array of the same calling array's type.\n *"}},"mapAsyncArray":{"category":"array","description":"Asynchronously iterates through the calling array and creates an array with the results of the iteratee (invoked and awaited one at a time) on every element in the calling array. If you want things happenign in parallel, use mapAllAsyncArray.","examples":[{"tag":"example","optional":false,"description":"import { mapAsyncArray, assert } from '@universalweb/acid'; assert(await mapAsyncArray([1, 2, 3], async (item) => { return item * 2; }), [2, 4, 6]);","source":"import { mapAsyncArray, assert } from \"@universalweb/acid\";\nassert(\n await mapAsyncArray([1, 2, 3], async (item) => {\n return item * 2;\n }),\n [2, 4, 6],\n);\n"}],"name":"mapAsyncArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created array, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length."}],"type":"function","isAsync":true,"functionTag":"mapAsyncArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array of the same calling array's type.","source":"* {Array} - An array of the same calling array's type.\n *"}},"mapRightArray":{"category":"array","description":"Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array in reverse.","examples":[{"tag":"example","optional":false,"description":"import { mapRightArray, assert } from '@universalweb/acid'; assert(mapRightArray([1, 2, 3], (item) => { return item * 2; }), [6, 4, 2]);","source":"import { mapRightArray, assert } from \"@universalweb/acid\";\nassert(\n mapRightArray([1, 2, 3], (item) => {\n return item * 2;\n }),\n [6, 4, 2],\n);\n"}],"name":"mapRightArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created array, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results. Default value is a new empty array.","source":"* {Array} results - Array that will be used to assign results. Default value is a new empty array."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"mapRightArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array of the same calling array's type.","source":"* {Array} - An array of the same calling array's type.\n *"}},"mapWhile":{"category":"array","description":"Iterates through the given and creates an object with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"import { mapWhile, assert } from '@universalweb/acid'; assert(mapWhile([1, 2, 0], (item) => { return Boolean(item); }), [1, 2]);","source":"import { mapWhile, assert } from \"@universalweb/acid\";\nassert(\n mapWhile([1, 2, 0], (item) => {\n return Boolean(item);\n }),\n [1, 2],\n);\n"}],"name":"mapWhile","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, the newly created array, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, the newly created array, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results. Default value is a new empty array.","source":"* {Array} results - Array that will be used to assign results. Default value is a new empty array."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"mapWhile","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with properties that passed the test.","source":"* {Array} - An array with properties that passed the test.\n *"}},"subtract":{"category":"math","description":"Subtracts the subtrahend (second argument) from the minuend (first argument).","examples":[{"tag":"example","optional":false,"description":"import { subtract, assert } from '@universalweb/acid'; assert(subtract(3, 1), 2);","source":"import { subtract, assert } from \"@universalweb/acid\";\nassert(subtract(3, 1), 2);\n"}],"name":"subtract","params":[{"tag":"param","name":"minuend","type":"Number","optional":false,"description":"- The minuend.","source":"* {Number} minuend - The minuend."},{"tag":"param","name":"subtrahend","type":"Number","optional":false,"description":"- The subtrahend.","source":"* {Number} subtrahend - The subtrahend."}],"type":"function","functionTag":"subtract","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the difference.","source":"* {Number} - Returns the difference.\n *"}},"sortNumberAscending":{"category":"array","description":"Sorts an array of numbers in ascending order. Smallest to largest.","examples":[{"tag":"example","optional":false,"description":"import { sortNumberAscending, assert } from '@universalweb/acid'; assert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);","source":"import { sortNumberAscending, assert } from \"@universalweb/acid\";\nassert(sortNumberAscending([10, 0, 2, 1]), [0, 1, 2, 10]);\n"}],"name":"sortNumberAscending","params":[{"tag":"param","name":"numberList","type":"Array","optional":false,"description":"- Array of numbers.","source":"* {Array} numberList - Array of numbers."}],"type":"function","functionTag":"sortNumberAscending","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The array this method was called on.","source":"* {Array} - The array this method was called on.\n *"}},"partition":{"category":"array","description":"Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.","examples":[{"tag":"example","optional":false,"description":"import { partition, assert } from '@universalweb/acid'; const result = partition([ {user: 'barney', age: 36, active: false}, {user: 'fred', age: 40, active: true}, {user: 'pebbles', age: 1, active: false} ], (item) => { return item.active; }); assert(result, [{\"user\":\"fred\",\"age\":40,\"active\":true}], [{\"user\":\"barney\",\"age\":36,\"active\":false}, {\"user\":\"pebbles\",\"age\":1,\"active\":false}]);","source":"import { partition, assert } from \"@universalweb/acid\";\nconst result = partition(\n [\n { user: \"barney\", age: 36, active: false },\n { user: \"fred\", age: 40, active: true },\n { user: \"pebbles\", age: 1, active: false },\n ],\n (item) => {\n return item.active;\n },\n);\nassert(\n result,\n [{ user: \"fred\", age: 40, active: true }],\n [\n { user: \"barney\", age: 36, active: false },\n { user: \"pebbles\", age: 1, active: false },\n ],\n);\n"}],"name":"partition","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Takes an array to split.","source":"* {Array} array - Takes an array to split."},{"tag":"param","name":"predicate","type":"Function","optional":false,"description":"- Function run on each item in the array.","source":"* {Function} predicate - Function run on each item in the array."}],"type":"function","functionTag":"partition","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"One array split into two arrays.","source":"* {Array} - One array split into two arrays.\n *"}},"subtractReverse":{"category":"math","description":"Subtracts the subtrahend (first argument) from the minuend (second argument). The arguments are reversed compared to the subtract function.","examples":[{"tag":"example","optional":false,"description":"import { subtractReverse, assert } from '@universalweb/acid'; assert(subtractReverse(1, 3), 2);","source":"import { subtractReverse, assert } from \"@universalweb/acid\";\nassert(subtractReverse(1, 3), 2);\n"}],"name":"subtractReverse","params":[{"tag":"param","name":"subtrahend","type":"Number","optional":false,"description":"- The subtrahend.","source":"* {Number} subtrahend - The subtrahend."},{"tag":"param","name":"minuend","type":"Number","optional":false,"description":"- The minuend.","source":"* {Number} minuend - The minuend."}],"type":"function","functionTag":"subtractReverse","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the difference.","source":"* {Number} - Returns the difference.\n *"}},"sortNumberDescening":{"category":"array","description":"Sorts an array of numbers in descending order. Largest to smallest.","examples":[{"tag":"example","optional":false,"description":"import { sortNumberDescening, assert } from '@universalweb/acid'; assert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);","source":"import { sortNumberDescening, assert } from \"@universalweb/acid\";\nassert(sortNumberDescening([10, 0, 2, 1]), [10, 2, 1, 0]);\n"}],"name":"sortNumberDescening","params":[{"tag":"param","name":"numberList","type":"Array","optional":false,"description":"- Array of numbers.","source":"* {Array} numberList - Array of numbers."}],"type":"function","functionTag":"sortNumberDescening","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The array this method was called on.","source":"* {Array} - The array this method was called on.\n *"}},"remove":{"category":"array","description":"Removes all occurrences of the passed in items from the array and returns the array. This mutates the given array. Clone the array if you desire to avoid mutation.","examples":[{"tag":"example","optional":false,"description":"remove([1, 2, 3, 3, 4, 3, 5], 1); // => [2, 3, 3, 4, 3, 5]","source":"remove([1, 2, 3, 3, 4, 3, 5], 1);\n// => [2, 3, 3, 4, 3, 5]\n"},{"tag":"example","optional":false,"description":"remove([3, 3, 4, 5], 3, 4); // => [5]","source":"remove([3, 3, 4, 5], 3, 4);\n// => [5]\n"}],"name":"remove","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to be mutated.","source":"* {Array} array - Array to be mutated."},{"tag":"param","name":"removeThese","type":"String|Array","optional":false,"description":"- Items to remove from the array.","source":"* {String|Array} removeThese - Items to remove from the array."}],"type":"function","functionTag":"remove","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The array this method was called on.","source":"* {Array} - The array this method was called on.\n *"}},"removeBy":{"category":"array","description":"Removes items that pass the method's test. This mutates the given array. Clone the array if you desire to avoid mutation.","examples":[{"tag":"example","optional":false,"description":"removeBy([1, 2, 3, 3, 4, 3, 5], (item) => { return Boolean(item % 2);}); // => [2, 4]","source":"removeBy([1, 2, 3, 3, 4, 3, 5], (item) => {\n return Boolean(item % 2);\n});\n// => [2, 4]\n"}],"name":"removeBy","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to be mutated.","source":"* {Array} source - Array to be mutated."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Function used to check object. Return true to remove the value.","source":"* {Function} iteratee - Function used to check object. Return true to remove the value."}],"type":"function","functionTag":"removeBy","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The array this method was called on.","source":"* {Array} - The array this method was called on.\n *"}},"rest":{"category":"array","description":"Extracts all items in array except the first and last item.","examples":[{"tag":"example","optional":false,"description":"rest([1, 2, 3, 4, 5]); // => [2, 3, 4, 5]","source":"rest([1, 2, 3, 4, 5]);\n// => [2, 3, 4, 5]\n"}],"name":"rest","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array to be sliced.","source":"* {Array} array - Array to be sliced."}],"type":"function","functionTag":"rest","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns the aggregated array.","source":"* {Array} - Returns the aggregated array.\n *"}},"right":{"category":"array","description":"Get the item at the supplied index starting at the end of the array.","examples":[{"tag":"example","optional":false,"description":"right([1, 2, 3, 4, 5] , 1); // => 4","source":"right([1, 2, 3, 4, 5], 1);\n// => 4\n"}],"name":"right","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to be sliced.","source":"* {Array} source - Array to be sliced."},{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- Amount from the right.","source":"* {Number} amount - Amount from the right."}],"type":"function","functionTag":"right","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns the object at the evaluated position.","source":"* {*} - Returns the object at the evaluated position.\n *"}},"randomInt":{"category":"number","description":"Roduces a random whole number between min (included) and max (excluded). Do not use for security or encryption..","examples":[{"tag":"example","optional":false,"description":"import { randomInt, assert } from '@universalweb/acid'; assert(randomInt(10, 0), (value) => { return value > 0 && value < 10;});","source":"import { randomInt, assert } from \"@universalweb/acid\";\nassert(randomInt(10, 0), (value) => {\n return value > 0 && value < 10;\n});\n"}],"name":"randomInt","params":[{"tag":"param","name":"max","type":"Number","optional":false,"description":"- The highest possible value for the random number.","source":"* {Number} max - The highest possible value for the random number."},{"tag":"param","name":"min","type":"Number","optional":true,"description":"- Establishes lowest possible value for the random number.","source":"* {Number} [min = 0] - Establishes lowest possible value for the random number.","default":"0"}],"type":"function","functionTag":"randomInt","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns random integer between the max and min range.","source":"* {Number} - Returns random integer between the max and min range.\n *"}},"isNumberEqual":{"category":"number","description":"Checks if two numbers are the same.","examples":[{"tag":"example","optional":false,"description":"import { isNumberEqual, assert } from '@universalweb/acid'; assert(isNumberEqual(0, 0), true);","source":"import { isNumberEqual, assert } from \"@universalweb/acid\";\nassert(isNumberEqual(0, 0), true);\n"}],"name":"isNumberEqual","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."},{"tag":"param","name":"target","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} target - Number to be checked."}],"type":"function","functionTag":"isNumberEqual","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"toArray":{"category":"array","description":"The Array.from() static method creates a new, shallow-copied Array instance from an iterable or array-like object. This just has a null & undefined safety check.","examples":[{"tag":"example","optional":false,"description":"import { toArray, assert } from '@universalweb/acid'; assert(toArray(new Map([[1, 2]])), [[1, 2]]);","source":"import { toArray, assert } from \"@universalweb/acid\";\nassert(toArray(new Map([[1, 2]])), [[1, 2]]);\n"}],"name":"toArray","params":[{"tag":"param","name":"arrayLike","type":"*","optional":false,"description":"- Array like object.","source":"* {*} arrayLike - Array like object."},{"tag":"param","name":"mapFn","type":"Function","optional":false,"description":"- Function to map over the array.","source":"* {Function} mapFn - Function to map over the array."},{"tag":"param","name":"thisArg","type":"*","optional":false,"description":"- MapFn's \"this\".","source":"* {*} thisArg - MapFn's \"this\"."}],"type":"function","functionTag":"toArray","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"New array.","source":"* {Array|undefined} - New array.\n *"}},"shuffle":{"category":"array","description":"Shuffle an array and return a new array.","examples":[{"tag":"example","optional":false,"description":"import { shuffle, assert } from '@universalweb/acid'; assert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);","source":"import { shuffle, assert } from \"@universalweb/acid\";\nassert(shuffle([1, 2, 3, 4]), [3, 4, 2, 1]);\n"}],"name":"shuffle","params":[{"tag":"param","name":"target","type":"Array","optional":false,"description":"- Target Array to be shuffled.","source":"* {Array} target - Target Array to be shuffled."},{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The amount of times to shuffle the array.","source":"* {Number} amount - The amount of times to shuffle the array."}],"type":"function","functionTag":"shuffle","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with the shuffled results.","source":"* {Array} - An array with the shuffled results.\n *"}},"sample":{"category":"array","description":"Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a single random item will be returned.","examples":[{"tag":"example","optional":false,"description":"sample([1, 2, 3, 4] , 2); // => [1, 3]","source":"sample([1, 2, 3, 4], 2);\n// => [1, 3]\n"}],"name":"sample","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The array to pull sample(s) from.","source":"* {Array} source - The array to pull sample(s) from."},{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The amount of samples to take.","source":"* {Number} amount - The amount of samples to take."}],"type":"function","functionTag":"sample","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array of randomly pulled samples.","source":"* {Array} - An array of randomly pulled samples.\n *"}},"smallest":{"category":"array","description":"Plucks the smallest value from an array.","examples":[{"tag":"example","optional":false,"description":"smallest([1,2,3]); // => 1","source":"smallest([1, 2, 3]);\n// => 1\n"}],"name":"smallest","params":[{"tag":"param","name":"array","type":"Array","optional":false,"description":"- Array from which smallest number is taken.","source":"* {Array} array - Array from which smallest number is taken."}],"type":"function","functionTag":"smallest","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The smallest number.","source":"* {Number} - The smallest number.\n *"}},"getNumberInsertIndex":{"category":"array","description":"What index should the number be inserted at to keep a sorted array still sorted.","examples":[{"tag":"example","optional":false,"description":"import { getNumberInsertIndex, assert } from '@universalweb/acid'; assert(getNumberInsertIndex([30, 39, 50], 40), 1);","source":"import { getNumberInsertIndex, assert } from \"@universalweb/acid\";\nassert(getNumberInsertIndex([30, 39, 50], 40), 1);\n"}],"name":"getNumberInsertIndex","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to be checked.","source":"* {Array} source - Array to be checked."},{"tag":"param","name":"target","type":"Number","optional":false,"description":"- Number to check where to be inserted.","source":"* {Number} target - Number to check where to be inserted."}],"type":"function","functionTag":"getNumberInsertIndex","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The index at which to insert.","source":"* {Number} - The index at which to insert.\n *"}},"take":{"category":"array","description":"Returns a shallow copy of the array up to an amount.","examples":[{"tag":"example","optional":false,"description":"import { take, assert } from '@universalweb/acid'; assert(take([1,2,3], 2), [1, 2]);","source":"import { take, assert } from \"@universalweb/acid\";\nassert(take([1, 2, 3], 2), [1, 2]);\n"}],"name":"take","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The source array to take from.","source":"* {Array} source - The source array to take from."},{"tag":"param","name":"endIndex","type":"Array","optional":true,"description":"- Zero-based index before which to end extraction.","source":"* {Array} [endIndex = 1] - Zero-based index before which to end extraction.","default":"1"}],"type":"function","functionTag":"take","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The aggregated array.","source":"* {Array} - The aggregated array.\n *"}},"takeRight":{"category":"array","description":"Returns a shallow copy of the array up to an amount starting from the right.","examples":[{"tag":"example","optional":false,"description":"import { takeRight, assert } from '@universalweb/acid'; assert(takeRight([1,2,3], 2), [2, 3]);","source":"import { takeRight, assert } from \"@universalweb/acid\";\nassert(takeRight([1, 2, 3], 2), [2, 3]);\n"}],"name":"takeRight","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The source array to take right from.","source":"* {Array} source - The source array to take right from."},{"tag":"param","name":"indexRight","type":"Array","optional":true,"description":"- Zero-based index from the right to begin extraction.","source":"* {Array} [indexRight = 1] - Zero-based index from the right to begin extraction.","default":"1"}],"type":"function","functionTag":"takeRight","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The aggregated array.","source":"* {Array} - The aggregated array.\n *"}},"unique":{"category":"array","description":"Filters the array down to unique elements.","examples":[{"tag":"example","optional":false,"description":"unique([1, 2, 2, 4]); // => [1, 2, 4]","source":"unique([1, 2, 2, 4]);\n// => [1, 2, 4]\n"}],"name":"unique","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The array to be filtered.","source":"* {Array} source - The array to be filtered."},{"tag":"param","name":"isSorted","type":"Boolean","optional":false,"description":"- Flag which means the array is already sorted.","source":"* {Boolean} isSorted - Flag which means the array is already sorted."}],"type":"function","functionTag":"unique","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The filtered array.","source":"* {Array} - The filtered array.\n *"}},"union":{"category":"array","description":"Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.","examples":[{"tag":"example","optional":false,"description":"union([1,2,4], [1,2,3]); // => [1, 2, 4, 3]","source":"union([1, 2, 4], [1, 2, 3]);\n// => [1, 2, 4, 3]\n"}],"name":"union","params":[{"tag":"param","name":"arrays","type":"...Array","optional":false,"description":"- The arrays to be evaluated.","source":"* {...Array} arrays - The arrays to be evaluated."}],"type":"function","functionTag":"union","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The aggregated array.","source":"* {Array} - The aggregated array.\n *"}},"untilFalseArray":{"category":"array","description":"Loops through an array invoking an iteratee with (value, key). If the iteratee always yields true then true is returned. If and when the iteratee yields false the loop stops & false is returned.","examples":[{"tag":"example","optional":false,"description":"import { untilFalseArray, assert } from '@universalweb/acid'; assert(untilFalseArray([true, true, false], (item) => { return item; }), false); assert(untilFalseArray([true, true, true], (item) => { return item; }), true);","source":"import { untilFalseArray, assert } from \"@universalweb/acid\";\nassert(\n untilFalseArray([true, true, false], (item) => {\n return item;\n }),\n false,\n);\nassert(\n untilFalseArray([true, true, true], (item) => {\n return item;\n }),\n true,\n);\n"}],"name":"untilFalseArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The array to iterate over.","source":"* {Array} source - The array to iterate over."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item & key and expects a boolean to be returned.","source":"* {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned."}],"type":"function","functionTag":"untilFalseArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns true if all returns are true or false if one value returns false.","source":"* {Array} - Returns true if all returns are true or false if one value returns false.\n *"}},"untilTrueArray":{"category":"array","description":"Loops through an array invoking an iteratee with (value, key). If the iteratee always yields false then true is returned. If and when the iteratee yields true the loop stops & false is returned.","examples":[{"tag":"example","optional":false,"description":"import { untilTrueArray, assert } from '@universalweb/acid'; assert(untilTrueArray([true], (item) => { return item; }), false); assert(untilTrueArray([true, true, true], (item) => { return item; }), true);","source":"import { untilTrueArray, assert } from \"@universalweb/acid\";\nassert(\n untilTrueArray([true], (item) => {\n return item;\n }),\n false,\n);\nassert(\n untilTrueArray([true, true, true], (item) => {\n return item;\n }),\n true,\n);\n"}],"name":"untilTrueArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The array to iterate over.","source":"* {Array} source - The array to iterate over."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item & key and expects a boolean to be returned.","source":"* {Function} iteratee - Transformation function which is passed item & key and expects a boolean to be returned."}],"type":"function","functionTag":"untilTrueArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns true if all returns are false or false if one value returns true.","source":"* {Array} - Returns true if all returns are false or false if one value returns true.\n *"}},"whileCompactMap":{"category":"array","description":"Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object. Re-checks the length each loop.","examples":[{"tag":"example","optional":false,"description":"import { whileCompactMap, assert } from '@universalweb/acid'; assert(whileCompactMap([1, 2, 3, false, undefined, null], (item) => { return item; }), [1, 2, 3, false]);","source":"import { whileCompactMap, assert } from \"@universalweb/acid\";\nassert(\n whileCompactMap([1, 2, 3, false, undefined, null], (item) => {\n return item;\n }),\n [1, 2, 3, false],\n);\n"}],"name":"whileCompactMap","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results. Default value is a new empty array.","source":"* {Array} results - Array that will be used to assign results. Default value is a new empty array."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"whileCompactMap","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The originally given array.","source":"* {Array} - The originally given array.\n *"}},"whileEachArray":{"category":"array","description":"Iterates through the given array but re-checks the length each loop. Usefull while mutating the same array being looped over.","examples":[{"tag":"example","optional":false,"description":"import { whileEachArray, assert } from '@universalweb/acid'; const list = []; whileEachArray([1, 2, 3], (item, index) => { list[index] = item; }); assert(list, [1, 2, 3]);","source":"import { whileEachArray, assert } from \"@universalweb/acid\";\nconst list = [];\nwhileEachArray([1, 2, 3], (item, index) => {\n list[index] = item;\n});\nassert(list, [1, 2, 3]);\n"}],"name":"whileEachArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, and array length."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"whileEachArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The originally given array.","source":"* {Array} - The originally given array.\n *"}},"whileMapArray":{"category":"array","description":"Iterates through the calling array and creates an object with the results of the iteratee on every element in the calling array. Re-checks the length each loop.","examples":[{"tag":"example","optional":false,"description":"import { whileMapArray, assert } from '@universalweb/acid'; assert(whileMapArray([1, 2, 3], (item, index, source) => { if (index === 0) { source.push(4); } return item; }), [1, 2, 3, 4]);","source":"import { whileMapArray, assert } from \"@universalweb/acid\";\nassert(\n whileMapArray([1, 2, 3], (item, index, source) => {\n if (index === 0) {\n source.push(4);\n }\n return item;\n }),\n [1, 2, 3, 4],\n);\n"}],"name":"whileMapArray","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, and array length."},{"tag":"param","name":"results","type":"Array","optional":false,"description":"- Array that will be used to assign results. Default value is a new empty array.","source":"* {Array} results - Array that will be used to assign results. Default value is a new empty array."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"whileMapArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The originally given array.","source":"* {Array} - The originally given array.\n *"}},"without":{"category":"array","description":"Returns a copy of the array with all instances of the values removed.","examples":[{"tag":"example","optional":false,"description":"import { without, assert } from '@universalweb/acid'; assert(without([1, 2, 2, 4], [4]), [1, 2, 2]);","source":"import { without, assert } from \"@universalweb/acid\";\nassert(without([1, 2, 2, 4], [4]), [1, 2, 2]);\n"}],"name":"without","params":[{"tag":"param","name":"target","type":"Array","optional":false,"description":"- The target array to be filtered.","source":"* {Array} target - The target array to be filtered."},{"tag":"param","name":"sources","type":"Array","optional":false,"description":"- Items to be removed.","source":"* {Array} sources - Items to be removed."}],"type":"function","functionTag":"without","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The target array filtered.","source":"* {Array} - The target array filtered.\n *"}},"xor":{"category":"array","description":"Creates an array that is the symmetric difference of the provided arrays.","examples":[{"tag":"example","optional":false,"description":"xor([2, 1], [2, 3, 5], [6]); // => [1, 3, 5, 6]","source":"xor([2, 1], [2, 3, 5], [6]);\n// => [1, 3, 5, 6]\n"}],"name":"xor","params":[{"tag":"param","name":"sources","type":"...Array","optional":false,"description":"- The array(s) to be filtered.","source":"* {...Array} sources - The array(s) to be filtered."}],"type":"function","functionTag":"xor","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"The filtered array.","source":"* {Array|undefined} - The filtered array.\n *"}},"zip":{"category":"array","description":"Merges together the values of each of the arrays with the values at the corresponding position.","examples":[{"tag":"example","optional":false,"description":"zip(['a', 'b'], [1, 2], [true, false]); // => [['a', 1, true], ['b', 2, false]]","source":"zip([\"a\", \"b\"], [1, 2], [true, false]);\n// => [['a', 1, true], ['b', 2, false]]\n"}],"name":"zip","params":[{"tag":"param","name":"arrays","type":"Array","optional":false,"description":"- The arrays to process.","source":"* {Array} arrays - The arrays to process."}],"type":"function","functionTag":"zip","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns the new array of regrouped elements.","source":"* {Array} - Returns the new array of regrouped elements.\n *"}},"unZip":{"category":"array","description":"Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip array configuration.","examples":[{"tag":"example","optional":false,"description":"unZip([['a', 1, true], ['b', 2, false]]); // => [['a', 'b'], [1, 2], [true, false]]","source":"unZip([\n [\"a\", 1, true],\n [\"b\", 2, false],\n]);\n// => [['a', 'b'], [1, 2], [true, false]]\n"}],"name":"unZip","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- The array of grouped elements to process.","source":"* {Array} source - The array of grouped elements to process."}],"type":"function","functionTag":"unZip","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns the new array of regrouped elements.","source":"* {Array} - Returns the new array of regrouped elements.\n *"}},"ensureBuffer":{"category":"buffer","description":"Ensures the source is a Buffer if not the source is used to create a buffer using Buffer.from else if there's no source an empty Buffer is returned with Buffer.alloc(0). Keep in mind not all objects can be used to create a Buffer.","examples":[{"tag":"example","optional":false,"description":"import { isBuffer, ensureBuffer, assert } from '@universalweb/acid'; assert(isBuffer(ensureBuffer('test')), true);","source":"import { isBuffer, ensureBuffer, assert } from \"@universalweb/acid\";\nassert(isBuffer(ensureBuffer(\"test\")), true);\n"}],"name":"ensureBuffer","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"ensureBuffer","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns an array.","source":"* {Array} - Returns an array.\n *"}},"clearBuffer":{"category":"buffer","description":"Clears the values out of a buffer.","examples":[{"tag":"example","optional":false,"description":"import { clearBuffer, assert } from '@universalweb/acid'; assert(clearBuffer(Buffer.from([1,'B', 'Cat'])), Buffer.from([]));","source":"import { clearBuffer, assert } from \"@universalweb/acid\";\nassert(clearBuffer(Buffer.from([1, \"B\", \"Cat\"])), Buffer.from([]));\n"}],"name":"clearBuffer","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Takes an array to be emptied.","source":"* {Array} source - Takes an array to be emptied."}],"type":"function","functionTag":"clearBuffer","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The originally given array.","source":"* {Array} - The originally given array.\n *"}},"isFunction":{"category":"type","description":"Checks if an object or objects are a plain object.","examples":[{"tag":"example","optional":false,"description":"import { isFunction } from '@universalweb/acid'; isFunction(() => {}); // => true","source":"import { isFunction } from \"@universalweb/acid\";\nisFunction(() => {});\n// => true\n"}],"name":"isFunction","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isFunction","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isNumber":{"category":"type","description":"Checks if the value is a number.","examples":[{"tag":"example","optional":false,"description":"import { isNumber, assert } from '@universalweb/acid'; assert(isNumber(1), true);","source":"import { isNumber, assert } from \"@universalweb/acid\";\nassert(isNumber(1), true);\n"}],"name":"isNumber","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isNumber","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isNotNumber":{"category":"type","description":"Checks if the value is not a number.","examples":[{"tag":"example","optional":false,"description":"import { isNotNumber, assert } from '@universalweb/acid'; assert(isNotNumber(1), false);","source":"import { isNotNumber, assert } from \"@universalweb/acid\";\nassert(isNotNumber(1), false);\n"}],"name":"isNotNumber","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isNotNumber","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isString":{"category":"type","description":"Checks if the value is a string.","examples":[{"tag":"example","optional":false,"description":"import { isString, assert } from '@universalweb/acid'; assert(isString('hello'), true); assert(isString(1), false);","source":"import { isString, assert } from \"@universalweb/acid\";\nassert(isString(\"hello\"), true);\nassert(isString(1), false);\n"}],"name":"isString","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isString","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isNotString":{"category":"type","description":"Checks if the value is not a string.","examples":[{"tag":"example","optional":false,"description":"import { isNotString, assert } from '@universalweb/acid'; assert(isNotString(1), true); assert(isNotString('hello'), false);","source":"import { isNotString, assert } from \"@universalweb/acid\";\nassert(isNotString(1), true);\nassert(isNotString(\"hello\"), false);\n"}],"name":"isNotString","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isNotString","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"assign":{"category":"object","description":"Copy the values of all enumerable own properties from one or more source objects to a target object. However, if an object is a function it will try and use its name as the key and the function itself as the value to assign to the target object. If it's a function without a name then it will do a straight object assign. It will do the same for strings and numbers except that it will use for both the key and the value the provided string or number. It will return the target object. If a raw object.assign is needed just import objectAssign from this module.","examples":[{"tag":"example","optional":false,"description":"import { assign, assert } from '@universalweb/acid'; assert(assign({a: 1}, {b: 2}, function c() { return 3; }, 'd', 5), {a: 1, b: 2, c, d: 'd', 5: 5});","source":"import { assign, assert } from \"@universalweb/acid\";\nassert(\n assign(\n { a: 1 },\n { b: 2 },\n function c() {\n return 3;\n },\n \"d\",\n 5,\n ),\n { a: 1, b: 2, c, d: \"d\", 5: 5 },\n);\n"}],"name":"assign","params":[{"tag":"param","name":"target","type":"Object","optional":false,"description":"- The target object.","source":"* {Object} target - The target object."},{"tag":"param","name":"sources","type":"...Object","optional":false,"description":"- The source object(s).","source":"* {...Object} sources - The source object(s)."}],"type":"function","functionTag":"assign","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the target object.","source":"* {Object} - Returns the target object.\n *"}},"countBy":{"category":"collection","description":"Creates an object composed of keys generated from the results of running each element of collection through iteratee.","examples":[{"tag":"example","optional":false,"description":"import { countBy, assert } from '@universalweb/acid'; assert(countBy([{a:1}, {a:3}], (item) => { return 'a';}), {a: 2});","source":"import { countBy, assert } from \"@universalweb/acid\";\nassert(\n countBy([{ a: 1 }, { a: 3 }], (item) => {\n return \"a\";\n }),\n { a: 2 },\n);\n"}],"name":"countBy","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Array of objects.","source":"* {Array} collection - Array of objects."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- The iteratee to transform keys.","source":"* {Function} iteratee - The iteratee to transform keys."}],"type":"function","functionTag":"countBy","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the composed aggregate object.","source":"* {Object} - Returns the composed aggregate object.\n *"}},"countKey":{"category":"collection","description":"Count the amount of times a key is present in a collection.","examples":[{"tag":"example","optional":false,"description":"import { countKey, assert } from '@universalweb/acid'; assert(countKey([{a:1}, {a:3}], 'a'), 2);","source":"import { countKey, assert } from \"@universalweb/acid\";\nassert(countKey([{ a: 1 }, { a: 3 }], \"a\"), 2);\n"}],"name":"countKey","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Array of objects.","source":"* {Array} collection - Array of objects."},{"tag":"param","name":"propertyName","type":"Function","optional":false,"description":"- The name of the key.","source":"* {Function} propertyName - The name of the key."}],"type":"function","functionTag":"countKey","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The count.","source":"* {Number} - The count.\n *"}},"countWithoutKey":{"category":"collection","description":"Count the amount of times a key is not present in a collection.","examples":[{"tag":"example","optional":false,"description":"import { countWithoutKey, assert } from '@universalweb/acid'; assert(countWithoutKey([{a:1}, {a:3}], 'b'), 2);","source":"import { countWithoutKey, assert } from \"@universalweb/acid\";\nassert(countWithoutKey([{ a: 1 }, { a: 3 }], \"b\"), 2);\n"}],"name":"countWithoutKey","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Array of objects.","source":"* {Array} collection - Array of objects."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- The name of the key.","source":"* {String} propertyName - The name of the key."}],"type":"function","functionTag":"countWithoutKey","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The count.","source":"* {Number} - The count.\n *"}},"findIndex":{"category":"collection","description":"Finds an object in a collection by the given id and property name and returns the array index of the object.","examples":[{"tag":"example","optional":false,"description":"findIndex([{id: 1}, {id: 2}], 1); // => 0","source":"findIndex([{ id: 1 }, { id: 2 }], 1);\n// => 0\n"}],"name":"findIndex","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be checked for an item.","source":"* {Array} collection - Collection to be checked for an item."},{"tag":"param","name":"id","type":"Number|string","optional":false,"description":"- The value to look for.","source":"* {Number|string} id - The value to look for."},{"tag":"param","name":"propertyName","type":"String","optional":true,"description":"- The name of the property to compare.","source":"* {String} [propertyName = 'id'] - The name of the property to compare.","default":"'id'"}],"type":"function","functionTag":"findIndex","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The index of the object.","source":"* {Number} - The index of the object.\n *"}},"findItem":{"category":"collection","description":"Finds an object in a collection by the given id and property name.","examples":[{"tag":"example","optional":false,"description":"findItem([{id: 1}, {id: 2}], 1); // => {id: 1}","source":"findItem([{ id: 1 }, { id: 2 }], 1);\n// => {id: 1}\n"}],"name":"findItem","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be checked for an item.","source":"* {Array} collection - Collection to be checked for an item."},{"tag":"param","name":"id","type":"Number|string","optional":false,"description":"- The value to look for.","source":"* {Number|string} id - The value to look for."},{"tag":"param","name":"propertyName","type":"String","optional":true,"description":"- The name of the property to compare.","source":"* {String} [propertyName = 'id'] - The name of the property to compare.","default":"'id'"}],"type":"function","functionTag":"findItem","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"The found object.","source":"* {Object} - The found object.\n *"}},"sortCollectionDescending":{"category":"collection","description":"Sorts an array in place using a key in descending order.","examples":[{"tag":"example","optional":false,"description":"import { sortCollectionDescending, assert } from '@universalweb/acid'; const result = [{id: 1}, {id: 0}]; const collect = [{id: 0}, {id: 1}]; const prop = 'id'; assert(sortCollectionDescending(collect, prop), result);","source":"import { sortCollectionDescending, assert } from \"@universalweb/acid\";\nconst result = [{ id: 1 }, { id: 0 }];\nconst collect = [{ id: 0 }, { id: 1 }];\nconst prop = \"id\";\nassert(sortCollectionDescending(collect, prop), result);\n"}],"name":"sortCollectionDescending","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be sorted.","source":"* {Array} collection - Collection to be sorted."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- The property name to sort by based on it's value.","source":"* {String} propertyName - The property name to sort by based on it's value."},{"tag":"param","name":"ifMatch","type":"Function","optional":false,"description":"- A function which returns a number for the sort function if two object properties match.","source":"* {Function} ifMatch - A function which returns a number for the sort function if two object properties match."}],"type":"function","functionTag":"sortCollectionDescending","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The sorted array and or a clone of the array sorted.","source":"* {Array} - The sorted array and or a clone of the array sorted.\n *"}},"getLowest":{"category":"collection","description":"Sorts an array in place using a key from newest to oldest and returns the latest. Does not mutate the array.","examples":[{"tag":"example","optional":false,"description":"import { getLowest, assert } from '@universalweb/acid'; assert(getLowest([{id: 1}, {id: 0}], 'id'), {id: 1});","source":"import { getLowest, assert } from \"@universalweb/acid\";\nassert(getLowest([{ id: 1 }, { id: 0 }], \"id\"), { id: 1 });\n"}],"name":"getLowest","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be sorted.","source":"* {Array} collection - Collection to be sorted."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- The property name to sort by based on it's value.","source":"* {String} propertyName - The property name to sort by based on it's value."}],"type":"function","functionTag":"getLowest","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"The newest object in the collection.","source":"* {Object} - The newest object in the collection.\n *"}},"sortCollectionAscending":{"category":"collection","description":"Sorts an array in place using a key in ascending order.","examples":[{"tag":"example","optional":false,"description":"import { sortCollectionAscending, assert } from '@universalweb/acid'; const result = [{id: 0}, {id: 1}]; const collect = [{id: 1}, {id: 0}]; const prop = 'id'; assert(sortCollectionAscending(collect, prop), result);","source":"import { sortCollectionAscending, assert } from \"@universalweb/acid\";\nconst result = [{ id: 0 }, { id: 1 }];\nconst collect = [{ id: 1 }, { id: 0 }];\nconst prop = \"id\";\nassert(sortCollectionAscending(collect, prop), result);\n"}],"name":"sortCollectionAscending","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be sorted.","source":"* {Array} collection - Collection to be sorted."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- The property name to sort by based on it's value.","source":"* {String} propertyName - The property name to sort by based on it's value."},{"tag":"param","name":"ifMatch","type":"Function","optional":false,"description":"- A function which returns a number for the sort function if two object properties match.","source":"* {Function} ifMatch - A function which returns a number for the sort function if two object properties match."}],"type":"function","functionTag":"sortCollectionAscending","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The sorted array and or a clone of the array sorted.","source":"* {Array} - The sorted array and or a clone of the array sorted.\n *"}},"getHighest":{"category":"collection","description":"Sorts an array in place using a key from oldest to newest and returns the oldest. Does not mutate the array.","examples":[{"tag":"example","optional":false,"description":"import { getHighest, assert } from '@universalweb/acid'; assert(getHighest([{id: 1}, {id: 0}], 'id'), {id: 0});","source":"import { getHighest, assert } from \"@universalweb/acid\";\nassert(getHighest([{ id: 1 }, { id: 0 }], \"id\"), { id: 0 });\n"}],"name":"getHighest","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be sorted.","source":"* {Array} collection - Collection to be sorted."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- The property name to sort by based on it's value.","source":"* {String} propertyName - The property name to sort by based on it's value."}],"type":"function","functionTag":"getHighest","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"The newest object in the collection.","source":"* {Object} - The newest object in the collection.\n *"}},"groupBy":{"category":"collection","description":"Creates an object composed of keys generated from the results of running each element of collection thru iteratee. The order of grouped values is determined by the order they occur in collection. The corresponding value of each key is an array of elements responsible for generating the key.","examples":[{"tag":"example","optional":false,"description":"groupBy([6.1, 4.2, 6.3], Math.floor); // => { '4': [4.2], '6': [6.1, 6.3] }","source":"groupBy([6.1, 4.2, 6.3], Math.floor);\n// => { '4': [4.2], '6': [6.1, 6.3] }\n"}],"name":"groupBy","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Array of objects.","source":"* {Array} collection - Array of objects."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- The iteratee to transform keys.","source":"* {Function} iteratee - The iteratee to transform keys."}],"type":"function","functionTag":"groupBy","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the composed aggregate object.","source":"* {Object} - Returns the composed aggregate object.\n *"}},"indexBy":{"category":"collection","description":"Given a list, and an iteratee function that returns a key for each element in the list (or a property name), returns an object with an index of each item. Just like groupBy, but for when you know the keys are unique.","examples":[{"tag":"example","optional":false,"description":"import { indexBy, assert } from '@universalweb/acid'; const result = { \"0\": {name: 'test', id: 0}, \"1\": {name: 'test2', id: 1}}; const indexed = indexBy([{name: 'test', id: 0}, {name: 'test2', id: 1}], 'id'); assert(indexed, result);","source":"import { indexBy, assert } from \"@universalweb/acid\";\nconst result = { 0: { name: \"test\", id: 0 }, 1: { name: \"test2\", id: 1 } };\nconst indexed = indexBy(\n [\n { name: \"test\", id: 0 },\n { name: \"test2\", id: 1 },\n ],\n \"id\",\n);\nassert(indexed, result);\n"}],"name":"indexBy","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Array of objects.","source":"* {Array} collection - Array of objects."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- The property name to index by.","source":"* {String} propertyName - The property name to index by."}],"type":"function","functionTag":"indexBy","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the composed aggregate object.","source":"* {Object} - Returns the composed aggregate object.\n *"}},"invokeCollection":{"category":"collection","description":"Invokes a function on the provided property name in each object in the collection.","examples":[{"tag":"example","optional":false,"description":"import { invokeCollection, assert } from '@universalweb/acid'; const results = invokeCollection([{ test(item, index) { return [item, index];} }], 'test', ['EXAMPLE']); assert(results, [['EXAMPLE', 0]]);","source":"import { invokeCollection, assert } from \"@universalweb/acid\";\nconst results = invokeCollection(\n [\n {\n test(item, index) {\n return [item, index];\n },\n },\n ],\n \"test\",\n [\"EXAMPLE\"],\n);\nassert(results, [[\"EXAMPLE\", 0]]);\n"}],"name":"invokeCollection","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection from which method will be taken.","source":"* {Array} collection - Collection from which method will be taken."},{"tag":"param","name":"property","type":"String","optional":false,"description":"- Value used to pluck method from object.","source":"* {String} property - Value used to pluck method from object."},{"tag":"param","name":"value","type":"*","optional":false,"description":"- Value to be passed to callable property.","source":"* {*} value - Value to be passed to callable property."}],"type":"function","functionTag":"invokeCollection","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns the results of the invoked method.","source":"* {Array} - Returns the results of the invoked method.\n *"}},"invokeCollectionAsync":{"category":"collection","description":"Asynchronously awaits & invokes a function on the provided property name in each object in the collection.","examples":[{"tag":"example","optional":false,"description":"import { invokeCollectionAsync, assert } from '@universalweb/acid'; const results = await invokeCollectionAsync([{ async test(item, index) { return [item, index];} }], 'test', ['EXAMPLE']); assert(results, [['EXAMPLE', 0]]);","source":"import { invokeCollectionAsync, assert } from \"@universalweb/acid\";\nconst results = await invokeCollectionAsync(\n [\n {\n async test(item, index) {\n return [item, index];\n },\n },\n ],\n \"test\",\n [\"EXAMPLE\"],\n);\nassert(results, [[\"EXAMPLE\", 0]]);\n"}],"name":"invokeCollectionAsync","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection from which method will be taken.","source":"* {Array} collection - Collection from which method will be taken."},{"tag":"param","name":"property","type":"String","optional":false,"description":"- Value used to pluck method from object.","source":"* {String} property - Value used to pluck method from object."},{"tag":"param","name":"value","type":"*","optional":false,"description":"- Value to be passed to callable property.","source":"* {*} value - Value to be passed to callable property."}],"type":"function","isAsync":true,"functionTag":"invokeCollectionAsync","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns the results of the invoked method.","source":"* {Array} - Returns the results of the invoked method.\n *"}},"pluckObject":{"category":"object","description":"Returns an array of the plucked sources from the object. Sources are plucked in the order given by the array.","examples":[{"tag":"example","optional":false,"description":"import { pluckObject, assert } from '@universalweb/acid'; assert(pluckObject({a: 1, b:3}, ['a','b']), [1, 3]);","source":"import { pluckObject, assert } from \"@universalweb/acid\";\nassert(pluckObject({ a: 1, b: 3 }, [\"a\", \"b\"]), [1, 3]);\n"}],"name":"pluckObject","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Array used to determine what sources to be plucked.","source":"* {Object} source - Array used to determine what sources to be plucked."},{"tag":"param","name":"targets","type":"String|Array","optional":false,"description":"- Property name.","source":"* {String|Array} targets - Property name."}],"type":"function","functionTag":"pluckObject","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"An array of plucked sources.","source":"* {Array|undefined} - An array of plucked sources.\n *"}},"pluck":{"category":"collection","description":"Returns an array of the plucked values from the collection.","examples":[{"tag":"example","optional":false,"description":"import { pluck, assert } from '@universalweb/acid'; assert(pluck([{a: 1}, {a: 2}], 'a'), [1, 2]); assert(pluck([{a: 1, b:3}, {a: 1, b:3}], ['a','b']), [[1, 3], [1, 3]]);","source":"import { pluck, assert } from \"@universalweb/acid\";\nassert(pluck([{ a: 1 }, { a: 2 }], \"a\"), [1, 2]);\nassert(\n pluck(\n [\n { a: 1, b: 3 },\n { a: 1, b: 3 },\n ],\n [\"a\", \"b\"],\n ),\n [\n [1, 3],\n [1, 3],\n ],\n);\n"}],"name":"pluck","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Array used to determine what value to be plucked.","source":"* {Array} collection - Array used to determine what value to be plucked."},{"tag":"param","name":"targets","type":"(String|Number|Array.)","optional":false,"description":"- Property name.","source":"* {(String|Number|Array.)} targets - Property name."}],"type":"function","functionTag":"pluck","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array of plucked values.","source":"* {Array} - An array of plucked values.\n *"}},"sortCollectionAlphabetically":{"category":"collection","description":"Perform alphabetical A-Z sort on a collection with the provided key name. Mutates the array.","examples":[{"tag":"example","optional":false,"description":"import { sortCollectionAlphabetically, assert } from '@universalweb/acid'; const result = [{\"letter\":\"a\"},{\"letter\":\"c\", g: 0},{\"letter\":\"c\", g: 2}, {letter:'f'}]; const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\", g: 2}, {letter:'c', g: 0}]; const prop = 'letter'; function ifMatchSort(c, n) { if (c.g < n.g) { return -1; } if (c.g > n.g) { return 1; } } assert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);","source":"import { sortCollectionAlphabetically, assert } from \"@universalweb/acid\";\nconst result = [\n { letter: \"a\" },\n { letter: \"c\", g: 0 },\n { letter: \"c\", g: 2 },\n { letter: \"f\" },\n];\nconst collect = [\n { letter: \"a\" },\n { letter: \"f\" },\n { letter: \"c\", g: 2 },\n { letter: \"c\", g: 0 },\n];\nconst prop = \"letter\";\nfunction ifMatchSort(c, n) {\n if (c.g < n.g) {\n return -1;\n }\n if (c.g > n.g) {\n return 1;\n }\n}\nassert(sortCollectionAlphabetically(collect, prop, ifMatchSort), result);\n"}],"name":"sortCollectionAlphabetically","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be sorted.","source":"* {Array} collection - Collection to be sorted."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- Name of property to compare.","source":"* {String} propertyName - Name of property to compare."},{"tag":"param","name":"ifMatch","type":"Function","optional":false,"description":"- A function which returns a number for the sort function if two object properties match.","source":"* {Function} ifMatch - A function which returns a number for the sort function if two object properties match."}],"type":"function","functionTag":"sortCollectionAlphabetically","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The sorted array.","source":"* {Array} - The sorted array.\n *"}},"sortCollectionAlphabeticallyReverse":{"category":"collection","description":"Perform alphabetical in reverse Z-A sort on a collection with the provided key name. Mutates the array.","examples":[{"tag":"example","optional":false,"description":"import { sortCollectionAlphabeticallyReverse, assert } from '@universalweb/acid'; const result = [{letter:'f'},{\"letter\":\"c\"}, {\"letter\":\"a\"}]; const collect = [{letter:'a'}, {letter:'f'}, {\"letter\":\"c\"}]; const prop = 'letter'; assert(sortCollectionAlphabeticallyReverse(collect, prop), result);","source":"import {\n sortCollectionAlphabeticallyReverse,\n assert,\n} from \"@universalweb/acid\";\nconst result = [{ letter: \"f\" }, { letter: \"c\" }, { letter: \"a\" }];\nconst collect = [{ letter: \"a\" }, { letter: \"f\" }, { letter: \"c\" }];\nconst prop = \"letter\";\nassert(sortCollectionAlphabeticallyReverse(collect, prop), result);\n"}],"name":"sortCollectionAlphabeticallyReverse","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Collection to be sorted.","source":"* {Array} collection - Collection to be sorted."},{"tag":"param","name":"propertyName","type":"String","optional":false,"description":"- Name of property to compare.","source":"* {String} propertyName - Name of property to compare."},{"tag":"param","name":"ifMatch","type":"Function","optional":false,"description":"- A function which returns a number for the sort function if two object properties match.","source":"* {Function} ifMatch - A function which returns a number for the sort function if two object properties match."}],"type":"function","functionTag":"sortCollectionAlphabeticallyReverse","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The sorted array.","source":"* {Array} - The sorted array.\n *"}},"getFileExtension":{"category":"file","description":"Return the file extension.","examples":[{"tag":"example","optional":false,"description":"import { getFileExtension, assert } from '@universalweb/acid'; assert(getFileExtension('test.js'),'js');","source":"import { getFileExtension, assert } from \"@universalweb/acid\";\nassert(getFileExtension(\"test.js\"), \"js\");\n"}],"name":"getFileExtension","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"getFileExtension","returns":{"tag":"returns","name":"-","type":"String|undefined","optional":false,"description":"Returns the extension.","source":"* {String|undefined} - Returns the extension.\n *"}},"getFilename":{"category":"file","description":"Return the file extension.","examples":[{"tag":"example","optional":false,"description":"import { getFilename, assert } from '@universalweb/acid'; assert(getFilename('./universalweb/test.js'),'test.js');","source":"import { getFilename, assert } from \"@universalweb/acid\";\nassert(getFilename(\"./universalweb/test.js\"), \"test.js\");\n"}],"name":"getFilename","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"getFilename","returns":{"tag":"returns","name":"-","type":"String|undefined","optional":false,"description":"Returns the extension.","source":"* {String|undefined} - Returns the extension.\n *"}},"isFileCSS":{"category":"file","description":"Checks if the string has a .css extension.","examples":[{"tag":"example","optional":false,"description":"import { isFileCSS, assert } from '@universalweb/acid'; assert(isFileCSS('test.css'), true);","source":"import { isFileCSS, assert } from \"@universalweb/acid\";\nassert(isFileCSS(\"test.css\"), true);\n"}],"name":"isFileCSS","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- Object to be checked.","source":"* {String} source - Object to be checked."}],"type":"function","functionTag":"isFileCSS","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isFileHTML":{"category":"file","description":"Checks if the string has a .html extension.","examples":[{"tag":"example","optional":false,"description":"import { isFileHTML, assert } from '@universalweb/acid'; assert(isFileHTML('test.html'), true);","source":"import { isFileHTML, assert } from \"@universalweb/acid\";\nassert(isFileHTML(\"test.html\"), true);\n"}],"name":"isFileHTML","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- Object to be checked.","source":"* {String} source - Object to be checked."}],"type":"function","functionTag":"isFileHTML","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isFileJS":{"category":"file","description":"Checks if the string has a .js extension.","examples":[{"tag":"example","optional":false,"description":"import { isFileJS, assert } from '@universalweb/acid'; assert(isFileJS('test.js'), true);","source":"import { isFileJS, assert } from \"@universalweb/acid\";\nassert(isFileJS(\"test.js\"), true);\n"}],"name":"isFileJS","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- Object to be checked.","source":"* {String} source - Object to be checked."}],"type":"function","functionTag":"isFileJS","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isFileJSON":{"category":"file","description":"Checks if the string has a .json extension.","examples":[{"tag":"example","optional":false,"description":"import { isFileJSON, assert } from '@universalweb/acid'; assert(isFileJSON('test.json'), true);","source":"import { isFileJSON, assert } from \"@universalweb/acid\";\nassert(isFileJSON(\"test.json\"), true);\n"}],"name":"isFileJSON","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- Object to be checked.","source":"* {String} source - Object to be checked."}],"type":"function","functionTag":"isFileJSON","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"after":{"category":"function","description":"Creates a function that executes callable, only after being called n times.","examples":[{"tag":"example","optional":false,"description":"import { after, assert } from '@universalweb/acid'; const onlyAfter = after(1, (item) => { return item;}); assert(onlyAfter(1), undefined); assert(onlyAfter(2), 2);","source":"import { after, assert } from \"@universalweb/acid\";\nconst onlyAfter = after(1, (item) => {\n return item;\n});\nassert(onlyAfter(1), undefined);\nassert(onlyAfter(2), 2);\n"}],"name":"after","params":[{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The number of calls until method is invoked.","source":"* {Number} amount - The number of calls until method is invoked."},{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be called.","source":"* {Function} callable - The function to be called."}],"type":"function","functionTag":"after","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new pass-thru function.","source":"* {Function} - Returns the new pass-thru function.\n *"}},"ary":{"category":"function","description":"Creates a function that invokes callable, with up to n arguments, ignoring any additional arguments.","examples":[{"tag":"example","optional":false,"description":"import { ary, assert } from '@universalweb/acid'; assert(ary((...args) => { return args;}, 2)(1, 2, 3), [1, 2]);","source":"import { ary, assert } from \"@universalweb/acid\";\nassert(\n ary((...args) => {\n return args;\n }, 2)(1, 2, 3),\n [1, 2],\n);\n"}],"name":"ary","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to cap arguments for.","source":"* {Function} callable - The function to cap arguments for."},{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The arity cap.","source":"* {Number} amount - The arity cap."}],"type":"function","functionTag":"ary","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the new capped function.","source":"* {Object} - Returns the new capped function.\n *"}},"before":{"category":"function","description":"Creates a function that executes callable, only before n times.","examples":[{"tag":"example","optional":false,"description":"import { before, assert } from '@universalweb/acid'; const onlyBefore = before(3, () => { return 1;}); assert(onlyBefore(1), 1);","source":"import { before, assert } from \"@universalweb/acid\";\nconst onlyBefore = before(3, () => {\n return 1;\n});\nassert(onlyBefore(1), 1);\n"}],"name":"before","params":[{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The number of calls before n.","source":"* {Number} amount - The number of calls before n."},{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be called.","source":"* {Function} callable - The function to be called."}],"type":"function","functionTag":"before","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new pass-thru function.","source":"* {Function} - Returns the new pass-thru function.\n *"}},"eachAsyncObject":{"category":"object","description":"Asynchronously iterates through the given object.","examples":[{"tag":"example","optional":false,"description":"import { eachAsyncObject, assert } from '@universalweb/acid'; const tempList = []; await eachAsyncObject({a: 1, b: 2, c: 3}, async (item, key) => { tempList[key] = item; }); assert(tempList, {a: 1, b: 2, c: 3});","source":"import { eachAsyncObject, assert } from \"@universalweb/acid\";\nconst tempList = [];\nawait eachAsyncObject({ a: 1, b: 2, c: 3 }, async (item, key) => {\n tempList[key] = item;\n});\nassert(tempList, { a: 1, b: 2, c: 3 });\n"}],"name":"eachAsyncObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling object, key count, array of keys, and additionalArg."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- Iteratee called with thisCall as this.","source":"* {*} thisCall - Iteratee called with thisCall as this."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"eachAsyncObject","returns":{"tag":"returns","name":"-","type":"Object|Function|undefined","optional":false,"description":"Returns source.","source":"* {Object|Function|undefined} - Returns source.\n *"}},"eachObject":{"category":"object","description":"Iterates through the given object.","examples":[{"tag":"example","optional":false,"description":"import { eachObject, assert } from '@universalweb/acid'; assert(eachObject({a: 1, b: 2, c: 3}, (item) => { console.log(item); }), {a: 1, b: 2, c: 3});","source":"import { eachObject, assert } from \"@universalweb/acid\";\nassert(\n eachObject({ a: 1, b: 2, c: 3 }, (item) => {\n console.log(item);\n }),\n { a: 1, b: 2, c: 3 },\n);\n"}],"name":"eachObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling object, key count, and array of keys."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} thisCall - An object to be given each time to the iteratee."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"eachObject","returns":{"tag":"returns","name":"-","type":"Object|Function|undefined","optional":false,"description":"Returns the calling object.","source":"* {Object|Function|undefined} - Returns the calling object.\n *"}},"isSet":{"category":"type","description":"Checks if an object(s) is a Set.","examples":[{"tag":"example","optional":false,"description":"import { isSet, assert } from '@universalweb/acid'; assert(isSet(new Set()), true);","source":"import { isSet, assert } from \"@universalweb/acid\";\nassert(isSet(new Set()), true);\n"}],"name":"isSet","params":[{"tag":"param","name":"sources","type":"...*","optional":false,"description":"- Objects to be checked.","source":"* {...*} sources - Objects to be checked."}],"type":"function","functionTag":"isSet","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isGenerator":{"category":"type","description":"Checks if an object or objects are a Int16Array.","examples":[{"tag":"example","optional":false,"description":"import { isGenerator } from '@universalweb/acid'; isGenerator(function* (){}); // => true","source":"import { isGenerator } from \"@universalweb/acid\";\nisGenerator(function* () {});\n// => true\n"}],"name":"isGenerator","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isGenerator","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isAsync":{"category":"type","description":"Checks if an object is an async function.","examples":[{"tag":"example","optional":false,"description":"import { isAsync, assert } from '@universalweb/acid'; assert(isAsync(async() => {}), true);","source":"import { isAsync, assert } from \"@universalweb/acid\";\nassert(\n isAsync(async () => {}),\n true,\n);\n"}],"name":"isAsync","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isAsync","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"True or false.","source":"* {Boolean} - True or false.\n *"}},"each":{"category":"utility","description":"Iterates through the given object.","examples":[{"tag":"example","optional":false,"description":"import { each, assert } from '@universalweb/acid'; const list = {}; each({a: 1, b: 2, c: 3}, (item, key) => { list[key] = item; }); assert(list, {a: 1, b: 2, c: 3});","source":"import { each, assert } from \"@universalweb/acid\";\nconst list = {};\neach({ a: 1, b: 2, c: 3 }, (item, key) => {\n list[key] = item;\n});\nassert(list, { a: 1, b: 2, c: 3 });\n"}],"name":"each","params":[{"tag":"param","name":"source","type":"Array | object | Function","optional":false,"description":"- Object that will be looped through.","source":"* {Array | object | Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type."},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} thisCall - An object to be given each time to the iteratee."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"each","returns":{"tag":"returns","name":"-","type":"Array | object | Function","optional":false,"description":"The originally given object.","source":"* {Array | object | Function} - The originally given object.\n *"}},"chain":{"category":"function","description":"Creates a chainable set of functions.","examples":[{"tag":"example","optional":false,"description":"import { chain, assert } from '@universalweb/acid'; const chained = chain({ a(value, c) { return value + c; } }).setValue(2).a(1).done(); assert(chained, 3);","source":"import { chain, assert } from \"@universalweb/acid\";\nconst chained = chain({\n a(value, c) {\n return value + c;\n },\n})\n .setValue(2)\n .a(1)\n .done();\nassert(chained, 3);\n"}],"name":"chain","params":[{"tag":"param","name":"config","type":"Array|Object","optional":false,"description":"- The object to take methods from.","source":"* {Array|Object} config - The object to take methods from."}],"type":"function","functionTag":"chain","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.","source":"* {*} - Returns a function which has value, methods, add, and done. When invoking the function the argument is saved as the value property for further chaining.\n *"}},"curry":{"category":"function","description":"Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method length is not sufficient.","examples":[{"tag":"example","optional":false,"description":"import { curry, assert } from '@universalweb/acid'; const result = curry((a, b, c) => { return [a, b, c]; })(1)(2)(3); assert(result, [1, 2, 3]);","source":"import { curry, assert } from \"@universalweb/acid\";\nconst result = curry((a, b, c) => {\n return [a, b, c];\n})(1)(2)(3);\nassert(result, [1, 2, 3]);\n"}],"name":"curry","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to curry.","source":"* {Function} callable - The function to curry."},{"tag":"param","name":"arity","type":"Number","optional":false,"description":"- The arity of method.","source":"* {Number} arity - The arity of method."}],"type":"function","functionTag":"curry","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns the new curried function.","source":"* {*} - Returns the new curried function.\n *"}},"curryRight":{"description":"Creates a function that accepts arguments of method and either invokes method returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining method arguments, and so on. The arity of method may be specified if method.length is not sufficient. The arguments are given in reverse order.","examples":[{"tag":"example","optional":false,"description":"import { curryRight, assert } from '@universalweb/acid'; const result = curryRight((a, b, c) => { return [a, b, c]; })(1)(2)(3); assert(result, [3, 2, 1]);","source":"import { curryRight, assert } from \"@universalweb/acid\";\nconst result = curryRight((a, b, c) => {\n return [a, b, c];\n})(1)(2)(3);\nassert(result, [3, 2, 1]);\n"}],"name":"curryRight","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to curry.","source":"* {Function} callable - The function to curry."},{"tag":"param","name":"arity","type":"Number","optional":false,"description":"- The arity of method.","source":"* {Number} arity - The arity of method."}],"type":"function","functionTag":"curryRight","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns the new curried function.","source":"* {*} - Returns the new curried function.\n *"}},"noop":{"category":"function","description":"This method returns undefined.","examples":[{"tag":"example","optional":false,"description":"import { noop, assert } from '@universalweb/acid'; assert(noop(), undefined);","source":"import { noop, assert } from \"@universalweb/acid\";\nassert(noop(), undefined);\n"}],"name":"noop","type":"function","functionTag":"noop","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n *"}},"times":{"category":"utility","description":"Iterates based on the amount given invoking the iteratee with the current index as an argument.","examples":[{"tag":"example","optional":false,"description":"import { times } from '@universalweb/acid'; times(3, (item) => { console.log(item); }); // 0 // 1 // 2 // => undefined","source":"import { times } from \"@universalweb/acid\";\ntimes(3, (item) => {\n console.log(item);\n}); // 0 // 1 // 2\n// => undefined\n"}],"name":"times","params":[{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The amount of times to loop invoking the iteratee.","source":"* {Number} amount - The amount of times to loop invoking the iteratee."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed index and amount.","source":"* {Function} iteratee - Transformation function which is passed index and amount."}],"type":"function","functionTag":"times","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Nothing.","source":"* {undefined} - Nothing.\n *"}},"timesMap":{"category":"utility","description":"Iterates based on the amount given and maps the results returned by the iteratee each time to an array.","examples":[{"tag":"example","optional":false,"description":"import { timesMap } from '@universalweb/acid'; timesMap(3, (item) => { return item; }); // => [0, 1, 2]","source":"import { timesMap } from \"@universalweb/acid\";\ntimesMap(3, (item) => {\n return item;\n});\n// => [0, 1, 2]\n"}],"name":"timesMap","params":[{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The amount of times to loop invoking the iteratee.","source":"* {Number} amount - The amount of times to loop invoking the iteratee."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed index and amount.","source":"* {Function} iteratee - Transformation function which is passed index and amount."},{"tag":"param","name":"results","type":"Array","optional":true,"description":"- Array that will have iteratee return pushed to.","source":"* {Array} [results = []] - Array that will have iteratee return pushed to.","default":"[]"}],"type":"function","functionTag":"timesMap","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with iteratee's returned values.","source":"* {Array} - An array with iteratee's returned values.\n *"}},"timer":{"category":"function","description":"Timer wrapper.","examples":[{"tag":"example","optional":false,"description":"import { timer, assert } from '@universalweb/acid'; timer(() => {}, 100); // => 0","source":"import { timer, assert } from \"@universalweb/acid\";\ntimer(() => {}, 100);\n// => 0\n"}],"name":"timer","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked.","source":"* {Function} callable - The function to be invoked."},{"tag":"param","name":"time","type":"Number","optional":false,"description":"- The time in milliseconds.","source":"* {Number} time - The time in milliseconds."}],"type":"function","functionTag":"timer","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns setTimeoutId ID.","source":"* {Object} - Returns setTimeoutId ID.\n *"}},"clearTimers":{"category":"function","description":"Clear all active timers.","examples":[{"tag":"example","optional":false,"description":"import { clearTimers, assert } from '@universalweb/acid'; clearTimers(); // => undefined","source":"import { clearTimers, assert } from \"@universalweb/acid\";\nclearTimers();\n// => undefined\n"}],"name":"clearTimers","type":"function","functionTag":"clearTimers","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n *"}},"apply":{"category":"function","description":"Calls a target function with an optional \"this\" and optional arguments as specified. Same as Reflect.apply but with a function check.","examples":[{"tag":"example","optional":false,"description":"import { apply, assert } from '@universalweb/acid'; assert(apply(function (a) {return a;}, undefined, [2]), 2);","source":"import { apply, assert } from \"@universalweb/acid\";\nassert(\n apply(\n function (a) {\n return a;\n },\n undefined,\n [2],\n ),\n 2,\n);\n"}],"name":"apply","params":[{"tag":"param","name":"target","type":"Function","optional":false,"description":"- The target function to call.","source":"* {Function} target - The target function to call."},{"tag":"param","name":"thisArgument","type":"*","optional":false,"description":"- Array like object.","source":"* {*} thisArgument - Array like object."},{"tag":"param","name":"argumentsList","type":"Array","optional":false,"description":"- An array-like object specifying the arguments with which target should be called.","source":"* {Array} argumentsList - An array-like object specifying the arguments with which target should be called."}],"type":"function","functionTag":"apply","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"The result of calling the given target function with the specified this value and arguments.","source":"* {*} - The result of calling the given target function with the specified this value and arguments.\n *"}},"debounce":{"category":"function","description":"Creates a debounced function that delays invoking callable until after milliseconds have elapsed since the last time the debounced function was invoked. The debounce function has a clear method to cancel the timer.","examples":[{"tag":"example","optional":false,"description":"import { debounce, promise, assert } from '@universalweb/acid'; const promised = promise((a) => { const debounced = debounce(() => { debounced.clear(); a('debounced'); }, 0); }); assert(await promised(), 'debounced');","source":"import { debounce, promise, assert } from \"@universalweb/acid\";\nconst promised = promise((a) => {\n const debounced = debounce(() => {\n debounced.clear();\n a(\"debounced\");\n }, 0);\n});\nassert(await promised(), \"debounced\");\n"}],"name":"debounce","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked.","source":"* {Function} callable - The function to be invoked."},{"tag":"param","name":"time","type":"Number","optional":false,"description":"- The time in milliseconds.","source":"* {Number} time - The time in milliseconds."}],"type":"function","functionTag":"debounce","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"The debounced function.","source":"* {Function} - The debounced function.\n *"}},"ifInvoke":{"category":"function","description":"Checks if the given method is a function. If it is then it invokes it with the given arguments.","examples":[{"tag":"example","optional":false,"description":"import { ifInvoke, assert } from '@universalweb/acid'; assert(ifInvoke((...args) => { return args;}, 1, 2), [1, 2]);","source":"import { ifInvoke, assert } from \"@universalweb/acid\";\nassert(\n ifInvoke(\n (...args) => {\n return args;\n },\n 1,\n 2,\n ),\n [1, 2],\n);\n"}],"name":"ifInvoke","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked if possible.","source":"* {Function} callable - The function to be invoked if possible."},{"tag":"param","name":"thisBind","type":"*","optional":false,"description":"- Object to use as the \"this\" within the function.","source":"* {*} thisBind - Object to use as the \"this\" within the function."},{"tag":"param","name":"args","type":"...*","optional":false,"description":"- Arguments to pass to the function.","source":"* {...*} args - Arguments to pass to the function."}],"type":"function","functionTag":"ifInvoke","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns the method invoked or undefined.","source":"* {*} - Returns the method invoked or undefined.\n *"}},"negate":{"category":"function","description":"Creates a function that negates the result of the predicate callable.","examples":[{"tag":"example","optional":false,"description":"negate(() => { return false;})(); // => true","source":"negate(() => {\n return false;\n})();\n// => true\n"}],"name":"negate","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked.","source":"* {Function} callable - The function to be invoked."}],"type":"function","functionTag":"negate","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns the given methods result.","source":"* {*} - Returns the given methods result.\n *"}},"nthArg":{"category":"function","description":"Creates a function that gets the argument at index n. If n is negative, the nth argument from the end is returned.","examples":[{"tag":"example","optional":false,"description":"nthArg(1)('a', 'b'); // => 'b'","source":"nthArg(1)(\"a\", \"b\");\n// => 'b'\n"}],"name":"nthArg","params":[{"tag":"param","name":"index","type":"Number","optional":true,"description":"- The index of the argument to return.","source":"* {Number} [index = 0] - The index of the argument to return.","default":"0"}],"type":"function","functionTag":"nthArg","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new pass-thru function.","source":"* {Function} - Returns the new pass-thru function.\n *"}},"once":{"category":"function","description":"Creates a function that is restricted to execute method once. Repeat calls to the function will return the value of the first call. The method is executed with the this binding of the created function.","examples":[{"tag":"example","optional":false,"description":"const onceOnly = once((item) => { return item;}); onceOnly(5); onceOnly(3); // => 5","source":"const onceOnly = once((item) => {\n return item;\n});\nonceOnly(5);\nonceOnly(3);\n// => 5\n"}],"name":"once","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be called.","source":"* {Function} callable - The function to be called."}],"type":"function","functionTag":"once","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new pass-thru function.","source":"* {Function} - Returns the new pass-thru function.\n *"}},"getType":{"category":"type","description":"Returns the constructor of an object.","examples":[{"tag":"example","optional":false,"description":"import { getType, assert } from '@universalweb/acid'; assert(getType(1), true);","source":"import { getType, assert } from \"@universalweb/acid\";\nassert(getType(1), true);\n"}],"name":"getType","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"getType","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"cloneType":{"category":"type","description":"Returns a new empty object of the same type.","examples":[{"tag":"example","optional":false,"description":"import { cloneType, assert } from '@universalweb/acid'; assert(cloneType([1]), []);","source":"import { cloneType, assert } from \"@universalweb/acid\";\nassert(cloneType([1]), []);\n"}],"name":"cloneType","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"cloneType","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"forOfCompactMap":{"category":"utility","description":"Iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { assert,forOfCompactMap } from '@universalweb/acid'; const source = {a: undefined, b: 2, c: 3}; const temp = forOfCompactMap(source, (item) => { return item; }); assert(temp, {b: 2, c: 3});","source":"import { assert, forOfCompactMap } from \"@universalweb/acid\";\nconst source = { a: undefined, b: 2, c: 3 };\nconst temp = forOfCompactMap(source, (item) => {\n return item;\n});\nassert(temp, { b: 2, c: 3 });\n"}],"name":"forOfCompactMap","params":[{"tag":"param","name":"source","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function|Class|Map|Set|Array} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"resultsObject","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be used to assign results else source is type cloned.","source":"* {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned."}],"type":"function","functionTag":"forOfCompactMap","returns":{"tag":"returns","name":"-","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"An object with mapped properties that are not null or undefined.","source":"* {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *"}},"forOfCompactMapAsync":{"category":"utility","description":"Asynchronously iterates (for of) through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { assert,forOfCompactMapAsync } from '@universalweb/acid'; const source = {a: undefined, b: 2, c: 3}; const temp = await forOfCompactMapAsync(source, async (item) => { return item; }); assert(temp, {b: 2, c: 3});","source":"import { assert, forOfCompactMapAsync } from \"@universalweb/acid\";\nconst source = { a: undefined, b: 2, c: 3 };\nconst temp = await forOfCompactMapAsync(source, async (item) => {\n return item;\n});\nassert(temp, { b: 2, c: 3 });\n"}],"name":"forOfCompactMapAsync","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"resultsObject","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be used to assign results else source is type cloned.","source":"* {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned."}],"type":"function","functionTag":"forOfCompactMapAsync","returns":{"tag":"returns","name":"-","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"An object with mapped properties that are not null or undefined.","source":"* {Object|Function|Class|Map|Set|Array} - An object with mapped properties that are not null or undefined.\n *"}},"mapObjectAsync":{"category":"object","description":"Asynchronously iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { mapAsyncObject, assert } from '@universalweb/acid'; assert(await mapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { return item; }), {a: 1, b: undefined, c: 3});","source":"import { mapAsyncObject, assert } from \"@universalweb/acid\";\nassert(\n await mapAsyncObject({ a: 1, b: undefined, c: 3 }, (item) => {\n return item;\n }),\n { a: 1, b: undefined, c: 3 },\n);\n"}],"name":"mapObjectAsync","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"results","type":"Object|Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object|Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"mapObjectAsync","returns":{"tag":"returns","name":"-","type":"Object|Function|undefined","optional":false,"description":"An object of the same calling object's type.","source":"* {Object|Function|undefined} - An object of the same calling object's type.\n *"}},"mapObject":{"category":"object","description":"Iterates through the calling object and creates an object with the results of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { mapObject, assert } from '@universalweb/acid'; assert(mapObject({a: 1, b: undefined, c: 3}, (item) => { return item; }), {a: 1, b: undefined, c: 3});","source":"import { mapObject, assert } from \"@universalweb/acid\";\nassert(\n mapObject({ a: 1, b: undefined, c: 3 }, (item) => {\n return item;\n }),\n { a: 1, b: undefined, c: 3 },\n);\n"}],"name":"mapObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"results","type":"Object|Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object|Function} [results = {}] - Object that will be used to assign results.","default":"{}"},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} thisCall - An object to be given each time to the iteratee."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"mapObject","returns":{"tag":"returns","name":"-","type":"Object|Function|undefined","optional":false,"description":"An object of the same calling object's type.","source":"* {Object|Function|undefined} - An object of the same calling object's type.\n *"}},"map":{"category":"utility","description":"Iterates through the calling object and creates a new object based on the calling object's type with the results of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { map, assert } from '@universalweb/acid'; assert(map({a: 1, b: 2, c: 3}, (item) => { return item * 2; }), {a: 2, b: 4, c: 6});","source":"import { map, assert } from \"@universalweb/acid\";\nassert(\n map({ a: 1, b: 2, c: 3 }, (item) => {\n return item * 2;\n }),\n { a: 2, b: 4, c: 6 },\n);\n"}],"name":"map","params":[{"tag":"param","name":"source","type":"Array | object | Function","optional":false,"description":"- Object that will be looped through.","source":"* {Array | object | Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type."},{"tag":"param","name":"results","type":"Object | Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object | Function} [results = {}] - Object that will be used to assign results.","default":"{}"},{"tag":"param","name":"thisCall","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} thisCall - An object to be given each time to the iteratee."},{"tag":"param","name":"additionalArg","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArg - An object to be given each time to the iteratee."}],"type":"function","functionTag":"map","returns":{"tag":"returns","name":"-","type":"Array | object | Function","optional":false,"description":"A new object of the same calling object's type.","source":"* {Array | object | Function} - A new object of the same calling object's type.\n *"}},"over":{"category":"function","description":"Creates a function that invokes iteratee with the arguments it receives and returns their results.","examples":[{"tag":"example","optional":false,"description":"import { overEvery, assert } from '@universalweb/acid'; assert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);","source":"import { overEvery, assert } from \"@universalweb/acid\";\nassert(over([Math.max, Math.min])(1, 2, 3, 4), [4, 1]);\n"}],"name":"over","params":[{"tag":"param","name":"iteratees","type":"(Array.|Object.)","optional":false,"description":"- The list of functions to loop through.","source":"* {(Array.|Object.)} iteratees - The list of functions to loop through."}],"type":"function","functionTag":"over","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new over wrapped function.","source":"* {Function} - Returns the new over wrapped function.\n *"}},"everyAsyncObject":{"category":"object","description":"Iterates through the given object while the iteratee returns true.","examples":[{"tag":"example","optional":false,"description":"import { everyAsyncObject, assert } from '@universalweb/acid'; const result = await everyAsyncObject({a: true, b: true, c: true}, (item) => { return item; }); assert(result, true);","source":"import { everyAsyncObject, assert } from \"@universalweb/acid\";\nconst result = await everyAsyncObject({ a: true, b: true, c: true }, (item) => {\n return item;\n});\nassert(result, true);\n"}],"name":"everyAsyncObject","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Object that will be looped through.","source":"* {Object} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling array, and array length."}],"type":"function","functionTag":"everyAsyncObject","returns":{"tag":"returns","name":"-","type":"Boolean|undefined","optional":false,"description":"Returns true if all values returned are true or false if one value returns false.","source":"* {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *"}},"everyObject":{"category":"object","description":"Iterates through the given object while the iteratee returns true.","examples":[{"tag":"example","optional":false,"description":"import { everyObject, assert } from '@universalweb/acid'; const result = everyObject({a: true, b: true, c: true}, (item) => { return item; }); assert(result, true);","source":"import { everyObject, assert } from \"@universalweb/acid\";\nconst result = everyObject({ a: true, b: true, c: true }, (item) => {\n return item;\n});\nassert(result, true);\n"}],"name":"everyObject","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Object that will be looped through.","source":"* {Object} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling array, and array length."}],"type":"function","functionTag":"everyObject","returns":{"tag":"returns","name":"-","type":"Boolean|undefined","optional":false,"description":"Returns true if all values returned are true or false if one value returns false.","source":"* {Boolean|undefined} - Returns true if all values returned are true or false if one value returns false.\n *"}},"forOfEvery":{"category":"utility","description":"Iterates (for of) through the given object while the iteratee returns true using a for of loop.","examples":[{"tag":"example","optional":false,"description":"import { every, assert } from '@universalweb/acid'; assert(forOfEvery({a: false, b: true, c: true}, (item) => { return item; }), false);","source":"import { every, assert } from \"@universalweb/acid\";\nassert(\n forOfEvery({ a: false, b: true, c: true }, (item) => {\n return item;\n }),\n false,\n);\n"}],"name":"forOfEvery","params":[{"tag":"param","name":"source","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function|Class|Map|Set|Array} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."}],"type":"function","functionTag":"forOfEvery","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true if all values returned are true or false if one value returns false.","source":"* {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *"}},"forOfEveryAsync":{"category":"utility","description":"Asynchronously iterates (for of) through the given object while the iteratee returns true using a for of loop.","examples":[{"tag":"example","optional":false,"description":"import { every, assert } from '@universalweb/acid'; assert(forOfEveryAsync({a: false, b: true, c: true}, (item) => { return item; }), false);","source":"import { every, assert } from \"@universalweb/acid\";\nassert(\n forOfEveryAsync({ a: false, b: true, c: true }, (item) => {\n return item;\n }),\n false,\n);\n"}],"name":"forOfEveryAsync","params":[{"tag":"param","name":"source","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function|Class|Map|Set|Array} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."}],"type":"function","functionTag":"forOfEveryAsync","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true if all values returned are true or false if one value returns false.","source":"* {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *"}},"every":{"category":"utility","description":"Iterates through the given object while the iteratee returns true.","examples":[{"tag":"example","optional":false,"description":"import { every, assert } from '@universalweb/acid'; assert(every({a: false, b: true, c: true}, (item) => { return item; }), false);","source":"import { every, assert } from \"@universalweb/acid\";\nassert(\n every({ a: false, b: true, c: true }, (item) => {\n return item;\n }),\n false,\n);\n"}],"name":"every","params":[{"tag":"param","name":"source","type":"Object | Array | Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object | Array | Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, key, calling array, and array length."}],"type":"function","functionTag":"every","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true if all values returned are true or false if one value returns false.","source":"* {Boolean} - Returns true if all values returned are true or false if one value returns false.\n *"}},"overEvery":{"category":"function","description":"Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.","examples":[{"tag":"example","optional":false,"description":"import { overEvery, assert } from '@universalweb/acid'; assert(overEvery([Boolean, isFinite])('1'), true);","source":"import { overEvery, assert } from \"@universalweb/acid\";\nassert(overEvery([Boolean, isFinite])(\"1\"), true);\n"}],"name":"overEvery","params":[{"tag":"param","name":"predicates","type":"(Array.|Object.)","optional":false,"description":"- The list of functions to loop through.","source":"* {(Array.|Object.)} predicates - The list of functions to loop through."}],"type":"function","functionTag":"overEvery","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new overEvery wrapped function.","source":"* {Function} - Returns the new overEvery wrapped function.\n *"}},"reArg":{"category":"function","description":"Creates a function that invokes method with arguments arranged according to the specified indexes where the argument value at the first index is provided as the first argument, the argument value at the second index is provided as the second argument, and so on.","examples":[{"tag":"example","optional":false,"description":"reArg((a, b, c) => { return [a, b, c]; }, [1,2,0])(1,2,3); // => [2, 3, 1]","source":"reArg(\n (a, b, c) => {\n return [a, b, c];\n },\n [1, 2, 0],\n)(1, 2, 3);\n// => [2, 3, 1]\n"}],"name":"reArg","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked.","source":"* {Function} callable - The function to be invoked."},{"tag":"param","name":"indexes","type":"Array","optional":false,"description":"- The arranged argument indexes.","source":"* {Array} indexes - The arranged argument indexes."}],"type":"function","functionTag":"reArg","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new function.","source":"* {Function} - Returns the new function.\n *"}},"throttle":{"category":"function","description":"Creates a throttled function that only invokes callable at most once per every milliseconds. The throttle function has a clear method to cancel the timer.","examples":[{"tag":"example","optional":false,"description":"const throttled = throttle(() => { console.log('throttle'); }, 0)(); throttled(); // 'throttle'","source":"const throttled = throttle(() => {\n console.log(\"throttle\");\n}, 0)();\nthrottled(); // 'throttle'\n"}],"name":"throttle","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked.","source":"* {Function} callable - The function to be invoked."},{"tag":"param","name":"time","type":"Number","optional":false,"description":"- The time in milliseconds.","source":"* {Number} time - The time in milliseconds."}],"type":"function","functionTag":"throttle","returns":{"tag":"returns","name":"-","type":"Function|undefined","optional":false,"description":"The throttled function.","source":"* {Function|undefined} - The throttled function.\n *"}},"wrap":{"category":"function","description":"Creates a function that provides value to wrapper as its first argument. The wrapper function is given two arguments the value and the provided argument from the newly created function.","examples":[{"tag":"example","optional":false,"description":"wrap('Lucy', (firstName, lastName) => { return `My name is ${firstName} ${lastName}.`; })('Diamonds'); // => 'My name is Lucy Diamonds.'","source":"wrap(\"Lucy\", (firstName, lastName) => {\n return `My name is ${firstName} ${lastName}.`;\n})(\"Diamonds\");\n// => 'My name is Lucy Diamonds.'\n"}],"name":"wrap","params":[{"tag":"param","name":"value","type":"*","optional":false,"description":"- The value to wrap.","source":"* {*} value - The value to wrap."},{"tag":"param","name":"wrapper","type":"Function","optional":false,"description":"- The wrapper function.","source":"* {Function} wrapper - The wrapper function."}],"type":"function","functionTag":"wrap","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"The new function.","source":"* {Function} - The new function.\n *"}},"cacheNativeMethod":{"category":"utility","description":"Caches a prototype method.","examples":[{"tag":"example","optional":false,"description":"import { cacheNativeMethod, assert } from '@universalweb/acid'; assert(cacheNativeMethod(Array.prototype.push)([], 1), 1);","source":"import { cacheNativeMethod, assert } from \"@universalweb/acid\";\nassert(cacheNativeMethod(Array.prototype.push)([], 1), 1);\n"}],"name":"cacheNativeMethod","params":[{"tag":"param","name":"method","type":"Function","optional":false,"description":"- Prototype method.","source":"* {Function} method - Prototype method."}],"type":"function","functionTag":"cacheNativeMethod","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Cached method.","source":"* {Function} - Cached method.\n *"}},"getPropNames":{"category":"object","description":"Returns an array of all properties (enumerable or not) found directly upon a given object.","examples":[{"tag":"example","optional":false,"description":"import { getPropNames, assert } from '@universalweb/acid'; assert(getPropNames({ 0: 'a', 1: 'b', 2: 'c' }), ['0', '1', '2']);","source":"import { getPropNames, assert } from \"@universalweb/acid\";\nassert(getPropNames({ 0: \"a\", 1: \"b\", 2: \"c\" }), [\"0\", \"1\", \"2\"]);\n"}],"name":"getPropNames","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- The object whose enumerable and non-enumerable own properties are to be returned.","source":"* {Object} source - The object whose enumerable and non-enumerable own properties are to be returned."}],"type":"function","functionTag":"getPropNames","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"An array of strings that correspond to the properties found directly upon the given object.","source":"* {Object} - An array of strings that correspond to the properties found directly upon the given object.\n *"}},"getPropDesc":{"category":"object","description":"Returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.","examples":[{"tag":"example","optional":false,"description":"getPropDesc({ bar: 42 }, 'bar'); // => { configurable: true, enumerable: true, value: 42, writable: true }","source":"getPropDesc({ bar: 42 }, \"bar\");\n// => { configurable: true, enumerable: true, value: 42, writable: true }\n"}],"name":"getPropDesc","params":[{"tag":"param","name":"target","type":"Object","optional":false,"description":"- The target object.","source":"* {Object} target - The target object."},{"tag":"param","name":"property","type":"String","optional":false,"description":"- The name of the property whose description is to be retrieved.","source":"* {String} property - The name of the property whose description is to be retrieved."}],"type":"function","functionTag":"getPropDesc","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"A property descriptor of the given property if it exists on the object, undefined otherwise.","source":"* {Object} - A property descriptor of the given property if it exists on the object, undefined otherwise.\n *"}},"defProp":{"category":"object","description":"Defines a new property directly on an object, or modifies an existing property on an object, and returns the object.","examples":[{"tag":"example","optional":false,"description":"defProp({}, 'key', { enumerable: false, configurable: false, writable: false, value: 'static' }).key; // => 'static'","source":"defProp({}, \"key\", {\n enumerable: false,\n configurable: false,\n writable: false,\n value: \"static\",\n}).key;\n// => 'static'\n"}],"name":"defProp","params":[{"tag":"param","name":"target","type":"Object","optional":false,"description":"- The object on which to define the property.","source":"* {Object} target - The object on which to define the property."},{"tag":"param","name":"property","type":"String","optional":false,"description":"- The name of the property whose description is to be retrieved.","source":"* {String} property - The name of the property whose description is to be retrieved."},{"tag":"param","name":"descriptor","type":"Object","optional":false,"description":"- The descriptor for the property being defined or modified.","source":"* {Object} descriptor - The descriptor for the property being defined or modified."}],"type":"function","functionTag":"defProp","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"The object that was passed to the function.","source":"* {Object} - The object that was passed to the function.\n *"}},"isSame":{"category":"object","description":"Determines whether two values are the same value.","examples":[{"tag":"example","optional":false,"description":"import { isSame, assert } from '@universalweb/acid'; assert(isSame('foo', 'foo'), true);","source":"import { isSame, assert } from \"@universalweb/acid\";\nassert(isSame(\"foo\", \"foo\"), true);\n"}],"name":"isSame","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Value to compare to.","source":"* {*} source - Value to compare to."},{"tag":"param","name":"target","type":"*","optional":false,"description":"- A value to compare.","source":"* {*} target - A value to compare."}],"type":"function","functionTag":"isSame","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"A Boolean indicating whether or not the two arguments are the same value.","source":"* {Boolean} - A Boolean indicating whether or not the two arguments are the same value.\n *"}},"add":{"category":"math","description":"Adds two numbers.","examples":[{"tag":"example","optional":false,"description":"import { add, assert } from '@universalweb/acid'; assert(add(1, 1), 2);","source":"import { add, assert } from \"@universalweb/acid\";\nassert(add(1, 1), 2);\n"}],"name":"add","params":[{"tag":"param","name":"augend","type":"Number","optional":false,"description":"- First number.","source":"* {Number} augend - First number."},{"tag":"param","name":"addend","type":"Number","optional":false,"description":"- Second number which is being added to another (augend).","source":"* {Number} addend - Second number which is being added to another (augend)."}],"type":"function","functionTag":"add","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the sum of the arguments.","source":"* {Number} - Returns the sum of the arguments.\n *"}},"deduct":{"category":"math","description":"Decrements a number.","examples":[{"tag":"example","optional":false,"description":"import { multiply, assert } from '@universalweb/acid'; assert(multiply(10, 5), 50); deduct(10); // => 9","source":"import { multiply, assert } from \"@universalweb/acid\";\nassert(multiply(10, 5), 50);\ndeduct(10);\n// => 9\n"}],"name":"deduct","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- First number.","source":"* {Number} source - First number."}],"type":"function","functionTag":"deduct","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns a decremented version of the number.","source":"* {Number} - Returns a decremented version of the number.\n *"}},"divide":{"category":"math","description":"Divides two numbers.","examples":[{"tag":"example","optional":false,"description":"import { divide, assert } from '@universalweb/acid'; assert(divide(10, 5), 2);","source":"import { divide, assert } from \"@universalweb/acid\";\nassert(divide(10, 5), 2);\n"}],"name":"divide","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- First number.","source":"* {Number} source - First number."},{"tag":"param","name":"value","type":"Number","optional":false,"description":"- Second number.","source":"* {Number} value - Second number."}],"type":"function","functionTag":"divide","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the quotient of the arguments.","source":"* {Number} - Returns the quotient of the arguments.\n *"}},"increment":{"category":"math","description":"Increments a number.","examples":[{"tag":"example","optional":false,"description":"import { multiply, assert } from '@universalweb/acid'; assert(multiply(10, 5), 50); increment(10); // => 11","source":"import { multiply, assert } from \"@universalweb/acid\";\nassert(multiply(10, 5), 50);\nincrement(10);\n// => 11\n"}],"name":"increment","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- First number.","source":"* {Number} source - First number."}],"type":"function","functionTag":"increment","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns an incremented version of the number.","source":"* {Number} - Returns an incremented version of the number.\n *"}},"multiply":{"category":"math","description":"Multiplies two numbers.","examples":[{"tag":"example","optional":false,"description":"import { multiply, assert } from '@universalweb/acid'; assert(multiply(10, 5), 50);","source":"import { multiply, assert } from \"@universalweb/acid\";\nassert(multiply(10, 5), 50);\n"}],"name":"multiply","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- First number.","source":"* {Number} source - First number."},{"tag":"param","name":"value","type":"Number","optional":false,"description":"- Second number.","source":"* {Number} value - Second number."}],"type":"function","functionTag":"multiply","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the product of the arguments.","source":"* {Number} - Returns the product of the arguments.\n *"}},"calcProgress":{"category":"utility","description":"Calculate the progress from a given total and current amount.","examples":[{"tag":"example","optional":false,"description":"import { calcProgress, assert } from '@universalweb/acid'; assert(calcProgress(100, 1), 1);","source":"import { calcProgress, assert } from \"@universalweb/acid\";\nassert(calcProgress(100, 1), 1);\n"}],"name":"calcProgress","params":[{"tag":"param","name":"total","type":"Number","optional":false,"description":"- The total amount.","source":"* {Number} total - The total amount."},{"tag":"param","name":"currentAmount","type":"Number","optional":false,"description":"- The current amount.","source":"* {Number} currentAmount - The current amount."}],"type":"function","functionTag":"calcProgress","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"The progress as a percentage.","source":"* {Number} - The progress as a percentage.\n *"}},"randomFloat":{"category":"math","description":"Roduces a random floating-point number between min (included) and max (excluded). Do not use for security or encryption..","examples":[{"tag":"example","optional":false,"description":"import { randomFloat, assert } from '@universalweb/acid'; assert(randomFloat(10, 0), (value) => { return value > 0 && value < 10;}); // => 9.1","source":"import { randomFloat, assert } from \"@universalweb/acid\";\nassert(randomFloat(10, 0), (value) => {\n return value > 0 && value < 10;\n});\n// => 9.1\n"}],"name":"randomFloat","params":[{"tag":"param","name":"max","type":"Number","optional":false,"description":"- Establishes highest possible value for the random number.","source":"* {Number} max - Establishes highest possible value for the random number."},{"tag":"param","name":"min","type":"Number","optional":true,"description":"- Establishes lowest possible value for the random number.","source":"* {Number} [min = 0] - Establishes lowest possible value for the random number.","default":"0"}],"type":"function","functionTag":"randomFloat","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns random integer between the max and min range.","source":"* {Number} - Returns random integer between the max and min range.\n *"}},"remainder":{"category":"math","description":"Extracts the remainder between two numbers.","examples":[{"tag":"example","optional":false,"description":"import { multiply, assert } from '@universalweb/acid'; assert(multiply(10, 5), 50); remainder(10, 6); // => 4","source":"import { multiply, assert } from \"@universalweb/acid\";\nassert(multiply(10, 5), 50);\nremainder(10, 6);\n// => 4\n"}],"name":"remainder","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- First number.","source":"* {Number} source - First number."},{"tag":"param","name":"value","type":"Number","optional":false,"description":"- Second number.","source":"* {Number} value - Second number."}],"type":"function","functionTag":"remainder","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the remainder of the arguments.","source":"* {Number} - Returns the remainder of the arguments.\n *"}},"subtractAll":{"category":"math","description":"Subtract all numbers in the array starting from left to right & return the difference.","examples":[{"tag":"example","optional":false,"description":"import { subtractAll, assert } from '@universalweb/acid'; assert(subtractAll([10, 1, 2, 3]), 5);","source":"import { subtractAll, assert } from \"@universalweb/acid\";\nassert(subtractAll([10, 1, 2, 3]), 5);\n"}],"name":"subtractAll","params":[{"tag":"param","name":"source","type":"Number[]","optional":false,"description":"- Array of numbers.","source":"* {Number[]} source - Array of numbers."}],"type":"function","functionTag":"subtractAll","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns the final difference.","source":"* {Number} - Returns the final difference.\n *"}},"sumAll":{"category":"math","description":"Sum all numbers in a given array.","examples":[{"tag":"example","optional":false,"description":"import { sumAll, assert } from '@universalweb/acid'; assert(sumAll([10, 1, 2, 3]), 5);","source":"import { sumAll, assert } from \"@universalweb/acid\";\nassert(sumAll([10, 1, 2, 3]), 5);\n"}],"name":"sumAll","params":[{"tag":"param","name":"source","type":"Number[]","optional":false,"description":"- Array of numbers.","source":"* {Number[]} source - Array of numbers."}],"type":"function","functionTag":"sumAll","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns a single number.","source":"* {Number} - Returns a single number.\n *"}},"isNumberInRange":{"category":"number","description":"Checks if a number is within a range.","examples":[{"tag":"example","optional":false,"description":"import { isNumberInRange, assert } from '@universalweb/acid'; assert(isNumberInRange(1, 0, 2), true); assert(isNumberInRange(1, 2, 5), false);","source":"import { isNumberInRange, assert } from \"@universalweb/acid\";\nassert(isNumberInRange(1, 0, 2), true);\nassert(isNumberInRange(1, 2, 5), false);\n"}],"name":"isNumberInRange","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."},{"tag":"param","name":"start","type":"Number","optional":false,"description":"- Beginning of range.","source":"* {Number} start - Beginning of range."},{"tag":"param","name":"end","type":"Number","optional":false,"description":"- End of range.","source":"* {Number} end - End of range."}],"type":"function","functionTag":"isNumberInRange","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isNumberNotInRange":{"category":"number","description":"Checks if a number is within a range.","examples":[{"tag":"example","optional":false,"description":"import { isNumberNotInRange, assert } from '@universalweb/acid'; assert(isNumberNotInRange(1, 0, 2), false); assert(isNumberNotInRange(1, 2, 5), true);","source":"import { isNumberNotInRange, assert } from \"@universalweb/acid\";\nassert(isNumberNotInRange(1, 0, 2), false);\nassert(isNumberNotInRange(1, 2, 5), true);\n"}],"name":"isNumberNotInRange","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."},{"tag":"param","name":"start","type":"Number","optional":false,"description":"- Beginning of range.","source":"* {Number} start - Beginning of range."},{"tag":"param","name":"end","type":"Number","optional":false,"description":"- End of range.","source":"* {Number} end - End of range."}],"type":"function","functionTag":"isNumberNotInRange","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isPositive":{"category":"number","description":"Checks if a number is negative & returns true or false.","examples":[{"tag":"example","optional":false,"description":"import { isPositive, assert } from '@universalweb/acid'; assert(isPositive(1), true);","source":"import { isPositive, assert } from \"@universalweb/acid\";\nassert(isPositive(1), true);\n"}],"name":"isPositive","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."}],"type":"function","functionTag":"isPositive","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isZero":{"category":"number","description":"Strictly checks if a number is zero.","examples":[{"tag":"example","optional":false,"description":"import { isZero, assert } from '@universalweb/acid'; assert(isZero(0), true);","source":"import { isZero, assert } from \"@universalweb/acid\";\nassert(isZero(0), true);\n"}],"name":"isZero","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."}],"type":"function","functionTag":"isZero","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isOdd":{"category":"number","description":"Checks if a number is odd & returns true or false.","examples":[{"tag":"example","optional":false,"description":"import { isOdd, assert } from '@universalweb/acid'; assert(isOdd(1), true);","source":"import { isOdd, assert } from \"@universalweb/acid\";\nassert(isOdd(1), true);\n"}],"name":"isOdd","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."}],"type":"function","functionTag":"isOdd","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isEven":{"category":"number","description":"Checks if a number is even & returns true or false.","examples":[{"tag":"example","optional":false,"description":"import { isEven, assert } from '@universalweb/acid'; assert(isEven(1), true);","source":"import { isEven, assert } from \"@universalweb/acid\";\nassert(isEven(1), true);\n"}],"name":"isEven","params":[{"tag":"param","name":"source","type":"Number","optional":false,"description":"- Number to be checked.","source":"* {Number} source - Number to be checked."}],"type":"function","functionTag":"isEven","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"getEntries":{"category":"object","description":"Return turns an array of arrays of key & value pairs. The first element in each key & value pair is the property key, and the second element is the associated value. If source is null or undefined it will not crash or error.","examples":[{"tag":"example","optional":false,"description":"import { getEntries, assert } from '@universalweb/acid'; assert(getEntries({b: 2, a: 1}), [['b', 2],['a', 1]]);","source":"import { getEntries, assert } from \"@universalweb/acid\";\nassert(getEntries({ b: 2, a: 1 }), [\n [\"b\", 2],\n [\"a\", 1],\n]);\n"}],"name":"getEntries","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- The source object.","source":"* {Object} source - The source object."}],"type":"function","functionTag":"getEntries","returns":{"tag":"returns","name":"-","type":"Array|undefined","optional":false,"description":"Returns the Object.entries of the source object.","source":"* {Array|undefined} - Returns the Object.entries of the source object.\n *"}},"compactKeys":{"category":"object","description":"Extracts all keys from an object whose values are not null or undefined.","examples":[{"tag":"example","optional":false,"description":"import { compactKeys, assert } from '@universalweb/acid'; assert(compactKeys({a: 1, b: 0, c: undefined, d: false, e: null}), ['a', 'b', 'd']);","source":"import { compactKeys, assert } from \"@universalweb/acid\";\nassert(compactKeys({ a: 1, b: 0, c: undefined, d: false, e: null }), [\n \"a\",\n \"b\",\n \"d\",\n]);\n"}],"name":"compactKeys","params":[{"tag":"param","name":"object","type":"Object","optional":false,"description":"- Object from which keys are extracted.","source":"* {Object} object - Object from which keys are extracted."}],"type":"function","functionTag":"compactKeys","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns an array of key values.","source":"* {Array} - Returns an array of key values.\n *"}},"compactMapAsyncObject":{"category":"object","description":"Asynchronously iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { compactMapAsyncObject, assert } from '@universalweb/acid'; assert(await compactMapAsyncObject({a: 1, b: undefined, c: 3}, (item) => { return item; }), {a: 1, c: 3});","source":"import { compactMapAsyncObject, assert } from \"@universalweb/acid\";\nassert(\n await compactMapAsyncObject({ a: 1, b: undefined, c: 3 }, (item) => {\n return item;\n }),\n { a: 1, c: 3 },\n);\n"}],"name":"compactMapAsyncObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"results","type":"Object|Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object|Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"compactMapAsyncObject","returns":{"tag":"returns","name":"-","type":"Object|Function","optional":false,"description":"An object with mapped properties that are not null or undefined.","source":"* {Object|Function} - An object with mapped properties that are not null or undefined.\n *"}},"compactMapObject":{"category":"object","description":"Iterates through the calling object and creates an object with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { compactMapObject, assert } from '@universalweb/acid'; assert(compactMapObject({a: 1, b: undefined, c: 3}, (item) => { return item; }), {a: 1, c: 3});","source":"import { compactMapObject, assert } from \"@universalweb/acid\";\nassert(\n compactMapObject({ a: 1, b: undefined, c: 3 }, (item) => {\n return item;\n }),\n { a: 1, c: 3 },\n);\n"}],"name":"compactMapObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"results","type":"Object|Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object|Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"compactMapObject","returns":{"tag":"returns","name":"-","type":"Object|Function","optional":false,"description":"An object with mapped properties that are not null or undefined.","source":"* {Object|Function} - An object with mapped properties that are not null or undefined.\n *"}},"filterObject":{"category":"object","description":"Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"filterObject({a: false, b: true, c: true}, (item) => { return item; }); // => {b: true, c: true}","source":"filterObject({ a: false, b: true, c: true }, (item) => {\n return item;\n});\n// => {b: true, c: true}\n"}],"name":"filterObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"results","type":"Object|Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object|Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"filterObject","returns":{"tag":"returns","name":"-","type":"Object|Function","optional":false,"description":"An object with properties that passed the test.","source":"* {Object|Function} - An object with properties that passed the test.\n *"}},"filterAsyncObject":{"category":"object","description":"Iterates through the calling object and creates an object with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"filterAsyncObject({a: false, b: true, c: true}, (item) => { return item; }); // => {b: true, c: true}","source":"filterAsyncObject({ a: false, b: true, c: true }, (item) => {\n return item;\n});\n// => {b: true, c: true}\n"}],"name":"filterAsyncObject","params":[{"tag":"param","name":"source","type":"Object|Function","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"results","type":"Object|Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object|Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"filterAsyncObject","returns":{"tag":"returns","name":"-","type":"Object|Function","optional":false,"description":"An object with properties that passed the test.","source":"* {Object|Function} - An object with properties that passed the test.\n *"}},"invert":{"category":"object","description":"Creates an inverted version of a given object by switching it's keys and values.","examples":[{"tag":"example","optional":false,"description":"import { invert, assert } from '@universalweb/acid'; assert(invert({a:1}), {1:'a'});","source":"import { invert, assert } from \"@universalweb/acid\";\nassert(invert({ a: 1 }), { 1: \"a\" });\n"}],"name":"invert","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Object to be inverted.","source":"* {Object} source - Object to be inverted."},{"tag":"param","name":"target","type":"Array","optional":true,"description":"- Empty object to be populated with inverted values from source.","source":"* {Array} [target = {}] - Empty object to be populated with inverted values from source.","default":"{}"}],"type":"function","functionTag":"invert","returns":{"tag":"returns","name":"-","type":"Object|undefined","optional":false,"description":"Returns object with keys and values switched.","source":"* {Object|undefined} - Returns object with keys and values switched.\n *"}},"isMatchObject":{"category":"object","description":"Performs a shallow strict comparison between two objects.","examples":[{"tag":"example","optional":false,"description":"import { assert, isMatchObject } from '@universalweb/acid'; assert(isMatchObject({a: 1}, {a: 1}), true);","source":"import { assert, isMatchObject } from \"@universalweb/acid\";\nassert(isMatchObject({ a: 1 }, { a: 1 }), true);\n"}],"name":"isMatchObject","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Source object.","source":"* {Object} source - Source object."},{"tag":"param","name":"target","type":"Object","optional":false,"description":"- Object to compare to source.","source":"* {Object} target - Object to compare to source."}],"type":"function","functionTag":"isMatchObject","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"regexSafe":{"category":"regex","description":"Returns a regex safe special characters escaped version of a string.","examples":[{"tag":"example","optional":false,"description":"import { regexSafe, assert } from '@universalweb/acid'; assert(regexSafe(/.+/), '\\/\\.\\+\\/');","source":"import { regexSafe, assert } from \"@universalweb/acid\";\nassert(regexSafe(/.+/), \"/.+/\");\n"}],"name":"regexSafe","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- String to make safe.","source":"* {Object} source - String to make safe."}],"type":"function","functionTag":"regexSafe","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns a regex safe version of the string.","source":"* {Object} - Returns a regex safe version of the string.\n *"}},"arrayToRegex":{"category":"regex","description":"Convert array of strings to regex.","examples":[{"tag":"example","optional":false,"description":"import { arrayToRegex, assert } from '@universalweb/acid'; assert(String(arrayToRegex(['a','b'])), String(/a|b/));","source":"import { arrayToRegex, assert } from \"@universalweb/acid\";\nassert(String(arrayToRegex([\"a\", \"b\"])), String(/a|b/));\n"}],"name":"arrayToRegex","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Array of strings.","source":"* {Object} source - Array of strings."}],"type":"function","functionTag":"arrayToRegex","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns a regex safe version of the string.","source":"* {Object} - Returns a regex safe version of the string.\n *"}},"isRegex":{"category":"type","description":"Checks if the value is a RegExp.","examples":[{"tag":"example","optional":false,"description":"import { isRegex, assert } from '@universalweb/acid'; assert(isRegex(/test/), true);","source":"import { isRegex, assert } from \"@universalweb/acid\";\nassert(isRegex(/test/), true);\n"}],"name":"isRegex","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isRegex","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"omit":{"category":"object","description":"Returns a clone of the given object without the given properties.","examples":[{"tag":"example","optional":false,"description":"import { omit, assert } from '@universalweb/acid'; assert(omit({a:1, b:2}, ['a']), {b:2}); assert(omit({a:1, b:2}, 'a'), {b:2}); assert(omit({1:'test', b:2}, 1), {b:2});","source":"import { omit, assert } from \"@universalweb/acid\";\nassert(omit({ a: 1, b: 2 }, [\"a\"]), { b: 2 });\nassert(omit({ a: 1, b: 2 }, \"a\"), { b: 2 });\nassert(omit({ 1: \"test\", b: 2 }, 1), { b: 2 });\n"}],"name":"omit","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Object from which keys are extracted.","source":"* {Object} source - Object from which keys are extracted."},{"tag":"param","name":"blacklist","type":"Array|RegExp|String","optional":false,"description":"- List of property keys to omit from the returned object.","source":"* {Array|RegExp|String} blacklist - List of property keys to omit from the returned object."}],"type":"function","functionTag":"omit","returns":{"tag":"returns","name":"-","type":"Object|undefined","optional":false,"description":"A new object with the removed.","source":"* {Object|undefined} - A new object with the removed.\n *"}},"pick":{"category":"object","description":"Returns a clone of the source object with the plucked properties.","examples":[{"tag":"example","optional":false,"description":"import { pick, assert } from '@universalweb/acid'; assert(pick({a:1, b:2, c:3}, ['a','b']), {a:1, b:2});","source":"import { pick, assert } from \"@universalweb/acid\";\nassert(pick({ a: 1, b: 2, c: 3 }, [\"a\", \"b\"]), { a: 1, b: 2 });\n"}],"name":"pick","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Object to be cloned.","source":"* {Object} source - Object to be cloned."},{"tag":"param","name":"whitelist","type":"Array","optional":false,"description":"- Array of property names used to determine what values to pluck.","source":"* {Array} whitelist - Array of property names used to determine what values to pluck."},{"tag":"param","name":"target","type":"Object","optional":true,"description":"- Object to be populated with plucked values.","source":"* {Object} [target = {}] - Object to be populated with plucked values.","default":"{}"}],"type":"function","functionTag":"pick","returns":{"tag":"returns","name":"-","type":"Object|undefined","optional":false,"description":"A new object with plucked properties.","source":"* {Object|undefined} - A new object with plucked properties.\n *"}},"objectSize":{"category":"object","description":"Returns the amount of keys on an object or if the length or size property of an object is present it will return it else it will default to returning the amount of keys on an object.","examples":[{"tag":"example","optional":false,"description":"import { objectSize, assert } from '@universalweb/acid'; assert(objectSize({ 0: 'a', 1: 'b', 2: 'c' }), 3);","source":"import { objectSize, assert } from \"@universalweb/acid\";\nassert(objectSize({ 0: \"a\", 1: \"b\", 2: \"c\" }), 3);\n"}],"name":"objectSize","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- The source object.","source":"* {Object} source - The source object."}],"type":"function","functionTag":"objectSize","returns":{"tag":"returns","name":"-","type":"Number|undefined","optional":false,"description":"The amount of keys.","source":"* {Number|undefined} - The amount of keys.\n *"}},"zipObject":{"category":"object","description":"Creates an object from two arrays, one of property identifiers and one of corresponding values.","examples":[{"tag":"example","optional":false,"description":"zipObject(['a', 'b'], [1, 2]); // => { 'a': 1, 'b': 2 }","source":"zipObject([\"a\", \"b\"], [1, 2]);\n// => { 'a': 1, 'b': 2 }\n"}],"name":"zipObject","params":[{"tag":"param","name":"properties","type":"Array","optional":false,"description":"- The property identifiers.","source":"* {Array} properties - The property identifiers."},{"tag":"param","name":"values","type":"Array","optional":false,"description":"- The property values.","source":"* {Array} values - The property values."}],"type":"function","functionTag":"zipObject","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the new object.","source":"* {Object} - Returns the new object.\n *"}},"unZipObject":{"category":"object","description":"Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration.","examples":[{"tag":"example","optional":false,"description":"unZipObject({ 'a': 1, 'b': 2 }); // => [['a', 'b'], [1, 2]]","source":"unZipObject({ a: 1, b: 2 });\n// => [['a', 'b'], [1, 2]]\n"}],"name":"unZipObject","params":[{"tag":"param","name":"object","type":"Object","optional":false,"description":"- The object to process.","source":"* {Object} object - The object to process."}],"type":"function","functionTag":"unZipObject","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns two arrays one of keys and the other of values inside a single array.","source":"* {Array} - Returns two arrays one of keys and the other of values inside a single array.\n *"}},"camelCase":{"category":"string","description":"Converts a string into Camel case format.","examples":[{"tag":"example","optional":false,"description":"import { camelCase, assert } from '@universalweb/acid'; assert(camelCase('camel case'), 'camelCase');","source":"import { camelCase, assert } from \"@universalweb/acid\";\nassert(camelCase(\"camel case\"), \"camelCase\");\n"}],"name":"camelCase","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be converted into Camel case.","source":"* {String} source - String to be converted into Camel case."}],"type":"function","functionTag":"camelCase","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Converted string in Camel case.","source":"* {String} - Converted string in Camel case.\n *"}},"kebabCase":{"category":"string","description":"Converts a string into single space sepperated words in Kebab case.","examples":[{"tag":"example","optional":false,"description":"import { kebabCase, assert } from '@universalweb/acid'; assert(kebabCase('kebab case'), 'kebab-case');","source":"import { kebabCase, assert } from \"@universalweb/acid\";\nassert(kebabCase(\"kebab case\"), \"kebab-case\");\n"}],"name":"kebabCase","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be converted into Kebab case.","source":"* {String} source - String to be converted into Kebab case."}],"type":"function","functionTag":"kebabCase","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Converted string in Kebab case.","source":"* {String} - Converted string in Kebab case.\n *"}},"snakeCase":{"category":"string","description":"Converts a string into single space sepperated words in snake case.","examples":[{"tag":"example","optional":false,"description":"import { snakeCase, assert } from '@universalweb/acid'; assert(snakeCase('snake case'), 'snake_case');","source":"import { snakeCase, assert } from \"@universalweb/acid\";\nassert(snakeCase(\"snake case\"), \"snake_case\");\n"}],"name":"snakeCase","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be converted into snake case.","source":"* {String} source - String to be converted into snake case."}],"type":"function","functionTag":"snakeCase","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Converted string in Snake case.","source":"* {String} - Converted string in Snake case.\n *"}},"upperCase":{"category":"string","description":"Converts a string into single space sepperated words in uppercase.","examples":[{"tag":"example","optional":false,"description":"import { upperCase, assert } from '@universalweb/acid'; assert(upperCase('upper-case'), 'UPPER CASE'); assert(upperCase('upper_case'), 'UPPER CASE');","source":"import { upperCase, assert } from \"@universalweb/acid\";\nassert(upperCase(\"upper-case\"), \"UPPER CASE\");\nassert(upperCase(\"upper_case\"), \"UPPER CASE\");\n"}],"name":"upperCase","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be converted into upper case.","source":"* {String} source - String to be converted into upper case."}],"type":"function","functionTag":"upperCase","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Converted string in upper case.","source":"* {String} - Converted string in upper case.\n *"}},"lowerCase":{"category":"string","description":"Converts a string into single space sepperated words in lowerCase.","examples":[{"tag":"example","optional":false,"description":"import { lowerCase, assert } from '@universalweb/acid'; assert(lowerCase('lower-CASE'), 'lower case');","source":"import { lowerCase, assert } from \"@universalweb/acid\";\nassert(lowerCase(\"lower-CASE\"), \"lower case\");\n"}],"name":"lowerCase","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be converted into upper case.","source":"* {String} source - String to be converted into upper case."}],"type":"function","functionTag":"lowerCase","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Converted string in upper case.","source":"* {String} - Converted string in upper case.\n *"}},"insertInRange":{"category":"string","description":"Inserts text into a string at a given position.","examples":[{"tag":"example","optional":false,"description":"import { insertInRange, assert } from '@universalweb/acid'; assert(insertInRange('A from Lucy.', 1, ' tab'), 'A tab from Lucy.');","source":"import { insertInRange, assert } from \"@universalweb/acid\";\nassert(insertInRange(\"A from Lucy.\", 1, \" tab\"), \"A tab from Lucy.\");\n"}],"name":"insertInRange","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to insert the text into.","source":"* {String} string - String to insert the text into."},{"tag":"param","name":"index","type":"Number","optional":false,"description":"- Point of insertion.","source":"* {Number} index - Point of insertion."},{"tag":"param","name":"text","type":"String","optional":false,"description":"- The string to be inserted.","source":"* {String} text - The string to be inserted."}],"type":"function","functionTag":"insertInRange","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"The string with the text inserted at the given point.","source":"* {String} - The string with the text inserted at the given point.\n *"}},"rightString":{"category":"string","description":"Plucks a letter using the index starting from the right.","examples":[{"tag":"example","optional":false,"description":"import { rightString, assert } from '@universalweb/acid'; assert(rightString('rightString'), 'g'); assert(rightString('rightString', 2), 'n');","source":"import { rightString, assert } from \"@universalweb/acid\";\nassert(rightString(\"rightString\"), \"g\");\nassert(rightString(\"rightString\", 2), \"n\");\n"}],"name":"rightString","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to extract the letter from.","source":"* {String} string - String to extract the letter from."},{"tag":"param","name":"index","type":"Number","optional":true,"description":"- The starting position.","source":"* {Number} [index=1] - The starting position.","default":"1"}],"type":"function","functionTag":"rightString","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"A letter at the given index.","source":"* {String} - A letter at the given index.\n *"}},"chunkString":{"category":"string","description":"Splits up a string into chunks.","examples":[{"tag":"example","optional":false,"description":"import { chunkString, assert } from '@universalweb/acid'; assert(chunkString('chunk', 2), ['ch', 'un', 'k']);","source":"import { chunkString, assert } from \"@universalweb/acid\";\nassert(chunkString(\"chunk\", 2), [\"ch\", \"un\", \"k\"]);\n"}],"name":"chunkString","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to chunked.","source":"* {String} string - String to chunked."},{"tag":"param","name":"size","type":"Number","optional":true,"description":"- The max string length per chunk.","source":"* {Number} [size] - The max string length per chunk."}],"type":"function","functionTag":"chunkString","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with strings that are <= size parameter.","source":"* {Array} - An array with strings that are <= size parameter.\n *"}},"initialString":{"category":"string","description":"Truncates everything before the index starting from the right.","examples":[{"tag":"example","optional":false,"description":"import { initialString, assert } from '@universalweb/acid'; assert(initialString('initialString', 2), 'initialStri');","source":"import { initialString, assert } from \"@universalweb/acid\";\nassert(initialString(\"initialString\", 2), \"initialStri\");\n"}],"name":"initialString","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to extract the initial letters from.","source":"* {String} string - String to extract the initial letters from."},{"tag":"param","name":"index","type":"Number","optional":true,"description":"- Starting point from the right.","source":"* {Number} [index=1] - Starting point from the right.","default":"1"}],"type":"function","functionTag":"initialString","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"A string with the characters before the index starting from the right.","source":"* {String} - A string with the characters before the index starting from the right.\n *"}},"restString":{"category":"string","description":"Truncates everything after a index.","examples":[{"tag":"example","optional":false,"description":"import { restString, assert } from '@universalweb/acid'; assert(restString('restString', 2), 'stString');","source":"import { restString, assert } from \"@universalweb/acid\";\nassert(restString(\"restString\", 2), \"stString\");\n"}],"name":"restString","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to extract the rest of the letters from.","source":"* {String} string - String to extract the rest of the letters from."},{"tag":"param","name":"index","type":"Number","optional":true,"description":"- Starting point.","source":"* {Number} [index=1] - Starting point.","default":"1"}],"type":"function","functionTag":"restString","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"A string without the characters up-to to the index.","source":"* {String} - A string without the characters up-to to the index.\n *"}},"replaceList":{"category":"string","description":"Replaces all occurrences of strings in an array with a value.","examples":[{"tag":"example","optional":false,"description":"import { replaceList, assert } from '@universalweb/acid'; assert(replaceList('user name was user.', ['user'], 'this'), 'this name was this.');","source":"import { replaceList, assert } from \"@universalweb/acid\";\nassert(\n replaceList(\"user name was user.\", [\"user\"], \"this\"),\n \"this name was this.\",\n);\n"}],"name":"replaceList","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be replaced.","source":"* {String} string - String to be replaced."},{"tag":"param","name":"words","type":"Array","optional":false,"description":"- Strings to replace.","source":"* {Array} words - Strings to replace."},{"tag":"param","name":"value","type":"String","optional":false,"description":"- The match replacement.","source":"* {String} value - The match replacement."}],"type":"function","functionTag":"replaceList","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"The string with the replacement.","source":"* {String} - The string with the replacement.\n *"}},"rawURLDecode":{"category":"string","description":"Raw URL decoder.","examples":[{"tag":"example","optional":false,"description":"import { rawURLDecode, assert } from '@universalweb/acid'; assert(rawURLDecode('Lucy%20saw%20diamonds%20in%20the%20sky.'), 'Lucy saw diamonds in the sky.');","source":"import { rawURLDecode, assert } from \"@universalweb/acid\";\nassert(\n rawURLDecode(\"Lucy%20saw%20diamonds%20in%20the%20sky.\"),\n \"Lucy saw diamonds in the sky.\",\n);\n"}],"name":"rawURLDecode","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be replaced.","source":"* {String} string - String to be replaced."}],"type":"function","functionTag":"rawURLDecode","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Converted string into the decoded URI Component .","source":"* {String} - Converted string into the decoded URI Component .\n *"}},"htmlEntities":{"category":"string","description":"Replaced sensitive characters with their matching html entity.","examples":[{"tag":"example","optional":false,"description":"import { htmlEntities, assert } from '@universalweb/acid'; assert(htmlEntities(``), `<script>console.log('Lucy & diamonds.')</script>`);","source":"import { htmlEntities, assert } from \"@universalweb/acid\";\nassert(\n htmlEntities(``),\n `<script>console.log('Lucy & diamonds.')</script>`,\n);\n"}],"name":"htmlEntities","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be replaced.","source":"* {String} string - String to be replaced."}],"type":"function","functionTag":"htmlEntities","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Replaced string.","source":"* {String} - Replaced string.\n *"}},"sanitize":{"category":"string","description":"Executes rawURLDecode followd by htmlEntities methods on a string.","examples":[{"tag":"example","optional":false,"description":"import { sanitize, assert } from '@universalweb/acid'; assert(sanitize(``),`<script>console.log('Lucy & diamonds.')</script>`);","source":"import { sanitize, assert } from \"@universalweb/acid\";\nassert(\n sanitize(``),\n `<script>console.log('Lucy & diamonds.')</script>`,\n);\n"}],"name":"sanitize","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be replaced.","source":"* {String} string - String to be replaced."}],"type":"function","functionTag":"sanitize","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Replaced string.","source":"* {String} - Replaced string.\n *"}},"tokenize":{"category":"string","description":"Break string by non-white space characters matches.","examples":[{"tag":"example","optional":false,"description":"import { tokenize, assert } from '@universalweb/acid'; assert(tokenize('I am Lucy!'), [\"I\", \"am\", \"Acid!\"]);","source":"import { tokenize, assert } from \"@universalweb/acid\";\nassert(tokenize(\"I am Lucy!\"), [\"I\", \"am\", \"Acid!\"]);\n"}],"name":"tokenize","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be broken up.","source":"* {String} string - String to be broken up."}],"type":"function","functionTag":"tokenize","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Array of words without white space characters.","source":"* {Array} - Array of words without white space characters.\n *"}},"words":{"description":"Break string into word matches.","examples":[{"tag":"example","optional":false,"description":"import { words, assert } from '@universalweb/acid'; assert(words('I am Acid!'), [\"I\", \"am\", \"Acid\"]);","source":"import { words, assert } from \"@universalweb/acid\";\nassert(words(\"I am Acid!\"), [\"I\", \"am\", \"Acid\"]);\n"}],"name":"words","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be broken up.","source":"* {String} string - String to be broken up."}],"type":"function","functionTag":"words","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Array of words with word characters only.","source":"* {Array} - Array of words with word characters only.\n *"}},"truncate":{"category":"string","description":"Truncates the string, accounting for word placement and character count.","examples":[{"tag":"example","optional":false,"description":"import { truncate, assert } from '@universalweb/acid'; assert(truncate('Where is Lucy?', 2), 'Where is');","source":"import { truncate, assert } from \"@universalweb/acid\";\nassert(truncate(\"Where is Lucy?\", 2), \"Where is\");\n"}],"name":"truncate","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be truncated.","source":"* {String} string - String to be truncated."},{"tag":"param","name":"maxLength","type":"Number","optional":false,"description":"- The desired max length of the string.","source":"* {Number} maxLength - The desired max length of the string."}],"type":"function","functionTag":"truncate","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"The mutated string.","source":"* {String} - The mutated string.\n *"}},"truncateRight":{"category":"string","description":"Truncates the string, accounting for word placement and character count from the right.","examples":[{"tag":"example","optional":false,"description":"import { truncateRight, assert } from '@universalweb/acid'; assert(truncateRight('Where is Lucy?', 6), 'Lucy?');","source":"import { truncateRight, assert } from \"@universalweb/acid\";\nassert(truncateRight(\"Where is Lucy?\", 6), \"Lucy?\");\n"}],"name":"truncateRight","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be truncated.","source":"* {String} string - String to be truncated."},{"tag":"param","name":"maxLength","type":"Number","optional":false,"description":"- The desired max length of the string.","source":"* {Number} maxLength - The desired max length of the string."}],"type":"function","functionTag":"truncateRight","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"The mutated string.","source":"* {String} - The mutated string.\n *"}},"upperFirstLetter":{"category":"string","description":"Returns the first letter capitalized.","examples":[{"tag":"example","optional":false,"description":"import { upperFirstLetter, assert } from '@universalweb/acid'; assert(upperFirstLetter('upper'), 'U');","source":"import { upperFirstLetter, assert } from \"@universalweb/acid\";\nassert(upperFirstLetter(\"upper\"), \"U\");\n"}],"name":"upperFirstLetter","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to extract first letter from.","source":"* {String} string - String to extract first letter from."}],"type":"function","functionTag":"upperFirstLetter","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"An upper case letter.","source":"* {String} - An upper case letter.\n *"}},"upperFirst":{"category":"string","description":"Capitalizes the first letter.","examples":[{"tag":"example","optional":false,"description":"import { upperFirst, assert } from '@universalweb/acid'; assert(upperFirstLetter('upper'), 'U'); upperFirst('upper'); // => 'Upper'","source":"import { upperFirst, assert } from \"@universalweb/acid\";\nassert(upperFirstLetter(\"upper\"), \"U\");\nupperFirst(\"upper\");\n// => 'Upper'\n"}],"name":"upperFirst","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be mutated.","source":"* {String} string - String to be mutated."}],"type":"function","functionTag":"upperFirst","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"String with first letter capitalized.","source":"* {String} - String with first letter capitalized.\n *"}},"upperFirstOnly":{"category":"string","description":"Capitalize first letter and lower case the rest.","examples":[{"tag":"example","optional":false,"description":"import { upperFirstOnly, assert } from '@universalweb/acid'; assert(upperFirstOnly('upper'), 'Upper');","source":"import { upperFirstOnly, assert } from \"@universalweb/acid\";\nassert(upperFirstOnly(\"upper\"), \"Upper\");\n"}],"name":"upperFirstOnly","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be mutated.","source":"* {String} string - String to be mutated."}],"type":"function","functionTag":"upperFirstOnly","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"String with first letter capitalized.","source":"* {String} - String with first letter capitalized.\n *"}},"upperFirstAll":{"category":"string","description":"Capitalize all first letters.","examples":[{"tag":"example","optional":false,"description":"import { upperFirstAll, assert } from '@universalweb/acid'; assert(upperFirstAll('uPPer'), 'UPPer');","source":"import { upperFirstAll, assert } from \"@universalweb/acid\";\nassert(upperFirstAll(\"uPPer\"), \"UPPer\");\n"}],"name":"upperFirstAll","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be mutated.","source":"* {String} string - String to be mutated."}],"type":"function","functionTag":"upperFirstAll","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"String with all first letters capitalized.","source":"* {String} - String with all first letters capitalized.\n *"}},"upperFirstOnlyAll":{"category":"string","description":"Capitalize all first letters and lower case the rest.","examples":[{"tag":"example","optional":false,"description":"import { upperFirstOnlyAll, assert } from '@universalweb/acid'; assert(upperFirstOnlyAll('this is'), 'This Is');","source":"import { upperFirstOnlyAll, assert } from \"@universalweb/acid\";\nassert(upperFirstOnlyAll(\"this is\"), \"This Is\");\n"}],"name":"upperFirstOnlyAll","params":[{"tag":"param","name":"string","type":"String","optional":false,"description":"- String to be mutated.","source":"* {String} string - String to be mutated."}],"type":"function","functionTag":"upperFirstOnlyAll","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"String with all first letters capitalized.","source":"* {String} - String with all first letters capitalized.\n *"}},"getTypeName":{"category":"type","description":"Returns the constructor name of an object.","examples":[{"tag":"example","optional":false,"description":"import { getTypeName, assert } from '@universalweb/acid'; assert(getTypeName(1), true);","source":"import { getTypeName, assert } from \"@universalweb/acid\";\nassert(getTypeName(1), true);\n"}],"name":"getTypeName","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"getTypeName","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isArguments":{"category":"type","description":"Checks if the value is an Arguments object.","examples":[{"tag":"example","optional":false,"description":"import { isArguments, assert } from '@universalweb/acid'; assert(isArguments((function() { return arguments;})()), true); assert(isArguments([]), false);","source":"import { isArguments, assert } from \"@universalweb/acid\";\nassert(\n isArguments(\n (function () {\n return arguments;\n })(),\n ),\n true,\n);\nassert(isArguments([]), false);\n"}],"name":"isArguments","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isArguments","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isMap":{"category":"type","description":"Checks if an object or objects are a Map.","examples":[{"tag":"example","optional":false,"description":"import { isMap } from '@universalweb/acid'; isMap(new Map()); // => true","source":"import { isMap } from \"@universalweb/acid\";\nisMap(new Map());\n// => true\n"}],"name":"isMap","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isMap","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isTypedArray":{"category":"type","description":"Checks if an object is a TypedArray. A TypedArray object is an array-like view of an underlying binary data buffer.","examples":[{"tag":"example","optional":false,"description":"import { isTypedArray, assert } from '@universalweb/acid'; assert(isTypedArray([]), false); assert(isTypedArray(new Int8Array()), true);","source":"import { isTypedArray, assert } from \"@universalweb/acid\";\nassert(isTypedArray([]), false);\nassert(isTypedArray(new Int8Array()), true);\n"}],"name":"isTypedArray","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isTypedArray","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"noValue":{"category":"type","description":"Checks if an object is null or undefined.","examples":[{"tag":"example","optional":false,"description":"import { noValue, assert } from '@universalweb/acid'; assert(noValue(null), true); assert(noValue(undefined), true); assert(noValue(1), false); assert(noValue(0), false);","source":"import { noValue, assert } from \"@universalweb/acid\";\nassert(noValue(null), true);\nassert(noValue(undefined), true);\nassert(noValue(1), false);\nassert(noValue(0), false);\n"}],"name":"noValue","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"noValue","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isArrayLike":{"category":"type","description":"Checks if an object has a .length property that's greater than or equal to 0 & is not a function. If strict is enabled it will check to see if there is an item returned in range of the number returned bu the length property.","examples":[{"tag":"example","optional":false,"description":"import { isArrayLike, assert } from '@universalweb/acid'; assert(isArrayLike([]), true); assert(isArrayLike(2), false);","source":"import { isArrayLike, assert } from \"@universalweb/acid\";\nassert(isArrayLike([]), true);\nassert(isArrayLike(2), false);\n"}],"name":"isArrayLike","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."},{"tag":"param","name":"strictFlag","type":"*","optional":false,"description":"- Strict flag to also check to see if keys are whole intigers greater than or equal to 0.","source":"* {*} strictFlag - Strict flag to also check to see if keys are whole intigers greater than or equal to 0."}],"type":"function","functionTag":"isArrayLike","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isBigInt":{"category":"type","description":"Checks if an object or objects are a BigInt.","examples":[{"tag":"example","optional":false,"description":"import { isBigInt, assert } from '@universalweb/acid'; assert(isBigInt(BigInt(123)), true);","source":"import { isBigInt, assert } from \"@universalweb/acid\";\nassert(isBigInt(BigInt(123)), true);\n"}],"name":"isBigInt","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isBigInt","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isBoolean":{"category":"type","description":"Checks if the value is a Boolean.","examples":[{"tag":"example","optional":false,"description":"import { isBoolean } from '@universalweb/acid'; isBoolean(true); // => true","source":"import { isBoolean } from \"@universalweb/acid\";\nisBoolean(true);\n// => true\n"}],"name":"isBoolean","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isBoolean","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isArrayBuffer":{"category":"type","description":"Checks if an object or objects are a ArrayBuffer.","examples":[{"tag":"example","optional":false,"description":"import { isArrayBuffer, assert } from '@universalweb/acid'; assert(isArrayBuffer(new ArrayBuffer()), true);","source":"import { isArrayBuffer, assert } from \"@universalweb/acid\";\nassert(isArrayBuffer(new ArrayBuffer()), true);\n"}],"name":"isArrayBuffer","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isArrayBuffer","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isChild":{"category":"type","description":"Checks if an object is the child of another. Typically used for classes.","examples":[{"tag":"example","optional":false,"description":"import { isChild, construct, assert } from '@universalweb/acid'; class Grandparent{} class Parent extends Grandparent{} class Child extends Parent{} const child = construct(Child); assert(isChild(Child, Grandparent), true); assert(isChild(Child, Parent), false); assert(isChild(Parent, Grandparent), false); assert(isChild(child1, child3), false);","source":"import { isChild, construct, assert } from \"@universalweb/acid\";\nclass Grandparent {}\nclass Parent extends Grandparent {}\nclass Child extends Parent {}\nconst child = construct(Child);\nassert(isChild(Child, Grandparent), true);\nassert(isChild(Child, Parent), false);\nassert(isChild(Parent, Grandparent), false);\nassert(isChild(child1, child3), false);\n"}],"name":"isChild","params":[{"tag":"param","name":"sourceChild","type":"*","optional":false,"description":"- Object to be checked as the child.","source":"* {*} sourceChild - Object to be checked as the child."},{"tag":"param","name":"targetParent","type":"*","optional":false,"description":"- Object to be checked as the parent.","source":"* {*} targetParent - Object to be checked as the parent."}],"type":"function","functionTag":"isChild","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isCloneable":{"category":"type","description":"Checks if an object or objects are a structured-cloneable type.","examples":[{"tag":"example","optional":false,"description":"import { isCloneable, assert } from '@universalweb/acid'; assert(isCloneable(function (){}), false);","source":"import { isCloneable, assert } from \"@universalweb/acid\";\nassert(\n isCloneable(function () {}),\n false,\n);\n"}],"name":"isCloneable","params":[{"tag":"param","name":"source","type":"...*","optional":false,"description":"- Object to be checked.","source":"* {...*} source - Object to be checked."}],"type":"function","functionTag":"isCloneable","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isDate":{"category":"type","description":"Checks if the value is a Date.","examples":[{"tag":"example","optional":false,"description":"import { isDate, assert } from '@universalweb/acid'; assert(isDate(new Date()), true);","source":"import { isDate, assert } from \"@universalweb/acid\";\nassert(isDate(new Date()), true);\n"}],"name":"isDate","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isDate","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isEmpty":{"category":"type","description":"Checks if the value is empty.","examples":[{"tag":"example","optional":false,"description":"import { isEmpty, assert } from '@universalweb/acid'; assert(isEmpty([]), true);","source":"import { isEmpty, assert } from \"@universalweb/acid\";\nassert(isEmpty([]), true);\n"}],"name":"isEmpty","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isEmpty","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isFalse":{"category":"utility","description":"Check if a value equals false using strict comparison.","examples":[{"tag":"example","optional":false,"description":"import { isFalse, assert } from '@universalweb/acid'; assert(isFalse(1), false); assert(isFalse(true), false); assert(isFalse(false), true);","source":"import { isFalse, assert } from \"@universalweb/acid\";\nassert(isFalse(1), false);\nassert(isFalse(true), false);\nassert(isFalse(false), true);\n"}],"name":"isFalse","params":[{"tag":"param","name":"source","type":"Boolean","optional":false,"description":"- Item to compare.","source":"* {Boolean} source - Item to compare."}],"type":"function","functionTag":"isFalse","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true if the item equals false.","source":"* {Boolean} - Returns true if the item equals false.\n *"}},"isF32":{"category":"type","description":"Checks if an object or objects are a Float32Array.","examples":[{"tag":"example","optional":false,"description":"import { isF32, assert } from '@universalweb/acid'; assert(isF32(new Float32Array()), true);","source":"import { isF32, assert } from \"@universalweb/acid\";\nassert(isF32(new Float32Array()), true);\n"}],"name":"isF32","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isF32","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isF64":{"category":"type","description":"Checks if an object or objects are a Float64Array.","examples":[{"tag":"example","optional":false,"description":"import { isF64 } from '@universalweb/acid'; isF64(new Float64Array()); // => true","source":"import { isF64 } from \"@universalweb/acid\";\nisF64(new Float64Array());\n// => true\n"}],"name":"isF64","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isF64","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isFloat":{"category":"type","description":"Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.","examples":[{"tag":"example","optional":false,"description":"import { isFloat } from '@universalweb/acid'; isFloat(1.01); // => true","source":"import { isFloat } from \"@universalweb/acid\";\nisFloat(1.01);\n// => true\n"}],"name":"isFloat","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isFloat","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isI16":{"category":"type","description":"Checks if an object or objects are a Int16Array.","examples":[{"tag":"example","optional":false,"description":"import { isI16 } from '@universalweb/acid'; isI16(new Int16Array()); // => true","source":"import { isI16 } from \"@universalweb/acid\";\nisI16(new Int16Array());\n// => true\n"}],"name":"isI16","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isI16","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isI32":{"category":"type","description":"Checks if an object or objects are a Int32Array.","examples":[{"tag":"example","optional":false,"description":"import { isI32, assert } from '@universalweb/acid'; assert(isI32(new Int32Array()), true);","source":"import { isI32, assert } from \"@universalweb/acid\";\nassert(isI32(new Int32Array()), true);\n"}],"name":"isI32","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isI32","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isI8":{"category":"type","description":"Checks if an object or objects are a Int8Array.","examples":[{"tag":"example","optional":false,"description":"import { isInt8 } from '@universalweb/acid'; isInt8(new Int8Array()); // => true","source":"import { isInt8 } from \"@universalweb/acid\";\nisInt8(new Int8Array());\n// => true\n"}],"name":"isI8","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isI8","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isIterable":{"category":"type","description":"Checks if the object has inherited properties from the built-in Iterator class and which implements the Symbol.iterator interface. Built-in Iterators: String, Array, TypedArray, Map, Set, and Segments.","examples":[{"tag":"example","optional":false,"description":"import { isIterable, assert } from '@universalweb/acid'; assert(isIterable([]), true); assert(isIterable(new Int8Array()), true); assert(isIterable('test'), false);","source":"import { isIterable, assert } from \"@universalweb/acid\";\nassert(isIterable([]), true);\nassert(isIterable(new Int8Array()), true);\nassert(isIterable(\"test\"), false);\n"}],"name":"isIterable","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isIterable","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isPromise":{"category":"type","description":"Checks if an object is a promise.","examples":[{"tag":"example","optional":false,"description":"import { isPromise } from '@universalweb/acid'; isPromise(new Promise(() => {})); // => true","source":"import { isPromise } from \"@universalweb/acid\";\nisPromise(new Promise(() => {}));\n// => true\n"}],"name":"isPromise","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isPromise","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"True or false.","source":"* {Boolean} - True or false.\n *"}},"isKindAsync":{"category":"type","description":"Checks if an object is a kind of async object such as async function, promise, or generator.","examples":[{"tag":"example","optional":false,"description":"import { isKindAsync, assert } from '@universalweb/acid'; assert(isKindAsync(async() => {}), true);","source":"import { isKindAsync, assert } from \"@universalweb/acid\";\nassert(\n isKindAsync(async () => {}),\n true,\n);\n"}],"name":"isKindAsync","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isKindAsync","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"True or false.","source":"* {Boolean} - True or false.\n *"}},"isParent":{"category":"type","description":"Checks if an object is the child of another. Typically used for classes.","examples":[{"tag":"example","optional":false,"description":"import { isParent, construct, assert } from '@universalweb/acid'; class parentClass{} class otherClass{} const child1 = construct(parentClass); const child2 = construct(otherClass); assert(isParent(child1, parentClass), true); assert(isParent(child3, parentClass), false); assert(isParent(parentClass, child1), false); assert(isParent(child1, child3), false);","source":"import { isParent, construct, assert } from \"@universalweb/acid\";\nclass parentClass {}\nclass otherClass {}\nconst child1 = construct(parentClass);\nconst child2 = construct(otherClass);\nassert(isParent(child1, parentClass), true);\nassert(isParent(child3, parentClass), false);\nassert(isParent(parentClass, child1), false);\nassert(isParent(child1, child3), false);\n"}],"name":"isParent","params":[{"tag":"param","name":"sourceParent","type":"*","optional":false,"description":"- Object to be checked as the child.","source":"* {*} sourceParent - Object to be checked as the child."},{"tag":"param","name":"targetChild","type":"*","optional":false,"description":"- Object to be checked as the parent.","source":"* {*} targetChild - Object to be checked as the parent."}],"type":"function","functionTag":"isParent","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isPrimitive":{"category":"type","description":"Checks if an object is a primitive.","examples":[{"tag":"example","optional":false,"description":"import { isPrimitive, assert } from '@universalweb/acid'; assert(isPrimitive(1), true); assert(isPrimitive(() => {}), false);","source":"import { isPrimitive, assert } from \"@universalweb/acid\";\nassert(isPrimitive(1), true);\nassert(\n isPrimitive(() => {}),\n false,\n);\n"}],"name":"isPrimitive","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isPrimitive","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"True or false.","source":"* {Boolean} - True or false.\n *"}},"isRelated":{"category":"type","description":"Checks if objects are related to each other using instanceof. There is no required order for arguments given it will check all available ways.","examples":[{"tag":"example","optional":false,"description":"import { isRelated, construct, assert } from '@universalweb/acid'; class parentClass{} class otherClass{} const child1 = construct(parentClass); const child2 = construct(parentClass); const child3 = construct(otherClass); assert(isRelated(child1, child2), true); assert(isRelated(child1, parentClass), true); assert(isRelated(parentClass, child2), true); assert(isRelated(child1, child3), false);","source":"import { isRelated, construct, assert } from \"@universalweb/acid\";\nclass parentClass {}\nclass otherClass {}\nconst child1 = construct(parentClass);\nconst child2 = construct(parentClass);\nconst child3 = construct(otherClass);\nassert(isRelated(child1, child2), true);\nassert(isRelated(child1, parentClass), true);\nassert(isRelated(parentClass, child2), true);\nassert(isRelated(child1, child3), false);\n"}],"name":"isRelated","params":[{"tag":"param","name":"targetOne","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} targetOne - Object to be checked."},{"tag":"param","name":"targetTwo","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} targetTwo - Object to be checked."}],"type":"function","functionTag":"isRelated","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isSafeInt":{"category":"type","description":"Checks if the value (typically a number) as a string has a decimal point. Alias of Number.isInteger.","examples":[{"tag":"example","optional":false,"description":"import { isSafeInt } from '@universalweb/acid'; isSafeInt(1.01); // => true","source":"import { isSafeInt } from \"@universalweb/acid\";\nisSafeInt(1.01);\n// => true\n"}],"name":"isSafeInt","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isSafeInt","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isTrue":{"category":"utility","description":"Check if a value equals true using strict comparison.","examples":[{"tag":"example","optional":false,"description":"import { isTrue, assert } from '@universalweb/acid'; assert(isTrue(1), false); assert(isTrue(true), true); assert(isTrue(false), false);","source":"import { isTrue, assert } from \"@universalweb/acid\";\nassert(isTrue(1), false);\nassert(isTrue(true), true);\nassert(isTrue(false), false);\n"}],"name":"isTrue","params":[{"tag":"param","name":"source","type":"Boolean","optional":false,"description":"- Item to check.","source":"* {Boolean} source - Item to check."}],"type":"function","functionTag":"isTrue","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true if the item is true.","source":"* {Boolean} - Returns true if the item is true.\n *"}},"isU16":{"category":"type","description":"Checks if an object or objects are a Uint16Array.","examples":[{"tag":"example","optional":false,"description":"import { isU16 } from '@universalweb/acid'; isU16(new Uint16Array()); // => true","source":"import { isU16 } from \"@universalweb/acid\";\nisU16(new Uint16Array());\n// => true\n"}],"name":"isU16","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isU16","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isU32":{"category":"type","description":"Checks if an object or objects are a Uint32Array.","examples":[{"tag":"example","optional":false,"description":"import { isU32 } from '@universalweb/acid'; isU32(new Uint32Array()); // => true","source":"import { isU32 } from \"@universalweb/acid\";\nisU32(new Uint32Array());\n// => true\n"}],"name":"isU32","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isU32","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isU8":{"category":"type","description":"Checks if an object or objects are a Uint8Array.","examples":[{"tag":"example","optional":false,"description":"import { isU8 } from '@universalweb/acid'; isU8(new Uint8Array()); // => true","source":"import { isU8 } from \"@universalweb/acid\";\nisU8(new Uint8Array());\n// => true\n"}],"name":"isU8","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isU8","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isU8C":{"category":"type","description":"Checks if an object or objects are a Uint8ClampedArray.","examples":[{"tag":"example","optional":false,"description":"import { isU8C } from '@universalweb/acid'; isU8C(new Uint8ClampedArray()); // => true","source":"import { isU8C } from \"@universalweb/acid\";\nisU8C(new Uint8ClampedArray());\n// => true\n"}],"name":"isU8C","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isU8C","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isWeakMap":{"category":"type","description":"Checks if an object or objects are a WeakMap.","examples":[{"tag":"example","optional":false,"description":"import { isWeakMap } from '@universalweb/acid'; assert(isWeakMap(new WeakMap()), true);","source":"import { isWeakMap } from \"@universalweb/acid\";\nassert(isWeakMap(new WeakMap()), true);\n"}],"name":"isWeakMap","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"isWeakMap","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"isTruthy":{"category":"type","description":"Check if a value is isTruthy which is anything but false, null, 0, \"\", undefined, and NaN.","examples":[{"tag":"example","optional":false,"description":"import { isTruthy, assert } from '@universalweb/acid'; assert(isTruthy(1), true); assert(isTruthy(0), false);","source":"import { isTruthy, assert } from \"@universalweb/acid\";\nassert(isTruthy(1), true);\nassert(isTruthy(0), false);\n"}],"name":"isTruthy","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Item to be isTruthy checked.","source":"* {*} source - Item to be isTruthy checked."},{"tag":"param","name":"returnIfTrue","type":"*","optional":true,"description":"- Item to be returned if item is isTruthy.","source":"* {*} [returnIfTrue = true] - Item to be returned if item is isTruthy.","default":"true"}],"type":"function","functionTag":"isTruthy","returns":{"tag":"returns","name":"-","type":"Boolean|*","optional":false,"description":"Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.","source":"* {Boolean|*} - Returns true if the item is isTruthy or returnIfTrue if provided otherwise returns false.\n *"}},"isFalsy":{"category":"type","description":"Check if a value is isFalsy which are false, null, 0, \"\", undefined, and NaN.","examples":[{"tag":"example","optional":false,"description":"import { isFalsy, assert } from '@universalweb/acid'; assert(isFalsy(0), true); assert(isFalsy(1), false);","source":"import { isFalsy, assert } from \"@universalweb/acid\";\nassert(isFalsy(0), true);\nassert(isFalsy(1), false);\n"}],"name":"isFalsy","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Item to be isFalsy checked.","source":"* {*} source - Item to be isFalsy checked."},{"tag":"param","name":"returnIfTrue","type":"*","optional":true,"description":"- Item to be returned if item is isFalsy.","source":"* {*} [returnIfTrue = true] - Item to be returned if item is isFalsy.","default":"true"}],"type":"function","functionTag":"isFalsy","returns":{"tag":"returns","name":"-","type":"Boolean|*","optional":false,"description":"Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.","source":"* {Boolean|*} - Returns true if the item is isFalsy or returnIfTrue if provided otherwise returns false.\n *"}},"ifValue":{"category":"utility","description":"If source has a value then assign it to an object or call a function.","examples":[{"tag":"example","optional":false,"description":"import { ifValue, assert } from '@universalweb/acid'; assert(ifValue(1, {}, 'a'), {a:1});","source":"import { ifValue, assert } from \"@universalweb/acid\";\nassert(ifValue(1, {}, \"a\"), { a: 1 });\n"}],"name":"ifValue","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- The source object to be hasValue checked.","source":"* {*} source - The source object to be hasValue checked."},{"tag":"param","name":"target","type":"Function|Object","optional":false,"description":"- The target which is either a function or object.","source":"* {Function|Object} target - The target which is either a function or object."},{"tag":"param","name":"optional","type":"*|String","optional":false,"description":"- If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target).","source":"* {*|String} optional - If target is a plain object then it must be a string and is used to assign the property name. Else it's used as the this for the provided function (target)."},{"tag":"param","name":"args","type":"Array","optional":false,"description":"- The args that would be used if the target is a function and is the params that is applied to the function.","source":"* {Array} args - The args that would be used if the target is a function and is the params that is applied to the function."}],"type":"function","functionTag":"ifValue","returns":{"tag":"returns","name":"The","type":"source|undefined","optional":false,"description":"source object if it passes the hasValue check.","source":"* {source|undefined} The source object if it passes the hasValue check.\n *"}},"notEqual":{"category":"utility","description":"Performs a deep comparison between two objects & determines if they're different using strict comparison.","examples":[{"tag":"example","optional":false,"description":"import { notEqual, assert } from '@universalweb/acid'; assert(notEqual({a: [1,2,3]}, {a: [1,3,3]}), true);","source":"import { notEqual, assert } from \"@universalweb/acid\";\nassert(notEqual({ a: [1, 2, 3] }, { a: [1, 3, 3] }), true);\n"}],"name":"notEqual","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Source object.","source":"* {*} source - Source object."},{"tag":"param","name":"target","type":"*","optional":false,"description":"- Object to be compared.","source":"* {*} target - Object to be compared."}],"type":"function","functionTag":"notEqual","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"jsonParse":{"category":"utility","description":"Parses JSON string with safety check for undefined.","examples":[{"tag":"example","optional":false,"description":"import { jsonParse, assert } from '@universalweb/acid'; assert(jsonParse('{a:1}'), {a:1});","source":"import { jsonParse, assert } from \"@universalweb/acid\";\nassert(jsonParse(\"{a:1}\"), { a: 1 });\n"}],"name":"jsonParse","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- String to be parsed.","source":"* {String} source - String to be parsed."},{"tag":"param","name":"reviver","type":"Function","optional":false,"description":"- A function that prescribes how each value originally produced by parsing is transformed before being returned.","source":"* {Function} reviver - A function that prescribes how each value originally produced by parsing is transformed before being returned."}],"type":"function","functionTag":"jsonParse","returns":{"tag":"returns","name":"-","type":"Object|undefined","optional":false,"description":"Returns the parsed object.","source":"* {Object|undefined} - Returns the parsed object.\n *"}},"stringify":{"category":"utility","description":"Stringify an object into a JSON string.","examples":[{"tag":"example","optional":false,"description":"import { stringify, assert } from '@universalweb/acid'; assert(stringify({a:1}), '{a:1}');","source":"import { stringify, assert } from \"@universalweb/acid\";\nassert(stringify({ a: 1 }), \"{a:1}\");\n"}],"name":"stringify","params":[{"tag":"param","name":"object","type":"Object","optional":false,"description":"- Object to Stringify.","source":"* {Object} object - Object to Stringify."}],"type":"function","functionTag":"stringify","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Returns the object as a valid JSON string.","source":"* {String} - Returns the object as a valid JSON string.\n *"}},"assert":{"category":"utility","description":"Check if source value matches the expected value.","examples":[{"tag":"example","optional":false,"description":"import { assert } from '@universalweb/acid'; if (!assert(1,1)) { new Error('Assert Method Failed'); }","source":"import { assert } from \"@universalweb/acid\";\nif (!assert(1, 1)) {\n new Error(\"Assert Method Failed\");\n}\n"}],"name":"assert","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- The source object to compare to.","source":"* {*} source - The source object to compare to."},{"tag":"param","name":"expected","type":"*","optional":false,"description":"- The expected result that's compared to the source.","source":"* {*} expected - The expected result that's compared to the source."},{"tag":"param","name":"options","type":"*","optional":false,"description":"- Additional options for the Error instance & unit test information.","source":"* {*} options - Additional options for the Error instance & unit test information."}],"type":"function","functionTag":"assert","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns a deep clone of an object.","source":"* {Object} - Returns a deep clone of an object.\n *"}},"bindAll":{"category":"utility","description":"Loops through an object or an array and binds the given object to all functions encountered. Optionally accepts an object which to assign the newly bound functions to.","examples":[{"tag":"example","optional":false,"description":"import { assert, bindAll } from '@universalweb/acid'; const bounded = bindAll([function () { return this;}], 'Bounded'); assert(bounded[0](), 'Bounded');","source":"import { assert, bindAll } from \"@universalweb/acid\";\nconst bounded = bindAll(\n [\n function () {\n return this;\n },\n ],\n \"Bounded\",\n);\nassert(bounded[0](), \"Bounded\");\n"}],"name":"bindAll","params":[{"tag":"param","name":"collection","type":"Object|Function|Array","optional":false,"description":"- The functions to bind.","source":"* {Object|Function|Array} collection - The functions to bind."},{"tag":"param","name":"bindThis","type":"*","optional":false,"description":"- Object to be bound to functions.","source":"* {*} bindThis - Object to be bound to functions."},{"tag":"param","name":"targetAssign","type":"Object|Function|Array","optional":false,"description":"- Object to assign newly bound functions to.","source":"* {Object|Function|Array} targetAssign - Object to assign newly bound functions to."}],"type":"function","functionTag":"bindAll","returns":{"tag":"returns","name":"-","type":"Object|Function|Array","optional":false,"description":"Returns the collection of bound functions or the assign target provided.","source":"* {Object|Function|Array} - Returns the collection of bound functions or the assign target provided.\n *"}},"clear":{"category":"utility","description":"Clears the values out of an array, buffer, and objects like Map that have a clear method.","examples":[{"tag":"example","optional":false,"description":"import { clear, assert } from '@universalweb/acid'; assert(clear(Buffer.from([1,'B', 'Cat'])), []);","source":"import { clear, assert } from \"@universalweb/acid\";\nassert(clear(Buffer.from([1, \"B\", \"Cat\"])), []);\n"}],"name":"clear","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Takes an array to be emptied.","source":"* {Array} source - Takes an array to be emptied."}],"type":"function","functionTag":"clear","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The originally given array.","source":"* {Array} - The originally given array.\n *"}},"clone":{"category":"utility","description":"Creates a structured clone of an object which is a \"structured-cloneable type\".","examples":[{"tag":"example","optional":false,"description":"import { clone, assert } from '@universalweb/acid'; assert(clone({a:{b:[2]}}), {a:{b:[2]}});","source":"import { clone, assert } from \"@universalweb/acid\";\nassert(clone({ a: { b: [2] } }), { a: { b: [2] } });\n"}],"name":"clone","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- Any structured-cloneable type object.","source":"* {Object} source - Any structured-cloneable type object."}],"type":"function","functionTag":"clone","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns a deep clone of an object.","source":"* {Object} - Returns a deep clone of an object.\n *"}},"concurrent":{"category":"utility","description":"Iterates through the given array of async function(s) adding each call to a queue. Then uses Promise.all on the queue returning the values from each promise. Does not await on each async iteratee before the next.","examples":[{"tag":"example","optional":false,"description":"import { concurrent, assert } from '@universalweb/acid'; const list = []; await concurrent([async (item) => { return item; }, async (item) => { return item; }], null, 1); assert(list, [1, 1]);","source":"import { concurrent, assert } from \"@universalweb/acid\";\nconst list = [];\nawait concurrent(\n [\n async (item) => {\n return item;\n },\n async (item) => {\n return item;\n },\n ],\n null,\n 1,\n);\nassert(list, [1, 1]);\n"}],"name":"concurrent","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array of async functions that will be looped through.","source":"* {Array} source - Array of async functions that will be looped through."},{"tag":"param","name":"thisBind","type":"*","optional":false,"description":"- Object to use as the \"this\" within the function.","source":"* {*} thisBind - Object to use as the \"this\" within the function."},{"tag":"param","name":"args","type":"...*","optional":false,"description":"- Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.","source":"* {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function."}],"type":"function","isAsync":true,"functionTag":"concurrent","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"The originally given array.","source":"* {Object} - The originally given array.\n *"}},"compact":{"category":"utility","description":"Creates an array with all isFalsy values removed. The values false, null, 0, \"\", undefined, and NaN are isFalsy.","examples":[{"tag":"example","optional":false,"description":"import { compact, assert } from '@universalweb/acid'; assert(compact([1,'B', 'Cat', false, null, 0 , '', undefined, NaN]), [1, 'B', 'Cat']);","source":"import { compact, assert } from \"@universalweb/acid\";\nassert(compact([1, \"B\", \"Cat\", false, null, 0, \"\", undefined, NaN]), [\n 1,\n \"B\",\n \"Cat\",\n]);\n"}],"name":"compact","params":[{"tag":"param","name":"source","type":"Array|Object","optional":false,"description":"- Array or Object to be compacted.","source":"* {Array|Object} source - Array or Object to be compacted."}],"type":"function","functionTag":"compact","returns":{"tag":"returns","name":"-","type":"Array|Object","optional":false,"description":"A new object or array containing the filtered values.","source":"* {Array|Object} - A new object or array containing the filtered values.\n *"}},"compactMap":{"category":"utility","description":"Iterates through the calling object and creates a new object based on the calling object's type with the results, (excludes results which are null or undefined), of the iteratee on every element in the calling object.","examples":[{"tag":"example","optional":false,"description":"import { compactMap, assert } from '@universalweb/acid'; assert(compactMap({a: null, b: 2, c: 3}, (item) => { return item; }), {b: 2, c: 3});","source":"import { compactMap, assert } from \"@universalweb/acid\";\nassert(\n compactMap({ a: null, b: 2, c: 3 }, (item) => {\n return item;\n }),\n { b: 2, c: 3 },\n);\n"}],"name":"compactMap","params":[{"tag":"param","name":"source","type":"Array | object | Function","optional":false,"description":"- Object that will be looped through.","source":"* {Array | object | Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type."},{"tag":"param","name":"results","type":"Object | Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object | Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"compactMap","returns":{"tag":"returns","name":"-","type":"Array | object | Function","optional":false,"description":"A new object of the same calling object's type.","source":"* {Array | object | Function} - A new object of the same calling object's type.\n *"}},"forOfFilter":{"category":"utility","description":"Iterates (for of) through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"import { assert, forOfFilter } from '@universalweb/acid'; const source = {a: undefined, b: 2, c: 3}; const temp = forOfFilter(source, (item) => { return Boolean(item); }); assert(temp, {b: 2, c: 3});","source":"import { assert, forOfFilter } from \"@universalweb/acid\";\nconst source = { a: undefined, b: 2, c: 3 };\nconst temp = forOfFilter(source, (item) => {\n return Boolean(item);\n});\nassert(temp, { b: 2, c: 3 });\n"}],"name":"forOfFilter","params":[{"tag":"param","name":"source","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function|Class|Map|Set|Array} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"resultsObject","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be used to assign results else source is type cloned.","source":"* {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned."}],"type":"function","functionTag":"forOfFilter","returns":{"tag":"returns","name":"-","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"An object with mapped properties.","source":"* {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *"}},"forOfFilterAsync":{"category":"utility","description":"Asynchronously iterates (for of)through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"import { assert, forOfFilterAsync } from '@universalweb/acid'; const source = {a: undefined, b: 2, c: 3}; const temp = forOfFilterAsync(source, (item) => { return Boolean(item); }); assert(temp, {b: 2, c: 3});","source":"import { assert, forOfFilterAsync } from \"@universalweb/acid\";\nconst source = { a: undefined, b: 2, c: 3 };\nconst temp = forOfFilterAsync(source, (item) => {\n return Boolean(item);\n});\nassert(temp, { b: 2, c: 3 });\n"}],"name":"forOfFilterAsync","params":[{"tag":"param","name":"source","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be looped through.","source":"* {Object|Function|Class|Map|Set|Array} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created object, calling object, key count, and array of keys."},{"tag":"param","name":"resultsObject","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"- Object that will be used to assign results else source is type cloned.","source":"* {Object|Function|Class|Map|Set|Array} resultsObject - Object that will be used to assign results else source is type cloned."}],"type":"function","functionTag":"forOfFilterAsync","returns":{"tag":"returns","name":"-","type":"Object|Function|Class|Map|Set|Array","optional":false,"description":"An object with mapped properties.","source":"* {Object|Function|Class|Map|Set|Array} - An object with mapped properties.\n *"}},"filter":{"category":"utility","description":"Iterates through the calling object and creates a new object of the same calling object's type with all elements that pass the test implemented by the iteratee.","examples":[{"tag":"example","optional":false,"description":"import { filter, assert } from '@universalweb/acid'; assert(filter({a: false, b: true, c: true}, (item) => { return item; }), {b: true, c: true});","source":"import { filter, assert } from \"@universalweb/acid\";\nassert(\n filter({ a: false, b: true, c: true }, (item) => {\n return item;\n }),\n { b: true, c: true },\n);\n"}],"name":"filter","params":[{"tag":"param","name":"source","type":"Array | object | Function","optional":false,"description":"- Object that will be looped through.","source":"* {Array | object | Function} source - Object that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type.","source":"* {Function} iteratee - Transformation function which is passed item, key, the newly created map object and arguments unique to mapArray or mapObject depending on the object type."},{"tag":"param","name":"results","type":"Object | Function","optional":true,"description":"- Object that will be used to assign results.","source":"* {Object | Function} [results = {}] - Object that will be used to assign results.","default":"{}"}],"type":"function","functionTag":"filter","returns":{"tag":"returns","name":"-","type":"Array | object | Function","optional":false,"description":"A new object of the same calling object's type.","source":"* {Array | object | Function} - A new object of the same calling object's type.\n *"}},"flow":{"category":"utility","description":"Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.","examples":[{"tag":"example","optional":false,"description":"flow(increment, increment, deduct)(0); // => 1","source":"flow(increment, increment, deduct)(0);\n// => 1\n"}],"name":"flow","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Methods to invoke.","source":"* {Array} collection - Methods to invoke."}],"type":"function","functionTag":"flow","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new composite function.","source":"* {Function} - Returns the new composite function.\n *"}},"flowRight":{"category":"utility","description":"This method is like flow except that it creates a function that invokes the given functions from right to left.","examples":[{"tag":"example","optional":false,"description":"flowRight(increment, increment, deduct)(0); // => 1","source":"flowRight(increment, increment, deduct)(0);\n// => 1\n"}],"name":"flowRight","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Methods to invoke.","source":"* {Array} collection - Methods to invoke."}],"type":"function","functionTag":"flowRight","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new composite function.","source":"* {Function} - Returns the new composite function.\n *"}},"flowAsync":{"category":"utility","description":"Creates a function that returns the result of invoking the given functions, where each successive invocation is supplied the return value of the previous.","examples":[{"tag":"example","optional":false,"description":"flowAsync(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); // => 2","source":"flowAsync(\n async (item) => {\n return increment(item);\n },\n async (item) => {\n return increment(item);\n },\n)(0);\n// => 2\n"}],"name":"flowAsync","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Methods to invoke.","source":"* {Array} collection - Methods to invoke."}],"type":"function","isAsync":true,"functionTag":"flowAsync","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new composite function.","source":"* {Function} - Returns the new composite function.\n *"}},"flowAsyncRight":{"category":"utility","description":"This method is like flow except that it creates a function that invokes the given functions from right to left.","examples":[{"tag":"example","optional":false,"description":"flowAsyncRight(async (item) => {return increment(item);}, async (item) => {return increment(item);})(0); // => 2","source":"flowAsyncRight(\n async (item) => {\n return increment(item);\n },\n async (item) => {\n return increment(item);\n },\n)(0);\n// => 2\n"}],"name":"flowAsyncRight","params":[{"tag":"param","name":"collection","type":"Array","optional":false,"description":"- Methods to invoke.","source":"* {Array} collection - Methods to invoke."}],"type":"function","isAsync":true,"functionTag":"flowAsyncRight","returns":{"tag":"returns","name":"-","type":"Function","optional":false,"description":"Returns the new composite function.","source":"* {Function} - Returns the new composite function.\n *"}},"arraysToObject":{"category":"utility","description":"Takes all but the last item in the array.","examples":[{"tag":"example","optional":false,"description":"import { arraysToObject, assert } from '@universalweb/acid'; assert(arraysToObject([1, 2, 3], ['a', 'b', 'c']), {a:1, b:2, c: 3});","source":"import { arraysToObject, assert } from \"@universalweb/acid\";\nassert(arraysToObject([1, 2, 3], [\"a\", \"b\", \"c\"]), { a: 1, b: 2, c: 3 });\n"}],"name":"arraysToObject","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array to have items extracted from.","source":"* {Array} source - Array to have items extracted from."},{"tag":"param","name":"properties","type":"Array","optional":false,"description":"- Array to have items extracted from.","source":"* {Array} properties - Array to have items extracted from."}],"type":"function","functionTag":"arraysToObject","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns a completely flattened array.","source":"* {Array} - Returns a completely flattened array.\n *"}},"has":{"category":"utility","description":"Checks if an object contains something. For basic searches.","examples":[{"tag":"example","optional":false,"description":"import { has, assert } from '@universalweb/acid'; assert(has('Hello World', 'Hello'), true); assert(has(['Hello', 'World'], 'hello'), true);","source":"import { has, assert } from \"@universalweb/acid\";\nassert(has(\"Hello World\", \"Hello\"), true);\nassert(has([\"Hello\", \"World\"], \"hello\"), true);\n"}],"name":"has","params":[{"tag":"param","name":"source","type":"Array|String|Object","optional":false,"description":"- Object to be checked.","source":"* {Array|String|Object} source - Object to be checked."},{"tag":"param","name":"search","type":"String|Array|Function|RegExp","optional":false,"description":"- Object that is being searched for.","source":"* {String|Array|Function|RegExp} search - Object that is being searched for."},{"tag":"param","name":"position","type":"Number","optional":false,"description":"- Index at which to start searching.","source":"* {Number} position - Index at which to start searching."}],"type":"function","functionTag":"has","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"hasDot":{"category":"utility","description":"Checks if the string has a '.'.","examples":[{"tag":"example","optional":false,"description":"import { hasDot, assert } from '@universalweb/acid'; assert(hasDot('test.js'), true);","source":"import { hasDot, assert } from \"@universalweb/acid\";\nassert(hasDot(\"test.js\"), true);\n"}],"name":"hasDot","params":[{"tag":"param","name":"source","type":"*","optional":false,"description":"- Object to be checked.","source":"* {*} source - Object to be checked."}],"type":"function","functionTag":"hasDot","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"ifNotAssign":{"category":"utility","description":"Checks if a property on an object has a value. If not, it will assign a value.","examples":[{"tag":"example","optional":false,"description":"import { ifNotAssign, assert } from '@universalweb/acid'; assert(ifNotAssign({}, 'a', 1), {a:1});","source":"import { ifNotAssign, assert } from \"@universalweb/acid\";\nassert(ifNotAssign({}, \"a\", 1), { a: 1 });\n"}],"name":"ifNotAssign","params":[{"tag":"param","name":"rootObject","type":"Object","optional":false,"description":"- The object to check.","source":"* {Object} rootObject - The object to check."},{"tag":"param","name":"property","type":"String","optional":false,"description":"- The property name which is to be checked.","source":"* {String} property - The property name which is to be checked."},{"tag":"param","name":"equalThis","type":"*","optional":false,"description":"- The reassignment value for the property being checked.","source":"* {*} equalThis - The reassignment value for the property being checked."}],"type":"function","functionTag":"ifNotAssign","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the provided rootObject.","source":"* {Object} - Returns the provided rootObject.\n *"}},"interval":{"category":"function","description":"Create an interval timer.","examples":[{"tag":"example","optional":false,"description":"interval(() => {}, 100); // => 0","source":"interval(() => {}, 100);\n// => 0\n"}],"name":"interval","params":[{"tag":"param","name":"callable","type":"Function","optional":false,"description":"- The function to be invoked.","source":"* {Function} callable - The function to be invoked."},{"tag":"param","name":"time","type":"Number","optional":false,"description":"- The time in milliseconds.","source":"* {Number} time - The time in milliseconds."}],"type":"function","functionTag":"interval","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns setInterval ID.","source":"* {Object} - Returns setInterval ID.\n *"}},"clearIntervals":{"category":"function","description":"Clear all active interval timers.","examples":[{"tag":"example","optional":false,"description":"clearIntervals(); // => undefined","source":"clearIntervals();\n// => undefined\n"}],"name":"clearIntervals","type":"function","functionTag":"clearIntervals","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n *"}},"Model":{"category":"utility","description":"Returns the model with the given name.","examples":[{"tag":"example","optional":false,"description":"import { Model, model, assert } from '@universalweb/acid'; const test = new Model('test', {a: 1}); assert(model('test'), {a: 1});","source":"import { Model, model, assert } from \"@universalweb/acid\";\nconst test = new Model(\"test\", { a: 1 });\nassert(model(\"test\"), { a: 1 });\n"}],"name":"Model","params":[{"tag":"param","name":"modelName","type":"String","optional":false,"description":"- The name of the model to return.","source":"* {String} modelName - The name of the model to return."},{"tag":"param","name":"modelSource","type":"*","optional":false,"description":"- The value of the model to return.","source":"* {*} modelSource - The value of the model to return."}],"type":"function","functionTag":"Model","returns":{"tag":"returns","name":"-","type":"Model","optional":false,"description":"The model with the given name.","source":"* {Model} - The model with the given name.\n *"}},"model":{"category":"utility","description":"Set & Get a model.","examples":[{"tag":"example","optional":false,"description":"import { model, assert } from '@universalweb/acid'; model('test', {a: 1}); assert(model('test'), {a: 1});","source":"import { model, assert } from \"@universalweb/acid\";\nmodel(\"test\", { a: 1 });\nassert(model(\"test\"), { a: 1 });\n"}],"name":"model","params":[{"tag":"param","name":"modelName","type":"String","optional":false,"description":"- Name of the model.","source":"* {String} modelName - Name of the model."},{"tag":"param","name":"modelSource","type":"Object","optional":false,"description":"- The model object.","source":"* {Object} modelSource - The model object."}],"type":"function","functionTag":"model","returns":{"tag":"returns","name":"-","type":"Model","optional":false,"description":"Returns the associated model.","source":"* {Model} - Returns the associated model.\n *"}},"pair":{"category":"utility","description":"Takes the first two arguments given and returns them inside a new array.","examples":[{"tag":"example","optional":false,"description":"import { pair, assert } from '@universalweb/acid'; assert(air(1, 2), [1, 2]);","source":"import { pair, assert } from \"@universalweb/acid\";\nassert(air(1, 2), [1, 2]);\n"}],"name":"pair","params":[{"tag":"param","name":"argument1","type":"*","optional":false,"description":"- The source object.","source":"* {*} argument1 - The source object."},{"tag":"param","name":"argument2","type":"*","optional":false,"description":"- The source object.","source":"* {*} argument2 - The source object."}],"type":"function","functionTag":"pair","returns":{"tag":"returns","name":"The","type":"Array","optional":false,"description":"array which holds the pair.","source":"* {Array} The array which holds the pair.\n *"}},"concurrentStatus":{"category":"utility","description":"Iterates through an array, invokes the async iteratee, and adds the promises to a queue. Then uses & returns the Promise.allSettled on the queue returning the values from each promise. Does not await on the async iteratee.","examples":[{"tag":"example","optional":false,"description":"import { concurrentStatus, assert } from '@universalweb/acid'; const tempList = []; await concurrentStatus([1, 2], async (item) => { return item; }); assert(tempList, [{status: 'fulfilled', value: 1}, {status: 'fulfilled', value: 2}]);","source":"import { concurrentStatus, assert } from \"@universalweb/acid\";\nconst tempList = [];\nawait concurrentStatus([1, 2], async (item) => {\n return item;\n});\nassert(tempList, [\n { status: \"fulfilled\", value: 1 },\n { status: \"fulfilled\", value: 2 },\n]);\n"}],"name":"concurrentStatus","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array that will be looped through.","source":"* {Array} source - Array that will be looped through."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed item, index, calling array, and array length.","source":"* {Function} iteratee - Transformation function which is passed item, index, calling array, and array length."},{"tag":"param","name":"additionalArgument","type":"*","optional":false,"description":"- An object to be given each time to the iteratee.","source":"* {*} additionalArgument - An object to be given each time to the iteratee."}],"type":"function","functionTag":"concurrentStatus","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"The array from Promise.allSettled.","source":"* {Array} - The array from Promise.allSettled.\n *"}},"promise":{"category":"utility","description":"A wrapper around the promise constructor.","examples":[{"tag":"example","optional":false,"description":"promise((a) => {}); // => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}","source":"promise((a) => {});\n// => Promise {[[PromiseStatus]]: \"pending\", [[PromiseValue]]: undefined}\n"}],"name":"promise","params":[{"tag":"param","name":"callback","type":"Function","optional":false,"description":"- Function to be called back.","source":"* {Function} callback - Function to be called back."}],"type":"function","functionTag":"promise","returns":{"tag":"returns","name":"-","type":"Promise","optional":false,"description":"A constructor with a callback function.).","source":"* {Promise} - A constructor with a callback function.).\n *"}},"propertyMatch":{"category":"utility","description":"Using a deep comparison it checks if properties of two objects using an array are equal.","examples":[{"tag":"example","optional":false,"description":"import { propertyMatch, assert } from '@universalweb/acid'; assert(propertyMatch({ a: 1, b: 2 }, { a: 1, b: 2 }, ['a', 'b']), true);","source":"import { propertyMatch, assert } from \"@universalweb/acid\";\nassert(propertyMatch({ a: 1, b: 2 }, { a: 1, b: 2 }, [\"a\", \"b\"]), true);\n"}],"name":"propertyMatch","params":[{"tag":"param","name":"source","type":"Object","optional":false,"description":"- The source object to compare.","source":"* {Object} source - The source object to compare."},{"tag":"param","name":"compared","type":"Object","optional":false,"description":"- Object to be compared to source.","source":"* {Object} compared - Object to be compared to source."},{"tag":"param","name":"properties","type":"Array","optional":false,"description":"- List of properties to compare defaults to keys(source).","source":"* {Array} properties - List of properties to compare defaults to keys(source)."}],"type":"function","functionTag":"propertyMatch","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns an array of properties.","source":"* {Array} - Returns an array of properties.\n *"}},"stubArray":{"category":"utility","description":"This method returns a new empty array.","examples":[{"tag":"example","optional":false,"description":"import { stubArray, assert } from '@universalweb/acid'; assert(stubArray(), []);","source":"import { stubArray, assert } from \"@universalweb/acid\";\nassert(stubArray(), []);\n"}],"name":"stubArray","type":"function","functionTag":"stubArray","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"Returns the new empty array.","source":"* {Array} - Returns the new empty array.\n *"}},"stubFalse":{"category":"utility","description":"This method returns false.","examples":[{"tag":"example","optional":false,"description":"import { stubFalse, assert } from '@universalweb/acid'; assert(stubFalse(), false);","source":"import { stubFalse, assert } from \"@universalweb/acid\";\nassert(stubFalse(), false);\n"}],"name":"stubFalse","type":"function","functionTag":"stubFalse","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns false.","source":"* {Boolean} - Returns false.\n *"}},"stubObject":{"category":"utility","description":"This method returns a new empty object.","examples":[{"tag":"example","optional":false,"description":"import { stubObject, assert } from '@universalweb/acid'; assert(stubObject(), {});","source":"import { stubObject, assert } from \"@universalweb/acid\";\nassert(stubObject(), {});\n"}],"name":"stubObject","type":"function","functionTag":"stubObject","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"Returns the new empty object.","source":"* {Object} - Returns the new empty object.\n *"}},"stubString":{"category":"utility","description":"This method returns a new empty string.","examples":[{"tag":"example","optional":false,"description":"import { stubString, assert } from '@universalweb/acid'; assert(stubString(), '');","source":"import { stubString, assert } from \"@universalweb/acid\";\nassert(stubString(), \"\");\n"}],"name":"stubString","type":"function","functionTag":"stubString","returns":{"tag":"returns","name":"-","type":"String","optional":false,"description":"Returns the new empty string.","source":"* {String} - Returns the new empty string.\n *"}},"stubTrue":{"category":"utility","description":"This method returns true.","examples":[{"tag":"example","optional":false,"description":"import { stubTrue, assert } from '@universalweb/acid'; assert(stubTrue(), true);","source":"import { stubTrue, assert } from \"@universalweb/acid\";\nassert(stubTrue(), true);\n"}],"name":"stubTrue","type":"function","functionTag":"stubTrue","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true.","source":"* {Boolean} - Returns true.\n *"}},"timesAsync":{"category":"utility","description":"Asynchronously iterates based on the amount given awaiting on the iteratee with the current index as an argument.","examples":[{"tag":"example","optional":false,"description":"import { timesAsync } from '@universalweb/acid'; await timesAsync(3, async (item) => { console.log(item); }); // 0 // 1 // 2 // => undefined","source":"import { timesAsync } from \"@universalweb/acid\";\nawait timesAsync(3, async (item) => {\n console.log(item);\n}); // 0 // 1 // 2\n// => undefined\n"}],"name":"timesAsync","params":[{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The amount of times to loop invoking the iteratee.","source":"* {Number} amount - The amount of times to loop invoking the iteratee."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed index and amount.","source":"* {Function} iteratee - Transformation function which is passed index and amount."}],"type":"function","isAsync":true,"functionTag":"timesAsync","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Nothing.","source":"* {undefined} - Nothing.\n *"}},"timesMapAsync":{"category":"array","description":"Asynchronously iterates based on the amount given and maps the results awaited on by the iteratee each time to an array.","examples":[{"tag":"example","optional":false,"description":"import { timesMapAsync } from '@universalweb/acid'; await timesMapAsync(3, (item) => { return item; }); // => [0, 1, 2]","source":"import { timesMapAsync } from \"@universalweb/acid\";\nawait timesMapAsync(3, (item) => {\n return item;\n});\n// => [0, 1, 2]\n"}],"name":"timesMapAsync","params":[{"tag":"param","name":"amount","type":"Number","optional":false,"description":"- The amount of times to loop invoking the iteratee.","source":"* {Number} amount - The amount of times to loop invoking the iteratee."},{"tag":"param","name":"iteratee","type":"Function","optional":false,"description":"- Transformation function which is passed index and amount.","source":"* {Function} iteratee - Transformation function which is passed index and amount."},{"tag":"param","name":"results","type":"Array","optional":true,"description":"- Array that will have iteratee return pushed to.","source":"* {Array} [results = []] - Array that will have iteratee return pushed to.","default":"[]"}],"type":"function","isAsync":true,"functionTag":"timesMapAsync","returns":{"tag":"returns","name":"-","type":"Array","optional":false,"description":"An array with iteratee's returned values.","source":"* {Array} - An array with iteratee's returned values.\n *"}},"toggle":{"category":"utility","description":"Performs a toggle between 2 values using a deep or strict comparison.","examples":[{"tag":"example","optional":false,"description":"import { toggle } from '@universalweb/acid'; let toggleMe = true; toggleMe = toggle(toggleMe, true, false); // => false","source":"import { toggle } from \"@universalweb/acid\";\nlet toggleMe = true;\ntoggleMe = toggle(toggleMe, true, false);\n// => false\n"}],"name":"toggle","params":[{"tag":"param","name":"value","type":"(string|number|Object|Array)","optional":false,"description":"- Strictly compared against on & off arguments.","source":"* {(string|number|Object|Array)} value - Strictly compared against on & off arguments."},{"tag":"param","name":"on","type":"(string|number|Object|Array)","optional":false,"description":"- The first object to be compared to.","source":"* {(string|number|Object|Array)} on - The first object to be compared to."},{"tag":"param","name":"off","type":"(string|number|Object|Array)","optional":false,"description":"- The second object to be compared to.","source":"* {(string|number|Object|Array)} off - The second object to be compared to."}],"type":"function","functionTag":"toggle","returns":{"tag":"returns","name":"-","type":"(string|number|Object|Array)","optional":false,"description":"The opposing value to the current.","source":"* {(string|number|Object|Array)} - The opposing value to the current.\n *"}},"UniqID":{"category":"utility","description":"Creates a unique numerical recyclable ID generator. The IDs are numerically ascending however freed ids are recycled when available.","examples":[{"tag":"example","optional":false,"description":"import { UniqID, construct, assert } from '@universalweb/acid'; const gen = construct(UniqID); assert(gen.get(), 0); assert(gen.get(), 1); gen.free(0); assert(gen.get(), 0);","source":"import { UniqID, construct, assert } from \"@universalweb/acid\";\nconst gen = construct(UniqID);\nassert(gen.get(), 0);\nassert(gen.get(), 1);\ngen.free(0);\nassert(gen.get(), 0);\n"}],"name":"UniqID","type":"class","classTag":"UniqID","returns":{"tag":"returns","name":"-","type":"UniqID","optional":false,"description":"Returns a new instance of UniqID.","source":"* {UniqID} - Returns a new instance of UniqID.\n *"}},"UniqID.get":{"category":"utility","description":"Generates a new ID or recycle one that is no longer used.","examples":[{"tag":"example","optional":false,"description":"import { UniqID, construct, assert } from '@universalweb/acid'; const gen = construct(UniqID); assert(gen.get(), 0);","source":"import { UniqID, construct, assert } from \"@universalweb/acid\";\nconst gen = construct(UniqID);\nassert(gen.get(), 0);\n"}],"name":"UniqID.get","type":"class","classTag":"UniqID","functionTag":"get","returns":{"tag":"returns","name":"-","type":"Number","optional":false,"description":"Returns a unique id.","source":"* {Number} - Returns a unique id.\n *"}},"UniqID.free":{"category":"utility","description":"Frees an UID so that it may be recycled for later use.","examples":[{"tag":"example","optional":false,"description":"import { UniqID, construct, assert } from '@universalweb/acid'; const gen = construct(UniqID); assert(gen.get(), 0); gen.free(0); assert(gen.get(), 0);","source":"import { UniqID, construct, assert } from \"@universalweb/acid\";\nconst gen = construct(UniqID);\nassert(gen.get(), 0);\ngen.free(0);\nassert(gen.get(), 0);\n"}],"name":"UniqID.free","params":[{"tag":"param","name":"id","type":"Number","optional":false,"description":"- Number to be freed.","source":"* {Number} id - Number to be freed."}],"type":"class","classTag":"UniqID","functionTag":"free","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Nothing is returned.","source":"* {undefined} - Nothing is returned.\n *"}},"uniqID":{"category":"utility","description":"A built in constructed instance of UniqID. Creates a unique numerical recyclable ID. The IDs are numerically ascending however freed ids are recycled when available.","examples":[{"tag":"example","optional":false,"description":"import { uniqID, assert } from '@universalweb/acid'; assert(uniqID.get(), 0); assert(uniqID.get(), 1); uniqID.free(0); assert(uniqID.get(), 0);","source":"import { uniqID, assert } from \"@universalweb/acid\";\nassert(uniqID.get(), 0);\nassert(uniqID.get(), 1);\nuniqID.free(0);\nassert(uniqID.get(), 0);\n"}],"name":"uniqID","type":"function","functionTag":"uniqID"},"VirtualStorage":{"category":"utility","description":"Class representing a virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.","examples":[{"tag":"example","optional":false,"description":"import { VirtualStorage } from '@universalweb/acid'; const myVirtualStorage = new VirtualStorage(); // => New VirtualStorage Object","source":"import { VirtualStorage } from \"@universalweb/acid\";\nconst myVirtualStorage = new VirtualStorage();\n// => New VirtualStorage Object\n"}],"name":"VirtualStorage","params":[{"tag":"param","name":"initialObject","type":"*","optional":false,"description":"- Initial object to be used as the storage object the default being a Map.","source":"* {*} initialObject - Initial object to be used as the storage object the default being a Map."}],"type":"function","functionTag":"VirtualStorage","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns a new VirtualStorage Object.","source":"* {*} - Returns a new VirtualStorage Object.\n *"}},"virtualStorage":{"category":"browser","description":"Returns an instance of VirtualStorage which represents a standard virtual storage interface over a provided object the default being a Map. A temporary storage shim for localStorage if not available.","examples":[{"tag":"example","optional":false,"description":"import { virtualStorage, assert } from '@universalweb/acid'; const vStorage = virtualStorage(); vStorage.setItem('title', 'value'); assert(vStorage.getItem('title'), 'value');","source":"import { virtualStorage, assert } from \"@universalweb/acid\";\nconst vStorage = virtualStorage();\nvStorage.setItem(\"title\", \"value\");\nassert(vStorage.getItem(\"title\"), \"value\");\n"}],"name":"virtualStorage","params":[{"tag":"param","name":"initialObject","type":"*","optional":false,"description":"- Initial object to be used as the storage object the default being a Map.","source":"* {*} initialObject - Initial object to be used as the storage object the default being a Map."}],"type":"function","functionTag":"virtualStorage","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns a new VirtualStorage Object.","source":"* {*} - Returns a new VirtualStorage Object.\n *"}},"inAsync":{"category":"utility","description":"Iterates through the given array of async function(s). Each async function is awaited as to ensure synchronous order and is given the supplied object.","examples":[{"tag":"example","optional":false,"description":"import { inAsync, assert } from '@universalweb/acid'; const list = []; await inAsync([async (firstArgument, item, index) => { list.push(index + firstArgument.a); }, async (firstArgument, item, index) => { list.push(index); }], {a:1}); assert(list, [1, 1]);","source":"import { inAsync, assert } from \"@universalweb/acid\";\nconst list = [];\nawait inAsync(\n [\n async (firstArgument, item, index) => {\n list.push(index + firstArgument.a);\n },\n async (firstArgument, item, index) => {\n list.push(index);\n },\n ],\n { a: 1 },\n);\nassert(list, [1, 1]);\n"}],"name":"inAsync","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array of async functions that will be looped through.","source":"* {Array} source - Array of async functions that will be looped through."},{"tag":"param","name":"thisBind","type":"*","optional":false,"description":"- Object to use as the \"this\" within the function.","source":"* {*} thisBind - Object to use as the \"this\" within the function."},{"tag":"param","name":"args","type":"...*","optional":false,"description":"- Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function.","source":"* {...*} args - Arguments to pass to each function. Every argument after the first (thisBind) is passed to each function."}],"type":"function","isAsync":true,"functionTag":"inAsync","returns":{"tag":"returns","name":"-","type":"Object","optional":false,"description":"The originally given array.","source":"* {Object} - The originally given array.\n *"}},"inSync":{"category":"utility","description":"Invoke an array of functions.","examples":[{"tag":"example","optional":false,"description":"inSync([() => {console.log(1);}, () => {console.log(2);}]); // 1 // 2 // => undefined","source":"inSync([\n () => {\n console.log(1);\n },\n () => {\n console.log(2);\n },\n]); // 1 // 2\n// => undefined\n"}],"name":"inSync","params":[{"tag":"param","name":"source","type":"Array","optional":false,"description":"- Array of functions that will be looped through.","source":"* {Array} source - Array of functions that will be looped through."},{"tag":"param","name":"thisBind","type":"*","optional":false,"description":"- Object to use as the \"this\" within the function.","source":"* {*} thisBind - Object to use as the \"this\" within the function."},{"tag":"param","name":"args","type":"...*","optional":false,"description":"-The arguments passed to each function. Every argument after the first (thisBind) is passed to each function.","source":"* {...*} args -The arguments passed to each function. Every argument after the first (thisBind) is passed to each function."}],"type":"function","functionTag":"inSync","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n *"}},"isAgent":{"category":"browser","description":"Checks to see of the browser agent has a string.","examples":[{"tag":"example","optional":false,"description":"import { isAgent, assert } from '@universalweb/acid'; assert(isAgent('NotThere'), false);","source":"import { isAgent, assert } from \"@universalweb/acid\";\nassert(isAgent(\"NotThere\"), false);\n"}],"name":"isAgent","params":[{"tag":"param","name":"source","type":"String","optional":false,"description":"- The string to search for.","source":"* {String} source - The string to search for."}],"type":"function","functionTag":"isAgent","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true or false.","source":"* {Boolean} - Returns true or false.\n *"}},"eventAdd":{"category":"browser","description":"Attaches an event listener to a node.","examples":[{"tag":"example","optional":false,"description":"eventAdd(document.body, 'click', () => {console.log('CLICKED');}); // = > document.body","source":"eventAdd(document.body, \"click\", () => {\n console.log(\"CLICKED\");\n}); // = > document.body\n"}],"name":"eventAdd","params":[{"tag":"param","name":"node","type":"Node","optional":false,"description":"- Given node.","source":"* {Node} node - Given node."},{"tag":"param","name":"eventName","type":"String","optional":false,"description":"- A string representing the event type.","source":"* {String} eventName - A string representing the event type."},{"tag":"param","name":"callback","type":"Object|Function","optional":false,"description":"- The object which receives a notification when an event of the specified type occurs.","source":"* {Object|Function} callback - The object which receives a notification when an event of the specified type occurs."},{"tag":"param","name":"useCapture","type":"Boolean","optional":false,"description":"- The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.","source":"* {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation."}],"type":"function","functionTag":"eventAdd","returns":{"tag":"returns","name":"-","type":"Node","optional":false,"description":"Returns given node.","source":"* {Node} - Returns given node.\n *"}},"eventRemove":{"category":"browser","description":"Attaches an event listener to a node.","examples":[{"tag":"example","optional":false,"description":"eventRemove(document.body, () => {console.log('CLICKED');}); // = > Undefined","source":"eventRemove(document.body, () => {\n console.log(\"CLICKED\");\n}); // = > Undefined\n"}],"name":"eventRemove","params":[{"tag":"param","name":"node","type":"Node","optional":false,"description":"- Given node.","source":"* {Node} node - Given node."},{"tag":"param","name":"eventName","type":"String","optional":false,"description":"- A string representing the event type.","source":"* {String} eventName - A string representing the event type."},{"tag":"param","name":"callback","type":"Object|Function","optional":false,"description":"- The object which receives a notification when an event of the specified type occurs.","source":"* {Object|Function} callback - The object which receives a notification when an event of the specified type occurs."},{"tag":"param","name":"useCapture","type":"Boolean","optional":false,"description":"- The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation.","source":"* {Boolean} useCapture - The default value is false, which will use the bubbling propagation, when the value is set to true, the event uses the capturing propagation."}],"type":"function","functionTag":"eventRemove","returns":{"tag":"returns","name":"-","type":"Node","optional":false,"description":"Returns given node.","source":"* {Node} - Returns given node.\n *"}},"isEnter":{"category":"browser","description":"Checks if the keycode of the event is strictly equal to 13.","examples":[{"tag":"example","optional":false,"description":"isEnter('click'); // => false","source":"isEnter(\"click\");\n// => false\n"}],"name":"isEnter","params":[{"tag":"param","name":"eventObject","type":"Object","optional":false,"description":"- Object to be checked.","source":"* {Object} eventObject - Object to be checked."}],"type":"function","functionTag":"isEnter","returns":{"tag":"returns","name":"-","type":"Boolean","optional":false,"description":"Returns true if the keycode property of the object equals 13.","source":"* {Boolean} - Returns true if the keycode property of the object equals 13.\n *"}},"importjs":{"category":"browser","description":"Asynchronously import a js file and append it to the head node. If a script fails to load importjs won't reject the promise rather it'll return the error event to limit further complications & reduce code complexity.","examples":[{"tag":"example","optional":false,"description":"importjs('core.js'); importjs('core');","source":"importjs(\"core.js\");\nimportjs(\"core\");\n"}],"name":"importjs","params":[{"tag":"param","name":"url","type":"*","optional":false,"description":"- URL of the script to import. If not \".\" is found in the file name \".js\" will be appended.","source":"* {*} url - URL of the script to import. If not \".\" is found in the file name \".js\" will be appended."}],"type":"function","isAsync":true,"functionTag":"importjs","returns":{"tag":"returns","name":"-","type":"Promise","optional":false,"description":"Returns a promise which returns a \"load\" or \"error\" event associated with the script.","source":"* {Promise} - Returns a promise which returns a \"load\" or \"error\" event associated with the script.\n *"}},"BrowserStorage":{"category":"browser","description":"Constructs a virtual storage container with localStorage support. BrowserStorage will fallback to strictly virtual storage if localStorage isn't supported. If localStorage is supported virtual storage will be used first & only fallback to localStorage when needed. BrowserStorage is ideal as a seemless drop in replacement for localStorage when not supported or allowed.","examples":[{"tag":"example","optional":false,"description":"import { BrowserStorage, construct, assert } from '@universalweb/acid'; const storageBrowserStorage = construct(BrowserStorage); storageBrowserStorage.setItem('key', 'value'); assert(storageBrowserStorage.getItem('key'), 'value');","source":"import { BrowserStorage, construct, assert } from \"@universalweb/acid\";\nconst storageBrowserStorage = construct(BrowserStorage);\nstorageBrowserStorage.setItem(\"key\", \"value\");\nassert(storageBrowserStorage.getItem(\"key\"), \"value\");\n"}],"name":"BrowserStorage","type":"class","classTag":"BrowserStorage","returns":{"tag":"returns","name":"-","type":"BrowserStorage","optional":false,"description":"Returns a new instance of BrowserStorage.","source":"* {BrowserStorage} - Returns a new instance of BrowserStorage.\n *"}},"BrowserStorage.setItem":{"category":"browser","description":"Save an item to a browserStorage.","examples":[{"tag":"example","optional":false,"description":"import { BrowserStorage, construct, assert } from '@universalweb/acid'; const storageBrowserStorage = construct(BrowserStorage); storageBrowserStorage.setItem('key', 'value'); assert(storageBrowserStorage.getItem('key'), 'value');","source":"import { BrowserStorage, construct, assert } from \"@universalweb/acid\";\nconst storageBrowserStorage = construct(BrowserStorage);\nstorageBrowserStorage.setItem(\"key\", \"value\");\nassert(storageBrowserStorage.getItem(\"key\"), \"value\");\n"}],"name":"BrowserStorage.setItem","params":[{"tag":"param","name":"key","type":"String","optional":false,"description":"- The key used to store the data.","source":"* {String} key - The key used to store the data."},{"tag":"param","name":"value","type":"*","optional":false,"description":"- If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify.","source":"* {*} value - If saving to localStorage, & the object isn't a string it will be converted to a string using JSON.stringify."}],"type":"class","classTag":"BrowserStorage","functionTag":"setItem","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n *"}},"BrowserStorage.getItem":{"category":"browser","description":"Get an item from a browserStorage.","examples":[{"tag":"example","optional":false,"description":"import { BrowserStorage, construct, assert } from '@universalweb/acid'; const storageBrowserStorage = construct(BrowserStorage); storageBrowserStorage.setItem('key', 'value'); assert(storageBrowserStorage.getItem('key'), 'value');","source":"import { BrowserStorage, construct, assert } from \"@universalweb/acid\";\nconst storageBrowserStorage = construct(BrowserStorage);\nstorageBrowserStorage.setItem(\"key\", \"value\");\nassert(storageBrowserStorage.getItem(\"key\"), \"value\");\n"}],"name":"BrowserStorage.getItem","params":[{"tag":"param","name":"key","type":"String","optional":false,"description":"- The key used to store the data.","source":"* {String} key - The key used to store the data."}],"type":"class","classTag":"BrowserStorage","functionTag":"getItem","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n *"}},"BrowserStorage.clear":{"category":"browser","description":"Clears all data for the browserStorage including all of localStorage if supported.","examples":[{"tag":"example","optional":false,"description":"import { BrowserStorage, construct, assert } from '@universalweb/acid'; const storageBrowserStorage = construct(BrowserStorage); storageBrowserStorage.setItem('key', 'value'); assert(storageBrowserStorage.getItem('key'), 'value'); storageBrowserStorage.clear(); assert(storageBrowserStorage.getItem('key'), undefined);","source":"import { BrowserStorage, construct, assert } from \"@universalweb/acid\";\nconst storageBrowserStorage = construct(BrowserStorage);\nstorageBrowserStorage.setItem(\"key\", \"value\");\nassert(storageBrowserStorage.getItem(\"key\"), \"value\");\nstorageBrowserStorage.clear();\nassert(storageBrowserStorage.getItem(\"key\"), undefined);\n"}],"name":"BrowserStorage.clear","type":"class","classTag":"BrowserStorage","functionTag":"clear","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n *"}},"BrowserStorage.removeItem":{"category":"browser","description":"Remove an item from a browserStorage.","examples":[{"tag":"example","optional":false,"description":"import { BrowserStorage, construct, assert } from '@universalweb/acid'; const storageBrowserStorage = construct(BrowserStorage); storageBrowserStorage.setItem('key', 'value'); assert(storageBrowserStorage.getItem('key'), 'value'); storageBrowserStorage.removeItem('key'); assert(storageBrowserStorage.getItem('key'), undefined);","source":"import { BrowserStorage, construct, assert } from \"@universalweb/acid\";\nconst storageBrowserStorage = construct(BrowserStorage);\nstorageBrowserStorage.setItem(\"key\", \"value\");\nassert(storageBrowserStorage.getItem(\"key\"), \"value\");\nstorageBrowserStorage.removeItem(\"key\");\nassert(storageBrowserStorage.getItem(\"key\"), undefined);\n"}],"name":"BrowserStorage.removeItem","params":[{"tag":"param","name":"key","type":"String","optional":false,"description":"- The key used to remove data.","source":"* {String} key - The key used to remove data."}],"type":"class","classTag":"BrowserStorage","functionTag":"removeItem","returns":{"tag":"returns","name":"-","type":"undefined","optional":false,"description":"Returns undefined.","source":"* {undefined} - Returns undefined.\n *"}},"browserStorage":{"category":"browser","description":"The browserStorage function is a factory which wraps the BrowserStorage class constructor.","examples":[{"tag":"example","optional":false,"description":"const storageBrowserStorage = browserStorage(); // => New BrowserStorage Object","source":"const storageBrowserStorage = browserStorage();\n// => New BrowserStorage Object\n"}],"name":"browserStorage","type":"function","functionTag":"browserStorage","returns":{"tag":"returns","name":"-","type":"*","optional":false,"description":"Returns a new BrowserStorage Object.","source":"* {*} - Returns a new BrowserStorage Object.\n *"}}}} \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js index e918eb9..96aa0d9 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -54,28 +54,19 @@ export default [ 'error', { multiline: true, - minItems: 2 + minItems: 3 } ], - '@stylistic/array-bracket-spacing': [ - 'error', - 'never' - ], + '@stylistic/array-bracket-spacing': ['error', 'never'], '@stylistic/array-element-newline': [ 'error', { multiline: true, - minItems: 2 + minItems: 3 } ], - '@stylistic/arrow-parens': [ - 'error', - 'always' - ], - '@stylistic/block-spacing': [ - 'error', - 'always' - ], + '@stylistic/arrow-parens': ['error', 'always'], + '@stylistic/block-spacing': ['error', 'always'], '@stylistic/brace-style': 'error', '@stylistic/comma-dangle': [ 'error', @@ -94,20 +85,11 @@ export default [ before: false } ], - '@stylistic/comma-style': [ - 'error', - 'last' - ], + '@stylistic/comma-style': ['error', 'last'], '@stylistic/computed-property-spacing': 'error', - '@stylistic/dot-location': [ - 'error', - 'property' - ], + '@stylistic/dot-location': ['error', 'property'], '@stylistic/eol-last': 'error', - '@stylistic/function-call-argument-newline': [ - 'error', - 'consistent' - ], + '@stylistic/function-call-argument-newline': ['error', 'consistent'], '@stylistic/function-call-spacing': 'error', '@stylistic/function-paren-newline': 'error', '@stylistic/generator-star-spacing': [ @@ -117,10 +99,7 @@ export default [ before: false } ], - '@stylistic/implicit-arrow-linebreak': [ - 'error', - 'beside' - ], + '@stylistic/implicit-arrow-linebreak': ['error', 'beside'], '@stylistic/indent': [ 'error', 'tab', @@ -130,10 +109,7 @@ export default [ SwitchCase: 1 } ], - '@stylistic/jsx-quotes': [ - 'error', - 'prefer-double' - ], + '@stylistic/jsx-quotes': ['error', 'prefer-double'], '@stylistic/key-spacing': [ 'error', { @@ -149,10 +125,7 @@ export default [ before: true } ], - '@stylistic/linebreak-style': [ - 'error', - 'unix' - ], + '@stylistic/linebreak-style': ['error', 'unix'], '@stylistic/lines-around-comment': [ 'error', { @@ -162,10 +135,7 @@ export default [ beforeLineComment: false } ], - '@stylistic/lines-between-class-members': [ - 'error', - 'never' - ], + '@stylistic/lines-between-class-members': ['error', 'never'], '@stylistic/max-len': [ 'error', { @@ -185,10 +155,7 @@ export default [ max: 1 } ], - '@stylistic/multiline-ternary': [ - 'error', - 'never' - ], + '@stylistic/multiline-ternary': ['error', 'never'], '@stylistic/new-parens': 'error', '@stylistic/newline-per-chained-call': [ 'error', @@ -205,7 +172,8 @@ export default [ enforceForSequenceExpressions: false, nestedBinaryExpressions: false, returnAssign: false, - ternaryOperandBinaryExpressions: false + ternaryOperandBinaryExpressions: false, + enforceForFunctionPrototypeMethods: false, } ], '@stylistic/no-extra-semi': 'error', @@ -244,10 +212,7 @@ export default [ } } ], - '@stylistic/object-curly-spacing': [ - 'error', - 'always' - ], + '@stylistic/object-curly-spacing': ['error', 'always'], '@stylistic/object-property-newline': [ 'error', { @@ -255,23 +220,11 @@ export default [ allowMultiplePropertiesPerLine: false } ], - '@stylistic/one-var-declaration-per-line': [ - 'error', - 'always' - ], - '@stylistic/operator-linebreak': [ - 'error', - 'after' - ], - '@stylistic/padded-blocks': [ - 'error', - 'never' - ], + '@stylistic/one-var-declaration-per-line': ['error', 'always'], + '@stylistic/operator-linebreak': ['error', 'after'], + '@stylistic/padded-blocks': ['error', 'never'], '@stylistic/padding-line-between-statements': 'off', - '@stylistic/quote-props': [ - 'error', - 'as-needed' - ], + '@stylistic/quote-props': ['error', 'as-needed'], '@stylistic/quotes': [ 'error', 'single', @@ -279,19 +232,10 @@ export default [ allowTemplateLiterals: true } ], - '@stylistic/rest-spread-spacing': [ - 'error', - 'never' - ], - '@stylistic/semi': [ - 'error', - 'always' - ], + '@stylistic/rest-spread-spacing': ['error', 'never'], + '@stylistic/semi': ['error', 'always'], '@stylistic/semi-spacing': 'error', - '@stylistic/space-before-blocks': [ - 'error', - 'always' - ], + '@stylistic/space-before-blocks': ['error', 'always'], '@stylistic/space-before-function-paren': [ 'error', { @@ -300,10 +244,7 @@ export default [ named: 'never' } ], - '@stylistic/space-in-parens': [ - 'error', - 'never' - ], + '@stylistic/space-in-parens': ['error', 'never'], '@stylistic/space-infix-ops': [ 'error', { @@ -327,10 +268,7 @@ export default [ markers: ['!'] }, line: { - exceptions: [ - '-', - '+' - ], + exceptions: ['-', '+'], markers: ['/'] } } @@ -342,29 +280,14 @@ export default [ before: false } ], - '@stylistic/template-curly-spacing': [ - 'error', - 'never' - ], - '@stylistic/template-tag-spacing': [ - 'error', - 'always' - ], - '@stylistic/wrap-iife': [ - 'error', - 'any' - ], + '@stylistic/template-curly-spacing': ['error', 'never'], + '@stylistic/template-tag-spacing': ['error', 'always'], + '@stylistic/wrap-iife': ['error', 'any'], '@stylistic/wrap-regex': 'error', - '@stylistic/yield-star-spacing': [ - 'error', - 'after' - ], + '@stylistic/yield-star-spacing': ['error', 'after'], 'accessor-pairs': 'error', 'array-callback-return': 'error', - 'arrow-body-style': [ - 'error', - 'always' - ], + 'arrow-body-style': ['error', 'always'], 'arrow-spacing': [ 'error', { @@ -379,16 +302,10 @@ export default [ 'consistent-return': 'off', 'consistent-this': 'off', 'constructor-super': 'error', - curly: [ - 'error', - 'all' - ], + curly: ['error', 'all'], 'default-case': 'error', 'dot-notation': 'error', - eqeqeq: [ - 'error', - 'smart' - ], + eqeqeq: ['error', 'smart'], 'func-names': 'off', 'func-style': 'off', 'global-require': 'off', @@ -456,10 +373,7 @@ export default [ } ], 'max-depth': 'off', - 'max-nested-callbacks': [ - 'error', - 3 - ], + 'max-nested-callbacks': ['error', 3], 'max-params': 'off', 'max-statements': 'off', 'multiline-comment-style': 'off', @@ -468,15 +382,12 @@ export default [ 'no-alert': 'error', 'no-array-constructor': 'error', 'no-await-in-loop': 'off', - 'no-bitwise': 'error', + 'no-bitwise': 'off', 'no-caller': 'error', 'no-case-declarations': 'error', 'no-catch-shadow': 'error', 'no-class-assign': 'error', - 'no-cond-assign': [ - 'error', - 'always' - ], + 'no-cond-assign': ['error', 'always'], 'no-console': 'off', 'no-const-assign': 'error', 'no-constant-binary-expression': 'error', @@ -512,10 +423,7 @@ export default [ 'no-implied-eval': 'error', 'no-import-assign': 'error', 'no-inline-comments': 'error', - 'no-inner-declarations': [ - 'error', - 'functions' - ], + 'no-inner-declarations': ['error', 'functions'], 'no-invalid-regexp': 'error', 'no-invalid-this': 'off', 'no-irregular-whitespace': 'error', @@ -564,10 +472,7 @@ export default [ 'no-restricted-imports': 'off', 'no-restricted-modules': 'off', 'no-restricted-syntax': 'off', - 'no-return-assign': [ - 'error', - 'always' - ], + 'no-return-assign': ['error', 'always'], 'no-return-await': 'error', 'no-script-url': 'error', 'no-self-compare': 'error', @@ -594,10 +499,7 @@ export default [ 'no-underscore-dangle': [ 'error', { - allow: [ - '__dirname', - '__filename' - ] + allow: ['__dirname', '__filename'] } ], 'no-unexpected-multiline': 'error', @@ -624,10 +526,7 @@ export default [ 'no-void': 'error', 'no-with': 'error', 'object-shorthand': 'error', - 'one-var': [ - 'error', - 'never' - ], + 'one-var': ['error', 'never'], 'operator-assignment': 'off', 'prefer-arrow-callback': 'error', 'prefer-const': 'error', @@ -637,10 +536,7 @@ export default [ 'prefer-template': 'error', radix: 'error', 'require-yield': 'error', - semi: [ - 'error', - 'always' - ], + semi: ['error', 'always'], 'sort-imports': [ 'error', { diff --git a/github/basic.js b/github/basic.js index ed1ef24..9477765 100644 --- a/github/basic.js +++ b/github/basic.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:l}=Math;function h(t){return-1===l(t)}function p(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const y=Array.isArray;const d=Reflect.construct;function m(t,n=[],e){const r=y(n)?n:[n];return e?d(t,r,e):d(t,r)}function A(t){return y(t)&&t||i(t)&&[t]||[]}function b(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=m(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function O(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function I(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function M(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function E(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const S=/\.|\[/,x=/]/g,R="";function N(t){return t.replace(x,R).split(S)}function T(t,n){if(!n)return!1;let e=n;return M(y(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function U(t){if(t)return B(t)}const P=Object.hasOwn;function k(t,...n){if(t)return M(n,(n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}}))}function $(t,n){return t?.constructor===n||!1}function D(t){return n=>$(n,t)}function L(t){return t?.constructor?.name}function q(t){return n=>L(n)===t||!1}function V(t){return function(n,...e){return e?t(n)&&M(e,t):t(n)}}const Z=q("Buffer"),K=V(Z),z=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),_=(t,n)=>{if(t===n)return!0;if(K(t))return t.equals(n);if(t.toString()===n.toString())if(z(t)){const e=U(t);if(k(n,e))return M(e,(e=>_(t[e],n[e])))}else if(y(t)&&t.length===n.length)return M(t,((t,e)=>_(t,n[e])));return!1};const W=Math.max;function G(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function J(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function H(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,ft=q("Number"),lt=V(ft);const ht=D(String);const pt=Object.assign;function gt(t,n){if(z(n))pt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:pt(t,n)}else(ht(n)||lt(n))&&(t[n]=n);return t}function yt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function bt(t,n="id",e){return t.sort(((t,r)=>At(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:G(n,(n=>t[n]))}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Mt(t){return n=>!!i(n)&&t.test(n)}const jt=Mt(/\.css$/),Ft=Mt(/\.html$/),Et=Mt(/\.js$/),St=Mt(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=U(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Rt(t,n,e,r){if(!t)return;const o=U(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Tt=V(Nt);function Bt(t,n){if(Tt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Ut=q("GeneratorFunction"),Pt=V(Ut);async function kt(t,n,e){if(Tt(t)){for(const e of t)await n(e,t);return t}if(Pt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const $t=q("AsyncFunction"),Dt=V($t);function Lt(t,n,e,r,o,c){return(s,u,a,f,l)=>{let h;const p=Dt(u);if(i(s)&&u)return h=y(s)?p?n:t:z(s)||at(s)?p?r:e:o?p?c:o:Pt(s)?c:p?r:e,h(s,u,a,f,l)}}const qt=Lt(s,a,Rt,xt,Bt,kt);class Vt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Zt(){}function Kt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const _t=m(zt);function Wt(t,n){return _t.set(t,n)}const Gt=Reflect.apply;function Jt(t,n,e){if(at(t))return Gt(t,n,e)}function Ht(t){return t?.constructor}function Qt(t,n=[]){const e=Ht(t);return e===Function&&"function"===e.name?function(){}:m(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Rt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Rt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Lt(G,J,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return j(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return M(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(y(t)||Tt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if(Pt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(y(t)||Tt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Lt(M,j,on,rn,cn,sn);const an=Function.prototype;function fn(t){return an.call.bind(t)}const ln=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,pn=Object.defineProperty,gn=fn(Object.hasOwnProperty),yn=Object.is;const{random:dn}=Math;const{sign:mn}=Math;function An(t){return 0===t}const bn=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Rt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Rt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function On(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const In=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Mn(t){return t.replace(In,"\\$&")}function jn(t,n){return n?jn(G(t,Mn)):RegExp(t.join("|"))}const Fn=q("RegExp"),En=V(Fn);function Sn(t){if(!t)return;if(z(t))return U(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:U(t).length}const xn=/[ _-]+/g;const Rn=/[ _-]+/g,Nn=/[ ]+/g;const Tn=/[ _-]+/g,Bn=/[ ]+/g;const Un=/[ _-]+/g;const Pn=/[ _-]+/g;function kn(t,n=1){return t.substring(n)}const $n=/%(?![\da-f]{2})/gi,Dn=/&/g,Ln=//g,Vn=/"/g;function Zn(t){return decodeURIComponent(t.replace($n,(()=>"%25")))}function Kn(t){return t.replace(Dn,"&").replace(Ln,"<").replace(qn,">").replace(Vn,""")}const zn=/\S+/g,_n=/\w+/g;const Wn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+kn(t)}function Hn(t){return Gn(t)+kn(t).toLowerCase()}function Qn(t){return Ht(t)?.name}const Xn=q("Map"),Yn=V(Xn),te=/Array/,ne="Array";function ee(t){if(t){const n=Qn(t);if(te.test(n)&&n!==ne)return!0}return!1}function re(t){return!i(t)}const oe=q("BigInt"),ie=V(oe),ce=q("Boolean"),se=V(ce),ue=q("ArrayBuffer"),ae=V(ue);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const le=q("Date"),he=V(le);function pe(t){return!1===t}const ge=q("Float32Array"),ye=V(ge),de=q("Float64Array"),me=V(de),{isInteger:Ae}=Number,be=Ae,we=q("Int16Array"),ve=V(we),Ce=q("Int32Array"),Oe=V(Ce),Ie=q("Int8Array"),Me=V(Ie);function je(t){return!!t&&t instanceof Promise}function Fe(t){return!!t&&(je(t)||Dt(t)||Pt(t))}const{isSafeInteger:Ee}=Number,Se=Ee;const xe=q("Uint16Array"),Re=V(xe),Ne=q("Uint32Array"),Te=V(Ne),Be=q("Uint8Array"),Ue=V(Be),Pe=q("Uint8ClampedArray"),ke=V(Pe),$e=q("WeakMap"),De=V($e),Le=void 0!==globalThis.Deno,qe=void 0!==globalThis.process&&process.versions&&process.versions.node;function Ve(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(_(t,n))}const Ke=JSON;const ze=Ke.stringify;function _e(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${ze(t)}\n\t\tExpected: ${ze(n)}`,r)}async function We(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||_e(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function He(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Qe=Lt(u,f,vn,wn,He,Je);function Xe(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function Ye(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const tr=Lt(F,E,Cn,On,Xe,Ye);function nr(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const er=nr(s),rr=nr(O);function or(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ir=or(a),cr=or(I);const sr=Mt(/\./);class ur{list=m(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ar=m(ur);class fr{static models=new Map;constructor(t,n){i(n)?(yt(this,n),this.modelName=t,fr.models.set(t,n)):yt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}class lr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Rt(t,(n=>{t[n]=new lr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new lr(e),!0)})}}class hr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const pr=m(hr);class gr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=Vt,t.Intervals=ur,t.Model=fr,t.Store=lr,t.Timers=zt,t.UniqID=hr,t.VirtualStorage=gr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Jt,t.arrayToRegex=jn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Fe(t)||Fe(n)?We(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||_e(t,n,e)},t.assertAsync=We,t.assign=yt,t.assignToClass=dt,t.assignToObject=gt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?yt(e,r):r},t.cacheNativeMethod=fn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(xn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return m(Vt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(K(t))return ut(t);if(y(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Kt(setTimeout(Zt,0),(t=>{ar.remove(t)}))},t.clearTimers=function(){Kt(setTimeout(Zt,0),(t=>{_t.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.compact=function(t){if(z(t)){const n=U(t),e=n.length,r={};for(let o=0;oVe(t)))},t.compactKeys=function(t){const n=[];return Rt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Qe,t.compactMapArray=u,t.compactMapAsyncArray=f,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&_t.remove(e.id),e.id=Wt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(_t.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=pn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Rt,t.eachRight=O,t.eachRightAsync=I,t.ensureArray=A,t.ensureBuffer=function(t){return K(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=An,t.escapeRegex=Mn,t.escapeRegexRegex=In,t.every=un,t.everyArg=function(...t){return Dt(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=M,t.everyAsyncArray=j,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rmt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=mt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>mt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e},t.flattenDeep=b,t.flow=er,t.flowAsync=ir,t.flowAsyncRight=cr,t.flowRight=rr,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=He,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Xe,t.forOfFilterAsync=Ye,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Lt,t.get=T,t.getEntries=function(t){if(i(t))return bn(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return bt(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return M(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=ln,t.getType=Ht,t.getTypeName=Qn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!re(n)&&!re(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):En(e)?e.test(n):at(e)?e(n):y(e)?M(e,(e=>t(n,e))):un(e,(e=>t(n,e))):y(n)?En(e)?M(n,(t=>t.test(e))):at(e)?M(n,e):y(e)?M(e,(e=>t(n,e))):n.includes(e,r):!!z(n)&&(En(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):z(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}})))},t.hasDot=sr,t.hasKeys=k,t.hasLength=r,t.hasProp=gn,t.hasValue=i,t.htmlEntities=Kn,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Jt(n,e,r):n(...r);if(z(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(M(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return ar.set(t,n)},t.intervals=ar,t.invert=function(t,n={}){if(t)return Rt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return J(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=y,t.isArrayBuffer=ae,t.isArrayBufferCall=ue,t.isArrayLike=function(t,n){if(re(t)||at(t))return!1;if(y(t)||ee(t))return!0;const e=t.length;if(!re(e)||!lt(e)||e<0)return!1;if(n){const n=U(t);return!!n&&un(n,((t,n)=>n>=0&<(n)))}return!0},t.isAsync=Dt,t.isAsyncCall=$t,t.isBigInt=ie,t.isBigIntCall=oe,t.isBoolean=se,t.isBooleanCall=ce,t.isBuffer=K,t.isBufferCall=Z,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=$,t.isConstructorFactory=D,t.isConstructorNameFactory=q,t.isDate=he,t.isDateCall=le,t.isDeno=Le,t.isEmpty=function(t){return ht(t)||y(t)?!r(t):z(t)?!Sn(t):!i(t)},t.isEqual=_,t.isF32=ye,t.isF32Call=ge,t.isF64=me,t.isF64Call=de,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=jt,t.isFileHTML=Ft,t.isFileJS=Et,t.isFileJSON=St,t.isFloat=be,t.isFunction=at,t.isGenerator=Pt,t.isGeneratorCall=Ut,t.isI16=ve,t.isI16Call=we,t.isI32=Oe,t.isI32Call=Ce,t.isI8=Me,t.isI8Call=Ie,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Fe,t.isMap=Yn,t.isMapCall=Xn,t.isMatchArray=function(t,n){return t.length===n.length&&M(t,((t,e)=>_(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=U(t),r=U(n);return e.length===r.length&&M(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodejs=qe,t.isNotArray=function(t){return!y(t)},t.isNotNumber=function(t){return!lt(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=lt,t.isNumberCall=ft,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=z,t.isPositive=function(t){return 1===mn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=je,t.isRegex=En,t.isRegexCall=Fn,t.isRelated=function(t,n){return!re(t)&&!re(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Se,t.isSame=yn,t.isSameType=function(t,n){const e=Ht(t),r=Ht(n);return e===r&&e.name===r.name},t.isSet=Tt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=Ve,t.isTypeFactory=V,t.isTypedArray=ee,t.isU16=Re,t.isU16Call=xe,t.isU32=Te,t.isU32Call=Ne,t.isU8=Ue,t.isU8C=ke,t.isU8CCall=Pe,t.isU8Call=Be,t.isUndefined=e,t.isWeakMap=De,t.isWeakMapCall=$e,t.isZero=An,t.jsonParse=function(t,n){if(t)return Ke.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Rn," ").trim().toLowerCase().replace(Nn,"-")},t.keys=U,t.largest=function(t){return W(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase()},t.map=en,t.mapArray=G,t.mapAsyncArray=J,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(z(e)||y(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?m(fr,[t,n]):T(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=re,t.noop=Zt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=pt,t.objectEntries=bn,t.objectSize=Sn,t.omit=function(t,n){if(!t)return{};if(y(n)){const e=jn(n);return Cn(t,((t,n)=>!e.test(n)))}if(En(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(lt(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):pt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return G(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=U(t))=>M(e,(e=>_(t[e],n[e]))),t.randomFloat=function(t,n=0){return dn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Mt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cOt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=bt,t.sortCollectionDescendingFilter=At,t.sortNumberAscending=function(t){return t.sort(H)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=Ot,t.sortObjectsAlphabeticallyReverse=It,t.sortUnique=ct,t.stringify=ze,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=H,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Wt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{_t.remove(e.id),e.id=!1},e},t.timer=Wt,t.timers=_t,t.times=Kt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Rt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(b(t))},t.uniqID=pr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Hn,t.upperFirstOnlyAll=function(t){return t.replace(Wn,(t=>Hn(t)))},t.virtualStorage=function(t){return new gr(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(_n)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=m(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e}})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:l}=Math;function h(t){return-1===l(t)}function p(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const y=Array.isArray;const d=Reflect.construct;function m(t,n=[],e){const r=y(n)?n:[n];return e?d(t,r,e):d(t,r)}function A(t){return y(t)&&t||i(t)&&[t]||[]}function b(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=m(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function O(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function I(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function M(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function E(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const S=/\.|\[/,x=/]/g,R="";function N(t){return t.replace(x,R).split(S)}function T(t,n){if(!n)return!1;let e=n;return M(y(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function U(t){if(t)return B(t)}const P=Object.hasOwn;function k(t,...n){if(t)return M(n,(n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}}))}function $(t,n){return t?.constructor===n||!1}function D(t){return n=>$(n,t)}function L(t){return t?.constructor?.name}function q(t){return n=>L(n)===t||!1}function V(t){return function(n,...e){return e?t(n)&&M(e,t):t(n)}}const Z=q("Buffer"),K=V(Z),z=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),_=(t,n)=>{if(t===n)return!0;if(K(t))return t.equals(n);if(t.toString()===n.toString())if(z(t)){const e=U(t);if(k(n,e))return M(e,(e=>_(t[e],n[e])))}else if(y(t)&&t.length===n.length)return M(t,((t,e)=>_(t,n[e])));return!1};const W=Math.max;function G(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function J(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function H(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,ft=q("Number"),lt=V(ft);const ht=D(String);const pt=Object.assign;function gt(t,n){if(z(n))pt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:pt(t,n)}else(ht(n)||lt(n))&&(t[n]=n);return t}function yt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function bt(t,n="id",e){return t.sort(((t,r)=>At(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:G(n,(n=>t[n]))}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Mt(t){return n=>!!i(n)&&t.test(n)}const jt=Mt(/\.css$/),Ft=Mt(/\.html$/),Et=Mt(/\.js$/),St=Mt(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=U(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Rt(t,n,e,r){if(!t)return;const o=U(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Tt=V(Nt);function Bt(t,n){if(Tt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Ut=q("GeneratorFunction"),Pt=V(Ut);async function kt(t,n,e){if(Tt(t)){for(const e of t)await n(e,t);return t}if(Pt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const $t=q("AsyncFunction"),Dt=V($t);function Lt(t,n,e,r,o,c){return(s,u,a,f,l)=>{let h;const p=Dt(u);if(i(s)&&u)return h=y(s)?p?n:t:z(s)||at(s)?p?r:e:o?p?c:o:Pt(s)?c:p?r:e,h(s,u,a,f,l)}}const qt=Lt(s,a,Rt,xt,Bt,kt);class Vt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Zt(){}function Kt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const _t=m(zt);function Wt(t,n){return _t.set(t,n)}const Gt=Reflect.apply;function Jt(t,n,e){if(at(t))return Gt(t,n,e)}function Ht(t){return t?.constructor}function Qt(t,n=[]){const e=Ht(t);return e===Function&&"function"===e.name?function(){}:m(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Rt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Rt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Lt(G,J,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return j(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return M(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(y(t)||Tt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if(Pt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(y(t)||Tt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Lt(M,j,on,rn,cn,sn);const an=Function.prototype;function fn(t){return an.call.bind(t)}const ln=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,pn=Object.defineProperty,gn=fn(Object.hasOwnProperty),yn=Object.is;const{random:dn}=Math;const{sign:mn}=Math;function An(t){return 0===t}const bn=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Rt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Rt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function On(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const In=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Mn(t){return t.replace(In,"\\$&")}function jn(t,n){return n?jn(G(t,Mn)):RegExp(t.join("|"))}const Fn=q("RegExp"),En=V(Fn);function Sn(t){if(!t)return;if(z(t))return U(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:U(t).length}const xn=/[ _-]+/g;const Rn=/[ _-]+/g,Nn=/[ ]+/g;const Tn=/[ _-]+/g,Bn=/[ ]+/g;const Un=/[ _-]+/g;const Pn=/[ _-]+/g;function kn(t,n=1){return t.substring(n)}const $n=/%(?![\da-f]{2})/gi,Dn=/&/g,Ln=//g,Vn=/"/g;function Zn(t){return decodeURIComponent(t.replace($n,(()=>"%25")))}function Kn(t){return t.replace(Dn,"&").replace(Ln,"<").replace(qn,">").replace(Vn,""")}const zn=/\S+/g,_n=/\w+/g;const Wn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+kn(t)}function Hn(t){return Gn(t)+kn(t).toLowerCase()}function Qn(t){return Ht(t)?.name}const Xn=q("Map"),Yn=V(Xn),te=/Array/,ne="Array";function ee(t){if(t){const n=Qn(t);if(te.test(n)&&n!==ne)return!0}return!1}function re(t){return!i(t)}const oe=q("BigInt"),ie=V(oe),ce=q("Boolean"),se=V(ce),ue=q("ArrayBuffer"),ae=V(ue);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const le=q("Date"),he=V(le);function pe(t){return!1===t}const ge=q("Float32Array"),ye=V(ge),de=q("Float64Array"),me=V(de),{isInteger:Ae}=Number,be=Ae,we=q("Int16Array"),ve=V(we),Ce=q("Int32Array"),Oe=V(Ce),Ie=q("Int8Array"),Me=V(Ie);function je(t){return!!t&&t instanceof Promise}function Fe(t){return!!t&&(je(t)||Dt(t)||Pt(t))}const{isSafeInteger:Ee}=Number,Se=Ee;const xe=q("Uint16Array"),Re=V(xe),Ne=q("Uint32Array"),Te=V(Ne),Be=q("Uint8Array"),Ue=V(Be),Pe=q("Uint8ClampedArray"),ke=V(Pe),$e=q("WeakMap"),De=V($e),Le=void 0!==globalThis.Deno,qe=void 0!==globalThis.process&&process.versions&&process.versions.node;function Ve(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(_(t,n))}const Ke=JSON;const ze=Ke.stringify;function _e(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${ze(t)}\n\t\tExpected: ${ze(n)}`,r)}async function We(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||_e(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function He(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Qe=Lt(u,f,vn,wn,He,Je);function Xe(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function Ye(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const tr=Lt(F,E,Cn,On,Xe,Ye);function nr(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const er=nr(s),rr=nr(O);function or(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ir=or(a),cr=or(I);const sr=Mt(/\./);class ur{list=m(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ar=m(ur);class fr{static models=new Map;constructor(t,n){i(n)?(yt(this,n),this.modelName=t,fr.models.set(t,n)):yt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}class lr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Rt(t,(n=>{t[n]=new lr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new lr(e),!0)})}}class hr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const pr=m(hr);class gr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=Vt,t.Intervals=ur,t.Model=fr,t.Store=lr,t.Timers=zt,t.UniqID=hr,t.VirtualStorage=gr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Jt,t.arrayToRegex=jn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Fe(t)||Fe(n)?We(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||_e(t,n,e)},t.assertAsync=We,t.assign=yt,t.assignToClass=dt,t.assignToObject=gt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?yt(e,r):r},t.cacheNativeMethod=fn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(xn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return m(Vt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(K(t))return ut(t);if(y(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Kt(setTimeout(Zt,0),(t=>{ar.remove(t)}))},t.clearTimers=function(){Kt(setTimeout(Zt,0),(t=>{_t.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.compact=function(t){if(z(t)){const n=U(t),e=n.length,r={};for(let o=0;oVe(t)))},t.compactKeys=function(t){const n=[];return Rt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Qe,t.compactMapArray=u,t.compactMapAsyncArray=f,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&_t.remove(e.id),e.id=Wt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(_t.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=pn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Rt,t.eachRight=O,t.eachRightAsync=I,t.ensureArray=A,t.ensureBuffer=function(t){return K(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=An,t.escapeRegex=Mn,t.escapeRegexRegex=In,t.every=un,t.everyArg=function(...t){return Dt(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=M,t.everyAsyncArray=j,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rmt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=mt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>mt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e},t.flattenDeep=b,t.flow=er,t.flowAsync=ir,t.flowAsyncRight=cr,t.flowRight=rr,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=He,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Xe,t.forOfFilterAsync=Ye,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Lt,t.get=T,t.getEntries=function(t){if(i(t))return bn(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return bt(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return M(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=ln,t.getType=Ht,t.getTypeName=Qn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!re(n)&&!re(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):En(e)?e.test(n):at(e)?e(n):y(e)?M(e,(e=>t(n,e))):un(e,(e=>t(n,e))):y(n)?En(e)?M(n,(t=>t.test(e))):at(e)?M(n,e):y(e)?M(e,(e=>t(n,e))):n.includes(e,r):!!z(n)&&(En(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):z(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}})))},t.hasDot=sr,t.hasKeys=k,t.hasLength=r,t.hasProp=gn,t.hasValue=i,t.htmlEntities=Kn,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Jt(n,e,r):n(...r);if(z(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(M(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return ar.set(t,n)},t.intervals=ar,t.invert=function(t,n={}){if(t)return Rt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return J(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=y,t.isArrayBuffer=ae,t.isArrayBufferCall=ue,t.isArrayLike=function(t,n){if(re(t)||at(t))return!1;if(y(t)||ee(t))return!0;const e=t.length;if(!re(e)||!lt(e)||e<0)return!1;if(n){const n=U(t);return!!n&&un(n,((t,n)=>n>=0&<(n)))}return!0},t.isAsync=Dt,t.isAsyncCall=$t,t.isBigInt=ie,t.isBigIntCall=oe,t.isBoolean=se,t.isBooleanCall=ce,t.isBuffer=K,t.isBufferCall=Z,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=$,t.isConstructorFactory=D,t.isConstructorNameFactory=q,t.isDate=he,t.isDateCall=le,t.isDeno=Le,t.isEmpty=function(t){return ht(t)||y(t)?!r(t):z(t)?!Sn(t):!i(t)},t.isEqual=_,t.isEven=function(t){return!(1&t)},t.isF32=ye,t.isF32Call=ge,t.isF64=me,t.isF64Call=de,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=jt,t.isFileHTML=Ft,t.isFileJS=Et,t.isFileJSON=St,t.isFloat=be,t.isFunction=at,t.isGenerator=Pt,t.isGeneratorCall=Ut,t.isI16=ve,t.isI16Call=we,t.isI32=Oe,t.isI32Call=Ce,t.isI8=Me,t.isI8Call=Ie,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Fe,t.isMap=Yn,t.isMapCall=Xn,t.isMatchArray=function(t,n){return t.length===n.length&&M(t,((t,e)=>_(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=U(t),r=U(n);return e.length===r.length&&M(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodejs=qe,t.isNotArray=function(t){return!y(t)},t.isNotNumber=function(t){return!lt(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=lt,t.isNumberCall=ft,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=z,t.isPositive=function(t){return 1===mn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=je,t.isRegex=En,t.isRegexCall=Fn,t.isRelated=function(t,n){return!re(t)&&!re(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Se,t.isSame=yn,t.isSameType=function(t,n){const e=Ht(t),r=Ht(n);return e===r&&e.name===r.name},t.isSet=Tt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=Ve,t.isTypeFactory=V,t.isTypedArray=ee,t.isU16=Re,t.isU16Call=xe,t.isU32=Te,t.isU32Call=Ne,t.isU8=Ue,t.isU8C=ke,t.isU8CCall=Pe,t.isU8Call=Be,t.isUndefined=e,t.isWeakMap=De,t.isWeakMapCall=$e,t.isZero=An,t.jsonParse=function(t,n){if(t)return Ke.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Rn," ").trim().toLowerCase().replace(Nn,"-")},t.keys=U,t.largest=function(t){return W(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase()},t.map=en,t.mapArray=G,t.mapAsyncArray=J,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(z(e)||y(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?m(fr,[t,n]):T(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=re,t.noop=Zt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=pt,t.objectEntries=bn,t.objectSize=Sn,t.omit=function(t,n){if(!t)return{};if(y(n)){const e=jn(n);return Cn(t,((t,n)=>!e.test(n)))}if(En(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(lt(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):pt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return G(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=U(t))=>M(e,(e=>_(t[e],n[e]))),t.randomFloat=function(t,n=0){return dn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Mt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cOt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=bt,t.sortCollectionDescendingFilter=At,t.sortNumberAscending=function(t){return t.sort(H)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=Ot,t.sortObjectsAlphabeticallyReverse=It,t.sortUnique=ct,t.stringify=ze,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=H,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Wt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{_t.remove(e.id),e.id=!1},e},t.timer=Wt,t.timers=_t,t.times=Kt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Rt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(b(t))},t.uniqID=pr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Hn,t.upperFirstOnlyAll=function(t){return t.replace(Wn,(t=>Hn(t)))},t.virtualStorage=function(t){return new gr(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(_n)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=m(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e}})); //# sourceMappingURL=basic.js.map diff --git a/github/browser.js b/github/browser.js index b597a51..9c92d54 100644 --- a/github/browser.js +++ b/github/browser.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:f}=Math;function h(t){return-1===f(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const d=Array.isArray;const m=Reflect.construct;function y(t,n=[],e){const r=d(n)?n:[n];return e?m(t,r,e):m(t,r)}function b(t){return d(t)&&t||i(t)&&[t]||[]}function A(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=y(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function I(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function O(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function E(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function M(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const j=/\.|\[/,x=/]/g,T="";function N(t){return t.replace(x,T).split(j)}function R(t,n){if(!n)return!1;let e=n;return E(d(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function L(t){if(t)return B(t)}const $=Object.hasOwn;function k(t,...n){if(t)return E(n,(n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}}))}function D(t,n){return t?.constructor===n||!1}function U(t){return n=>D(n,t)}function P(t){return t?.constructor?.name}function q(t){return n=>P(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&E(e,t):t(n)}}const W=q("Buffer"),Z=z(W),_=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(Z(t))return t.equals(n);if(t.toString()===n.toString())if(_(t)){const e=L(t);if(k(n,e))return E(e,(e=>H(t[e],n[e])))}else if(d(t)&&t.length===n.length)return E(t,((t,e)=>H(t,n[e])));return!1};const V=Math.max;function K(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function G(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function J(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,lt=q("Number"),ft=z(lt);const ht=U(String);const gt=Object.assign;function pt(t,n){if(_(n))gt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:gt(t,n)}else(ht(n)||ft(n))&&(t[n]=n);return t}function dt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function At(t,n="id",e){return t.sort(((t,r)=>bt(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:K(n,(n=>t[n]))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Et(t){return n=>!!i(n)&&t.test(n)}const St=Et(/\.css$/),Ft=Et(/\.html$/),Mt=Et(/\.js$/),jt=Et(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=L(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Tt(t,n,e,r){if(!t)return;const o=L(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Rt=z(Nt);function Bt(t,n){if(Rt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Lt=q("GeneratorFunction"),$t=z(Lt);async function kt(t,n,e){if(Rt(t)){for(const e of t)await n(e,t);return t}if($t(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const Dt=q("AsyncFunction"),Ut=z(Dt);function Pt(t,n,e,r,o,c){return(s,u,a,l,f)=>{let h;const g=Ut(u);if(i(s)&&u)return h=d(s)?g?n:t:_(s)||at(s)?g?r:e:o?g?c:o:$t(s)?c:g?r:e,h(s,u,a,l,f)}}const qt=Pt(s,a,Tt,xt,Bt,kt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Zt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=y(_t);function Vt(t,n){return Ht.set(t,n)}const Kt=Reflect.apply;function Gt(t,n,e){if(at(t))return Kt(t,n,e)}function Jt(t){return t?.constructor}function Qt(t,n=[]){const e=Jt(t);return e===Function&&"function"===e.name?function(){}:y(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Tt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Tt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Pt(K,G,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return S(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return E(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(d(t)||Rt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if($t(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(d(t)||Rt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Pt(E,S,on,rn,cn,sn);const an=Function.prototype;function ln(t){return an.call.bind(t)}const fn=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,gn=Object.defineProperty,pn=ln(Object.hasOwnProperty),dn=Object.is;const{random:mn}=Math;const{sign:yn}=Math;function bn(t){return 0===t}const An=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Tt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Tt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function In(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const On=/[()[\]{}*+?^$|#.,/\\\s-]/g;function En(t){return t.replace(On,"\\$&")}function Sn(t,n){return n?Sn(K(t,En)):RegExp(t.join("|"))}const Fn=q("RegExp"),Mn=z(Fn);function jn(t){if(!t)return;if(_(t))return L(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:L(t).length}const xn=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Tn=/[ _-]+/g;const Nn=/[ _-]+/g,Rn=/[ ]+/g;const Bn=/[ _-]+/g,Ln=/[ ]+/g;const $n=/[ _-]+/g;const kn=/[ _-]+/g;function Dn(t,n=1){return t.substring(n)}const Un=/%(?![\da-f]{2})/gi,Pn=/&/g,qn=//g,Wn=/"/g;function Zn(t){return decodeURIComponent(t.replace(Un,(()=>"%25")))}function _n(t){return t.replace(Pn,"&").replace(qn,"<").replace(zn,">").replace(Wn,""")}const Hn=/\S+/g,Vn=/\w+/g;const Kn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+Dn(t)}function Qn(t){return Gn(t)+Dn(t).toLowerCase()}function Xn(t){return Jt(t)?.name}const Yn=q("Map"),te=z(Yn),ne=/Array/,ee="Array";function re(t){if(t){const n=Xn(t);if(ne.test(n)&&n!==ee)return!0}return!1}function oe(t){return!i(t)}const ie=q("BigInt"),ce=z(ie),se=q("Boolean"),ue=z(se),ae=q("ArrayBuffer"),le=z(ae);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const he=q("Date"),ge=z(he);function pe(t){return!1===t}const de=q("Float32Array"),me=z(de),ye=q("Float64Array"),be=z(ye),{isInteger:Ae}=Number,we=Ae,ve=q("Int16Array"),Ce=z(ve),Ie=q("Int32Array"),Oe=z(Ie),Ee=q("Int8Array"),Se=z(Ee);function Fe(t){return!!t&&t instanceof Promise}function Me(t){return!!t&&(Fe(t)||Ut(t)||$t(t))}const{isSafeInteger:je}=Number,xe=je;const Te=q("Uint16Array"),Ne=z(Te),Re=q("Uint32Array"),Be=z(Re),Le=q("Uint8Array"),$e=z(Le),ke=q("Uint8ClampedArray"),De=z(ke),Ue=q("WeakMap"),Pe=z(Ue),qe=void 0!==globalThis.Deno,ze=void 0!==globalThis.process&&process.versions&&process.versions.node;function We(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(H(t,n))}const _e=JSON;const He=_e.stringify;function Ve(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${He(t)}\n\t\tExpected: ${He(n)}`,r)}async function Ke(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||Ve(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function Qe(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Xe=Pt(u,l,vn,wn,Qe,Je);function Ye(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function tr(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const nr=Pt(F,M,Cn,In,Ye,tr);function er(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const rr=er(s),or=er(I);function ir(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const cr=ir(a),sr=ir(O);const ur=Et(/\./);class ar{list=y(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const lr=y(ar);class fr{static models=new Map;constructor(t,n){i(n)?(dt(this,n),this.modelName=t,fr.models.set(t,n)):dt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}function hr(t){return new Promise(t)}class gr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Tt(t,(n=>{t[n]=new gr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new gr(e),!0)})}}class pr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const dr=y(pr);class mr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function yr(t){return new mr(t)}function br(t){return i(t)?br[t]:L(br)}const Ar=globalThis.navigator?.userAgentData;if(Ar)Tt(Ar,((t,n)=>{ue(t)&&t&&(br[n]=t)})),s(Ar.brands,(t=>{br[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{br[t]=!0}))}function wr(t,n,e,r){return t.addEventListener(n,e,r),t}const vr=document.createDocumentFragment.bind(document);function Cr(t,n){return t.appendChild(n),n}function Ir(t,n){return d(n)?xn(n,K(n,(n=>t.getAttribute(n)))):(Tt(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Or=/^.[\w_-]+$/,Er=/^[A-Za-z]+$/,Sr=/\s/,Fr=document.getElementsByClassName.bind(document),Mr=document.getElementsByTagName.bind(document),jr=document.getElementById.bind(document),xr=document.querySelector.bind(document),Tr=document.querySelectorAll.bind(document);const Nr=document.createElement.bind(document);function Rr(t){const n=ur(t)&&t||`${t}.js`;return(t=>hr((n=>{wr(t,"load",n,!0),wr(t,"error",n,!0),Cr(xr("head"),t)})))(Ir(Nr("script"),{async:"",src:n}))}function Br(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&wr(document,"DOMContentLoaded",t),!1)}Br((()=>{const t=jr("AcidLib");Rr(t&&t.getAttribute("data-index")||"/index")}));const Lr=location.protocol,$r="http:"===Lr?"ws":"wss",kr=location.hostname,Dr={hardware:{cores:navigator.hardwareConcurrency},host:{name:kr,protocol:Lr,protocolSocket:$r}};function Ur(){dt(Dr,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Pr(){Ur()}Br(Pr),wr(window,"load",Pr,!0),wr(window,"resize",Pr,!0),t.hasLocal=void 0,function(n){try{n().removeItem("TESTING"),t.hasLocal=!0}catch(n){t.hasLocal=!1}}((()=>localStorage));class qr{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=yr(t)}hasLocal=t.hasLocal;setItem(t,n){return this.hasLocal&&this.local.setItem(t,ht(n)?n:He(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return i(n)?n:!i(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}const zr=(t,n)=>`color:${t};background:${n};`,Wr={alert:zr("#fff","#f44336"),important:zr("#fff","#E91E63"),notify:zr("#fff","#651FFF"),warning:zr("#000","#FFEA00")};t.BrowserStorage=qr,t.Chain=zt,t.Intervals=ar,t.Model=fr,t.Store=gr,t.Timers=_t,t.UniqID=pr,t.VirtualStorage=mr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.append=Cr,t.apply=Gt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Me(t)||Me(n)?Ke(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||Ve(t,n,e)},t.assertAsync=Ke,t.assign=dt,t.assignToClass=mt,t.assignToObject=pt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?dt(e,r):r},t.browserStorage=function(t){return new qr(t)},t.cacheNativeMethod=ln,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Tn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return y(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(Z(t))return ut(t);if(d(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Zt(setTimeout(Wt,0),(t=>{lr.remove(t)}))},t.clearTimers=function(){Zt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.cnsl=(t,n)=>{const e=ht(t)?t:He(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},t.cnslTheme=(t,n,e)=>{Wr[t]=zr(n,e)},t.compact=function(t){if(_(t)){const n=L(t),e=n.length,r={};for(let o=0;oWe(t)))},t.compactKeys=function(t){const n=[];return Tt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Xe,t.compactMapArray=u,t.compactMapAsyncArray=l,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.createFragment=vr,t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Vt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=gn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Tt,t.eachRight=I,t.eachRightAsync=O,t.ensureArray=b,t.ensureBuffer=function(t){return Z(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=bn,t.escapeRegex=En,t.escapeRegexRegex=On,t.eventAdd=wr,t.eventRemove=function(t,n,e,r){return t.removeEventListener(n,e,r),t},t.every=un,t.everyArg=function(...t){return Ut(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=E,t.everyAsyncArray=S,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;ryt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=yt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>yt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(b(n))),[]);return e},t.flattenDeep=A,t.flow=rr,t.flowAsync=cr,t.flowAsyncRight=sr,t.flowRight=or,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=Qe,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Ye,t.forOfFilterAsync=tr,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Pt,t.get=R,t.getByClass=Fr,t.getById=jr,t.getByTag=Mr,t.getEntries=function(t){if(i(t))return An(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return At(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return E(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=fn,t.getType=Jt,t.getTypeName=Xn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!oe(n)&&!oe(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):Mn(e)?e.test(n):at(e)?e(n):d(e)?E(e,(e=>t(n,e))):un(e,(e=>t(n,e))):d(n)?Mn(e)?E(n,(t=>t.test(e))):at(e)?E(n,e):d(e)?E(e,(e=>t(n,e))):n.includes(e,r):!!_(n)&&(Mn(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):_(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}})))},t.hasDot=ur,t.hasKeys=k,t.hasLength=r,t.hasProp=pn,t.hasValue=i,t.htmlEntities=_n,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Gt(n,e,r):n(...r);if(_(n))return n[e]=t,n}},t.importjs=Rr,t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.info=Dr,t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(E(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return lr.set(t,n)},t.intervals=lr,t.invert=function(t,n={}){if(t)return Tt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return G(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isAgent=br,t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=d,t.isArrayBuffer=le,t.isArrayBufferCall=ae,t.isArrayLike=function(t,n){if(oe(t)||at(t))return!1;if(d(t)||re(t))return!0;const e=t.length;if(!oe(e)||!ft(e)||e<0)return!1;if(n){const n=L(t);return!!n&&un(n,((t,n)=>n>=0&&ft(n)))}return!0},t.isAsync=Ut,t.isAsyncCall=Dt,t.isBigInt=ce,t.isBigIntCall=ie,t.isBoolean=ue,t.isBooleanCall=se,t.isBuffer=Z,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=D,t.isConstructorFactory=U,t.isConstructorNameFactory=q,t.isDate=ge,t.isDateCall=he,t.isDeno=qe,t.isDocumentReady=Br,t.isDom=function(t){return t&&9!==t.nodeType},t.isEmpty=function(t){return ht(t)||d(t)?!r(t):_(t)?!jn(t):!i(t)},t.isEnter=function(t){return 13===t.keyCode},t.isEqual=H,t.isF32=me,t.isF32Call=de,t.isF64=be,t.isF64Call=ye,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=Ft,t.isFileJS=Mt,t.isFileJSON=jt,t.isFloat=we,t.isFunction=at,t.isGenerator=$t,t.isGeneratorCall=Lt,t.isHTMLCollection=function(t){return!!i(t)&&"[object HTMLCollection]"===t.toString()},t.isI16=Ce,t.isI16Call=ve,t.isI32=Oe,t.isI32Call=Ie,t.isI8=Se,t.isI8Call=Ee,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Me,t.isMap=te,t.isMapCall=Yn,t.isMatchArray=function(t,n){return t.length===n.length&&E(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=L(t),r=L(n);return e.length===r.length&&E(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodeList=function(t){return!!i(t)&&"[object NodeList]"===t.toString()},t.isNodejs=ze,t.isNotArray=function(t){return!d(t)},t.isNotNumber=function(t){return!ft(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=ft,t.isNumberCall=lt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=_,t.isPositive=function(t){return 1===yn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Fe,t.isRegex=Mn,t.isRegexCall=Fn,t.isRelated=function(t,n){return!oe(t)&&!oe(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=xe,t.isSame=dn,t.isSameType=function(t,n){const e=Jt(t),r=Jt(n);return e===r&&e.name===r.name},t.isSet=Rt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=We,t.isTypeFactory=z,t.isTypedArray=re,t.isU16=Ne,t.isU16Call=Te,t.isU32=Be,t.isU32Call=Re,t.isU8=$e,t.isU8C=De,t.isU8CCall=ke,t.isU8Call=Le,t.isUndefined=e,t.isWeakMap=Pe,t.isWeakMapCall=Ue,t.isZero=bn,t.jsonParse=function(t,n){if(t)return _e.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Nn," ").trim().toLowerCase().replace(Rn,"-")},t.keys=L,t.largest=function(t){return V(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(kn," ").trim().toLowerCase()},t.map=en,t.mapArray=K,t.mapAsyncArray=G,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(_(e)||d(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?y(fr,[t,n]):R(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=oe,t.nodeAttribute=Ir,t.noop=Wt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=gt,t.objectEntries=An,t.objectSize=jn,t.omit=function(t,n){if(!t)return{};if(d(n)){const e=Sn(n);return Cn(t,((t,n)=>!e.test(n)))}if(Mn(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(ft(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):gt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return K(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=hr,t.propertyMatch=(t,n,e=L(t))=>E(e,(e=>H(t[e],n[e]))),t.querySelector=xr,t.querySelectorAll=Tr,t.randomFloat=function(t,n=0){return mn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Et,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cIt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Ot(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=At,t.sortCollectionDescendingFilter=bt,t.sortNumberAscending=function(t){return t.sort(J)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=It,t.sortObjectsAlphabeticallyReverse=Ot,t.sortUnique=ct,t.stringify=He,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=J,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.themes=Wr,t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Vt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Vt,t.timers=Ht,t.times=Zt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Tt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(A(t))},t.uniqID=dr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Qn,t.upperFirstOnlyAll=function(t){return t.replace(Kn,(t=>Qn(t)))},t.virtualStorage=yr,t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Vn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=y(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=xn})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:f}=Math;function h(t){return-1===f(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const d=Array.isArray;const m=Reflect.construct;function y(t,n=[],e){const r=d(n)?n:[n];return e?m(t,r,e):m(t,r)}function b(t){return d(t)&&t||i(t)&&[t]||[]}function A(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=y(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function I(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function O(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function E(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function M(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const j=/\.|\[/,x=/]/g,T="";function N(t){return t.replace(x,T).split(j)}function R(t,n){if(!n)return!1;let e=n;return E(d(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function L(t){if(t)return B(t)}const $=Object.hasOwn;function k(t,...n){if(t)return E(n,(n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}}))}function D(t,n){return t?.constructor===n||!1}function U(t){return n=>D(n,t)}function P(t){return t?.constructor?.name}function q(t){return n=>P(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&E(e,t):t(n)}}const W=q("Buffer"),Z=z(W),_=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(Z(t))return t.equals(n);if(t.toString()===n.toString())if(_(t)){const e=L(t);if(k(n,e))return E(e,(e=>H(t[e],n[e])))}else if(d(t)&&t.length===n.length)return E(t,((t,e)=>H(t,n[e])));return!1};const V=Math.max;function K(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function G(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function J(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,lt=q("Number"),ft=z(lt);const ht=U(String);const gt=Object.assign;function pt(t,n){if(_(n))gt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:gt(t,n)}else(ht(n)||ft(n))&&(t[n]=n);return t}function dt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function At(t,n="id",e){return t.sort(((t,r)=>bt(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:K(n,(n=>t[n]))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Et(t){return n=>!!i(n)&&t.test(n)}const St=Et(/\.css$/),Ft=Et(/\.html$/),Mt=Et(/\.js$/),jt=Et(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=L(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Tt(t,n,e,r){if(!t)return;const o=L(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Rt=z(Nt);function Bt(t,n){if(Rt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Lt=q("GeneratorFunction"),$t=z(Lt);async function kt(t,n,e){if(Rt(t)){for(const e of t)await n(e,t);return t}if($t(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const Dt=q("AsyncFunction"),Ut=z(Dt);function Pt(t,n,e,r,o,c){return(s,u,a,l,f)=>{let h;const g=Ut(u);if(i(s)&&u)return h=d(s)?g?n:t:_(s)||at(s)?g?r:e:o?g?c:o:$t(s)?c:g?r:e,h(s,u,a,l,f)}}const qt=Pt(s,a,Tt,xt,Bt,kt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Zt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=y(_t);function Vt(t,n){return Ht.set(t,n)}const Kt=Reflect.apply;function Gt(t,n,e){if(at(t))return Kt(t,n,e)}function Jt(t){return t?.constructor}function Qt(t,n=[]){const e=Jt(t);return e===Function&&"function"===e.name?function(){}:y(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Tt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Tt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Pt(K,G,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return S(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return E(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(d(t)||Rt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if($t(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(d(t)||Rt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Pt(E,S,on,rn,cn,sn);const an=Function.prototype;function ln(t){return an.call.bind(t)}const fn=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,gn=Object.defineProperty,pn=ln(Object.hasOwnProperty),dn=Object.is;const{random:mn}=Math;const{sign:yn}=Math;function bn(t){return 0===t}const An=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Tt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Tt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function In(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const On=/[()[\]{}*+?^$|#.,/\\\s-]/g;function En(t){return t.replace(On,"\\$&")}function Sn(t,n){return n?Sn(K(t,En)):RegExp(t.join("|"))}const Fn=q("RegExp"),Mn=z(Fn);function jn(t){if(!t)return;if(_(t))return L(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:L(t).length}const xn=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Tn=/[ _-]+/g;const Nn=/[ _-]+/g,Rn=/[ ]+/g;const Bn=/[ _-]+/g,Ln=/[ ]+/g;const $n=/[ _-]+/g;const kn=/[ _-]+/g;function Dn(t,n=1){return t.substring(n)}const Un=/%(?![\da-f]{2})/gi,Pn=/&/g,qn=//g,Wn=/"/g;function Zn(t){return decodeURIComponent(t.replace(Un,(()=>"%25")))}function _n(t){return t.replace(Pn,"&").replace(qn,"<").replace(zn,">").replace(Wn,""")}const Hn=/\S+/g,Vn=/\w+/g;const Kn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+Dn(t)}function Qn(t){return Gn(t)+Dn(t).toLowerCase()}function Xn(t){return Jt(t)?.name}const Yn=q("Map"),te=z(Yn),ne=/Array/,ee="Array";function re(t){if(t){const n=Xn(t);if(ne.test(n)&&n!==ee)return!0}return!1}function oe(t){return!i(t)}const ie=q("BigInt"),ce=z(ie),se=q("Boolean"),ue=z(se),ae=q("ArrayBuffer"),le=z(ae);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const he=q("Date"),ge=z(he);function pe(t){return!1===t}const de=q("Float32Array"),me=z(de),ye=q("Float64Array"),be=z(ye),{isInteger:Ae}=Number,we=Ae,ve=q("Int16Array"),Ce=z(ve),Ie=q("Int32Array"),Oe=z(Ie),Ee=q("Int8Array"),Se=z(Ee);function Fe(t){return!!t&&t instanceof Promise}function Me(t){return!!t&&(Fe(t)||Ut(t)||$t(t))}const{isSafeInteger:je}=Number,xe=je;const Te=q("Uint16Array"),Ne=z(Te),Re=q("Uint32Array"),Be=z(Re),Le=q("Uint8Array"),$e=z(Le),ke=q("Uint8ClampedArray"),De=z(ke),Ue=q("WeakMap"),Pe=z(Ue),qe=void 0!==globalThis.Deno,ze=void 0!==globalThis.process&&process.versions&&process.versions.node;function We(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(H(t,n))}const _e=JSON;const He=_e.stringify;function Ve(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${He(t)}\n\t\tExpected: ${He(n)}`,r)}async function Ke(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||Ve(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function Qe(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Xe=Pt(u,l,vn,wn,Qe,Je);function Ye(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function tr(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const nr=Pt(F,M,Cn,In,Ye,tr);function er(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const rr=er(s),or=er(I);function ir(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const cr=ir(a),sr=ir(O);const ur=Et(/\./);class ar{list=y(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const lr=y(ar);class fr{static models=new Map;constructor(t,n){i(n)?(dt(this,n),this.modelName=t,fr.models.set(t,n)):dt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}function hr(t){return new Promise(t)}class gr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Tt(t,(n=>{t[n]=new gr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new gr(e),!0)})}}class pr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const dr=y(pr);class mr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function yr(t){return new mr(t)}function br(t){return i(t)?br[t]:L(br)}const Ar=globalThis.navigator?.userAgentData;if(Ar)Tt(Ar,((t,n)=>{ue(t)&&t&&(br[n]=t)})),s(Ar.brands,(t=>{br[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{br[t]=!0}))}function wr(t,n,e,r){return t.addEventListener(n,e,r),t}const vr=document.createDocumentFragment.bind(document);function Cr(t,n){return t.appendChild(n),n}function Ir(t,n){return d(n)?xn(n,K(n,(n=>t.getAttribute(n)))):(Tt(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Or=/^.[\w_-]+$/,Er=/^[A-Za-z]+$/,Sr=/\s/,Fr=document.getElementsByClassName.bind(document),Mr=document.getElementsByTagName.bind(document),jr=document.getElementById.bind(document),xr=document.querySelector.bind(document),Tr=document.querySelectorAll.bind(document);const Nr=document.createElement.bind(document);function Rr(t){const n=ur(t)&&t||`${t}.js`;return(t=>hr((n=>{wr(t,"load",n,!0),wr(t,"error",n,!0),Cr(xr("head"),t)})))(Ir(Nr("script"),{async:"",src:n}))}function Br(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&wr(document,"DOMContentLoaded",t),!1)}Br((()=>{const t=jr("AcidLib");Rr(t&&t.getAttribute("data-index")||"/index")}));const Lr=location.protocol,$r="http:"===Lr?"ws":"wss",kr=location.hostname,Dr={hardware:{cores:navigator.hardwareConcurrency},host:{name:kr,protocol:Lr,protocolSocket:$r}};function Ur(){dt(Dr,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Pr(){Ur()}Br(Pr),wr(window,"load",Pr,!0),wr(window,"resize",Pr,!0),t.hasLocal=void 0,function(n){try{n().removeItem("TESTING"),t.hasLocal=!0}catch(n){t.hasLocal=!1}}((()=>localStorage));class qr{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=yr(t)}hasLocal=t.hasLocal;setItem(t,n){return this.hasLocal&&this.local.setItem(t,ht(n)?n:He(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return i(n)?n:!i(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}const zr=(t,n)=>`color:${t};background:${n};`,Wr={alert:zr("#fff","#f44336"),important:zr("#fff","#E91E63"),notify:zr("#fff","#651FFF"),warning:zr("#000","#FFEA00")};t.BrowserStorage=qr,t.Chain=zt,t.Intervals=ar,t.Model=fr,t.Store=gr,t.Timers=_t,t.UniqID=pr,t.VirtualStorage=mr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.append=Cr,t.apply=Gt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Me(t)||Me(n)?Ke(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||Ve(t,n,e)},t.assertAsync=Ke,t.assign=dt,t.assignToClass=mt,t.assignToObject=pt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?dt(e,r):r},t.browserStorage=function(t){return new qr(t)},t.cacheNativeMethod=ln,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Tn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return y(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(Z(t))return ut(t);if(d(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Zt(setTimeout(Wt,0),(t=>{lr.remove(t)}))},t.clearTimers=function(){Zt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.cnsl=(t,n)=>{const e=ht(t)?t:He(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},t.cnslTheme=(t,n,e)=>{Wr[t]=zr(n,e)},t.compact=function(t){if(_(t)){const n=L(t),e=n.length,r={};for(let o=0;oWe(t)))},t.compactKeys=function(t){const n=[];return Tt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Xe,t.compactMapArray=u,t.compactMapAsyncArray=l,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.createFragment=vr,t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Vt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=gn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Tt,t.eachRight=I,t.eachRightAsync=O,t.ensureArray=b,t.ensureBuffer=function(t){return Z(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=bn,t.escapeRegex=En,t.escapeRegexRegex=On,t.eventAdd=wr,t.eventRemove=function(t,n,e,r){return t.removeEventListener(n,e,r),t},t.every=un,t.everyArg=function(...t){return Ut(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=E,t.everyAsyncArray=S,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;ryt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=yt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>yt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(b(n))),[]);return e},t.flattenDeep=A,t.flow=rr,t.flowAsync=cr,t.flowAsyncRight=sr,t.flowRight=or,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=Qe,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Ye,t.forOfFilterAsync=tr,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Pt,t.get=R,t.getByClass=Fr,t.getById=jr,t.getByTag=Mr,t.getEntries=function(t){if(i(t))return An(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return At(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return E(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=fn,t.getType=Jt,t.getTypeName=Xn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!oe(n)&&!oe(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):Mn(e)?e.test(n):at(e)?e(n):d(e)?E(e,(e=>t(n,e))):un(e,(e=>t(n,e))):d(n)?Mn(e)?E(n,(t=>t.test(e))):at(e)?E(n,e):d(e)?E(e,(e=>t(n,e))):n.includes(e,r):!!_(n)&&(Mn(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):_(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}})))},t.hasDot=ur,t.hasKeys=k,t.hasLength=r,t.hasProp=pn,t.hasValue=i,t.htmlEntities=_n,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Gt(n,e,r):n(...r);if(_(n))return n[e]=t,n}},t.importjs=Rr,t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.info=Dr,t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(E(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return lr.set(t,n)},t.intervals=lr,t.invert=function(t,n={}){if(t)return Tt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return G(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isAgent=br,t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=d,t.isArrayBuffer=le,t.isArrayBufferCall=ae,t.isArrayLike=function(t,n){if(oe(t)||at(t))return!1;if(d(t)||re(t))return!0;const e=t.length;if(!oe(e)||!ft(e)||e<0)return!1;if(n){const n=L(t);return!!n&&un(n,((t,n)=>n>=0&&ft(n)))}return!0},t.isAsync=Ut,t.isAsyncCall=Dt,t.isBigInt=ce,t.isBigIntCall=ie,t.isBoolean=ue,t.isBooleanCall=se,t.isBuffer=Z,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=D,t.isConstructorFactory=U,t.isConstructorNameFactory=q,t.isDate=ge,t.isDateCall=he,t.isDeno=qe,t.isDocumentReady=Br,t.isDom=function(t){return t&&9!==t.nodeType},t.isEmpty=function(t){return ht(t)||d(t)?!r(t):_(t)?!jn(t):!i(t)},t.isEnter=function(t){return 13===t.keyCode},t.isEqual=H,t.isEven=function(t){return!(1&t)},t.isF32=me,t.isF32Call=de,t.isF64=be,t.isF64Call=ye,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=Ft,t.isFileJS=Mt,t.isFileJSON=jt,t.isFloat=we,t.isFunction=at,t.isGenerator=$t,t.isGeneratorCall=Lt,t.isHTMLCollection=function(t){return!!i(t)&&"[object HTMLCollection]"===t.toString()},t.isI16=Ce,t.isI16Call=ve,t.isI32=Oe,t.isI32Call=Ie,t.isI8=Se,t.isI8Call=Ee,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Me,t.isMap=te,t.isMapCall=Yn,t.isMatchArray=function(t,n){return t.length===n.length&&E(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=L(t),r=L(n);return e.length===r.length&&E(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodeList=function(t){return!!i(t)&&"[object NodeList]"===t.toString()},t.isNodejs=ze,t.isNotArray=function(t){return!d(t)},t.isNotNumber=function(t){return!ft(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=ft,t.isNumberCall=lt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=_,t.isPositive=function(t){return 1===yn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Fe,t.isRegex=Mn,t.isRegexCall=Fn,t.isRelated=function(t,n){return!oe(t)&&!oe(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=xe,t.isSame=dn,t.isSameType=function(t,n){const e=Jt(t),r=Jt(n);return e===r&&e.name===r.name},t.isSet=Rt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=We,t.isTypeFactory=z,t.isTypedArray=re,t.isU16=Ne,t.isU16Call=Te,t.isU32=Be,t.isU32Call=Re,t.isU8=$e,t.isU8C=De,t.isU8CCall=ke,t.isU8Call=Le,t.isUndefined=e,t.isWeakMap=Pe,t.isWeakMapCall=Ue,t.isZero=bn,t.jsonParse=function(t,n){if(t)return _e.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Nn," ").trim().toLowerCase().replace(Rn,"-")},t.keys=L,t.largest=function(t){return V(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(kn," ").trim().toLowerCase()},t.map=en,t.mapArray=K,t.mapAsyncArray=G,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(_(e)||d(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?y(fr,[t,n]):R(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=oe,t.nodeAttribute=Ir,t.noop=Wt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=gt,t.objectEntries=An,t.objectSize=jn,t.omit=function(t,n){if(!t)return{};if(d(n)){const e=Sn(n);return Cn(t,((t,n)=>!e.test(n)))}if(Mn(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(ft(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):gt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return K(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=hr,t.propertyMatch=(t,n,e=L(t))=>E(e,(e=>H(t[e],n[e]))),t.querySelector=xr,t.querySelectorAll=Tr,t.randomFloat=function(t,n=0){return mn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Et,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cIt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Ot(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=At,t.sortCollectionDescendingFilter=bt,t.sortNumberAscending=function(t){return t.sort(J)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=It,t.sortObjectsAlphabeticallyReverse=Ot,t.sortUnique=ct,t.stringify=He,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=J,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.themes=Wr,t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Vt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Vt,t.timers=Ht,t.times=Zt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Tt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(A(t))},t.uniqID=dr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Qn,t.upperFirstOnlyAll=function(t){return t.replace(Kn,(t=>Qn(t)))},t.virtualStorage=yr,t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Vn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=y(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=xn})); //# sourceMappingURL=browser.js.map diff --git a/github/index.js b/github/index.js index 185e186..2106920 100644 --- a/github/index.js +++ b/github/index.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:fs/promises"),require("node:path"),require("node:url"),require("path")):"function"==typeof define&&define.amd?define(["exports","node:fs/promises","node:path","node:url","path"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={},t.promises,t.path,t.node_url,t.path$1)}(this,(function(t,n,e,r,o){"use strict";function i(t){return t.length=0,t}function c(t){return void 0===t}function s(t){return Boolean(t.length)}function u(t){return null===t}function a(t){return!c(t)&&!u(t)}function f(t){return t}function l(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const u=n.call(r,t,i,e,c,s,o);a(u)&&e.push(u)})):l(t,((t,i,c,s)=>{const u=n(t,i,e,c,s,r,o);a(u)&&e.push(u)})),e}async function p(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const i=await n(t,r,e,o);a(i)&&e.push(i)})),e}const{sign:d}=Math;function y(t){return-1===d(t)}function m(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const b=Array.isArray;const w=Reflect.construct;function v(t,n=[],e){const r=b(n)?n:[n];return e?w(t,r,e):w(t,r)}function C(t){return b(t)&&t||a(t)&&[t]||[]}function O(t){return t.flat(1/0)}function I(t,n){return t.forEach(n),t}function j(...t){const n=v(Map),e=[];return l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function F(t,n=1,e=t.length){return t.splice(n,e)}function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function E(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function R(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function T(t,n,e=[],r){return await p(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const N=/\.|\[/,B=/]/g,P="";function U(t){return t.replace(B,P).split(N)}function k(t,n){if(!n)return!1;let e=n;return R(b(t)?t:U(t),(t=>(e=e[t],a(e)))),e}const $=Object.keys;function D(t){if(t)return $(t)}const L=Object.hasOwn;function q(t,...n){if(t)return R(n,(n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}}))}function _(t,n){return t?.constructor===n||!1}function V(t){return n=>_(n,t)}function Z(t){return t?.constructor?.name}function K(t){return n=>Z(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&R(e,t):t(n)}}const W=K("Buffer"),G=z(W),J=t=>!!a(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(G(t))return t.equals(n);if(t.toString()===n.toString())if(J(t)){const e=D(t);if(q(n,e))return R(e,(e=>H(t[e],n[e])))}else if(b(t)&&t.length===n.length)return R(t,((t,e)=>H(t,n[e])));return!1};const Q=Math.max;function X(t,n,e=[],r,o){return a(r)?l(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):l(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function Y(t,n){const e=[];return await p(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function tt(t,n){return t-n}function nt(t,n){return n-t}const{floor:et,random:rt}=Math;function ot(t,n=0){return et(rt()*(t-n))+n}const it=Array.from;function ct(t,n,e){if(a(t))return it(t,n,e)}function st(t,n=t.length){if(t.length<=1)return ct(t);const e=ct(t);let r,o,i=0;for(;i!!a(t)&&t instanceof Function,gt=K("Number"),dt=z(gt);const yt=V(String);const mt=Object.assign;function At(t,n){if(J(n))mt(t,n);else if(pt(n)){const e=n.name;e?t[e]=n:mt(t,n)}else(yt(n)||dt(n))&&(t[n]=n);return t}function bt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function Ot(t,n="id",e){return t.sort(((t,r)=>Ct(t,r,n,e)))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function jt(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))}function Ft(t,n){if(t)return yt(n)?t[n]:X(n,(n=>t[n]))}function Mt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Et(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Rt(t){return n=>!!a(n)&&t.test(n)}const St=Rt(/\.css$/),xt=Rt(/\.html$/),Tt=Rt(/\.js$/),Nt=Rt(/\.json$/);const Bt=async(t,n,e,r)=>{if(!t)return;const o=D(t);return a(e)?await p(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await p(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Pt(t,n,e,r){if(!t)return;const o=D(t);return a(e)?l(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):l(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Ut=K("Set"),kt=z(Ut);function $t(t,n){if(kt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Dt=K("GeneratorFunction"),Lt=z(Dt);async function qt(t,n,e){if(kt(t)){for(const e of t)await n(e,t);return t}if(Lt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const _t=K("AsyncFunction"),Vt=z(_t);function Zt(t,n,e,r,o,i){return(c,s,u,f,l)=>{let h;const p=Vt(s);if(a(c)&&s)return h=b(c)?p?n:t:J(c)||pt(c)?p?r:e:o?p?i:o:Lt(c)?i:p?r:e,h(c,s,u,f,l)}}const Kt=Zt(l,p,Pt,Bt,$t,qt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Kt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Gt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=v(Jt);function Qt(t,n){return Ht.set(t,n)}const Xt=Reflect.apply;function Yt(t,n,e){if(pt(t))return Xt(t,n,e)}function tn(t){return t?.constructor}function nn(t,n=[]){const e=tn(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function en(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function rn(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function on(t,n,e={}){if(t)return await Bt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function cn(t,n,e={},r,o){if(t)return a(r)?Pt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Pt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const sn=Zt(X,Y,cn,on,en,rn);async function un(t,n){if(!t)return;return S(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function an(t,n){if(!t)return;return R(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function fn(t,n=f){if(b(t)||kt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function ln(t,n=f,e){if(Lt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(b(t)||kt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const hn=Zt(R,S,an,un,fn,ln);const pn=Function.prototype;function gn(t){return pn.call.bind(t)}const dn=Object.getOwnPropertyNames,yn=Object.getOwnPropertyDescriptor,mn=Object.defineProperty,An=gn(Object.hasOwnProperty),bn=Object.is;const{random:wn}=Math;const{sign:vn}=Math;function Cn(t){return 0===t}const On=Object.entries;async function In(t,n=f,e={}){return await Bt(t,(async(t,r,o,i,c)=>{const s=await n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function jn(t,n=f,e={}){return Pt(t,((t,r,o,i,c)=>{const s=n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function Fn(t,n,e={}){return Pt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function Mn(t,n,e={}){return await Bt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const En=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Rn(t){return t.replace(En,"\\$&")}function Sn(t,n){return n?Sn(X(t,Rn)):RegExp(t.join("|"))}const xn=K("RegExp"),Tn=z(xn);function Nn(t){if(!t)return;if(J(t))return D(t).length;const n=t.length;if(a(n))return n;const e=t.size;return a(n)?e:D(t).length}const Bn=/[ _-]+/g;const Pn=/[ _-]+/g,Un=/[ ]+/g;const kn=/[ _-]+/g,$n=/[ ]+/g;const Dn=/[ _-]+/g;const Ln=/[ _-]+/g;function qn(t,n=1){return t.substring(n)}const _n=/%(?![\da-f]{2})/gi,Vn=/&/g,Zn=//g,zn=/"/g;function Wn(t){return decodeURIComponent(t.replace(_n,(()=>"%25")))}function Gn(t){return t.replace(Vn,"&").replace(Zn,"<").replace(Kn,">").replace(zn,""")}const Jn=/\S+/g,Hn=/\w+/g;const Qn=/\w+/g;function Xn(t){return t[0].toUpperCase()}function Yn(t){return Xn(t)+qn(t)}function te(t){return Xn(t)+qn(t).toLowerCase()}function ne(t){return tn(t)?.name}const ee=K("Map"),re=z(ee),oe=/Array/,ie="Array";function ce(t){if(t){const n=ne(t);if(oe.test(n)&&n!==ie)return!0}return!1}function se(t){return!a(t)}const ue=K("BigInt"),ae=z(ue),fe=K("Boolean"),le=z(fe),he=K("ArrayBuffer"),pe=z(he);const ge=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const de=K("Date"),ye=z(de);function me(t){return!1===t}const Ae=K("Float32Array"),be=z(Ae),we=K("Float64Array"),ve=z(we),{isInteger:Ce}=Number,Oe=Ce,Ie=K("Int16Array"),je=z(Ie),Fe=K("Int32Array"),Me=z(Fe),Ee=K("Int8Array"),Re=z(Ee);function Se(t){return!!t&&t instanceof Promise}function xe(t){return!!t&&(Se(t)||Vt(t)||Lt(t))}const{isSafeInteger:Te}=Number,Ne=Te;const Be=K("Uint16Array"),Pe=z(Be),Ue=K("Uint32Array"),ke=z(Ue),$e=K("Uint8Array"),De=z($e),Le=K("Uint8ClampedArray"),qe=z(Le),_e=K("WeakMap"),Ve=z(_e),Ze=void 0!==globalThis.Deno,Ke=void 0!==globalThis.process&&process.versions&&process.versions.node;function ze(t,n=!0){return Boolean(t)&&n}function We(t,n){return me(H(t,n))}const Ge=JSON;const Je=Ge.stringify;function He(t,n,e){const r=globalThis.options||e;let o;return pt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Je(t)}\n\t\tExpected: ${Je(n)}`,r)}async function Qe(t,n,e){const r=await t;return!(pt(n)&&!1===await n(r,e))&&!We(r,n)||He(r,n,e)}const Xe=globalThis.structuredClone;async function Ye(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);a(r)&&e.push(r)}return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const i=await n(e,o,t);a(i)&&r(i)}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);a(c)&&(i?o.set(e,c):o[e]=c)}return o}function tr(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const i=n(e,r,t);a(i)&&o(i)}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);a(c)&&(o?r.set(e,c):r[e]=c)}return r}const nr=Zt(h,g,jn,In,tr,Ye);function er(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=pt(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function rr(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=pt(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const or=Zt(x,T,Fn,Mn,er,rr);function ir(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const cr=ir(l),sr=ir(M);function ur(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ar=ur(p),fr=ur(E);const lr=Rt(/\./);class hr{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=v(hr);class gr{static models=new Map;constructor(t,n){a(n)?(bt(this,n),this.modelName=t,gr.models.set(t,n)):bt(this,t)}delete(t){gr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),gr.models.set(t||this.modelName,this)}has(t){return gr.models.has(t||this.modelName)}get(t){return gr.models.get(t||this.modelName)}}class dr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Pt(t,(n=>{t[n]=new dr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new dr(e),!0)})}}class yr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return a(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const mr=v(yr);class Ar{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):a(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=nn(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=zt,t.Intervals=hr,t.Model=gr,t.Store=dr,t.Timers=Jt,t.UniqID=yr,t.VirtualStorage=Ar,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Yt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return l(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return xe(t)||xe(n)?Qe(t,n,e):!(pt(n)&&!1===n(t,e))&&!We(t,n)||He(t,n,e)},t.assertAsync=Qe,t.assign=bt,t.assignToClass=wt,t.assignToObject=At,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=sn(t,(t=>pt(t)?t.bind(n):t));return e?bt(e,r):r},t.cacheNativeMethod=gn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Bn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return v(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(G(t))return ht(t);if(b(t))return i(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=i,t.clearBuffer=ht,t.clearIntervals=function(){Gt(setTimeout(Wt,0),(t=>{pr.remove(t)}))},t.clearTimers=function(){Gt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Xe(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=nn,t.compact=function(t){if(J(t)){const n=D(t),e=n.length,r={};for(let o=0;oze(t)))},t.compactKeys=function(t){const n=[];return Pt(t,((t,e)=>{a(t)&&n.push(e)})),n},t.compactMap=nr,t.compactMapArray=h,t.compactMapAsyncArray=g,t.compactMapAsyncObject=In,t.compactMapObject=jn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{const c=e.join(r,i);if((await n.stat(c)).isDirectory()){const s=e.join(o,i.replace(r,""));await n.mkdir(s,{recursive:!0}),await t(c,s)}else await async function(t,r,o){const i=e.join(t,o),c=e.join(r,o);await n.copyFile(i,c)}(r,o,i)})),!0},t.countBy=function(t,n){const e={};let r;return l(t,(t=>{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return l(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return l(t,(t=>{t[n]||e++})),e},t.currentFile=function(t){return globalThis.__filename?__filename:r.fileURLToPath(t.url)},t.currentPath=function(t){return globalThis.__dirname?__dirname:o.dirname(r.fileURLToPath(t.url))},t.curry=function(t,n=t.length){const e=[],r=(...o)=>{if(e.push(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.curryRight=function(t,n=t.length){const e=[],r=(...o)=>{if(e.unshift(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Qt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=mn,t.difference=j,t.divide=function(t,n){return t/n},t.drop=F,t.dropRight=(t,n=1,e=t.length)=>F(t,0,e-n),t.each=Kt,t.eachArray=l,t.eachAsyncArray=p,t.eachAsyncObject=Bt,t.eachObject=Pt,t.eachRight=M,t.eachRightAsync=E,t.ensureArray=C,t.ensureBuffer=function(t){return G(t)&&t||a(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=Cn,t.escapeRegex=Rn,t.escapeRegexRegex=En,t.every=hn,t.everyArg=function(...t){return Vt(t[0])?async function(...n){return hn(t,(async t=>hn(n,(async n=>t(n)))))}:function(...n){return hn(t,(t=>hn(n,(n=>t(n)))))}},t.everyArray=R,t.everyAsyncArray=S,t.everyAsyncObject=un,t.everyObject=an,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rvt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=vt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>vt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(C(n))),[]);return e},t.flattenDeep=O,t.flow=cr,t.flowAsync=ar,t.flowAsyncRight=fr,t.flowRight=sr,t.forEach=I,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else pt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=$t,t.forOfAsync=qt,t.forOfCompactMap=tr,t.forOfCompactMapAsync=Ye,t.forOfEvery=fn,t.forOfEveryAsync=ln,t.forOfFilter=er,t.forOfFilterAsync=rr,t.forOfMap=en,t.forOfMapAsync=rn,t.generateLoop=Zt,t.get=k,t.getEntries=function(t){if(a(t))return On(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return jt(t,n)[0]},t.getLowest=function(t,n){return Ot(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return R(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=yn,t.getPropNames=dn,t.getType=tn,t.getTypeName=ne,t.groupBy=function(t,n){const e={};return l(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!se(n)&&!se(e)&&(n===e||(yt(n)?yt(e)?n.includes(e,r):Tn(e)?e.test(n):pt(e)?e(n):b(e)?R(e,(e=>t(n,e))):hn(e,(e=>t(n,e))):b(n)?Tn(e)?R(n,(t=>t.test(e))):pt(e)?R(n,e):b(e)?R(e,(e=>t(n,e))):n.includes(e,r):!!J(n)&&(Tn(e)?an(n,(t=>t.test(e))):pt(e)?an(n,e):J(e)?an(n,((t,n)=>t===e[n])):an(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}})))},t.hasDot=lr,t.hasKeys=q,t.hasLength=s,t.hasProp=An,t.hasValue=a,t.htmlEntities=Gn,t.ifInvoke=function(t,n,...e){if(pt(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!a(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(a(t)){if(pt(n))return e?Yt(n,e,r):n(...r);if(J(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return h(t,(t=>{if(R(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return pr.set(t,n)},t.intervals=pr,t.invert=function(t,n={}){if(t)return Pt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(a(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return Y(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!a(t)&&"[object Arguments]"===t.toString()},t.isArray=b,t.isArrayBuffer=pe,t.isArrayBufferCall=he,t.isArrayLike=function(t,n){if(se(t)||pt(t))return!1;if(b(t)||ce(t))return!0;const e=t.length;if(!se(e)||!dt(e)||e<0)return!1;if(n){const n=D(t);return!!n&&hn(n,((t,n)=>n>=0&&dt(n)))}return!0},t.isAsync=Vt,t.isAsyncCall=_t,t.isBigInt=ae,t.isBigIntCall=ue,t.isBoolean=le,t.isBooleanCall=fe,t.isBuffer=G,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(a(t)){const n=t?.constructor?.name;return ge.test(n)}return!1},t.isConstructor=_,t.isConstructorFactory=V,t.isConstructorNameFactory=K,t.isDate=ye,t.isDateCall=de,t.isDeno=Ze,t.isEmpty=function(t){return yt(t)||b(t)?!s(t):J(t)?!Nn(t):!a(t)},t.isEqual=H,t.isF32=be,t.isF32Call=Ae,t.isF64=ve,t.isF64Call=we,t.isFalse=me,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=xt,t.isFileJS=Tt,t.isFileJSON=Nt,t.isFloat=Oe,t.isFunction=pt,t.isGenerator=Lt,t.isGeneratorCall=Dt,t.isI16=je,t.isI16Call=Ie,t.isI32=Me,t.isI32Call=Fe,t.isI8=Re,t.isI8Call=Ee,t.isIterable=function(t){return a(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=xe,t.isMap=re,t.isMapCall=ee,t.isMatchArray=function(t,n){return t.length===n.length&&R(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=D(t),r=D(n);return e.length===r.length&&R(e,(e=>t[e]===n[e]))},t.isNegative=y,t.isNodejs=Ke,t.isNotArray=function(t){return!b(t)},t.isNotNumber=function(t){return!dt(t)},t.isNotString=function(t){return!yt(t)},t.isNull=u,t.isNumber=dt,t.isNumberCall=gt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=J,t.isPositive=function(t){return 1===vn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Se,t.isRegex=Tn,t.isRegexCall=xn,t.isRelated=function(t,n){return!se(t)&&!se(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Ne,t.isSame=bn,t.isSameType=function(t,n){const e=tn(t),r=tn(n);return e===r&&e.name===r.name},t.isSet=kt,t.isSetCall=Ut,t.isString=yt,t.isTrue=function(t){return!0===t},t.isTruthy=ze,t.isTypeFactory=z,t.isTypedArray=ce,t.isU16=Pe,t.isU16Call=Be,t.isU32=ke,t.isU32Call=Ue,t.isU8=De,t.isU8C=qe,t.isU8CCall=Le,t.isU8Call=$e,t.isUndefined=c,t.isWeakMap=Ve,t.isWeakMapCall=_e,t.isZero=Cn,t.jsonParse=function(t,n){if(t)return Ge.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase().replace(Un,"-")},t.keys=D,t.largest=function(t){return Q(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Ln," ").trim().toLowerCase()},t.map=sn,t.mapArray=X,t.mapAsyncArray=Y,t.mapAsyncObject=on,t.mapObject=cn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{Kt(e,((e,r)=>{if(n[r]&&(J(e)||b(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return a(n)?v(gr,[t,n]):k(t,gr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=se,t.noop=Wt,t.notEqual=We,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=mt,t.objectEntries=On,t.objectSize=Nn,t.omit=function(t,n){if(!t)return{};if(b(n)){const e=Sn(n);return Fn(t,((t,n)=>!e.test(n)))}if(Tn(n))return Fn(t,((t,e)=>!n.test(e)));if(yt(n))return Fn(t,((t,e)=>e!==n));if(dt(n)){const e=n.toString();return Fn(t,((t,n)=>n!==e))}return pt(n)?Fn(t,((t,e)=>!n(t,e))):mt({},t)},t.once=t=>{let n;return(...e)=>(a(n)||(n=t(...e)),n)},t.onlyUnique=at,t.over=function(t){return(...n)=>sn(t,(t=>t(...n)))},t.overEvery=function(t){return n=>hn(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[h(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return l(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return X(t,(t=>Ft(t,n)))},t.pluckObject=Ft,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=D(t))=>R(e,(e=>H(t[e],n[e]))),t.randomFloat=function(t,n=0){return wn()*(t-n)+n},t.randomInt=ot,t.range=function(t,n,e=1,r=[]){return y(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Rt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return st(t);if(1===n)return[t[ot(e-1,0)]];const r=[],o={};let i,c=0;for(;cMt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Et(t,r,n,e)))},t.sortCollectionAscending=jt,t.sortCollectionAscendingFilter=It,t.sortCollectionDescending=Ot,t.sortCollectionDescendingFilter=Ct,t.sortNumberAscending=function(t){return t.sort(tt)},t.sortNumberDescening=function(t){return t.sort(nt)},t.sortObjectsAlphabetically=Mt,t.sortObjectsAlphabeticallyReverse=Et,t.sortUnique=ft,t.stringify=Je,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=tt,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=nt,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Qt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Qt,t.timers=Ht,t.times=Gt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Pt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return lt(O(t))},t.uniqID=mr,t.unique=lt,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rYn(t)))},t.upperFirstLetter=Xn,t.upperFirstOnly=te,t.upperFirstOnlyAll=function(t){return t.replace(Qn,(t=>te(t)))},t.virtualStorage=function(t){return new Ar(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Hn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=v(Map),e=[];return 2===t.length?j(t[0],t[1]):(l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return l(t,((t,r)=>{e[t]=n[r]})),e}})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:fs/promises"),require("node:path"),require("node:url"),require("path")):"function"==typeof define&&define.amd?define(["exports","node:fs/promises","node:path","node:url","path"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={},t.promises,t.path,t.node_url,t.path$1)}(this,(function(t,n,e,r,o){"use strict";function i(t){return t.length=0,t}function c(t){return void 0===t}function s(t){return Boolean(t.length)}function u(t){return null===t}function a(t){return!c(t)&&!u(t)}function f(t){return t}function l(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const u=n.call(r,t,i,e,c,s,o);a(u)&&e.push(u)})):l(t,((t,i,c,s)=>{const u=n(t,i,e,c,s,r,o);a(u)&&e.push(u)})),e}async function p(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const i=await n(t,r,e,o);a(i)&&e.push(i)})),e}const{sign:d}=Math;function y(t){return-1===d(t)}function m(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const b=Array.isArray;const w=Reflect.construct;function v(t,n=[],e){const r=b(n)?n:[n];return e?w(t,r,e):w(t,r)}function C(t){return b(t)&&t||a(t)&&[t]||[]}function O(t){return t.flat(1/0)}function I(t,n){return t.forEach(n),t}function j(...t){const n=v(Map),e=[];return l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function F(t,n=1,e=t.length){return t.splice(n,e)}function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function E(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function R(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function T(t,n,e=[],r){return await p(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const N=/\.|\[/,B=/]/g,P="";function U(t){return t.replace(B,P).split(N)}function k(t,n){if(!n)return!1;let e=n;return R(b(t)?t:U(t),(t=>(e=e[t],a(e)))),e}const $=Object.keys;function D(t){if(t)return $(t)}const L=Object.hasOwn;function q(t,...n){if(t)return R(n,(n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}}))}function _(t,n){return t?.constructor===n||!1}function V(t){return n=>_(n,t)}function Z(t){return t?.constructor?.name}function K(t){return n=>Z(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&R(e,t):t(n)}}const W=K("Buffer"),G=z(W),J=t=>!!a(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(G(t))return t.equals(n);if(t.toString()===n.toString())if(J(t)){const e=D(t);if(q(n,e))return R(e,(e=>H(t[e],n[e])))}else if(b(t)&&t.length===n.length)return R(t,((t,e)=>H(t,n[e])));return!1};const Q=Math.max;function X(t,n,e=[],r,o){return a(r)?l(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):l(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function Y(t,n){const e=[];return await p(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function tt(t,n){return t-n}function nt(t,n){return n-t}const{floor:et,random:rt}=Math;function ot(t,n=0){return et(rt()*(t-n))+n}const it=Array.from;function ct(t,n,e){if(a(t))return it(t,n,e)}function st(t,n=t.length){if(t.length<=1)return ct(t);const e=ct(t);let r,o,i=0;for(;i!!a(t)&&t instanceof Function,gt=K("Number"),dt=z(gt);const yt=V(String);const mt=Object.assign;function At(t,n){if(J(n))mt(t,n);else if(pt(n)){const e=n.name;e?t[e]=n:mt(t,n)}else(yt(n)||dt(n))&&(t[n]=n);return t}function bt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function Ot(t,n="id",e){return t.sort(((t,r)=>Ct(t,r,n,e)))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function jt(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))}function Ft(t,n){if(t)return yt(n)?t[n]:X(n,(n=>t[n]))}function Mt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Et(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Rt(t){return n=>!!a(n)&&t.test(n)}const St=Rt(/\.css$/),xt=Rt(/\.html$/),Tt=Rt(/\.js$/),Nt=Rt(/\.json$/);const Bt=async(t,n,e,r)=>{if(!t)return;const o=D(t);return a(e)?await p(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await p(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Pt(t,n,e,r){if(!t)return;const o=D(t);return a(e)?l(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):l(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Ut=K("Set"),kt=z(Ut);function $t(t,n){if(kt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Dt=K("GeneratorFunction"),Lt=z(Dt);async function qt(t,n,e){if(kt(t)){for(const e of t)await n(e,t);return t}if(Lt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const _t=K("AsyncFunction"),Vt=z(_t);function Zt(t,n,e,r,o,i){return(c,s,u,f,l)=>{let h;const p=Vt(s);if(a(c)&&s)return h=b(c)?p?n:t:J(c)||pt(c)?p?r:e:o?p?i:o:Lt(c)?i:p?r:e,h(c,s,u,f,l)}}const Kt=Zt(l,p,Pt,Bt,$t,qt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Kt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Gt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=v(Jt);function Qt(t,n){return Ht.set(t,n)}const Xt=Reflect.apply;function Yt(t,n,e){if(pt(t))return Xt(t,n,e)}function tn(t){return t?.constructor}function nn(t,n=[]){const e=tn(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function en(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function rn(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function on(t,n,e={}){if(t)return await Bt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function cn(t,n,e={},r,o){if(t)return a(r)?Pt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Pt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const sn=Zt(X,Y,cn,on,en,rn);async function un(t,n){if(!t)return;return S(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function an(t,n){if(!t)return;return R(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function fn(t,n=f){if(b(t)||kt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function ln(t,n=f,e){if(Lt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(b(t)||kt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const hn=Zt(R,S,an,un,fn,ln);const pn=Function.prototype;function gn(t){return pn.call.bind(t)}const dn=Object.getOwnPropertyNames,yn=Object.getOwnPropertyDescriptor,mn=Object.defineProperty,An=gn(Object.hasOwnProperty),bn=Object.is;const{random:wn}=Math;const{sign:vn}=Math;function Cn(t){return 0===t}const On=Object.entries;async function In(t,n=f,e={}){return await Bt(t,(async(t,r,o,i,c)=>{const s=await n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function jn(t,n=f,e={}){return Pt(t,((t,r,o,i,c)=>{const s=n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function Fn(t,n,e={}){return Pt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function Mn(t,n,e={}){return await Bt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const En=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Rn(t){return t.replace(En,"\\$&")}function Sn(t,n){return n?Sn(X(t,Rn)):RegExp(t.join("|"))}const xn=K("RegExp"),Tn=z(xn);function Nn(t){if(!t)return;if(J(t))return D(t).length;const n=t.length;if(a(n))return n;const e=t.size;return a(n)?e:D(t).length}const Bn=/[ _-]+/g;const Pn=/[ _-]+/g,Un=/[ ]+/g;const kn=/[ _-]+/g,$n=/[ ]+/g;const Dn=/[ _-]+/g;const Ln=/[ _-]+/g;function qn(t,n=1){return t.substring(n)}const _n=/%(?![\da-f]{2})/gi,Vn=/&/g,Zn=//g,zn=/"/g;function Wn(t){return decodeURIComponent(t.replace(_n,(()=>"%25")))}function Gn(t){return t.replace(Vn,"&").replace(Zn,"<").replace(Kn,">").replace(zn,""")}const Jn=/\S+/g,Hn=/\w+/g;const Qn=/\w+/g;function Xn(t){return t[0].toUpperCase()}function Yn(t){return Xn(t)+qn(t)}function te(t){return Xn(t)+qn(t).toLowerCase()}function ne(t){return tn(t)?.name}const ee=K("Map"),re=z(ee),oe=/Array/,ie="Array";function ce(t){if(t){const n=ne(t);if(oe.test(n)&&n!==ie)return!0}return!1}function se(t){return!a(t)}const ue=K("BigInt"),ae=z(ue),fe=K("Boolean"),le=z(fe),he=K("ArrayBuffer"),pe=z(he);const ge=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const de=K("Date"),ye=z(de);function me(t){return!1===t}const Ae=K("Float32Array"),be=z(Ae),we=K("Float64Array"),ve=z(we),{isInteger:Ce}=Number,Oe=Ce,Ie=K("Int16Array"),je=z(Ie),Fe=K("Int32Array"),Me=z(Fe),Ee=K("Int8Array"),Re=z(Ee);function Se(t){return!!t&&t instanceof Promise}function xe(t){return!!t&&(Se(t)||Vt(t)||Lt(t))}const{isSafeInteger:Te}=Number,Ne=Te;const Be=K("Uint16Array"),Pe=z(Be),Ue=K("Uint32Array"),ke=z(Ue),$e=K("Uint8Array"),De=z($e),Le=K("Uint8ClampedArray"),qe=z(Le),_e=K("WeakMap"),Ve=z(_e),Ze=void 0!==globalThis.Deno,Ke=void 0!==globalThis.process&&process.versions&&process.versions.node;function ze(t,n=!0){return Boolean(t)&&n}function We(t,n){return me(H(t,n))}const Ge=JSON;const Je=Ge.stringify;function He(t,n,e){const r=globalThis.options||e;let o;return pt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Je(t)}\n\t\tExpected: ${Je(n)}`,r)}async function Qe(t,n,e){const r=await t;return!(pt(n)&&!1===await n(r,e))&&!We(r,n)||He(r,n,e)}const Xe=globalThis.structuredClone;async function Ye(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);a(r)&&e.push(r)}return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const i=await n(e,o,t);a(i)&&r(i)}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);a(c)&&(i?o.set(e,c):o[e]=c)}return o}function tr(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const i=n(e,r,t);a(i)&&o(i)}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);a(c)&&(o?r.set(e,c):r[e]=c)}return r}const nr=Zt(h,g,jn,In,tr,Ye);function er(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=pt(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function rr(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=pt(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const or=Zt(x,T,Fn,Mn,er,rr);function ir(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const cr=ir(l),sr=ir(M);function ur(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ar=ur(p),fr=ur(E);const lr=Rt(/\./);class hr{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=v(hr);class gr{static models=new Map;constructor(t,n){a(n)?(bt(this,n),this.modelName=t,gr.models.set(t,n)):bt(this,t)}delete(t){gr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),gr.models.set(t||this.modelName,this)}has(t){return gr.models.has(t||this.modelName)}get(t){return gr.models.get(t||this.modelName)}}class dr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Pt(t,(n=>{t[n]=new dr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new dr(e),!0)})}}class yr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return a(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const mr=v(yr);class Ar{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):a(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=nn(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=zt,t.Intervals=hr,t.Model=gr,t.Store=dr,t.Timers=Jt,t.UniqID=yr,t.VirtualStorage=Ar,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Yt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return l(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return xe(t)||xe(n)?Qe(t,n,e):!(pt(n)&&!1===n(t,e))&&!We(t,n)||He(t,n,e)},t.assertAsync=Qe,t.assign=bt,t.assignToClass=wt,t.assignToObject=At,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=sn(t,(t=>pt(t)?t.bind(n):t));return e?bt(e,r):r},t.cacheNativeMethod=gn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Bn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return v(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(G(t))return ht(t);if(b(t))return i(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=i,t.clearBuffer=ht,t.clearIntervals=function(){Gt(setTimeout(Wt,0),(t=>{pr.remove(t)}))},t.clearTimers=function(){Gt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Xe(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=nn,t.compact=function(t){if(J(t)){const n=D(t),e=n.length,r={};for(let o=0;oze(t)))},t.compactKeys=function(t){const n=[];return Pt(t,((t,e)=>{a(t)&&n.push(e)})),n},t.compactMap=nr,t.compactMapArray=h,t.compactMapAsyncArray=g,t.compactMapAsyncObject=In,t.compactMapObject=jn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{const c=e.join(r,i);if((await n.stat(c)).isDirectory()){const s=e.join(o,i.replace(r,""));await n.mkdir(s,{recursive:!0}),await t(c,s)}else await async function(t,r,o){const i=e.join(t,o),c=e.join(r,o);await n.copyFile(i,c)}(r,o,i)})),!0},t.countBy=function(t,n){const e={};let r;return l(t,(t=>{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return l(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return l(t,(t=>{t[n]||e++})),e},t.currentFile=function(t){return globalThis.__filename?__filename:r.fileURLToPath(t.url)},t.currentPath=function(t){return globalThis.__dirname?__dirname:o.dirname(r.fileURLToPath(t.url))},t.curry=function(t,n=t.length){const e=[],r=(...o)=>{if(e.push(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.curryRight=function(t,n=t.length){const e=[],r=(...o)=>{if(e.unshift(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Qt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=mn,t.difference=j,t.divide=function(t,n){return t/n},t.drop=F,t.dropRight=(t,n=1,e=t.length)=>F(t,0,e-n),t.each=Kt,t.eachArray=l,t.eachAsyncArray=p,t.eachAsyncObject=Bt,t.eachObject=Pt,t.eachRight=M,t.eachRightAsync=E,t.ensureArray=C,t.ensureBuffer=function(t){return G(t)&&t||a(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=Cn,t.escapeRegex=Rn,t.escapeRegexRegex=En,t.every=hn,t.everyArg=function(...t){return Vt(t[0])?async function(...n){return hn(t,(async t=>hn(n,(async n=>t(n)))))}:function(...n){return hn(t,(t=>hn(n,(n=>t(n)))))}},t.everyArray=R,t.everyAsyncArray=S,t.everyAsyncObject=un,t.everyObject=an,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rvt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=vt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>vt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(C(n))),[]);return e},t.flattenDeep=O,t.flow=cr,t.flowAsync=ar,t.flowAsyncRight=fr,t.flowRight=sr,t.forEach=I,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else pt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=$t,t.forOfAsync=qt,t.forOfCompactMap=tr,t.forOfCompactMapAsync=Ye,t.forOfEvery=fn,t.forOfEveryAsync=ln,t.forOfFilter=er,t.forOfFilterAsync=rr,t.forOfMap=en,t.forOfMapAsync=rn,t.generateLoop=Zt,t.get=k,t.getEntries=function(t){if(a(t))return On(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return jt(t,n)[0]},t.getLowest=function(t,n){return Ot(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return R(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=yn,t.getPropNames=dn,t.getType=tn,t.getTypeName=ne,t.groupBy=function(t,n){const e={};return l(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!se(n)&&!se(e)&&(n===e||(yt(n)?yt(e)?n.includes(e,r):Tn(e)?e.test(n):pt(e)?e(n):b(e)?R(e,(e=>t(n,e))):hn(e,(e=>t(n,e))):b(n)?Tn(e)?R(n,(t=>t.test(e))):pt(e)?R(n,e):b(e)?R(e,(e=>t(n,e))):n.includes(e,r):!!J(n)&&(Tn(e)?an(n,(t=>t.test(e))):pt(e)?an(n,e):J(e)?an(n,((t,n)=>t===e[n])):an(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}})))},t.hasDot=lr,t.hasKeys=q,t.hasLength=s,t.hasProp=An,t.hasValue=a,t.htmlEntities=Gn,t.ifInvoke=function(t,n,...e){if(pt(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!a(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(a(t)){if(pt(n))return e?Yt(n,e,r):n(...r);if(J(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return h(t,(t=>{if(R(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return pr.set(t,n)},t.intervals=pr,t.invert=function(t,n={}){if(t)return Pt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(a(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return Y(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!a(t)&&"[object Arguments]"===t.toString()},t.isArray=b,t.isArrayBuffer=pe,t.isArrayBufferCall=he,t.isArrayLike=function(t,n){if(se(t)||pt(t))return!1;if(b(t)||ce(t))return!0;const e=t.length;if(!se(e)||!dt(e)||e<0)return!1;if(n){const n=D(t);return!!n&&hn(n,((t,n)=>n>=0&&dt(n)))}return!0},t.isAsync=Vt,t.isAsyncCall=_t,t.isBigInt=ae,t.isBigIntCall=ue,t.isBoolean=le,t.isBooleanCall=fe,t.isBuffer=G,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(a(t)){const n=t?.constructor?.name;return ge.test(n)}return!1},t.isConstructor=_,t.isConstructorFactory=V,t.isConstructorNameFactory=K,t.isDate=ye,t.isDateCall=de,t.isDeno=Ze,t.isEmpty=function(t){return yt(t)||b(t)?!s(t):J(t)?!Nn(t):!a(t)},t.isEqual=H,t.isEven=function(t){return!(1&t)},t.isF32=be,t.isF32Call=Ae,t.isF64=ve,t.isF64Call=we,t.isFalse=me,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=xt,t.isFileJS=Tt,t.isFileJSON=Nt,t.isFloat=Oe,t.isFunction=pt,t.isGenerator=Lt,t.isGeneratorCall=Dt,t.isI16=je,t.isI16Call=Ie,t.isI32=Me,t.isI32Call=Fe,t.isI8=Re,t.isI8Call=Ee,t.isIterable=function(t){return a(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=xe,t.isMap=re,t.isMapCall=ee,t.isMatchArray=function(t,n){return t.length===n.length&&R(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=D(t),r=D(n);return e.length===r.length&&R(e,(e=>t[e]===n[e]))},t.isNegative=y,t.isNodejs=Ke,t.isNotArray=function(t){return!b(t)},t.isNotNumber=function(t){return!dt(t)},t.isNotString=function(t){return!yt(t)},t.isNull=u,t.isNumber=dt,t.isNumberCall=gt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=J,t.isPositive=function(t){return 1===vn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Se,t.isRegex=Tn,t.isRegexCall=xn,t.isRelated=function(t,n){return!se(t)&&!se(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Ne,t.isSame=bn,t.isSameType=function(t,n){const e=tn(t),r=tn(n);return e===r&&e.name===r.name},t.isSet=kt,t.isSetCall=Ut,t.isString=yt,t.isTrue=function(t){return!0===t},t.isTruthy=ze,t.isTypeFactory=z,t.isTypedArray=ce,t.isU16=Pe,t.isU16Call=Be,t.isU32=ke,t.isU32Call=Ue,t.isU8=De,t.isU8C=qe,t.isU8CCall=Le,t.isU8Call=$e,t.isUndefined=c,t.isWeakMap=Ve,t.isWeakMapCall=_e,t.isZero=Cn,t.jsonParse=function(t,n){if(t)return Ge.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase().replace(Un,"-")},t.keys=D,t.largest=function(t){return Q(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Ln," ").trim().toLowerCase()},t.map=sn,t.mapArray=X,t.mapAsyncArray=Y,t.mapAsyncObject=on,t.mapObject=cn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{Kt(e,((e,r)=>{if(n[r]&&(J(e)||b(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return a(n)?v(gr,[t,n]):k(t,gr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=se,t.noop=Wt,t.notEqual=We,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=mt,t.objectEntries=On,t.objectSize=Nn,t.omit=function(t,n){if(!t)return{};if(b(n)){const e=Sn(n);return Fn(t,((t,n)=>!e.test(n)))}if(Tn(n))return Fn(t,((t,e)=>!n.test(e)));if(yt(n))return Fn(t,((t,e)=>e!==n));if(dt(n)){const e=n.toString();return Fn(t,((t,n)=>n!==e))}return pt(n)?Fn(t,((t,e)=>!n(t,e))):mt({},t)},t.once=t=>{let n;return(...e)=>(a(n)||(n=t(...e)),n)},t.onlyUnique=at,t.over=function(t){return(...n)=>sn(t,(t=>t(...n)))},t.overEvery=function(t){return n=>hn(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[h(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return l(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return X(t,(t=>Ft(t,n)))},t.pluckObject=Ft,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=D(t))=>R(e,(e=>H(t[e],n[e]))),t.randomFloat=function(t,n=0){return wn()*(t-n)+n},t.randomInt=ot,t.range=function(t,n,e=1,r=[]){return y(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Rt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return st(t);if(1===n)return[t[ot(e-1,0)]];const r=[],o={};let i,c=0;for(;cMt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Et(t,r,n,e)))},t.sortCollectionAscending=jt,t.sortCollectionAscendingFilter=It,t.sortCollectionDescending=Ot,t.sortCollectionDescendingFilter=Ct,t.sortNumberAscending=function(t){return t.sort(tt)},t.sortNumberDescening=function(t){return t.sort(nt)},t.sortObjectsAlphabetically=Mt,t.sortObjectsAlphabeticallyReverse=Et,t.sortUnique=ft,t.stringify=Je,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=tt,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=nt,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Qt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Qt,t.timers=Ht,t.times=Gt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Pt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return lt(O(t))},t.uniqID=mr,t.unique=lt,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rYn(t)))},t.upperFirstLetter=Xn,t.upperFirstOnly=te,t.upperFirstOnlyAll=function(t){return t.replace(Qn,(t=>te(t)))},t.virtualStorage=function(t){return new Ar(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Hn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=v(Map),e=[];return 2===t.length?j(t[0],t[1]):(l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return l(t,((t,r)=>{e[t]=n[r]})),e}})); //# sourceMappingURL=index.js.map diff --git a/github/module/basic.js b/github/module/basic.js index 2344234..181af9e 100644 --- a/github/module/basic.js +++ b/github/module/basic.js @@ -1,2 +1,2 @@ -function t(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function n(t){return t.length=0,t}function r(t){return t.slice()}function e(t){return void 0===t}function o(t){return Boolean(t.length)}function u(t){return null===t}function c(t){return!e(t)&&!u(t)}function i(t){return t}function s(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const f=n.call(e,t,u,r,i,s,o);c(f)&&r.push(f)})):s(t,((t,u,i,s)=>{const f=n(t,u,r,i,s,e,o);c(f)&&r.push(f)})),r}async function l(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const u=await n(t,e,r,o);c(u)&&r.push(u)})),r}const{sign:h}=Math;function g(t){return-1===h(t)}function p(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function m(t,n,r=1,e=[]){return g(r)?e:t{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function x(t,n=1,r=t.length){return t.splice(n,r)}const O=(t,n=1,r=t.length)=>x(t,0,r-n);function $(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function j(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function C(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function F(t,n,r=[],e){return await l(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function R(t,n){return n?t.slice(0,n):t[0]}function N(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat(A(n))),[]);return r}function T(t){return t.slice(0,t.length-1)}function P(t,...n){return f(t,(t=>{if(C(n,(n=>n.includes(t))))return t}))}function U(t,n,r){if(!t)return;const e=t.length;if(c(r))for(let o=0;o(r=r[t],c(r)))),r}const q=Object.keys;function V(t){if(t)return q(t)}const z=Object.hasOwn;function G(t,...n){if(t)return C(n,(n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}}))}function J(t,...n){if(t)return Boolean(n.find((n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}})))}function W(t,n){return t?.constructor===n||!1}function H(t){return n=>W(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...r){return r?t(n)&&C(r,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!c(t)&&"Object("===t.constructor.toString().trim().slice(9,16),rt=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const r=V(t);if(G(n,r))return C(r,(r=>rt(t[r],n[r])))}else if(w(t)&&t.length===n.length)return C(t,((t,r)=>rt(t,n[r])));return!1};function et(t,n){return t.length===n.length&&C(t,((t,r)=>rt(n[r],t)))}const ot=Math.max;function ut(t){return ot(...t)}function ct(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function it(t,n,r=[],e,o){return c(e)?s(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):s(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function st(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function lt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function at(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function dt(t,n){return n-t}function mt(t){return t.sort(dt)}function wt(t,n){let r=t.length;for(let e=0;er)return $t(t);if(1===n)return[t[Et(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Ft(t,n=1){return t.slice(0,n)}function Rt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Nt(t,n,r){return r.indexOf(t)===n}function Tt(t,n,r){return t!==r[n-1]}function Pt(t,n){return n?t.filter(Tt):t.filter(Nt)}function Ut(...t){return Pt(I(t))}function Lt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Vt(...t){const n=v(Map),r=[];return 2===t.length?M(t[0],t[1]):(s(t,((t,r)=>{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&r.push(t.child)})),r)}function zt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Gt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Jt(t){return tt(t)&&t||c(t)&&Buffer.from(t)||Buffer.alloc(0)}function Wt(t){return t.fill(0),t}const Ht=t=>!!c(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=H(String);function tn(t){return!Yt(t)}const nn=Object.assign;function rn(t,n){if(nt(n))nn(t,n);else if(Ht(n)){const r=n.name;r?t[r]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function en(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function sn(t,n){let r=0;return s(t,(t=>{t[n]&&r++})),r}function fn(t,n){let r=0;return s(t,(t=>{t[n]||r++})),r}function ln(t,n,r,e,o){if(t[o]===e)return!0}function an(t,n,r="id"){const e=t.findIndex(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function hn(t,n,r="id"){const e=t.find(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function gn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function pn(t,n="id",r){return t.sort(((t,e)=>gn(t,e,n,r)))}function dn(t,n){return pn(t,n,!1)[0]}function mn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function wn(t,n="id",r){return t.sort(((t,e)=>mn(t,e,n,r)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const r={};return s(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function vn(t,n="id"){const r={};return s(t,(t=>{r[t[n]]=t})),r}function An(t,n,r,e){return it(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function In(t,n,r,e){return ft(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function Mn(t,n){return it(t,(t=>En(t,n)))}function xn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function On(t,n="id",r){return t.sort(((t,e)=>xn(t,e,n,r)))}function $n(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function jn(t,n="id",r){return t.sort(((t,e)=>$n(t,e,n,r)))}function Cn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Sn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Bn(t){return n=>!!c(n)&&t.test(n)}const Fn=Bn(/\.css$/),Rn=Bn(/\.html$/),Nn=Bn(/\.js$/),Tn=Bn(/\.json$/);function Pn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Un(t,n){return(...r)=>t(...r.splice(0,n))}function Ln(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const _n=async(t,n,r,e)=>{if(!t)return;const o=V(t);return c(r)?await l(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await l(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Dn(t,n,r,e){if(!t)return;const o=V(t);return c(r)?s(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):s(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Zn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let h;const g=Hn(s);if(c(i)&&s)return h=w(i)?g?n:t:nt(i)||Ht(i)?g?e:r:o?g?u:o:Gn(i)?u:g?e:r,h(i,s,f,l,a)}}const Qn=Kn(s,l,Dn,_n,Vn,Jn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function tr(t,r=t.length){const e=[],o=(...u)=>{if(e.push(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function nr(t,r=t.length){const e=[],o=(...u)=>{if(e.unshift(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function rr(){}function er(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const cr=v(ur);function ir(t,n){return cr.set(t,n)}function sr(){er(setTimeout(rr,0),(t=>{cr.remove(t)}))}const fr=Reflect.apply;function lr(t,n,r){if(Ht(t))return fr(t,n,r)}function ar(t,n){function r(...t){!1!==r.id&&cr.remove(r.id),r.id=ir((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(cr.remove(r.id),r.id=!1)},r}function hr(t,n,...r){if(Ht(t))return n?t.call(n,...r):t(...r)}function gr(t){return(...n)=>!t(...n)}function pr(t=0){return(...n)=>n[t]}const dr=t=>{let n;return(...r)=>(c(n)||(n=t(...r)),n)};function mr(t){return t?.constructor}function wr(t,n=[]){const r=mr(t);return r===Function&&"function"===r.name?function(){}:v(r,n)}function yr(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=Ht(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function br(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=Ht(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function vr(t,n,r={}){if(t)return await _n(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function Ar(t,n,r={},e,o){if(t)return c(e)?Dn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Dn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Ir=Kn(it,ft,Ar,vr,yr,br);function Er(t){return(...n)=>Ir(t,(t=>t(...n)))}async function Mr(t,n){if(!t)return;return S(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function xr(t,n){if(!t)return;return C(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Or(t,n=i){if(w(t)||qn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function $r(t,n=i,r){if(Gn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(w(t)||qn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const jr=Kn(C,S,xr,Mr,Or,$r);function Cr(t){return n=>jr(t,(t=>t(n)))}function Sr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Br(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=ir((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{cr.remove(r.id),r.id=!1},r}function Fr(t,n){return(...r)=>n(t,...r)}const Rr=Function.prototype;function Nr(t){return Rr.call.bind(t)}const Tr=Object.getOwnPropertyNames,Pr=Object.getOwnPropertyDescriptor,Ur=Object.defineProperty,Lr=Nr(Object.hasOwnProperty),_r=Object.is;function Dr(t,n){return t+n}function Zr(t){return t-1}function kr(t,n){return t/n}function qr(t){return t+1}function Vr(t,n){return t*n}function zr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Gr}=Math;function Jr(t,n=0){return Gr()*(t-n)+n}function Wr(t,n){return t%n}function Hr(t){return t.reduce(((t,n)=>t-n),0)}function Kr(t){return t.reduce(((t,n)=>t+n),0)}function Qr(t,n,r){return t>n&&tr}const{sign:Yr}=Math;function te(t){return 1===Yr(t)}function ne(t){return 0===t}const re=Object.entries;function ee(t){if(c(t))return re(t)}function oe(t){const n=[];return Dn(t,((t,r)=>{c(t)&&n.push(r)})),n}async function ue(t,n=i,r={}){return await _n(t,(async(t,e,o,u,i)=>{const s=await n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function ce(t,n=i,r={}){return Dn(t,((t,e,o,u,i)=>{const s=n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function ie(t,n,r={}){return Dn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function se(t,n,r={}){return await _n(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function fe(t,n={}){if(t)return Dn(t,((t,r)=>{n[t]=r})),n}const le=(t,n)=>{if(t===n)return!0;const r=V(t),e=V(n);return r.length===e.length&&C(r,(r=>t[r]===n[r]))},ae=/[()[\]{}*+?^$|#.,/\\\s-]/g;function he(t){return t.replace(ae,"\\$&")}function ge(t,n){return n?ge(it(t,he)):RegExp(t.join("|"))}const pe=Q("RegExp"),de=X(pe);function me(t,n){if(!t)return{};if(w(n)){const r=ge(n);return ie(t,((t,n)=>!r.test(n)))}if(de(n))return ie(t,((t,r)=>!n.test(r)));if(Yt(n))return ie(t,((t,r)=>r!==n));if(Qt(n)){const r=n.toString();return ie(t,((t,n)=>n!==r))}return Ht(n)?ie(t,((t,r)=>!n(t,r))):nn({},t)}const we=(t,n,r={})=>{if(t)return s(n,(n=>{r[n]=t[n]})),r};function ye(t){if(!t)return;if(nt(t))return V(t).length;const n=t.length;if(c(n))return n;const r=t.size;return c(n)?r:V(t).length}const be=(t,n)=>{const r={};return s(t,((t,e)=>{r[t]=n[e]})),r},ve=t=>{const n=[],r=[];return Dn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Ae=/[ _-]+/g;function Ie(t){let n="";return t.replace(Ae," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Ee=/[ _-]+/g,Me=/[ ]+/g;function xe(t){return t.replace(/([A-Z]+)/g," $1").replace(Ee," ").trim().toLowerCase().replace(Me,"-")}const Oe=/[ _-]+/g,$e=/[ ]+/g;function je(t){return t.replace(/([A-Z]+)/g," $1").replace(Oe," ").trim().toLowerCase().replace($e,"_")}const Ce=/[ _-]+/g;function Se(t){return t.replace(/([A-Z]+)/g," $1").replace(Ce," ").trim().toUpperCase()}const Be=/[ _-]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Be," ").trim().toLowerCase()}function Re(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Ne(t,n=1){return t[t.length-n]}function Te(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Pe(t,n=1){return t.slice(0,-1*n)}function Ue(t,n=1){return t.substring(n)}function Le(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const _e=/%(?![\da-f]{2})/gi,De=/&/g,Ze=//g,qe=/"/g;function Ve(t){return decodeURIComponent(t.replace(_e,(()=>"%25")))}function ze(t){return t.replace(De,"&").replace(Ze,"<").replace(ke,">").replace(qe,""")}function Ge(t){return ze(Ve(t))}const Je=/\S+/g,We=/\w+/g;function He(t){return t.match(Je)||[]}function Ke(t){return t.match(We)||[]}function Qe(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function Xe(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const Ye=/\w+/g;function to(t){return t[0].toUpperCase()}function no(t){return to(t)+Ue(t)}function ro(t){return to(t)+Ue(t).toLowerCase()}function eo(t){return t.replace(Ye,(t=>no(t)))}function oo(t){return t.replace(Ye,(t=>ro(t)))}function uo(t){return mr(t)?.name}function co(t){return!!c(t)&&"[object Arguments]"===t.toString()}const io=Q("Map"),so=X(io),fo=/Array/,lo="Array";function ao(t){if(t){const n=uo(t);if(fo.test(n)&&n!==lo)return!0}return!1}function ho(t){return!c(t)}function go(t,n){if(ho(t)||Ht(t))return!1;if(w(t)||ao(t))return!0;const r=t.length;if(!ho(r)||!Qt(r)||r<0)return!1;if(n){const n=V(t);return!!n&&jr(n,((t,n)=>n>=0&&Qt(n)))}return!0}const po=Q("BigInt"),mo=X(po),wo=Q("Boolean"),yo=X(wo),bo=Q("ArrayBuffer"),vo=X(bo);function Ao(t,n){return!(!t||!n)&&t instanceof n}const Io=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function Eo(t){if(c(t)){const n=t?.constructor?.name;return Io.test(n)}return!1}const Mo=Q("Date"),xo=X(Mo);function Oo(t){return Yt(t)||w(t)?!o(t):nt(t)?!ye(t):!c(t)}function $o(t){return!1===t}const jo=Q("Float32Array"),Co=X(jo),So=Q("Float64Array"),Bo=X(So),{isInteger:Fo}=Number,Ro=Fo,No=Q("Int16Array"),To=X(No),Po=Q("Int32Array"),Uo=X(Po),Lo=Q("Int8Array"),_o=X(Lo);function Do(t){return c(t)&&"function"==typeof t[Symbol.iterator]}function Zo(t){return!!t&&t instanceof Promise}function ko(t){return!!t&&(Zo(t)||Hn(t)||Gn(t))}function qo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Vo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function zo(t,n){return!ho(t)&&!ho(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Go}=Number,Jo=Go;function Wo(t,n){const r=mr(t),e=mr(n);return r===e&&r.name===e.name}function Ho(t){return!0===t}const Ko=Q("Uint16Array"),Qo=X(Ko),Xo=Q("Uint32Array"),Yo=X(Xo),tu=Q("Uint8Array"),nu=X(tu),ru=Q("Uint8ClampedArray"),eu=X(ru),ou=Q("WeakMap"),uu=X(ou),cu=void 0!==globalThis.Deno,iu=void 0!==globalThis.process&&process.versions&&process.versions.node;function su(t,n=!0){return Boolean(t)&&n}function fu(t,n=!0){return!1===Boolean(t)&&n}function lu(t,n,r,e){if(c(t)){if(Ht(n))return r?lr(n,r,e):n(...e);if(nt(n))return n[r]=t,n}}function au(t,n){return $o(rt(t,n))}const hu=JSON;function gu(t,n){if(t)return hu.parse(t,n)}const pu=hu.stringify;function du(t,n,r){const e=globalThis.options||r;let o;return Ht(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${pu(t)}\n\t\tExpected: ${pu(n)}`,e)}async function mu(t,n,r){const e=await t;return!(Ht(n)&&!1===await n(e,r))&&!au(e,n)||du(e,n,r)}function wu(t,n,r){if(ko(t)||ko(n))return mu(t,n,r);return!(Ht(n)&&!1===n(t,r))&&!au(t,n)||du(t,n,r)}function yu(t,n,r){const e=Ir(t,(t=>Ht(t)?t.bind(n):t));return r?en(r,e):e}function bu(t){if(t){if(tt(t))return Wt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const vu=globalThis.structuredClone;function Au(t){return vu(t)}async function Iu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;usu(t)))}async function Mu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);c(e)&&r.push(e)}return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);c(u)&&e(u)}return o}const u=Ht(o.set);for await(const[r,e]of t){const i=await n(e,r,o,t);c(i)&&(u?o.set(r,i):o[r]=i)}return o}function xu(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);c(u)&&o(u)}return e}const o=Ht(e.set);for(const[r,u]of t){const i=n(u,r,e,t);c(i)&&(o?e.set(r,i):e[r]=i)}return e}const Ou=Kn(f,a,ce,ue,xu,Mu);function $u(...t){return Hn(t[0])?async function(...n){return jr(t,(async t=>jr(n,(async n=>t(n)))))}:function(...n){return jr(t,(t=>jr(n,(n=>t(n)))))}}function ju(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=Ht(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Cu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=Ht(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Su=Kn(B,F,ie,se,ju,Cu);function Bu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Fu=Bu(s),Ru=Bu($);function Nu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Tu=Nu(l),Pu=Nu(j);function Uu(t,n){const r=wr(t),e=r.push||r.add;if(e&&Ht(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else Ht(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Lu(t,n){const r={};return s(t,((t,e)=>{r[n[e]]=t})),r}function _u(t,n,r){return!ho(t)&&!ho(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,r):de(n)?n.test(t):Ht(n)?n(t):w(n)?C(n,(n=>_u(t,n))):jr(n,(n=>_u(t,n))):w(t)?de(n)?C(t,(t=>t.test(n))):Ht(n)?C(t,n):w(n)?C(n,(n=>_u(t,n))):t.includes(n,r):!!nt(t)&&(de(n)?xr(t,(t=>t.test(n))):Ht(n)?xr(t,n):nt(n)?xr(t,((t,r)=>t===n[r])):xr(t,(t=>_u(t,n))))))}const Du=Bn(/\./),Zu=(t,n,r)=>(n&&!c(t[n])&&(t[n]=r),t);class ku{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const qu=v(ku);function Vu(t,n){return qu.set(t,n)}function zu(){er(setTimeout(rr,0),(t=>{qu.remove(t)}))}function Gu(t,...n){return Qn(n,(n=>{Qn(n,((n,r)=>{if(t[r]&&(nt(n)||w(n)||n.forEach))return Gu(t[r],n);t[r]=n}))})),t}class Ju{static models=new Map;constructor(t,n){c(n)?(en(this,n),this.modelName=t,Ju.models.set(t,n)):en(this,t)}delete(t){Ju.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Ju.models.set(t||this.modelName,this)}has(t){return Ju.models.has(t||this.modelName)}get(t){return Ju.models.get(t||this.modelName)}}function Wu(t,n){return c(n)?v(Ju,[t,n]):k(t,Ju.models)}function Hu(t,n){return[t,n]}function Ku(t,n,r){const e=t.length,o=[];for(let u=0;uC(r,(r=>rt(t[r],n[r])));function Yu(t,n,r){return n&&nt(t)||Qt(n)&&w(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function tc(t,n,r){return Qt(r)&&w(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class nc{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Dn(t,(n=>{t[n]=new nc(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new nc(r),!0)})}}function rc(){return[]}function ec(){return!1}const oc=()=>({}),uc=()=>"",cc=()=>!0;async function ic(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const ac=v(lc);class hc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):c(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=wr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function gc(t){return new hc(t)}async function pc(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function n(t){return t.length=0,t}function r(t){return t.slice()}function e(t){return void 0===t}function o(t){return Boolean(t.length)}function u(t){return null===t}function c(t){return!e(t)&&!u(t)}function i(t){return t}function s(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const f=n.call(e,t,u,r,i,s,o);c(f)&&r.push(f)})):s(t,((t,u,i,s)=>{const f=n(t,u,r,i,s,e,o);c(f)&&r.push(f)})),r}async function l(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const u=await n(t,e,r,o);c(u)&&r.push(u)})),r}const{sign:h}=Math;function g(t){return-1===h(t)}function p(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function m(t,n,r=1,e=[]){return g(r)?e:t{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function x(t,n=1,r=t.length){return t.splice(n,r)}const O=(t,n=1,r=t.length)=>x(t,0,r-n);function $(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function j(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function C(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function F(t,n,r=[],e){return await l(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function R(t,n){return n?t.slice(0,n):t[0]}function N(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat(A(n))),[]);return r}function T(t){return t.slice(0,t.length-1)}function P(t,...n){return f(t,(t=>{if(C(n,(n=>n.includes(t))))return t}))}function U(t,n,r){if(!t)return;const e=t.length;if(c(r))for(let o=0;o(r=r[t],c(r)))),r}const q=Object.keys;function V(t){if(t)return q(t)}const z=Object.hasOwn;function G(t,...n){if(t)return C(n,(n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}}))}function J(t,...n){if(t)return Boolean(n.find((n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}})))}function W(t,n){return t?.constructor===n||!1}function H(t){return n=>W(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...r){return r?t(n)&&C(r,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!c(t)&&"Object("===t.constructor.toString().trim().slice(9,16),rt=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const r=V(t);if(G(n,r))return C(r,(r=>rt(t[r],n[r])))}else if(w(t)&&t.length===n.length)return C(t,((t,r)=>rt(t,n[r])));return!1};function et(t,n){return t.length===n.length&&C(t,((t,r)=>rt(n[r],t)))}const ot=Math.max;function ut(t){return ot(...t)}function ct(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function it(t,n,r=[],e,o){return c(e)?s(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):s(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function st(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function lt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function at(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function dt(t,n){return n-t}function mt(t){return t.sort(dt)}function wt(t,n){let r=t.length;for(let e=0;er)return $t(t);if(1===n)return[t[Et(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Ft(t,n=1){return t.slice(0,n)}function Rt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Nt(t,n,r){return r.indexOf(t)===n}function Tt(t,n,r){return t!==r[n-1]}function Pt(t,n){return n?t.filter(Tt):t.filter(Nt)}function Ut(...t){return Pt(I(t))}function Lt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Vt(...t){const n=v(Map),r=[];return 2===t.length?M(t[0],t[1]):(s(t,((t,r)=>{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&r.push(t.child)})),r)}function zt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Gt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Jt(t){return tt(t)&&t||c(t)&&Buffer.from(t)||Buffer.alloc(0)}function Wt(t){return t.fill(0),t}const Ht=t=>!!c(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=H(String);function tn(t){return!Yt(t)}const nn=Object.assign;function rn(t,n){if(nt(n))nn(t,n);else if(Ht(n)){const r=n.name;r?t[r]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function en(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function sn(t,n){let r=0;return s(t,(t=>{t[n]&&r++})),r}function fn(t,n){let r=0;return s(t,(t=>{t[n]||r++})),r}function ln(t,n,r,e,o){if(t[o]===e)return!0}function an(t,n,r="id"){const e=t.findIndex(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function hn(t,n,r="id"){const e=t.find(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function gn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function pn(t,n="id",r){return t.sort(((t,e)=>gn(t,e,n,r)))}function dn(t,n){return pn(t,n,!1)[0]}function mn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function wn(t,n="id",r){return t.sort(((t,e)=>mn(t,e,n,r)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const r={};return s(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function vn(t,n="id"){const r={};return s(t,(t=>{r[t[n]]=t})),r}function An(t,n,r,e){return it(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function In(t,n,r,e){return ft(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function Mn(t,n){return it(t,(t=>En(t,n)))}function xn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function On(t,n="id",r){return t.sort(((t,e)=>xn(t,e,n,r)))}function $n(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function jn(t,n="id",r){return t.sort(((t,e)=>$n(t,e,n,r)))}function Cn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Sn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Bn(t){return n=>!!c(n)&&t.test(n)}const Fn=Bn(/\.css$/),Rn=Bn(/\.html$/),Nn=Bn(/\.js$/),Tn=Bn(/\.json$/);function Pn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Un(t,n){return(...r)=>t(...r.splice(0,n))}function Ln(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const _n=async(t,n,r,e)=>{if(!t)return;const o=V(t);return c(r)?await l(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await l(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Dn(t,n,r,e){if(!t)return;const o=V(t);return c(r)?s(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):s(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Zn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let h;const g=Hn(s);if(c(i)&&s)return h=w(i)?g?n:t:nt(i)||Ht(i)?g?e:r:o?g?u:o:Gn(i)?u:g?e:r,h(i,s,f,l,a)}}const Qn=Kn(s,l,Dn,_n,Vn,Jn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function tr(t,r=t.length){const e=[],o=(...u)=>{if(e.push(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function nr(t,r=t.length){const e=[],o=(...u)=>{if(e.unshift(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function rr(){}function er(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const cr=v(ur);function ir(t,n){return cr.set(t,n)}function sr(){er(setTimeout(rr,0),(t=>{cr.remove(t)}))}const fr=Reflect.apply;function lr(t,n,r){if(Ht(t))return fr(t,n,r)}function ar(t,n){function r(...t){!1!==r.id&&cr.remove(r.id),r.id=ir((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(cr.remove(r.id),r.id=!1)},r}function hr(t,n,...r){if(Ht(t))return n?t.call(n,...r):t(...r)}function gr(t){return(...n)=>!t(...n)}function pr(t=0){return(...n)=>n[t]}const dr=t=>{let n;return(...r)=>(c(n)||(n=t(...r)),n)};function mr(t){return t?.constructor}function wr(t,n=[]){const r=mr(t);return r===Function&&"function"===r.name?function(){}:v(r,n)}function yr(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=Ht(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function br(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=Ht(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function vr(t,n,r={}){if(t)return await _n(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function Ar(t,n,r={},e,o){if(t)return c(e)?Dn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Dn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Ir=Kn(it,ft,Ar,vr,yr,br);function Er(t){return(...n)=>Ir(t,(t=>t(...n)))}async function Mr(t,n){if(!t)return;return S(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function xr(t,n){if(!t)return;return C(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Or(t,n=i){if(w(t)||qn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function $r(t,n=i,r){if(Gn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(w(t)||qn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const jr=Kn(C,S,xr,Mr,Or,$r);function Cr(t){return n=>jr(t,(t=>t(n)))}function Sr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Br(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=ir((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{cr.remove(r.id),r.id=!1},r}function Fr(t,n){return(...r)=>n(t,...r)}const Rr=Function.prototype;function Nr(t){return Rr.call.bind(t)}const Tr=Object.getOwnPropertyNames,Pr=Object.getOwnPropertyDescriptor,Ur=Object.defineProperty,Lr=Nr(Object.hasOwnProperty),_r=Object.is;function Dr(t,n){return t+n}function Zr(t){return t-1}function kr(t,n){return t/n}function qr(t){return t+1}function Vr(t,n){return t*n}function zr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Gr}=Math;function Jr(t,n=0){return Gr()*(t-n)+n}function Wr(t,n){return t%n}function Hr(t){return t.reduce(((t,n)=>t-n),0)}function Kr(t){return t.reduce(((t,n)=>t+n),0)}function Qr(t,n,r){return t>n&&tr}const{sign:Yr}=Math;function te(t){return 1===Yr(t)}function ne(t){return 0===t}function re(t){return!(1&~t)}function ee(t){return!(1&t)}const oe=Object.entries;function ue(t){if(c(t))return oe(t)}function ce(t){const n=[];return Dn(t,((t,r)=>{c(t)&&n.push(r)})),n}async function ie(t,n=i,r={}){return await _n(t,(async(t,e,o,u,i)=>{const s=await n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function se(t,n=i,r={}){return Dn(t,((t,e,o,u,i)=>{const s=n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function fe(t,n,r={}){return Dn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function le(t,n,r={}){return await _n(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function ae(t,n={}){if(t)return Dn(t,((t,r)=>{n[t]=r})),n}const he=(t,n)=>{if(t===n)return!0;const r=V(t),e=V(n);return r.length===e.length&&C(r,(r=>t[r]===n[r]))},ge=/[()[\]{}*+?^$|#.,/\\\s-]/g;function pe(t){return t.replace(ge,"\\$&")}function de(t,n){return n?de(it(t,pe)):RegExp(t.join("|"))}const me=Q("RegExp"),we=X(me);function ye(t,n){if(!t)return{};if(w(n)){const r=de(n);return fe(t,((t,n)=>!r.test(n)))}if(we(n))return fe(t,((t,r)=>!n.test(r)));if(Yt(n))return fe(t,((t,r)=>r!==n));if(Qt(n)){const r=n.toString();return fe(t,((t,n)=>n!==r))}return Ht(n)?fe(t,((t,r)=>!n(t,r))):nn({},t)}const be=(t,n,r={})=>{if(t)return s(n,(n=>{r[n]=t[n]})),r};function ve(t){if(!t)return;if(nt(t))return V(t).length;const n=t.length;if(c(n))return n;const r=t.size;return c(n)?r:V(t).length}const Ae=(t,n)=>{const r={};return s(t,((t,e)=>{r[t]=n[e]})),r},Ie=t=>{const n=[],r=[];return Dn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Ee=/[ _-]+/g;function Me(t){let n="";return t.replace(Ee," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const xe=/[ _-]+/g,Oe=/[ ]+/g;function $e(t){return t.replace(/([A-Z]+)/g," $1").replace(xe," ").trim().toLowerCase().replace(Oe,"-")}const je=/[ _-]+/g,Ce=/[ ]+/g;function Se(t){return t.replace(/([A-Z]+)/g," $1").replace(je," ").trim().toLowerCase().replace(Ce,"_")}const Be=/[ _-]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Be," ").trim().toUpperCase()}const Re=/[ _-]+/g;function Ne(t){return t.replace(/([A-Z]+)/g," $1").replace(Re," ").trim().toLowerCase()}function Te(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Pe(t,n=1){return t[t.length-n]}function Ue(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Le(t,n=1){return t.slice(0,-1*n)}function _e(t,n=1){return t.substring(n)}function De(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const Ze=/%(?![\da-f]{2})/gi,ke=/&/g,qe=//g,ze=/"/g;function Ge(t){return decodeURIComponent(t.replace(Ze,(()=>"%25")))}function Je(t){return t.replace(ke,"&").replace(qe,"<").replace(Ve,">").replace(ze,""")}function We(t){return Je(Ge(t))}const He=/\S+/g,Ke=/\w+/g;function Qe(t){return t.match(He)||[]}function Xe(t){return t.match(Ke)||[]}function Ye(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function to(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const no=/\w+/g;function ro(t){return t[0].toUpperCase()}function eo(t){return ro(t)+_e(t)}function oo(t){return ro(t)+_e(t).toLowerCase()}function uo(t){return t.replace(no,(t=>eo(t)))}function co(t){return t.replace(no,(t=>oo(t)))}function io(t){return mr(t)?.name}function so(t){return!!c(t)&&"[object Arguments]"===t.toString()}const fo=Q("Map"),lo=X(fo),ao=/Array/,ho="Array";function go(t){if(t){const n=io(t);if(ao.test(n)&&n!==ho)return!0}return!1}function po(t){return!c(t)}function mo(t,n){if(po(t)||Ht(t))return!1;if(w(t)||go(t))return!0;const r=t.length;if(!po(r)||!Qt(r)||r<0)return!1;if(n){const n=V(t);return!!n&&jr(n,((t,n)=>n>=0&&Qt(n)))}return!0}const wo=Q("BigInt"),yo=X(wo),bo=Q("Boolean"),vo=X(bo),Ao=Q("ArrayBuffer"),Io=X(Ao);function Eo(t,n){return!(!t||!n)&&t instanceof n}const Mo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function xo(t){if(c(t)){const n=t?.constructor?.name;return Mo.test(n)}return!1}const Oo=Q("Date"),$o=X(Oo);function jo(t){return Yt(t)||w(t)?!o(t):nt(t)?!ve(t):!c(t)}function Co(t){return!1===t}const So=Q("Float32Array"),Bo=X(So),Fo=Q("Float64Array"),Ro=X(Fo),{isInteger:No}=Number,To=No,Po=Q("Int16Array"),Uo=X(Po),Lo=Q("Int32Array"),_o=X(Lo),Do=Q("Int8Array"),Zo=X(Do);function ko(t){return c(t)&&"function"==typeof t[Symbol.iterator]}function qo(t){return!!t&&t instanceof Promise}function Vo(t){return!!t&&(qo(t)||Hn(t)||Gn(t))}function zo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Go(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Jo(t,n){return!po(t)&&!po(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Wo}=Number,Ho=Wo;function Ko(t,n){const r=mr(t),e=mr(n);return r===e&&r.name===e.name}function Qo(t){return!0===t}const Xo=Q("Uint16Array"),Yo=X(Xo),tu=Q("Uint32Array"),nu=X(tu),ru=Q("Uint8Array"),eu=X(ru),ou=Q("Uint8ClampedArray"),uu=X(ou),cu=Q("WeakMap"),iu=X(cu),su=void 0!==globalThis.Deno,fu=void 0!==globalThis.process&&process.versions&&process.versions.node;function lu(t,n=!0){return Boolean(t)&&n}function au(t,n=!0){return!1===Boolean(t)&&n}function hu(t,n,r,e){if(c(t)){if(Ht(n))return r?lr(n,r,e):n(...e);if(nt(n))return n[r]=t,n}}function gu(t,n){return Co(rt(t,n))}const pu=JSON;function du(t,n){if(t)return pu.parse(t,n)}const mu=pu.stringify;function wu(t,n,r){const e=globalThis.options||r;let o;return Ht(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${mu(t)}\n\t\tExpected: ${mu(n)}`,e)}async function yu(t,n,r){const e=await t;return!(Ht(n)&&!1===await n(e,r))&&!gu(e,n)||wu(e,n,r)}function bu(t,n,r){if(Vo(t)||Vo(n))return yu(t,n,r);return!(Ht(n)&&!1===n(t,r))&&!gu(t,n)||wu(t,n,r)}function vu(t,n,r){const e=Ir(t,(t=>Ht(t)?t.bind(n):t));return r?en(r,e):e}function Au(t){if(t){if(tt(t))return Wt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Iu=globalThis.structuredClone;function Eu(t){return Iu(t)}async function Mu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;ulu(t)))}async function Ou(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);c(e)&&r.push(e)}return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);c(u)&&e(u)}return o}const u=Ht(o.set);for await(const[r,e]of t){const i=await n(e,r,o,t);c(i)&&(u?o.set(r,i):o[r]=i)}return o}function $u(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);c(u)&&o(u)}return e}const o=Ht(e.set);for(const[r,u]of t){const i=n(u,r,e,t);c(i)&&(o?e.set(r,i):e[r]=i)}return e}const ju=Kn(f,a,se,ie,$u,Ou);function Cu(...t){return Hn(t[0])?async function(...n){return jr(t,(async t=>jr(n,(async n=>t(n)))))}:function(...n){return jr(t,(t=>jr(n,(n=>t(n)))))}}function Su(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=Ht(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Bu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=Ht(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Fu=Kn(B,F,fe,le,Su,Bu);function Ru(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Nu=Ru(s),Tu=Ru($);function Pu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Uu=Pu(l),Lu=Pu(j);function _u(t,n){const r=wr(t),e=r.push||r.add;if(e&&Ht(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else Ht(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Du(t,n){const r={};return s(t,((t,e)=>{r[n[e]]=t})),r}function Zu(t,n,r){return!po(t)&&!po(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,r):we(n)?n.test(t):Ht(n)?n(t):w(n)?C(n,(n=>Zu(t,n))):jr(n,(n=>Zu(t,n))):w(t)?we(n)?C(t,(t=>t.test(n))):Ht(n)?C(t,n):w(n)?C(n,(n=>Zu(t,n))):t.includes(n,r):!!nt(t)&&(we(n)?xr(t,(t=>t.test(n))):Ht(n)?xr(t,n):nt(n)?xr(t,((t,r)=>t===n[r])):xr(t,(t=>Zu(t,n))))))}const ku=Bn(/\./),qu=(t,n,r)=>(n&&!c(t[n])&&(t[n]=r),t);class Vu{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const zu=v(Vu);function Gu(t,n){return zu.set(t,n)}function Ju(){er(setTimeout(rr,0),(t=>{zu.remove(t)}))}function Wu(t,...n){return Qn(n,(n=>{Qn(n,((n,r)=>{if(t[r]&&(nt(n)||w(n)||n.forEach))return Wu(t[r],n);t[r]=n}))})),t}class Hu{static models=new Map;constructor(t,n){c(n)?(en(this,n),this.modelName=t,Hu.models.set(t,n)):en(this,t)}delete(t){Hu.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Hu.models.set(t||this.modelName,this)}has(t){return Hu.models.has(t||this.modelName)}get(t){return Hu.models.get(t||this.modelName)}}function Ku(t,n){return c(n)?v(Hu,[t,n]):k(t,Hu.models)}function Qu(t,n){return[t,n]}function Xu(t,n,r){const e=t.length,o=[];for(let u=0;uC(r,(r=>rt(t[r],n[r])));function nc(t,n,r){return n&&nt(t)||Qt(n)&&w(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function rc(t,n,r){return Qt(r)&&w(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class ec{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Dn(t,(n=>{t[n]=new ec(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new ec(r),!0)})}}function oc(){return[]}function uc(){return!1}const cc=()=>({}),ic=()=>"",sc=()=>!0;async function fc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const gc=v(hc);class pc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):c(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=wr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function dc(t){return new pc(t)}async function mc(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{o%n||(e.push([]),o&&r++),e[r].push(t)})),e}function n(t){return t.length=0,t}function e(t){return t.slice()}function r(t){return void 0===t}function o(t){return Boolean(t.length)}function c(t){return null===t}function u(t){return!r(t)&&!c(t)}function i(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const f=n.call(r,t,c,e,i,s,o);u(f)&&e.push(f)})):s(t,((t,c,i,s)=>{const f=n(t,c,e,i,s,r,o);u(f)&&e.push(f)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const c=await n(t,r,e,o);u(c)&&e.push(c)})),e}const{sign:h}=Math;function d(t){return-1===h(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}function m(t,n,e=1,r=[]){return d(e)?r:t{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function $(t,n=1,e=t.length){return t.splice(n,e)}const S=(t,n=1,e=t.length)=>$(t,0,e-n);function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function C(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function j(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,c,u,r)&&e.push(t)})),e}async function L(t,n,e=[],r){return await a(t,(async(t,o,c,u)=>{!0===await n(t,o,e,c,u,r)&&e.push(t)})),e}function T(t,n){return n?t.slice(0,n):t[0]}function B(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e}function N(t){return t.slice(0,t.length-1)}function R(t,...n){return f(t,(t=>{if(j(n,(n=>n.includes(t))))return t}))}function P(t,n,e){if(!t)return;const r=t.length;if(u(e))for(let o=0;o(e=e[t],u(e)))),e}const q=Object.keys;function z(t){if(t)return q(t)}const H=Object.hasOwn;function W(t,...n){if(t)return j(n,(n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}}))}function G(t,...n){if(t)return Boolean(n.find((n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}})))}function V(t,n){return t?.constructor===n||!1}function J(t){return n=>V(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...e){return e?t(n)&&j(e,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!u(t)&&"Object("===t.constructor.toString().trim().slice(9,16),et=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const e=z(t);if(W(n,e))return j(e,(e=>et(t[e],n[e])))}else if(w(t)&&t.length===n.length)return j(t,((t,e)=>et(t,n[e])));return!1};function rt(t,n){return t.length===n.length&&j(t,((t,e)=>et(n[e],t)))}const ot=Math.max;function ct(t){return ot(...t)}function ut(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]}function it(t,n,e=[],r,o){return u(r)?s(t,((t,c,u,i)=>{e[c]=n.call(r,t,c,e,u,i,o)})):s(t,((t,r,c,u)=>{e[r]=n(t,r,e,c,u,o)})),e}async function st(t,n,e){if(!t)return;const r=[],o=t.length;if(e)for(let c=0;c{e[r]=await n(t,r,e,o)})),e}function at(t,n,e=[],r){let o=0;const c=t.length;for(let u=c-1;u>=0;u--)e[o]=n(t[u],u,t,c,r),o++;return e}function lt(t,n,e=[],r){const o=t.length;for(let c=0;c{if(n(t,r))return t;e.push(t)})),e]}function pt(t,n){return n-t}function mt(t){return t.sort(pt)}function wt(t,n){let e=t.length;for(let r=0;re)return Mt(t);if(1===n)return[t[Et(e-1,0)]];const r=[],o={};let c,u=0;for(;u(e=r,n>=t&&(e=r+1,!0)))),e}function Lt(t,n=1){return t.slice(0,n)}function Tt(t,n=1){const e=t.length;return t.slice(e-n,e)}function Bt(t,n,e){return e.indexOf(t)===n}function Nt(t,n,e){return t!==e[n-1]}function Rt(t,n){return n?t.filter(Nt):t.filter(Bt)}function Pt(...t){return Rt(I(t))}function Ut(t,n){const e=t.length;for(let r=0;r!e.has(t)))}function zt(...t){const n=v(Map),e=[];return 2===t.length?x(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&e.push(t.child)})),e)}function Ht(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Wt(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Gt(t){return tt(t)&&t||u(t)&&Buffer.from(t)||Buffer.alloc(0)}function Vt(t){return t.fill(0),t}const Jt=t=>!!u(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=J(String);function tn(t){return!Yt(t)}const nn=Object.assign;function en(t,n){if(nt(n))nn(t,n);else if(Jt(n)){const e=n.name;e?t[e]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function rn(t,...n){const e=n.length;for(let r=0;r{r=n(t),e[r]||(e[r]=0),e[r]++})),e}function sn(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e}function fn(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e}function an(t,n,e,r,o){if(t[o]===r)return!0}function ln(t,n,e="id"){const r=t.findIndex(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function hn(t,n,e="id"){const r=t.find(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function dn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?-1:0:1:-1}function gn(t,n="id",e){return t.sort(((t,r)=>dn(t,r,n,e)))}function pn(t,n){return gn(t,n,!1)[0]}function mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?1:0:-1:1}function wn(t,n="id",e){return t.sort(((t,r)=>mn(t,r,n,e)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e}function vn(t,n="id"){const e={};return s(t,(t=>{e[t[n]]=t})),e}function An(t,n,e,r){return it(t,r?(t,o)=>t[n].call(r,e):(t,r)=>t[n](e))}function In(t,n,e,r){return ft(t,r?t=>t[n].call(r,e):async t=>t[n](e))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function xn(t,n){return it(t,(t=>En(t,n)))}function $n(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):o.localeCompare(c)}function Sn(t,n="id",e){return t.sort(((t,r)=>$n(t,r,n,e)))}function Mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c.localeCompare(o)}function Cn(t,n="id",e){return t.sort(((t,r)=>Mn(t,r,n,e)))}function jn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function On(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Fn(t){return n=>!!u(n)&&t.test(n)}const Ln=Fn(/\.css$/),Tn=Fn(/\.html$/),Bn=Fn(/\.js$/),Nn=Fn(/\.json$/);function Rn(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)}function Pn(t,n){return(...e)=>t(...e.splice(0,n))}function Un(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)}const _n=async(t,n,e,r)=>{if(!t)return;const o=z(t);return u(e)?await a(o,((c,u,i,s)=>n.call(e,t[c],c,t,s,o,r))):await a(o,((e,c,u,i)=>n(t[e],e,t,i,o,r))),t};function kn(t,n,e,r){if(!t)return;const o=z(t);return u(e)?s(o,((o,c,u,i)=>{n.call(e,t[o],o,t,i,u,r)})):s(o,((e,o,c,u)=>{n(t[e],e,t,u,c,r)})),t}async function Dn(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{let h;const d=Jn(s);if(u(i)&&s)return h=w(i)?d?n:t:nt(i)||Jt(i)?d?r:e:o?d?c:o:Wn(i)?c:d?r:e,h(i,s,f,a,l)}}const Qn=Kn(s,a,kn,_n,zn,Gn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function te(t,e=t.length){const r=[],o=(...c)=>{if(r.push(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ne(t,e=t.length){const r=[],o=(...c)=>{if(r.unshift(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ee(){}function re(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ue=v(ce);function ie(t,n){return ue.set(t,n)}function se(){re(setTimeout(ee,0),(t=>{ue.remove(t)}))}const fe=Reflect.apply;function ae(t,n,e){if(Jt(t))return fe(t,n,e)}function le(t,n){function e(...t){!1!==e.id&&ue.remove(e.id),e.id=ie((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(ue.remove(e.id),e.id=!1)},e}function he(t,n,...e){if(Jt(t))return n?t.call(n,...e):t(...e)}function de(t){return(...n)=>!t(...n)}function ge(t=0){return(...n)=>n[t]}const pe=t=>{let n;return(...e)=>(u(n)||(n=t(...e)),n)};function me(t){return t?.constructor}function we(t,n=[]){const e=me(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function ye(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=Jt(r.set);for(const[e,c]of t){const u=n(c,e,r,t);o?r.set(e,u):r[e]=u}return r}async function be(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const c=Jt(o.set);for await(const[e,r]of t){const u=await n(r,e,o,t);c?o.set(e,u):o[e]=u}return o}async function ve(t,n,e={}){if(t)return await _n(t,(async(t,r,o,c,u)=>{e[r]=await n(t,r,e,o,c,u)})),e}function Ae(t,n,e={},r,o){if(t)return u(r)?kn(t,((t,c,u,i,s)=>{e[c]=n.call(r,t,c,e,u,i,s,o)})):kn(t,((t,r,c,u,i)=>{e[r]=n(t,r,e,c,u,i,o)})),e}const Ie=Kn(it,ft,Ae,ve,ye,be);function Ee(t){return(...n)=>Ie(t,(t=>t(...n)))}async function xe(t,n){if(!t)return;return O(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function $e(t,n){if(!t)return;return j(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function Se(t,n=i){if(w(t)||qn(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function Me(t,n=i,e){if(Wn(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(w(t)||qn(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const Ce=Kn(j,O,$e,xe,Se,Me);function je(t){return n=>Ce(t,(t=>t(n)))}function Oe(t,n){return(...e)=>t(...n.map((t=>e[t])))}function Fe(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=ie((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{ue.remove(e.id),e.id=!1},e}function Le(t,n){return(...e)=>n(t,...e)}const Te=Function.prototype;function Be(t){return Te.call.bind(t)}const Ne=Object.getOwnPropertyNames,Re=Object.getOwnPropertyDescriptor,Pe=Object.defineProperty,Ue=Be(Object.hasOwnProperty),_e=Object.is;function ke(t,n){return t+n}function De(t){return t-1}function Ze(t,n){return t/n}function qe(t){return t+1}function ze(t,n){return t*n}function He(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:We}=Math;function Ge(t,n=0){return We()*(t-n)+n}function Ve(t,n){return t%n}function Je(t){return t.reduce(((t,n)=>t-n),0)}function Ke(t){return t.reduce(((t,n)=>t+n),0)}function Qe(t,n,e){return t>n&&te}const{sign:Ye}=Math;function tr(t){return 1===Ye(t)}function nr(t){return 0===t}const er=Object.entries;function rr(t){if(u(t))return er(t)}function or(t){const n=[];return kn(t,((t,e)=>{u(t)&&n.push(e)})),n}async function cr(t,n=i,e={}){return await _n(t,(async(t,r,o,c,i)=>{const s=await n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function ur(t,n=i,e={}){return kn(t,((t,r,o,c,i)=>{const s=n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function ir(t,n,e={}){return kn(t,((t,r,o,c,u)=>{!0===n(t,r,e,o,c,u)&&(e[r]=t)})),e}async function sr(t,n,e={}){return await _n(t,(async(t,r,o,c,u)=>{!0===await n(t,r,e,o,c,u)&&(e[r]=t)})),e}function fr(t,n={}){if(t)return kn(t,((t,e)=>{n[t]=e})),n}const ar=(t,n)=>{if(t===n)return!0;const e=z(t),r=z(n);return e.length===r.length&&j(e,(e=>t[e]===n[e]))},lr=/[()[\]{}*+?^$|#.,/\\\s-]/g;function hr(t){return t.replace(lr,"\\$&")}function dr(t,n){return n?dr(it(t,hr)):RegExp(t.join("|"))}const gr=Q("RegExp"),pr=X(gr);function mr(t,n){if(!t)return{};if(w(n)){const e=dr(n);return ir(t,((t,n)=>!e.test(n)))}if(pr(n))return ir(t,((t,e)=>!n.test(e)));if(Yt(n))return ir(t,((t,e)=>e!==n));if(Qt(n)){const e=n.toString();return ir(t,((t,n)=>n!==e))}return Jt(n)?ir(t,((t,e)=>!n(t,e))):nn({},t)}const wr=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e};function yr(t){if(!t)return;if(nt(t))return z(t).length;const n=t.length;if(u(n))return n;const e=t.size;return u(n)?e:z(t).length}const br=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},vr=t=>{const n=[],e=[];return kn(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},Ar=/[ _-]+/g;function Ir(t){let n="";return t.replace(Ar," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Er=/[ _-]+/g,xr=/[ ]+/g;function $r(t){return t.replace(/([A-Z]+)/g," $1").replace(Er," ").trim().toLowerCase().replace(xr,"-")}const Sr=/[ _-]+/g,Mr=/[ ]+/g;function Cr(t){return t.replace(/([A-Z]+)/g," $1").replace(Sr," ").trim().toLowerCase().replace(Mr,"_")}const jr=/[ _-]+/g;function Or(t){return t.replace(/([A-Z]+)/g," $1").replace(jr," ").trim().toUpperCase()}const Fr=/[ _-]+/g;function Lr(t){return t.replace(/([A-Z]+)/g," $1").replace(Fr," ").trim().toLowerCase()}function Tr(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)}function Br(t,n=1){return t[t.length-n]}function Nr(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Rr(t,n=1){return t.slice(0,-1*n)}function Pr(t,n=1){return t.substring(n)}function Ur(t,n,e){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),e)}const _r=/%(?![\da-f]{2})/gi,kr=/&/g,Dr=//g,qr=/"/g;function zr(t){return decodeURIComponent(t.replace(_r,(()=>"%25")))}function Hr(t){return t.replace(kr,"&").replace(Dr,"<").replace(Zr,">").replace(qr,""")}function Wr(t){return Hr(zr(t))}const Gr=/\S+/g,Vr=/\w+/g;function Jr(t){return t.match(Gr)||[]}function Kr(t){return t.match(Vr)||[]}function Qr(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=e-n;for(;u=0&&(c=r[u]," "!==c);u--);return t.slice(0,u).trim()})(t,n,e):t}function Xr(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=n;for(;u0&&(c=r[u]," "!==c);u++);return t.substring(u,e).trim()})(t,n,e):t}const Yr=/\w+/g;function to(t){return t[0].toUpperCase()}function no(t){return to(t)+Pr(t)}function eo(t){return to(t)+Pr(t).toLowerCase()}function ro(t){return t.replace(Yr,(t=>no(t)))}function oo(t){return t.replace(Yr,(t=>eo(t)))}function co(t){return me(t)?.name}function uo(t){return!!u(t)&&"[object Arguments]"===t.toString()}const io=Q("Map"),so=X(io),fo=/Array/,ao="Array";function lo(t){if(t){const n=co(t);if(fo.test(n)&&n!==ao)return!0}return!1}function ho(t){return!u(t)}function go(t,n){if(ho(t)||Jt(t))return!1;if(w(t)||lo(t))return!0;const e=t.length;if(!ho(e)||!Qt(e)||e<0)return!1;if(n){const n=z(t);return!!n&&Ce(n,((t,n)=>n>=0&&Qt(n)))}return!0}const po=Q("BigInt"),mo=X(po),wo=Q("Boolean"),yo=X(wo),bo=Q("ArrayBuffer"),vo=X(bo);function Ao(t,n){return!(!t||!n)&&t instanceof n}const Io=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function Eo(t){if(u(t)){const n=t?.constructor?.name;return Io.test(n)}return!1}const xo=Q("Date"),$o=X(xo);function So(t){return Yt(t)||w(t)?!o(t):nt(t)?!yr(t):!u(t)}function Mo(t){return!1===t}const Co=Q("Float32Array"),jo=X(Co),Oo=Q("Float64Array"),Fo=X(Oo),{isInteger:Lo}=Number,To=Lo,Bo=Q("Int16Array"),No=X(Bo),Ro=Q("Int32Array"),Po=X(Ro),Uo=Q("Int8Array"),_o=X(Uo);function ko(t){return u(t)&&"function"==typeof t[Symbol.iterator]}function Do(t){return!!t&&t instanceof Promise}function Zo(t){return!!t&&(Do(t)||Jn(t)||Wn(t))}function qo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function zo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Ho(t,n){return!ho(t)&&!ho(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Wo}=Number,Go=Wo;function Vo(t,n){const e=me(t),r=me(n);return e===r&&e.name===r.name}function Jo(t){return!0===t}const Ko=Q("Uint16Array"),Qo=X(Ko),Xo=Q("Uint32Array"),Yo=X(Xo),tc=Q("Uint8Array"),nc=X(tc),ec=Q("Uint8ClampedArray"),rc=X(ec),oc=Q("WeakMap"),cc=X(oc),uc=void 0!==globalThis.Deno,ic=void 0!==globalThis.process&&process.versions&&process.versions.node;function sc(t,n=!0){return Boolean(t)&&n}function fc(t,n=!0){return!1===Boolean(t)&&n}function ac(t,n,e,r){if(u(t)){if(Jt(n))return e?ae(n,e,r):n(...r);if(nt(n))return n[e]=t,n}}function lc(t,n){return Mo(et(t,n))}const hc=JSON;function dc(t,n){if(t)return hc.parse(t,n)}const gc=hc.stringify;function pc(t,n,e){const r=globalThis.options||e;let o;return Jt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${gc(t)}\n\t\tExpected: ${gc(n)}`,r)}async function mc(t,n,e){const r=await t;return!(Jt(n)&&!1===await n(r,e))&&!lc(r,n)||pc(r,n,e)}function wc(t,n,e){if(Zo(t)||Zo(n))return mc(t,n,e);return!(Jt(n)&&!1===n(t,e))&&!lc(t,n)||pc(t,n,e)}function yc(t,n,e){const r=Ie(t,(t=>Jt(t)?t.bind(n):t));return e?rn(e,r):r}function bc(t){if(t){if(tt(t))return Vt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const vc=globalThis.structuredClone;function Ac(t){return vc(t)}async function Ic(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;csc(t)))}async function xc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);u(r)&&e.push(r)}return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);u(c)&&r(c)}return o}const c=Jt(o.set);for await(const[e,r]of t){const i=await n(r,e,o,t);u(i)&&(c?o.set(e,i):o[e]=i)}return o}function $c(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);u(c)&&o(c)}return r}const o=Jt(r.set);for(const[e,c]of t){const i=n(c,e,r,t);u(i)&&(o?r.set(e,i):r[e]=i)}return r}const Sc=Kn(f,l,ur,cr,$c,xc);function Mc(...t){return Jn(t[0])?async function(...n){return Ce(t,(async t=>Ce(n,(async n=>t(n)))))}:function(...n){return Ce(t,(t=>Ce(n,(n=>t(n)))))}}function Cc(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=Jt(r.set);for(const[o,c]of t){!0===n(c,o,r,t)&&(e?r.set(o,c):r[o]=c)}}return r}async function jc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=Jt(o.set);for await(const[r,c]of t){!0===await n(c,r,o,t)&&(e?o.set(r,c):o[r]=c)}}return o}const Oc=Kn(F,L,ir,sr,Cc,jc);function Fc(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const Lc=Fc(s),Tc=Fc(M);function Bc(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const Nc=Bc(a),Rc=Bc(C);function Pc(t,n){const e=we(t),r=e.push||e.add;if(r&&Jt(r)){const o=r.bind(e);t.forEach((t=>{const r=n(t,e);o(r)}))}else Jt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e}function Uc(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e}function _c(t,n,e){return!ho(t)&&!ho(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,e):pr(n)?n.test(t):Jt(n)?n(t):w(n)?j(n,(n=>_c(t,n))):Ce(n,(n=>_c(t,n))):w(t)?pr(n)?j(t,(t=>t.test(n))):Jt(n)?j(t,n):w(n)?j(n,(n=>_c(t,n))):t.includes(n,e):!!nt(t)&&(pr(n)?$e(t,(t=>t.test(n))):Jt(n)?$e(t,n):nt(n)?$e(t,((t,e)=>t===n[e])):$e(t,(t=>_c(t,n))))))}const kc=Fn(/\./),Dc=(t,n,e)=>(n&&!u(t[n])&&(t[n]=e),t);class Zc{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const qc=v(Zc);function zc(t,n){return qc.set(t,n)}function Hc(){re(setTimeout(ee,0),(t=>{qc.remove(t)}))}function Wc(t,...n){return Qn(n,(n=>{Qn(n,((n,e)=>{if(t[e]&&(nt(n)||w(n)||n.forEach))return Wc(t[e],n);t[e]=n}))})),t}class Gc{static models=new Map;constructor(t,n){u(n)?(rn(this,n),this.modelName=t,Gc.models.set(t,n)):rn(this,t)}delete(t){Gc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Gc.models.set(t||this.modelName,this)}has(t){return Gc.models.has(t||this.modelName)}get(t){return Gc.models.get(t||this.modelName)}}function Vc(t,n){return u(n)?v(Gc,[t,n]):Z(t,Gc.models)}function Jc(t,n){return[t,n]}function Kc(t,n,e){const r=t.length,o=[];for(let c=0;cj(e,(e=>et(t[e],n[e])));function Yc(t,n,e){return n&&nt(t)||Qt(n)&&w(t)?t[n]=e:t.set?t.set(n,e):t.push?t.push(e):t.add?t.add(e):t[n]=e,t}function tu(t,n,e){return Qt(e)&&w(t)?t[e]=n:t.push?t.push(n):t.add?t.add(n):t[e]=n,t}class nu{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;kn(t,(n=>{t[n]=new nu(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new nu(e),!0)})}}function eu(){return[]}function ru(){return!1}const ou=()=>({}),cu=()=>"",uu=()=>!0;async function iu(t,n){for(let e=0;e0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const lu=v(au);class hu{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):u(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=we(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function du(t){return new hu(t)}async function gu(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;c{yo(t)&&t&&(mu[n]=t)})),s(wu.brands,(t=>{mu[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{mu[t]=!0}))}function yu(t,n,e,r){return t.addEventListener(n,e,r),t}function bu(t,n,e,r){return t.removeEventListener(n,e,r),t}function vu(t){return 13===t.keyCode}const Au=document.createDocumentFragment.bind(document);function Iu(t,n){return t.appendChild(n),n}function Eu(t,n){return w(n)?br(n,it(n,(n=>t.getAttribute(n)))):(kn(n,((n,e)=>{t.setAttribute(e,n)})),t)}const xu=/^.[\w_-]+$/,$u=/^[A-Za-z]+$/,Su=/\s/,Mu=document.getElementsByClassName.bind(document),Cu=document.getElementsByTagName.bind(document),ju=document.getElementById.bind(document),Ou=document.querySelector.bind(document),Fu=document.querySelectorAll.bind(document);function Lu(t){switch(t[0]){case"#":if(!Su.test(t))return ju(Pr(t));break;case".":if(xu.test(t))return Mu(Pr(t));break;default:if($u.test(t))return Cu(t)}return Fu(t)}const Tu=document.createElement.bind(document);function Bu(t){const n=kc(t)&&t||`${t}.js`;return(t=>Qc((n=>{yu(t,"load",n,!0),yu(t,"error",n,!0),Iu(Ou("head"),t)})))(Eu(Tu("script"),{async:"",src:n}))}function Nu(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&yu(document,"DOMContentLoaded",t),!1)}Nu((()=>{const t=ju("AcidLib");Bu(t&&t.getAttribute("data-index")||"/index")}));const Ru=location.protocol,Pu="http:"===Ru?"ws":"wss",Uu=location.hostname,_u={hardware:{cores:navigator.hardwareConcurrency},host:{name:Uu,protocol:Ru,protocolSocket:Pu}};function ku(){rn(_u,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Du(){ku()}let Zu;Nu(Du),yu(window,"load",Du,!0),yu(window,"resize",Du,!0),function(t){try{t().removeItem("TESTING"),Zu=!0}catch(t){Zu=!1}}((()=>localStorage));class qu{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=du(t)}hasLocal=Zu;setItem(t,n){return this.hasLocal&&this.local.setItem(t,Yt(n)?n:gc(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return u(n)?n:!u(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}function zu(t){return new qu(t)}const Hu=(t,n)=>`color:${t};background:${n};`,Wu={alert:Hu("#fff","#f44336"),important:Hu("#fff","#E91E63"),notify:Hu("#fff","#651FFF"),warning:Hu("#000","#FFEA00")},Gu=(t,n)=>{const e=Yt(t)?t:gc(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},Vu=(t,n,e)=>{Wu[t]=Hu(n,e)};function Ju(t){return t&&9!==t.nodeType}function Ku(t){return!!u(t)&&"[object HTMLCollection]"===t.toString()}function Qu(t){return!!u(t)&&"[object NodeList]"===t.toString()}export{qu as BrowserStorage,Xn as Chain,Zc as Intervals,Gc as Model,nu as Store,ce as Timers,au as UniqID,hu as VirtualStorage,ke as add,Rn as after,Iu as append,ae as apply,dr as arrayToRegex,Uc as arraysToObject,Pn as ary,wc as assert,mc as assertAsync,rn as assign,on as assignToClass,en as assignToObject,Un as before,yc as bindAll,zu as browserStorage,Be as cacheNativeMethod,He as calcProgress,Ir as camelCase,Yn as chain,t as chunk,Nr as chunkString,bc as clear,n as clearArray,Vt as clearBuffer,Hc as clearIntervals,se as clearTimers,Ac as clone,e as cloneArray,we as cloneType,Gu as cnsl,Vu as cnslTheme,Ec as compact,or as compactKeys,Sc as compactMap,f as compactMapArray,l as compactMapAsyncArray,cr as compactMapAsyncObject,ur as compactMapObject,Ic as concurrent,st as concurrentEachArray,Kc as concurrentStatus,v as construct,K as constructorName,un as countBy,sn as countKey,fn as countWithoutKey,Au as createFragment,te as curry,ne as curryRight,le as debounce,De as deduct,Pe as defProp,x as difference,Ze as divide,$ as drop,S as dropRight,Qn as each,s as eachArray,a as eachAsyncArray,_n as eachAsyncObject,kn as eachObject,M as eachRight,C as eachRightAsync,A as ensureArray,Gt as ensureBuffer,nr as equalsZero,hr as escapeRegex,lr as escapeRegexRegex,yu as eventAdd,bu as eventRemove,Ce as every,Mc as everyArg,j as everyArray,O as everyAsyncArray,xe as everyAsyncObject,$e as everyObject,cn as extendClass,Oc as filter,F as filterArray,L as filterAsyncArray,sr as filterAsyncObject,ir as filterObject,ln as findIndex,an as findIndexCache,hn as findItem,T as first,B as flatten,I as flattenDeep,Lc as flow,Nc as flowAsync,Rc as flowAsyncRight,Tc as flowRight,E as forEach,Dn as forEachAsync,Pc as forMap,zn as forOf,Gn as forOfAsync,$c as forOfCompactMap,xc as forOfCompactMapAsync,Se as forOfEvery,Me as forOfEveryAsync,Cc as forOfFilter,jc as forOfFilterAsync,ye as forOfMap,be as forOfMapAsync,Kn as generateLoop,Z as get,Mu as getByClass,ju as getById,Cu as getByTag,rr as getEntries,jn as getFileExtension,On as getFilename,yn as getHighest,pn as getLowest,Ft as getNumberInsertIndex,Re as getPropDesc,Ne as getPropNames,me as getType,co as getTypeName,bn as groupBy,_c as has,G as hasAnyKeys,kc as hasDot,W as hasKeys,o as hasLength,Zu as hasLocal,Ue as hasProp,u as hasValue,Hr as htmlEntities,he as ifInvoke,Dc as ifNotAssign,ac as ifValue,Bu as importjs,gu as inAsync,pu as inSync,qe as increment,vn as indexBy,_u as info,N as initial,Rr as initialString,Tr as insertInRange,R as intersection,zc as interval,qc as intervals,fr as invert,P as invokeArray,An as invokeCollection,In as invokeCollectionAsync,mu as isAgent,uo as isArguments,w as isArray,vo as isArrayBuffer,bo as isArrayBufferCall,go as isArrayLike,Jn as isAsync,Vn as isAsyncCall,mo as isBigInt,po as isBigIntCall,yo as isBoolean,wo as isBooleanCall,tt as isBuffer,Y as isBufferCall,Ao as isChild,Eo as isCloneable,V as isConstructor,J as isConstructorFactory,Q as isConstructorNameFactory,$o as isDate,xo as isDateCall,uc as isDeno,Nu as isDocumentReady,Ju as isDom,So as isEmpty,vu as isEnter,et as isEqual,jo as isF32,Co as isF32Call,Fo as isF64,Oo as isF64Call,Mo as isFalse,fc as isFalsy,Ln as isFileCSS,Tn as isFileHTML,Bn as isFileJS,Nn as isFileJSON,To as isFloat,Jt as isFunction,Wn as isGenerator,Hn as isGeneratorCall,Ku as isHTMLCollection,No as isI16,Bo as isI16Call,Po as isI32,Ro as isI32Call,_o as isI8,Uo as isI8Call,ko as isIterable,Zo as isKindAsync,so as isMap,io as isMapCall,rt as isMatchArray,ar as isMatchObject,d as isNegative,Qu as isNodeList,ic as isNodejs,y as isNotArray,Xt as isNotNumber,tn as isNotString,c as isNull,Qt as isNumber,Kt as isNumberCall,xt as isNumberEqual,Qe as isNumberInRange,Xe as isNumberNotInRange,qo as isParent,nt as isPlainObject,tr as isPositive,zo as isPrimitive,Do as isPromise,pr as isRegex,gr as isRegexCall,Ho as isRelated,Go as isSafeInt,_e as isSame,Vo as isSameType,qn as isSet,Zn as isSetCall,Yt as isString,Jo as isTrue,sc as isTruthy,X as isTypeFactory,lo as isTypedArray,Qo as isU16,Ko as isU16Call,Yo as isU32,Xo as isU32Call,nc as isU8,rc as isU8C,ec as isU8CCall,tc as isU8Call,r as isUndefined,cc as isWeakMap,oc as isWeakMapCall,nr as isZero,dc as jsonParse,$r as kebabCase,z as keys,ct as largest,ut as last,Lr as lowerCase,Ie as map,it as mapArray,ft as mapAsyncArray,ve as mapAsyncObject,Ae as mapObject,at as mapRightArray,lt as mapWhile,Wc as merge,Vc as model,ze as multiply,de as negate,ho as noValue,Eu as nodeAttribute,ee as noop,lc as notEqual,ge as nthArg,nn as objectAssign,er as objectEntries,yr as objectSize,mr as omit,pe as once,Bt as onlyUnique,Ee as over,je as overEvery,Jc as pair,gt as partition,wr as pick,xn as pluck,En as pluckObject,Qc as promise,Xc as propertyMatch,Ou as querySelector,Fu as querySelectorAll,Ge as randomFloat,Et as randomInt,m as range,p as rangeDown,g as rangeUp,zr as rawURLDecode,Oe as reArg,Fn as regexTestFactory,Ve as remainder,wt as remove,yt as removeBy,Ur as replaceList,bt as rest,Pr as restString,i as returnValue,vt as right,Br as rightString,Ct as sample,Wr as sanitize,ku as saveDimensions,Lu as selector,Yc as setKey,tu as setValue,Mt as shuffle,Ot as smallest,Cr as snakeCase,Sn as sortCollectionAlphabetically,Cn as sortCollectionAlphabeticallyReverse,wn as sortCollectionAscending,mn as sortCollectionAscendingFilter,gn as sortCollectionDescending,dn as sortCollectionDescendingFilter,dt as sortNumberAscending,mt as sortNumberDescening,$n as sortObjectsAlphabetically,Mn as sortObjectsAlphabeticallyReverse,Nt as sortUnique,gc as stringify,eu as stubArray,ru as stubFalse,ou as stubObject,cu as stubString,uu as stubTrue,ht as subtract,Je as subtractAll,pt as subtractReverse,Ke as sumAll,Lt as take,Tt as takeRight,Wu as themes,Fe as throttle,ie as timer,ue as timers,re as times,iu as timesAsync,oe as timesMap,su as timesMapAsync,St as toArray,D as toPath,fu as toggle,Jr as tokenize,Qr as truncate,Xr as truncateRight,Wt as unZip,vr as unZipObject,Pt as union,lu as uniqID,Rt as unique,Ut as untilFalseArray,_t as untilTrueArray,Du as updateDimensions,Or as upperCase,no as upperFirst,ro as upperFirstAll,to as upperFirstLetter,eo as upperFirstOnly,oo as upperFirstOnlyAll,du as virtualStorage,kt as whileCompactMap,Dt as whileEachArray,Zt as whileMapArray,qt as without,Kr as words,Le as wrap,zt as xor,Ht as zip,br as zipObject}; +function t(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e}function n(t){return t.length=0,t}function e(t){return t.slice()}function r(t){return void 0===t}function o(t){return Boolean(t.length)}function c(t){return null===t}function u(t){return!r(t)&&!c(t)}function i(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const f=n.call(r,t,c,e,i,s,o);u(f)&&e.push(f)})):s(t,((t,c,i,s)=>{const f=n(t,c,e,i,s,r,o);u(f)&&e.push(f)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const c=await n(t,r,e,o);u(c)&&e.push(c)})),e}const{sign:h}=Math;function d(t){return-1===h(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}function m(t,n,e=1,r=[]){return d(e)?r:t{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function $(t,n=1,e=t.length){return t.splice(n,e)}const S=(t,n=1,e=t.length)=>$(t,0,e-n);function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function C(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function j(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,c,u,r)&&e.push(t)})),e}async function L(t,n,e=[],r){return await a(t,(async(t,o,c,u)=>{!0===await n(t,o,e,c,u,r)&&e.push(t)})),e}function T(t,n){return n?t.slice(0,n):t[0]}function B(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e}function N(t){return t.slice(0,t.length-1)}function R(t,...n){return f(t,(t=>{if(j(n,(n=>n.includes(t))))return t}))}function P(t,n,e){if(!t)return;const r=t.length;if(u(e))for(let o=0;o(e=e[t],u(e)))),e}const q=Object.keys;function z(t){if(t)return q(t)}const H=Object.hasOwn;function W(t,...n){if(t)return j(n,(n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}}))}function G(t,...n){if(t)return Boolean(n.find((n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}})))}function V(t,n){return t?.constructor===n||!1}function J(t){return n=>V(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...e){return e?t(n)&&j(e,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!u(t)&&"Object("===t.constructor.toString().trim().slice(9,16),et=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const e=z(t);if(W(n,e))return j(e,(e=>et(t[e],n[e])))}else if(w(t)&&t.length===n.length)return j(t,((t,e)=>et(t,n[e])));return!1};function rt(t,n){return t.length===n.length&&j(t,((t,e)=>et(n[e],t)))}const ot=Math.max;function ct(t){return ot(...t)}function ut(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]}function it(t,n,e=[],r,o){return u(r)?s(t,((t,c,u,i)=>{e[c]=n.call(r,t,c,e,u,i,o)})):s(t,((t,r,c,u)=>{e[r]=n(t,r,e,c,u,o)})),e}async function st(t,n,e){if(!t)return;const r=[],o=t.length;if(e)for(let c=0;c{e[r]=await n(t,r,e,o)})),e}function at(t,n,e=[],r){let o=0;const c=t.length;for(let u=c-1;u>=0;u--)e[o]=n(t[u],u,t,c,r),o++;return e}function lt(t,n,e=[],r){const o=t.length;for(let c=0;c{if(n(t,r))return t;e.push(t)})),e]}function pt(t,n){return n-t}function mt(t){return t.sort(pt)}function wt(t,n){let e=t.length;for(let r=0;re)return Mt(t);if(1===n)return[t[Et(e-1,0)]];const r=[],o={};let c,u=0;for(;u(e=r,n>=t&&(e=r+1,!0)))),e}function Lt(t,n=1){return t.slice(0,n)}function Tt(t,n=1){const e=t.length;return t.slice(e-n,e)}function Bt(t,n,e){return e.indexOf(t)===n}function Nt(t,n,e){return t!==e[n-1]}function Rt(t,n){return n?t.filter(Nt):t.filter(Bt)}function Pt(...t){return Rt(I(t))}function Ut(t,n){const e=t.length;for(let r=0;r!e.has(t)))}function zt(...t){const n=v(Map),e=[];return 2===t.length?x(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&e.push(t.child)})),e)}function Ht(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Wt(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Gt(t){return tt(t)&&t||u(t)&&Buffer.from(t)||Buffer.alloc(0)}function Vt(t){return t.fill(0),t}const Jt=t=>!!u(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=J(String);function tn(t){return!Yt(t)}const nn=Object.assign;function en(t,n){if(nt(n))nn(t,n);else if(Jt(n)){const e=n.name;e?t[e]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function rn(t,...n){const e=n.length;for(let r=0;r{r=n(t),e[r]||(e[r]=0),e[r]++})),e}function sn(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e}function fn(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e}function an(t,n,e,r,o){if(t[o]===r)return!0}function ln(t,n,e="id"){const r=t.findIndex(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function hn(t,n,e="id"){const r=t.find(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function dn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?-1:0:1:-1}function gn(t,n="id",e){return t.sort(((t,r)=>dn(t,r,n,e)))}function pn(t,n){return gn(t,n,!1)[0]}function mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?1:0:-1:1}function wn(t,n="id",e){return t.sort(((t,r)=>mn(t,r,n,e)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e}function vn(t,n="id"){const e={};return s(t,(t=>{e[t[n]]=t})),e}function An(t,n,e,r){return it(t,r?(t,o)=>t[n].call(r,e):(t,r)=>t[n](e))}function In(t,n,e,r){return ft(t,r?t=>t[n].call(r,e):async t=>t[n](e))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function xn(t,n){return it(t,(t=>En(t,n)))}function $n(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):o.localeCompare(c)}function Sn(t,n="id",e){return t.sort(((t,r)=>$n(t,r,n,e)))}function Mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c.localeCompare(o)}function Cn(t,n="id",e){return t.sort(((t,r)=>Mn(t,r,n,e)))}function jn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function On(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Fn(t){return n=>!!u(n)&&t.test(n)}const Ln=Fn(/\.css$/),Tn=Fn(/\.html$/),Bn=Fn(/\.js$/),Nn=Fn(/\.json$/);function Rn(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)}function Pn(t,n){return(...e)=>t(...e.splice(0,n))}function Un(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)}const _n=async(t,n,e,r)=>{if(!t)return;const o=z(t);return u(e)?await a(o,((c,u,i,s)=>n.call(e,t[c],c,t,s,o,r))):await a(o,((e,c,u,i)=>n(t[e],e,t,i,o,r))),t};function kn(t,n,e,r){if(!t)return;const o=z(t);return u(e)?s(o,((o,c,u,i)=>{n.call(e,t[o],o,t,i,u,r)})):s(o,((e,o,c,u)=>{n(t[e],e,t,u,c,r)})),t}async function Dn(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{let h;const d=Jn(s);if(u(i)&&s)return h=w(i)?d?n:t:nt(i)||Jt(i)?d?r:e:o?d?c:o:Wn(i)?c:d?r:e,h(i,s,f,a,l)}}const Qn=Kn(s,a,kn,_n,zn,Gn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function te(t,e=t.length){const r=[],o=(...c)=>{if(r.push(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ne(t,e=t.length){const r=[],o=(...c)=>{if(r.unshift(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ee(){}function re(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ue=v(ce);function ie(t,n){return ue.set(t,n)}function se(){re(setTimeout(ee,0),(t=>{ue.remove(t)}))}const fe=Reflect.apply;function ae(t,n,e){if(Jt(t))return fe(t,n,e)}function le(t,n){function e(...t){!1!==e.id&&ue.remove(e.id),e.id=ie((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(ue.remove(e.id),e.id=!1)},e}function he(t,n,...e){if(Jt(t))return n?t.call(n,...e):t(...e)}function de(t){return(...n)=>!t(...n)}function ge(t=0){return(...n)=>n[t]}const pe=t=>{let n;return(...e)=>(u(n)||(n=t(...e)),n)};function me(t){return t?.constructor}function we(t,n=[]){const e=me(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function ye(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=Jt(r.set);for(const[e,c]of t){const u=n(c,e,r,t);o?r.set(e,u):r[e]=u}return r}async function be(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const c=Jt(o.set);for await(const[e,r]of t){const u=await n(r,e,o,t);c?o.set(e,u):o[e]=u}return o}async function ve(t,n,e={}){if(t)return await _n(t,(async(t,r,o,c,u)=>{e[r]=await n(t,r,e,o,c,u)})),e}function Ae(t,n,e={},r,o){if(t)return u(r)?kn(t,((t,c,u,i,s)=>{e[c]=n.call(r,t,c,e,u,i,s,o)})):kn(t,((t,r,c,u,i)=>{e[r]=n(t,r,e,c,u,i,o)})),e}const Ie=Kn(it,ft,Ae,ve,ye,be);function Ee(t){return(...n)=>Ie(t,(t=>t(...n)))}async function xe(t,n){if(!t)return;return O(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function $e(t,n){if(!t)return;return j(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function Se(t,n=i){if(w(t)||qn(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function Me(t,n=i,e){if(Wn(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(w(t)||qn(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const Ce=Kn(j,O,$e,xe,Se,Me);function je(t){return n=>Ce(t,(t=>t(n)))}function Oe(t,n){return(...e)=>t(...n.map((t=>e[t])))}function Fe(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=ie((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{ue.remove(e.id),e.id=!1},e}function Le(t,n){return(...e)=>n(t,...e)}const Te=Function.prototype;function Be(t){return Te.call.bind(t)}const Ne=Object.getOwnPropertyNames,Re=Object.getOwnPropertyDescriptor,Pe=Object.defineProperty,Ue=Be(Object.hasOwnProperty),_e=Object.is;function ke(t,n){return t+n}function De(t){return t-1}function Ze(t,n){return t/n}function qe(t){return t+1}function ze(t,n){return t*n}function He(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:We}=Math;function Ge(t,n=0){return We()*(t-n)+n}function Ve(t,n){return t%n}function Je(t){return t.reduce(((t,n)=>t-n),0)}function Ke(t){return t.reduce(((t,n)=>t+n),0)}function Qe(t,n,e){return t>n&&te}const{sign:Ye}=Math;function tr(t){return 1===Ye(t)}function nr(t){return 0===t}function er(t){return!(1&~t)}function rr(t){return!(1&t)}const or=Object.entries;function cr(t){if(u(t))return or(t)}function ur(t){const n=[];return kn(t,((t,e)=>{u(t)&&n.push(e)})),n}async function ir(t,n=i,e={}){return await _n(t,(async(t,r,o,c,i)=>{const s=await n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function sr(t,n=i,e={}){return kn(t,((t,r,o,c,i)=>{const s=n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function fr(t,n,e={}){return kn(t,((t,r,o,c,u)=>{!0===n(t,r,e,o,c,u)&&(e[r]=t)})),e}async function ar(t,n,e={}){return await _n(t,(async(t,r,o,c,u)=>{!0===await n(t,r,e,o,c,u)&&(e[r]=t)})),e}function lr(t,n={}){if(t)return kn(t,((t,e)=>{n[t]=e})),n}const hr=(t,n)=>{if(t===n)return!0;const e=z(t),r=z(n);return e.length===r.length&&j(e,(e=>t[e]===n[e]))},dr=/[()[\]{}*+?^$|#.,/\\\s-]/g;function gr(t){return t.replace(dr,"\\$&")}function pr(t,n){return n?pr(it(t,gr)):RegExp(t.join("|"))}const mr=Q("RegExp"),wr=X(mr);function yr(t,n){if(!t)return{};if(w(n)){const e=pr(n);return fr(t,((t,n)=>!e.test(n)))}if(wr(n))return fr(t,((t,e)=>!n.test(e)));if(Yt(n))return fr(t,((t,e)=>e!==n));if(Qt(n)){const e=n.toString();return fr(t,((t,n)=>n!==e))}return Jt(n)?fr(t,((t,e)=>!n(t,e))):nn({},t)}const br=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e};function vr(t){if(!t)return;if(nt(t))return z(t).length;const n=t.length;if(u(n))return n;const e=t.size;return u(n)?e:z(t).length}const Ar=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Ir=t=>{const n=[],e=[];return kn(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},Er=/[ _-]+/g;function xr(t){let n="";return t.replace(Er," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const $r=/[ _-]+/g,Sr=/[ ]+/g;function Mr(t){return t.replace(/([A-Z]+)/g," $1").replace($r," ").trim().toLowerCase().replace(Sr,"-")}const Cr=/[ _-]+/g,jr=/[ ]+/g;function Or(t){return t.replace(/([A-Z]+)/g," $1").replace(Cr," ").trim().toLowerCase().replace(jr,"_")}const Fr=/[ _-]+/g;function Lr(t){return t.replace(/([A-Z]+)/g," $1").replace(Fr," ").trim().toUpperCase()}const Tr=/[ _-]+/g;function Br(t){return t.replace(/([A-Z]+)/g," $1").replace(Tr," ").trim().toLowerCase()}function Nr(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)}function Rr(t,n=1){return t[t.length-n]}function Pr(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Ur(t,n=1){return t.slice(0,-1*n)}function _r(t,n=1){return t.substring(n)}function kr(t,n,e){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),e)}const Dr=/%(?![\da-f]{2})/gi,Zr=/&/g,qr=//g,Hr=/"/g;function Wr(t){return decodeURIComponent(t.replace(Dr,(()=>"%25")))}function Gr(t){return t.replace(Zr,"&").replace(qr,"<").replace(zr,">").replace(Hr,""")}function Vr(t){return Gr(Wr(t))}const Jr=/\S+/g,Kr=/\w+/g;function Qr(t){return t.match(Jr)||[]}function Xr(t){return t.match(Kr)||[]}function Yr(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=e-n;for(;u=0&&(c=r[u]," "!==c);u--);return t.slice(0,u).trim()})(t,n,e):t}function to(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=n;for(;u0&&(c=r[u]," "!==c);u++);return t.substring(u,e).trim()})(t,n,e):t}const no=/\w+/g;function eo(t){return t[0].toUpperCase()}function ro(t){return eo(t)+_r(t)}function oo(t){return eo(t)+_r(t).toLowerCase()}function co(t){return t.replace(no,(t=>ro(t)))}function uo(t){return t.replace(no,(t=>oo(t)))}function io(t){return me(t)?.name}function so(t){return!!u(t)&&"[object Arguments]"===t.toString()}const fo=Q("Map"),ao=X(fo),lo=/Array/,ho="Array";function go(t){if(t){const n=io(t);if(lo.test(n)&&n!==ho)return!0}return!1}function po(t){return!u(t)}function mo(t,n){if(po(t)||Jt(t))return!1;if(w(t)||go(t))return!0;const e=t.length;if(!po(e)||!Qt(e)||e<0)return!1;if(n){const n=z(t);return!!n&&Ce(n,((t,n)=>n>=0&&Qt(n)))}return!0}const wo=Q("BigInt"),yo=X(wo),bo=Q("Boolean"),vo=X(bo),Ao=Q("ArrayBuffer"),Io=X(Ao);function Eo(t,n){return!(!t||!n)&&t instanceof n}const xo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function $o(t){if(u(t)){const n=t?.constructor?.name;return xo.test(n)}return!1}const So=Q("Date"),Mo=X(So);function Co(t){return Yt(t)||w(t)?!o(t):nt(t)?!vr(t):!u(t)}function jo(t){return!1===t}const Oo=Q("Float32Array"),Fo=X(Oo),Lo=Q("Float64Array"),To=X(Lo),{isInteger:Bo}=Number,No=Bo,Ro=Q("Int16Array"),Po=X(Ro),Uo=Q("Int32Array"),_o=X(Uo),ko=Q("Int8Array"),Do=X(ko);function Zo(t){return u(t)&&"function"==typeof t[Symbol.iterator]}function qo(t){return!!t&&t instanceof Promise}function zo(t){return!!t&&(qo(t)||Jn(t)||Wn(t))}function Ho(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Wo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Go(t,n){return!po(t)&&!po(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Vo}=Number,Jo=Vo;function Ko(t,n){const e=me(t),r=me(n);return e===r&&e.name===r.name}function Qo(t){return!0===t}const Xo=Q("Uint16Array"),Yo=X(Xo),tc=Q("Uint32Array"),nc=X(tc),ec=Q("Uint8Array"),rc=X(ec),oc=Q("Uint8ClampedArray"),cc=X(oc),uc=Q("WeakMap"),ic=X(uc),sc=void 0!==globalThis.Deno,fc=void 0!==globalThis.process&&process.versions&&process.versions.node;function ac(t,n=!0){return Boolean(t)&&n}function lc(t,n=!0){return!1===Boolean(t)&&n}function hc(t,n,e,r){if(u(t)){if(Jt(n))return e?ae(n,e,r):n(...r);if(nt(n))return n[e]=t,n}}function dc(t,n){return jo(et(t,n))}const gc=JSON;function pc(t,n){if(t)return gc.parse(t,n)}const mc=gc.stringify;function wc(t,n,e){const r=globalThis.options||e;let o;return Jt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${mc(t)}\n\t\tExpected: ${mc(n)}`,r)}async function yc(t,n,e){const r=await t;return!(Jt(n)&&!1===await n(r,e))&&!dc(r,n)||wc(r,n,e)}function bc(t,n,e){if(zo(t)||zo(n))return yc(t,n,e);return!(Jt(n)&&!1===n(t,e))&&!dc(t,n)||wc(t,n,e)}function vc(t,n,e){const r=Ie(t,(t=>Jt(t)?t.bind(n):t));return e?rn(e,r):r}function Ac(t){if(t){if(tt(t))return Vt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Ic=globalThis.structuredClone;function Ec(t){return Ic(t)}async function xc(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;cac(t)))}async function Sc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);u(r)&&e.push(r)}return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);u(c)&&r(c)}return o}const c=Jt(o.set);for await(const[e,r]of t){const i=await n(r,e,o,t);u(i)&&(c?o.set(e,i):o[e]=i)}return o}function Mc(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);u(c)&&o(c)}return r}const o=Jt(r.set);for(const[e,c]of t){const i=n(c,e,r,t);u(i)&&(o?r.set(e,i):r[e]=i)}return r}const Cc=Kn(f,l,sr,ir,Mc,Sc);function jc(...t){return Jn(t[0])?async function(...n){return Ce(t,(async t=>Ce(n,(async n=>t(n)))))}:function(...n){return Ce(t,(t=>Ce(n,(n=>t(n)))))}}function Oc(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=Jt(r.set);for(const[o,c]of t){!0===n(c,o,r,t)&&(e?r.set(o,c):r[o]=c)}}return r}async function Fc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=Jt(o.set);for await(const[r,c]of t){!0===await n(c,r,o,t)&&(e?o.set(r,c):o[r]=c)}}return o}const Lc=Kn(F,L,fr,ar,Oc,Fc);function Tc(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const Bc=Tc(s),Nc=Tc(M);function Rc(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const Pc=Rc(a),Uc=Rc(C);function _c(t,n){const e=we(t),r=e.push||e.add;if(r&&Jt(r)){const o=r.bind(e);t.forEach((t=>{const r=n(t,e);o(r)}))}else Jt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e}function kc(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e}function Dc(t,n,e){return!po(t)&&!po(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,e):wr(n)?n.test(t):Jt(n)?n(t):w(n)?j(n,(n=>Dc(t,n))):Ce(n,(n=>Dc(t,n))):w(t)?wr(n)?j(t,(t=>t.test(n))):Jt(n)?j(t,n):w(n)?j(n,(n=>Dc(t,n))):t.includes(n,e):!!nt(t)&&(wr(n)?$e(t,(t=>t.test(n))):Jt(n)?$e(t,n):nt(n)?$e(t,((t,e)=>t===n[e])):$e(t,(t=>Dc(t,n))))))}const Zc=Fn(/\./),qc=(t,n,e)=>(n&&!u(t[n])&&(t[n]=e),t);class zc{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Hc=v(zc);function Wc(t,n){return Hc.set(t,n)}function Gc(){re(setTimeout(ee,0),(t=>{Hc.remove(t)}))}function Vc(t,...n){return Qn(n,(n=>{Qn(n,((n,e)=>{if(t[e]&&(nt(n)||w(n)||n.forEach))return Vc(t[e],n);t[e]=n}))})),t}class Jc{static models=new Map;constructor(t,n){u(n)?(rn(this,n),this.modelName=t,Jc.models.set(t,n)):rn(this,t)}delete(t){Jc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Jc.models.set(t||this.modelName,this)}has(t){return Jc.models.has(t||this.modelName)}get(t){return Jc.models.get(t||this.modelName)}}function Kc(t,n){return u(n)?v(Jc,[t,n]):Z(t,Jc.models)}function Qc(t,n){return[t,n]}function Xc(t,n,e){const r=t.length,o=[];for(let c=0;cj(e,(e=>et(t[e],n[e])));function nu(t,n,e){return n&&nt(t)||Qt(n)&&w(t)?t[n]=e:t.set?t.set(n,e):t.push?t.push(e):t.add?t.add(e):t[n]=e,t}function eu(t,n,e){return Qt(e)&&w(t)?t[e]=n:t.push?t.push(n):t.add?t.add(n):t[e]=n,t}class ru{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;kn(t,(n=>{t[n]=new ru(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new ru(e),!0)})}}function ou(){return[]}function cu(){return!1}const uu=()=>({}),iu=()=>"",su=()=>!0;async function fu(t,n){for(let e=0;e0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const du=v(hu);class gu{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):u(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=we(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function pu(t){return new gu(t)}async function mu(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;c{vo(t)&&t&&(yu[n]=t)})),s(bu.brands,(t=>{yu[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{yu[t]=!0}))}function vu(t,n,e,r){return t.addEventListener(n,e,r),t}function Au(t,n,e,r){return t.removeEventListener(n,e,r),t}function Iu(t){return 13===t.keyCode}const Eu=document.createDocumentFragment.bind(document);function xu(t,n){return t.appendChild(n),n}function $u(t,n){return w(n)?Ar(n,it(n,(n=>t.getAttribute(n)))):(kn(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Su=/^.[\w_-]+$/,Mu=/^[A-Za-z]+$/,Cu=/\s/,ju=document.getElementsByClassName.bind(document),Ou=document.getElementsByTagName.bind(document),Fu=document.getElementById.bind(document),Lu=document.querySelector.bind(document),Tu=document.querySelectorAll.bind(document);function Bu(t){switch(t[0]){case"#":if(!Cu.test(t))return Fu(_r(t));break;case".":if(Su.test(t))return ju(_r(t));break;default:if(Mu.test(t))return Ou(t)}return Tu(t)}const Nu=document.createElement.bind(document);function Ru(t){const n=Zc(t)&&t||`${t}.js`;return(t=>Yc((n=>{vu(t,"load",n,!0),vu(t,"error",n,!0),xu(Lu("head"),t)})))($u(Nu("script"),{async:"",src:n}))}function Pu(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&vu(document,"DOMContentLoaded",t),!1)}Pu((()=>{const t=Fu("AcidLib");Ru(t&&t.getAttribute("data-index")||"/index")}));const Uu=location.protocol,_u="http:"===Uu?"ws":"wss",ku=location.hostname,Du={hardware:{cores:navigator.hardwareConcurrency},host:{name:ku,protocol:Uu,protocolSocket:_u}};function Zu(){rn(Du,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function qu(){Zu()}let zu;Pu(qu),vu(window,"load",qu,!0),vu(window,"resize",qu,!0),function(t){try{t().removeItem("TESTING"),zu=!0}catch(t){zu=!1}}((()=>localStorage));class Hu{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=pu(t)}hasLocal=zu;setItem(t,n){return this.hasLocal&&this.local.setItem(t,Yt(n)?n:mc(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return u(n)?n:!u(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}function Wu(t){return new Hu(t)}const Gu=(t,n)=>`color:${t};background:${n};`,Vu={alert:Gu("#fff","#f44336"),important:Gu("#fff","#E91E63"),notify:Gu("#fff","#651FFF"),warning:Gu("#000","#FFEA00")},Ju=(t,n)=>{const e=Yt(t)?t:mc(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Vu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Vu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},Ku=(t,n,e)=>{Vu[t]=Gu(n,e)};function Qu(t){return t&&9!==t.nodeType}function Xu(t){return!!u(t)&&"[object HTMLCollection]"===t.toString()}function Yu(t){return!!u(t)&&"[object NodeList]"===t.toString()}export{Hu as BrowserStorage,Xn as Chain,zc as Intervals,Jc as Model,ru as Store,ce as Timers,hu as UniqID,gu as VirtualStorage,ke as add,Rn as after,xu as append,ae as apply,pr as arrayToRegex,kc as arraysToObject,Pn as ary,bc as assert,yc as assertAsync,rn as assign,on as assignToClass,en as assignToObject,Un as before,vc as bindAll,Wu as browserStorage,Be as cacheNativeMethod,He as calcProgress,xr as camelCase,Yn as chain,t as chunk,Pr as chunkString,Ac as clear,n as clearArray,Vt as clearBuffer,Gc as clearIntervals,se as clearTimers,Ec as clone,e as cloneArray,we as cloneType,Ju as cnsl,Ku as cnslTheme,$c as compact,ur as compactKeys,Cc as compactMap,f as compactMapArray,l as compactMapAsyncArray,ir as compactMapAsyncObject,sr as compactMapObject,xc as concurrent,st as concurrentEachArray,Xc as concurrentStatus,v as construct,K as constructorName,un as countBy,sn as countKey,fn as countWithoutKey,Eu as createFragment,te as curry,ne as curryRight,le as debounce,De as deduct,Pe as defProp,x as difference,Ze as divide,$ as drop,S as dropRight,Qn as each,s as eachArray,a as eachAsyncArray,_n as eachAsyncObject,kn as eachObject,M as eachRight,C as eachRightAsync,A as ensureArray,Gt as ensureBuffer,nr as equalsZero,gr as escapeRegex,dr as escapeRegexRegex,vu as eventAdd,Au as eventRemove,Ce as every,jc as everyArg,j as everyArray,O as everyAsyncArray,xe as everyAsyncObject,$e as everyObject,cn as extendClass,Lc as filter,F as filterArray,L as filterAsyncArray,ar as filterAsyncObject,fr as filterObject,ln as findIndex,an as findIndexCache,hn as findItem,T as first,B as flatten,I as flattenDeep,Bc as flow,Pc as flowAsync,Uc as flowAsyncRight,Nc as flowRight,E as forEach,Dn as forEachAsync,_c as forMap,zn as forOf,Gn as forOfAsync,Mc as forOfCompactMap,Sc as forOfCompactMapAsync,Se as forOfEvery,Me as forOfEveryAsync,Oc as forOfFilter,Fc as forOfFilterAsync,ye as forOfMap,be as forOfMapAsync,Kn as generateLoop,Z as get,ju as getByClass,Fu as getById,Ou as getByTag,cr as getEntries,jn as getFileExtension,On as getFilename,yn as getHighest,pn as getLowest,Ft as getNumberInsertIndex,Re as getPropDesc,Ne as getPropNames,me as getType,io as getTypeName,bn as groupBy,Dc as has,G as hasAnyKeys,Zc as hasDot,W as hasKeys,o as hasLength,zu as hasLocal,Ue as hasProp,u as hasValue,Gr as htmlEntities,he as ifInvoke,qc as ifNotAssign,hc as ifValue,Ru as importjs,mu as inAsync,wu as inSync,qe as increment,vn as indexBy,Du as info,N as initial,Ur as initialString,Nr as insertInRange,R as intersection,Wc as interval,Hc as intervals,lr as invert,P as invokeArray,An as invokeCollection,In as invokeCollectionAsync,yu as isAgent,so as isArguments,w as isArray,Io as isArrayBuffer,Ao as isArrayBufferCall,mo as isArrayLike,Jn as isAsync,Vn as isAsyncCall,yo as isBigInt,wo as isBigIntCall,vo as isBoolean,bo as isBooleanCall,tt as isBuffer,Y as isBufferCall,Eo as isChild,$o as isCloneable,V as isConstructor,J as isConstructorFactory,Q as isConstructorNameFactory,Mo as isDate,So as isDateCall,sc as isDeno,Pu as isDocumentReady,Qu as isDom,Co as isEmpty,Iu as isEnter,et as isEqual,rr as isEven,Fo as isF32,Oo as isF32Call,To as isF64,Lo as isF64Call,jo as isFalse,lc as isFalsy,Ln as isFileCSS,Tn as isFileHTML,Bn as isFileJS,Nn as isFileJSON,No as isFloat,Jt as isFunction,Wn as isGenerator,Hn as isGeneratorCall,Xu as isHTMLCollection,Po as isI16,Ro as isI16Call,_o as isI32,Uo as isI32Call,Do as isI8,ko as isI8Call,Zo as isIterable,zo as isKindAsync,ao as isMap,fo as isMapCall,rt as isMatchArray,hr as isMatchObject,d as isNegative,Yu as isNodeList,fc as isNodejs,y as isNotArray,Xt as isNotNumber,tn as isNotString,c as isNull,Qt as isNumber,Kt as isNumberCall,xt as isNumberEqual,Qe as isNumberInRange,Xe as isNumberNotInRange,er as isOdd,Ho as isParent,nt as isPlainObject,tr as isPositive,Wo as isPrimitive,qo as isPromise,wr as isRegex,mr as isRegexCall,Go as isRelated,Jo as isSafeInt,_e as isSame,Ko as isSameType,qn as isSet,Zn as isSetCall,Yt as isString,Qo as isTrue,ac as isTruthy,X as isTypeFactory,go as isTypedArray,Yo as isU16,Xo as isU16Call,nc as isU32,tc as isU32Call,rc as isU8,cc as isU8C,oc as isU8CCall,ec as isU8Call,r as isUndefined,ic as isWeakMap,uc as isWeakMapCall,nr as isZero,pc as jsonParse,Mr as kebabCase,z as keys,ct as largest,ut as last,Br as lowerCase,Ie as map,it as mapArray,ft as mapAsyncArray,ve as mapAsyncObject,Ae as mapObject,at as mapRightArray,lt as mapWhile,Vc as merge,Kc as model,ze as multiply,de as negate,po as noValue,$u as nodeAttribute,ee as noop,dc as notEqual,ge as nthArg,nn as objectAssign,or as objectEntries,vr as objectSize,yr as omit,pe as once,Bt as onlyUnique,Ee as over,je as overEvery,Qc as pair,gt as partition,br as pick,xn as pluck,En as pluckObject,Yc as promise,tu as propertyMatch,Lu as querySelector,Tu as querySelectorAll,Ge as randomFloat,Et as randomInt,m as range,p as rangeDown,g as rangeUp,Wr as rawURLDecode,Oe as reArg,Fn as regexTestFactory,Ve as remainder,wt as remove,yt as removeBy,kr as replaceList,bt as rest,_r as restString,i as returnValue,vt as right,Rr as rightString,Ct as sample,Vr as sanitize,Zu as saveDimensions,Bu as selector,nu as setKey,eu as setValue,Mt as shuffle,Ot as smallest,Or as snakeCase,Sn as sortCollectionAlphabetically,Cn as sortCollectionAlphabeticallyReverse,wn as sortCollectionAscending,mn as sortCollectionAscendingFilter,gn as sortCollectionDescending,dn as sortCollectionDescendingFilter,dt as sortNumberAscending,mt as sortNumberDescening,$n as sortObjectsAlphabetically,Mn as sortObjectsAlphabeticallyReverse,Nt as sortUnique,mc as stringify,ou as stubArray,cu as stubFalse,uu as stubObject,iu as stubString,su as stubTrue,ht as subtract,Je as subtractAll,pt as subtractReverse,Ke as sumAll,Lt as take,Tt as takeRight,Vu as themes,Fe as throttle,ie as timer,ue as timers,re as times,fu as timesAsync,oe as timesMap,au as timesMapAsync,St as toArray,D as toPath,lu as toggle,Qr as tokenize,Yr as truncate,to as truncateRight,Wt as unZip,Ir as unZipObject,Pt as union,du as uniqID,Rt as unique,Ut as untilFalseArray,_t as untilTrueArray,qu as updateDimensions,Lr as upperCase,ro as upperFirst,co as upperFirstAll,eo as upperFirstLetter,oo as upperFirstOnly,uo as upperFirstOnlyAll,pu as virtualStorage,kt as whileCompactMap,Dt as whileEachArray,Zt as whileMapArray,qt as without,Xr as words,Le as wrap,zt as xor,Ht as zip,Ar as zipObject}; //# sourceMappingURL=index.js.map diff --git a/github/module/index.js b/github/module/index.js index d8f8b32..d9d37f6 100644 --- a/github/module/index.js +++ b/github/module/index.js @@ -1,2 +1,2 @@ -import{readdir as t,stat as n,mkdir as r,copyFile as e}from"node:fs/promises";import o from"node:path";import{fileURLToPath as u}from"node:url";import c from"path";function i(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function s(t){return t.length=0,t}function f(t){return t.slice()}function a(t){return void 0===t}function l(t){return Boolean(t.length)}function h(t){return null===t}function p(t){return!a(t)&&!h(t)}function g(t){return t}function d(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const s=n.call(e,t,u,r,c,i,o);p(s)&&r.push(s)})):d(t,((t,u,c,i)=>{const s=n(t,u,r,c,i,e,o);p(s)&&r.push(s)})),r}async function w(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const u=await n(t,e,r,o);p(u)&&r.push(u)})),r}const{sign:b}=Math;function v(t){return-1===b(t)}function A(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function E(t,n,r=1,e=[]){return v(r)?e:t{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function T(t,n=1,r=t.length){return t.splice(n,r)}const _=(t,n=1,r=t.length)=>T(t,0,r-n);function F(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function R(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function N(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function D(t,n,r=[],e){return await w(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function L(t,n){return n?t.slice(0,n):t[0]}function Z(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat($(n))),[]);return r}function k(t){return t.slice(0,t.length-1)}function q(t,...n){return m(t,(t=>{if(N(n,(n=>n.includes(t))))return t}))}function V(t,n,r){if(!t)return;const e=t.length;if(p(r))for(let o=0;o(r=r[t],p(r)))),r}const K=Object.keys;function Q(t){if(t)return K(t)}const X=Object.hasOwn;function Y(t,...n){if(t)return N(n,(n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}}))}function tt(t,...n){if(t)return Boolean(n.find((n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}})))}function nt(t,n){return t?.constructor===n||!1}function rt(t){return n=>nt(n,t)}function et(t){return t?.constructor?.name}function ot(t){return n=>et(n)===t||!1}function ut(t){return function(n,...r){return r?t(n)&&N(r,t):t(n)}}const ct=ot("Buffer"),it=ut(ct),st=t=>!!p(t)&&"Object("===t.constructor.toString().trim().slice(9,16),ft=(t,n)=>{if(t===n)return!0;if(it(t))return t.equals(n);if(t.toString()===n.toString())if(st(t)){const r=Q(t);if(Y(n,r))return N(r,(r=>ft(t[r],n[r])))}else if(j(t)&&t.length===n.length)return N(t,((t,r)=>ft(t,n[r])));return!1};function at(t,n){return t.length===n.length&&N(t,((t,r)=>ft(n[r],t)))}const lt=Math.max;function ht(t){return lt(...t)}function pt(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function gt(t,n,r=[],e,o){return p(e)?d(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):d(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function dt(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function wt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function yt(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function It(t,n){return n-t}function Et(t){return t.sort(It)}function jt(t,n){let r=t.length;for(let e=0;er)return Ft(t);if(1===n)return[t[St(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Dt(t,n=1){return t.slice(0,n)}function Lt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Zt(t,n,r){return r.indexOf(t)===n}function kt(t,n,r){return t!==r[n-1]}function qt(t,n){return n?t.filter(kt):t.filter(Zt)}function Vt(...t){return qt(C(t))}function zt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Qt(...t){const n=O(Map),r=[];return 2===t.length?B(t[0],t[1]):(d(t,((t,r)=>{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&r.push(t.child)})),r)}function Xt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Yt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function tn(t){return it(t)&&t||p(t)&&Buffer.from(t)||Buffer.alloc(0)}function nn(t){return t.fill(0),t}const rn=t=>!!p(t)&&t instanceof Function,en=ot("Number"),on=ut(en);function un(t){return!on(t)}const cn=rt(String);function sn(t){return!cn(t)}const fn=Object.assign;function an(t,n){if(st(n))fn(t,n);else if(rn(n)){const r=n.name;r?t[r]=n:fn(t,n)}else(cn(n)||on(n))&&(t[n]=n);return t}function ln(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function dn(t,n){let r=0;return d(t,(t=>{t[n]&&r++})),r}function mn(t,n){let r=0;return d(t,(t=>{t[n]||r++})),r}function wn(t,n,r,e,o){if(t[o]===e)return!0}function yn(t,n,r="id"){const e=t.findIndex(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function bn(t,n,r="id"){const e=t.find(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function vn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function An(t,n="id",r){return t.sort(((t,e)=>vn(t,e,n,r)))}function In(t,n){return An(t,n,!1)[0]}function En(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function jn(t,n="id",r){return t.sort(((t,e)=>En(t,e,n,r)))}function Mn(t,n="id"){return jn(t,n)[0]}function xn(t,n){const r={};return d(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function On(t,n="id"){const r={};return d(t,(t=>{r[t[n]]=t})),r}function $n(t,n,r,e){return gt(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function Cn(t,n,r,e){return mt(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function Sn(t,n){if(t)return cn(n)?t[n]:gt(n,(n=>t[n]))}function Bn(t,n){return gt(t,(t=>Sn(t,n)))}function Tn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function _n(t,n="id",r){return t.sort(((t,e)=>Tn(t,e,n,r)))}function Fn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function Rn(t,n="id",r){return t.sort(((t,e)=>Fn(t,e,n,r)))}function Nn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Pn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Un(t){return n=>!!p(n)&&t.test(n)}const Dn=Un(/\.css$/),Ln=Un(/\.html$/),Zn=Un(/\.js$/),kn=Un(/\.json$/);function qn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Vn(t,n){return(...r)=>t(...r.splice(0,n))}function zn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const Gn=async(t,n,r,e)=>{if(!t)return;const o=Q(t);return p(r)?await w(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await w(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Jn(t,n,r,e){if(!t)return;const o=Q(t);return p(r)?d(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):d(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Wn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let l;const h=rr(i);if(p(c)&&i)return l=j(c)?h?n:t:st(c)||rn(c)?h?e:r:o?h?u:o:Yn(c)?u:h?e:r,l(c,i,s,f,a)}}const or=er(d,w,Jn,Gn,Qn,tr);class ur{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;or(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function cr(t){return O(ur,[t])}function ir(t,n=t.length){const r=[],e=(...o)=>{if(r.push(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function sr(t,n=t.length){const r=[],e=(...o)=>{if(r.unshift(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function fr(){}function ar(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=O(hr);function gr(t,n){return pr.set(t,n)}function dr(){ar(setTimeout(fr,0),(t=>{pr.remove(t)}))}const mr=Reflect.apply;function wr(t,n,r){if(rn(t))return mr(t,n,r)}function yr(t,n){function r(...t){!1!==r.id&&pr.remove(r.id),r.id=gr((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(pr.remove(r.id),r.id=!1)},r}function br(t,n,...r){if(rn(t))return n?t.call(n,...r):t(...r)}function vr(t){return(...n)=>!t(...n)}function Ar(t=0){return(...n)=>n[t]}const Ir=t=>{let n;return(...r)=>(p(n)||(n=t(...r)),n)};function Er(t){return t?.constructor}function jr(t,n=[]){const r=Er(t);return r===Function&&"function"===r.name?function(){}:O(r,n)}function Mr(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function xr(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function Or(t,n,r={}){if(t)return await Gn(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function $r(t,n,r={},e,o){if(t)return p(e)?Jn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Jn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Cr=er(gt,mt,$r,Or,Mr,xr);function Sr(t){return(...n)=>Cr(t,(t=>t(...n)))}async function Br(t,n){if(!t)return;return P(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Tr(t,n){if(!t)return;return N(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function _r(t,n=g){if(j(t)||Kn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function Fr(t,n=g,r){if(Yn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(j(t)||Kn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const Rr=er(N,P,Tr,Br,_r,Fr);function Nr(t){return n=>Rr(t,(t=>t(n)))}function Pr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Ur(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=gr((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{pr.remove(r.id),r.id=!1},r}function Dr(t,n){return(...r)=>n(t,...r)}const Lr=Function.prototype;function Zr(t){return Lr.call.bind(t)}const kr=Object.getOwnPropertyNames,qr=Object.getOwnPropertyDescriptor,Vr=Object.defineProperty,zr=Zr(Object.hasOwnProperty),Gr=Object.is;function Jr(t,n){return t+n}function Wr(t){return t-1}function Hr(t,n){return t/n}function Kr(t){return t+1}function Qr(t,n){return t*n}function Xr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Yr}=Math;function te(t,n=0){return Yr()*(t-n)+n}function ne(t,n){return t%n}function re(t){return t.reduce(((t,n)=>t-n),0)}function ee(t){return t.reduce(((t,n)=>t+n),0)}function oe(t,n,r){return t>n&&tr}const{sign:ce}=Math;function ie(t){return 1===ce(t)}function se(t){return 0===t}const fe=Object.entries;function ae(t){if(p(t))return fe(t)}function le(t){const n=[];return Jn(t,((t,r)=>{p(t)&&n.push(r)})),n}async function he(t,n=g,r={}){return await Gn(t,(async(t,e,o,u,c)=>{const i=await n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function pe(t,n=g,r={}){return Jn(t,((t,e,o,u,c)=>{const i=n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function ge(t,n,r={}){return Jn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function de(t,n,r={}){return await Gn(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function me(t,n={}){if(t)return Jn(t,((t,r)=>{n[t]=r})),n}const we=(t,n)=>{if(t===n)return!0;const r=Q(t),e=Q(n);return r.length===e.length&&N(r,(r=>t[r]===n[r]))},ye=/[()[\]{}*+?^$|#.,/\\\s-]/g;function be(t){return t.replace(ye,"\\$&")}function ve(t,n){return n?ve(gt(t,be)):RegExp(t.join("|"))}const Ae=ot("RegExp"),Ie=ut(Ae);function Ee(t,n){if(!t)return{};if(j(n)){const r=ve(n);return ge(t,((t,n)=>!r.test(n)))}if(Ie(n))return ge(t,((t,r)=>!n.test(r)));if(cn(n))return ge(t,((t,r)=>r!==n));if(on(n)){const r=n.toString();return ge(t,((t,n)=>n!==r))}return rn(n)?ge(t,((t,r)=>!n(t,r))):fn({},t)}const je=(t,n,r={})=>{if(t)return d(n,(n=>{r[n]=t[n]})),r};function Me(t){if(!t)return;if(st(t))return Q(t).length;const n=t.length;if(p(n))return n;const r=t.size;return p(n)?r:Q(t).length}const xe=(t,n)=>{const r={};return d(t,((t,e)=>{r[t]=n[e]})),r},Oe=t=>{const n=[],r=[];return Jn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},$e=/[ _-]+/g;function Ce(t){let n="";return t.replace($e," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Se=/[ _-]+/g,Be=/[ ]+/g;function Te(t){return t.replace(/([A-Z]+)/g," $1").replace(Se," ").trim().toLowerCase().replace(Be,"-")}const _e=/[ _-]+/g,Fe=/[ ]+/g;function Re(t){return t.replace(/([A-Z]+)/g," $1").replace(_e," ").trim().toLowerCase().replace(Fe,"_")}const Ne=/[ _-]+/g;function Pe(t){return t.replace(/([A-Z]+)/g," $1").replace(Ne," ").trim().toUpperCase()}const Ue=/[ _-]+/g;function De(t){return t.replace(/([A-Z]+)/g," $1").replace(Ue," ").trim().toLowerCase()}function Le(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Ze(t,n=1){return t[t.length-n]}function ke(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function qe(t,n=1){return t.slice(0,-1*n)}function Ve(t,n=1){return t.substring(n)}function ze(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const Ge=/%(?![\da-f]{2})/gi,Je=/&/g,We=//g,Ke=/"/g;function Qe(t){return decodeURIComponent(t.replace(Ge,(()=>"%25")))}function Xe(t){return t.replace(Je,"&").replace(We,"<").replace(He,">").replace(Ke,""")}function Ye(t){return Xe(Qe(t))}const to=/\S+/g,no=/\w+/g;function ro(t){return t.match(to)||[]}function eo(t){return t.match(no)||[]}function oo(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function uo(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const co=/\w+/g;function io(t){return t[0].toUpperCase()}function so(t){return io(t)+Ve(t)}function fo(t){return io(t)+Ve(t).toLowerCase()}function ao(t){return t.replace(co,(t=>so(t)))}function lo(t){return t.replace(co,(t=>fo(t)))}function ho(t){return Er(t)?.name}function po(t){return!!p(t)&&"[object Arguments]"===t.toString()}const go=ot("Map"),mo=ut(go),wo=/Array/,yo="Array";function bo(t){if(t){const n=ho(t);if(wo.test(n)&&n!==yo)return!0}return!1}function vo(t){return!p(t)}function Ao(t,n){if(vo(t)||rn(t))return!1;if(j(t)||bo(t))return!0;const r=t.length;if(!vo(r)||!on(r)||r<0)return!1;if(n){const n=Q(t);return!!n&&Rr(n,((t,n)=>n>=0&&on(n)))}return!0}const Io=ot("BigInt"),Eo=ut(Io),jo=ot("Boolean"),Mo=ut(jo),xo=ot("ArrayBuffer"),Oo=ut(xo);function $o(t,n){return!(!t||!n)&&t instanceof n}const Co=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function So(t){if(p(t)){const n=t?.constructor?.name;return Co.test(n)}return!1}const Bo=ot("Date"),To=ut(Bo);function _o(t){return cn(t)||j(t)?!l(t):st(t)?!Me(t):!p(t)}function Fo(t){return!1===t}const Ro=ot("Float32Array"),No=ut(Ro),Po=ot("Float64Array"),Uo=ut(Po),{isInteger:Do}=Number,Lo=Do,Zo=ot("Int16Array"),ko=ut(Zo),qo=ot("Int32Array"),Vo=ut(qo),zo=ot("Int8Array"),Go=ut(zo);function Jo(t){return p(t)&&"function"==typeof t[Symbol.iterator]}function Wo(t){return!!t&&t instanceof Promise}function Ho(t){return!!t&&(Wo(t)||rr(t)||Yn(t))}function Ko(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Qo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Xo(t,n){return!vo(t)&&!vo(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Yo}=Number,tu=Yo;function nu(t,n){const r=Er(t),e=Er(n);return r===e&&r.name===e.name}function ru(t){return!0===t}const eu=ot("Uint16Array"),ou=ut(eu),uu=ot("Uint32Array"),cu=ut(uu),iu=ot("Uint8Array"),su=ut(iu),fu=ot("Uint8ClampedArray"),au=ut(fu),lu=ot("WeakMap"),hu=ut(lu),pu=void 0!==globalThis.Deno,gu=void 0!==globalThis.process&&process.versions&&process.versions.node;function du(t,n=!0){return Boolean(t)&&n}function mu(t,n=!0){return!1===Boolean(t)&&n}function wu(t,n,r,e){if(p(t)){if(rn(n))return r?wr(n,r,e):n(...e);if(st(n))return n[r]=t,n}}function yu(t,n){return Fo(ft(t,n))}const bu=JSON;function vu(t,n){if(t)return bu.parse(t,n)}const Au=bu.stringify;function Iu(t,n,r){const e=globalThis.options||r;let o;return rn(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Au(t)}\n\t\tExpected: ${Au(n)}`,e)}async function Eu(t,n,r){const e=await t;return!(rn(n)&&!1===await n(e,r))&&!yu(e,n)||Iu(e,n,r)}function ju(t,n,r){if(Ho(t)||Ho(n))return Eu(t,n,r);return!(rn(n)&&!1===n(t,r))&&!yu(t,n)||Iu(t,n,r)}function Mu(t,n,r){const e=Cr(t,(t=>rn(t)?t.bind(n):t));return r?ln(r,e):e}function xu(t){if(t){if(it(t))return nn(t);if(j(t))return s(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Ou=globalThis.structuredClone;function $u(t){return Ou(t)}async function Cu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;udu(t)))}async function Bu(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);p(e)&&r.push(e)}return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);p(u)&&e(u)}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);p(c)&&(u?o.set(r,c):o[r]=c)}return o}function Tu(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);p(u)&&o(u)}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);p(c)&&(o?e.set(r,c):e[r]=c)}return e}const _u=er(m,y,pe,he,Tu,Bu);function Fu(...t){return rr(t[0])?async function(...n){return Rr(t,(async t=>Rr(n,(async n=>t(n)))))}:function(...n){return Rr(t,(t=>Rr(n,(n=>t(n)))))}}function Ru(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=rn(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Nu(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=rn(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Pu=er(U,D,ge,de,Ru,Nu);function Uu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Du=Uu(d),Lu=Uu(F);function Zu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const ku=Zu(w),qu=Zu(R);function Vu(t,n){const r=jr(t),e=r.push||r.add;if(e&&rn(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else rn(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function zu(t,n){const r={};return d(t,((t,e)=>{r[n[e]]=t})),r}function Gu(t,n,r){return!vo(t)&&!vo(n)&&(t===n||(cn(t)?cn(n)?t.includes(n,r):Ie(n)?n.test(t):rn(n)?n(t):j(n)?N(n,(n=>Gu(t,n))):Rr(n,(n=>Gu(t,n))):j(t)?Ie(n)?N(t,(t=>t.test(n))):rn(n)?N(t,n):j(n)?N(n,(n=>Gu(t,n))):t.includes(n,r):!!st(t)&&(Ie(n)?Tr(t,(t=>t.test(n))):rn(n)?Tr(t,n):st(n)?Tr(t,((t,r)=>t===n[r])):Tr(t,(t=>Gu(t,n))))))}const Ju=Un(/\./),Wu=(t,n,r)=>(n&&!p(t[n])&&(t[n]=r),t);class Hu{list=O(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ku=O(Hu);function Qu(t,n){return Ku.set(t,n)}function Xu(){ar(setTimeout(fr,0),(t=>{Ku.remove(t)}))}function Yu(t,...n){return or(n,(n=>{or(n,((n,r)=>{if(t[r]&&(st(n)||j(n)||n.forEach))return Yu(t[r],n);t[r]=n}))})),t}class tc{static models=new Map;constructor(t,n){p(n)?(ln(this,n),this.modelName=t,tc.models.set(t,n)):ln(this,t)}delete(t){tc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),tc.models.set(t||this.modelName,this)}has(t){return tc.models.has(t||this.modelName)}get(t){return tc.models.get(t||this.modelName)}}function nc(t,n){return p(n)?O(tc,[t,n]):H(t,tc.models)}function rc(t,n){return[t,n]}function ec(t,n,r){const e=t.length,o=[];for(let u=0;uN(r,(r=>ft(t[r],n[r])));function cc(t,n,r){return n&&st(t)||on(n)&&j(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function ic(t,n,r){return on(r)&&j(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class sc{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Jn(t,(n=>{t[n]=new sc(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new sc(r),!0)})}}function fc(){return[]}function ac(){return!1}const lc=()=>({}),hc=()=>"",pc=()=>!0;async function gc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const yc=O(wc);class bc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):p(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=jr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function vc(t){return new bc(t)}async function Ac(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{const i=o.join(u,t);if((await n(i)).isDirectory()){const n=o.join(c,t.replace(u,""));await r(n,{recursive:!0}),await Ec(i,n)}else await async function(t,n,r){const u=o.join(t,r),c=o.join(n,r);await e(u,c)}(u,c,t)})),!0}function jc(t){return globalThis.__filename?__filename:u(t.url)}function Mc(t){return globalThis.__dirname?__dirname:c.dirname(u(t.url))}export{ur as Chain,Hu as Intervals,tc as Model,sc as Store,hr as Timers,wc as UniqID,bc as VirtualStorage,Jr as add,qn as after,wr as apply,ve as arrayToRegex,zu as arraysToObject,Vn as ary,ju as assert,Eu as assertAsync,ln as assign,hn as assignToClass,an as assignToObject,zn as before,Mu as bindAll,Zr as cacheNativeMethod,Xr as calcProgress,Ce as camelCase,cr as chain,i as chunk,ke as chunkString,xu as clear,s as clearArray,nn as clearBuffer,Xu as clearIntervals,dr as clearTimers,$u as clone,f as cloneArray,jr as cloneType,Su as compact,le as compactKeys,_u as compactMap,m as compactMapArray,y as compactMapAsyncArray,he as compactMapAsyncObject,pe as compactMapObject,Cu as concurrent,dt as concurrentEachArray,ec as concurrentStatus,O as construct,et as constructorName,Ec as copyFolder,gn as countBy,dn as countKey,mn as countWithoutKey,jc as currentFile,Mc as currentPath,ir as curry,sr as curryRight,yr as debounce,Wr as deduct,Vr as defProp,B as difference,Hr as divide,T as drop,_ as dropRight,or as each,d as eachArray,w as eachAsyncArray,Gn as eachAsyncObject,Jn as eachObject,F as eachRight,R as eachRightAsync,$ as ensureArray,tn as ensureBuffer,se as equalsZero,be as escapeRegex,ye as escapeRegexRegex,Rr as every,Fu as everyArg,N as everyArray,P as everyAsyncArray,Br as everyAsyncObject,Tr as everyObject,pn as extendClass,Pu as filter,U as filterArray,D as filterAsyncArray,de as filterAsyncObject,ge as filterObject,yn as findIndex,wn as findIndexCache,bn as findItem,L as first,Z as flatten,C as flattenDeep,Du as flow,ku as flowAsync,qu as flowAsyncRight,Lu as flowRight,S as forEach,Wn as forEachAsync,Vu as forMap,Qn as forOf,tr as forOfAsync,Tu as forOfCompactMap,Bu as forOfCompactMapAsync,_r as forOfEvery,Fr as forOfEveryAsync,Ru as forOfFilter,Nu as forOfFilterAsync,Mr as forOfMap,xr as forOfMapAsync,er as generateLoop,H as get,ae as getEntries,Nn as getFileExtension,Pn as getFilename,Mn as getHighest,In as getLowest,Ut as getNumberInsertIndex,qr as getPropDesc,kr as getPropNames,Er as getType,ho as getTypeName,xn as groupBy,Gu as has,tt as hasAnyKeys,Ju as hasDot,Y as hasKeys,l as hasLength,zr as hasProp,p as hasValue,Xe as htmlEntities,br as ifInvoke,Wu as ifNotAssign,wu as ifValue,Ac as inAsync,Ic as inSync,Kr as increment,On as indexBy,k as initial,qe as initialString,Le as insertInRange,q as intersection,Qu as interval,Ku as intervals,me as invert,V as invokeArray,$n as invokeCollection,Cn as invokeCollectionAsync,po as isArguments,j as isArray,Oo as isArrayBuffer,xo as isArrayBufferCall,Ao as isArrayLike,rr as isAsync,nr as isAsyncCall,Eo as isBigInt,Io as isBigIntCall,Mo as isBoolean,jo as isBooleanCall,it as isBuffer,ct as isBufferCall,$o as isChild,So as isCloneable,nt as isConstructor,rt as isConstructorFactory,ot as isConstructorNameFactory,To as isDate,Bo as isDateCall,pu as isDeno,_o as isEmpty,ft as isEqual,No as isF32,Ro as isF32Call,Uo as isF64,Po as isF64Call,Fo as isFalse,mu as isFalsy,Dn as isFileCSS,Ln as isFileHTML,Zn as isFileJS,kn as isFileJSON,Lo as isFloat,rn as isFunction,Yn as isGenerator,Xn as isGeneratorCall,ko as isI16,Zo as isI16Call,Vo as isI32,qo as isI32Call,Go as isI8,zo as isI8Call,Jo as isIterable,Ho as isKindAsync,mo as isMap,go as isMapCall,at as isMatchArray,we as isMatchObject,v as isNegative,gu as isNodejs,M as isNotArray,un as isNotNumber,sn as isNotString,h as isNull,on as isNumber,en as isNumberCall,Bt as isNumberEqual,oe as isNumberInRange,ue as isNumberNotInRange,Ko as isParent,st as isPlainObject,ie as isPositive,Qo as isPrimitive,Wo as isPromise,Ie as isRegex,Ae as isRegexCall,Xo as isRelated,tu as isSafeInt,Gr as isSame,nu as isSameType,Kn as isSet,Hn as isSetCall,cn as isString,ru as isTrue,du as isTruthy,ut as isTypeFactory,bo as isTypedArray,ou as isU16,eu as isU16Call,cu as isU32,uu as isU32Call,su as isU8,au as isU8C,fu as isU8CCall,iu as isU8Call,a as isUndefined,hu as isWeakMap,lu as isWeakMapCall,se as isZero,vu as jsonParse,Te as kebabCase,Q as keys,ht as largest,pt as last,De as lowerCase,Cr as map,gt as mapArray,mt as mapAsyncArray,Or as mapAsyncObject,$r as mapObject,wt as mapRightArray,yt as mapWhile,Yu as merge,nc as model,Qr as multiply,vr as negate,vo as noValue,fr as noop,yu as notEqual,Ar as nthArg,fn as objectAssign,fe as objectEntries,Me as objectSize,Ee as omit,Ir as once,Zt as onlyUnique,Sr as over,Nr as overEvery,rc as pair,At as partition,je as pick,Bn as pluck,Sn as pluckObject,oc as promise,uc as propertyMatch,te as randomFloat,St as randomInt,E as range,I as rangeDown,A as rangeUp,Qe as rawURLDecode,Pr as reArg,Un as regexTestFactory,ne as remainder,jt as remove,Mt as removeBy,ze as replaceList,xt as rest,Ve as restString,g as returnValue,Ot as right,Ze as rightString,Rt as sample,Ye as sanitize,cc as setKey,ic as setValue,Ft as shuffle,Pt as smallest,Re as snakeCase,_n as sortCollectionAlphabetically,Rn as sortCollectionAlphabeticallyReverse,jn as sortCollectionAscending,En as sortCollectionAscendingFilter,An as sortCollectionDescending,vn as sortCollectionDescendingFilter,vt as sortNumberAscending,Et as sortNumberDescening,Tn as sortObjectsAlphabetically,Fn as sortObjectsAlphabeticallyReverse,kt as sortUnique,Au as stringify,fc as stubArray,ac as stubFalse,lc as stubObject,hc as stubString,pc as stubTrue,bt as subtract,re as subtractAll,It as subtractReverse,ee as sumAll,Dt as take,Lt as takeRight,Ur as throttle,gr as timer,pr as timers,ar as times,gc as timesAsync,lr as timesMap,dc as timesMapAsync,_t as toArray,W as toPath,mc as toggle,ro as tokenize,oo as truncate,uo as truncateRight,Yt as unZip,Oe as unZipObject,Vt as union,yc as uniqID,qt as unique,zt as untilFalseArray,Gt as untilTrueArray,Pe as upperCase,so as upperFirst,ao as upperFirstAll,io as upperFirstLetter,fo as upperFirstOnly,lo as upperFirstOnlyAll,vc as virtualStorage,Jt as whileCompactMap,Wt as whileEachArray,Ht as whileMapArray,Kt as without,eo as words,Dr as wrap,Qt as xor,Xt as zip,xe as zipObject}; +import{readdir as t,stat as n,mkdir as r,copyFile as e}from"node:fs/promises";import o from"node:path";import{fileURLToPath as u}from"node:url";import c from"path";function i(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function s(t){return t.length=0,t}function f(t){return t.slice()}function a(t){return void 0===t}function l(t){return Boolean(t.length)}function h(t){return null===t}function p(t){return!a(t)&&!h(t)}function g(t){return t}function d(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const s=n.call(e,t,u,r,c,i,o);p(s)&&r.push(s)})):d(t,((t,u,c,i)=>{const s=n(t,u,r,c,i,e,o);p(s)&&r.push(s)})),r}async function w(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const u=await n(t,e,r,o);p(u)&&r.push(u)})),r}const{sign:b}=Math;function v(t){return-1===b(t)}function A(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function E(t,n,r=1,e=[]){return v(r)?e:t{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function T(t,n=1,r=t.length){return t.splice(n,r)}const _=(t,n=1,r=t.length)=>T(t,0,r-n);function F(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function R(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function N(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function D(t,n,r=[],e){return await w(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function L(t,n){return n?t.slice(0,n):t[0]}function Z(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat($(n))),[]);return r}function k(t){return t.slice(0,t.length-1)}function q(t,...n){return m(t,(t=>{if(N(n,(n=>n.includes(t))))return t}))}function V(t,n,r){if(!t)return;const e=t.length;if(p(r))for(let o=0;o(r=r[t],p(r)))),r}const K=Object.keys;function Q(t){if(t)return K(t)}const X=Object.hasOwn;function Y(t,...n){if(t)return N(n,(n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}}))}function tt(t,...n){if(t)return Boolean(n.find((n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}})))}function nt(t,n){return t?.constructor===n||!1}function rt(t){return n=>nt(n,t)}function et(t){return t?.constructor?.name}function ot(t){return n=>et(n)===t||!1}function ut(t){return function(n,...r){return r?t(n)&&N(r,t):t(n)}}const ct=ot("Buffer"),it=ut(ct),st=t=>!!p(t)&&"Object("===t.constructor.toString().trim().slice(9,16),ft=(t,n)=>{if(t===n)return!0;if(it(t))return t.equals(n);if(t.toString()===n.toString())if(st(t)){const r=Q(t);if(Y(n,r))return N(r,(r=>ft(t[r],n[r])))}else if(j(t)&&t.length===n.length)return N(t,((t,r)=>ft(t,n[r])));return!1};function at(t,n){return t.length===n.length&&N(t,((t,r)=>ft(n[r],t)))}const lt=Math.max;function ht(t){return lt(...t)}function pt(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function gt(t,n,r=[],e,o){return p(e)?d(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):d(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function dt(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function wt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function yt(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function It(t,n){return n-t}function Et(t){return t.sort(It)}function jt(t,n){let r=t.length;for(let e=0;er)return Ft(t);if(1===n)return[t[St(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Dt(t,n=1){return t.slice(0,n)}function Lt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Zt(t,n,r){return r.indexOf(t)===n}function kt(t,n,r){return t!==r[n-1]}function qt(t,n){return n?t.filter(kt):t.filter(Zt)}function Vt(...t){return qt(C(t))}function zt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Qt(...t){const n=O(Map),r=[];return 2===t.length?B(t[0],t[1]):(d(t,((t,r)=>{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&r.push(t.child)})),r)}function Xt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Yt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function tn(t){return it(t)&&t||p(t)&&Buffer.from(t)||Buffer.alloc(0)}function nn(t){return t.fill(0),t}const rn=t=>!!p(t)&&t instanceof Function,en=ot("Number"),on=ut(en);function un(t){return!on(t)}const cn=rt(String);function sn(t){return!cn(t)}const fn=Object.assign;function an(t,n){if(st(n))fn(t,n);else if(rn(n)){const r=n.name;r?t[r]=n:fn(t,n)}else(cn(n)||on(n))&&(t[n]=n);return t}function ln(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function dn(t,n){let r=0;return d(t,(t=>{t[n]&&r++})),r}function mn(t,n){let r=0;return d(t,(t=>{t[n]||r++})),r}function wn(t,n,r,e,o){if(t[o]===e)return!0}function yn(t,n,r="id"){const e=t.findIndex(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function bn(t,n,r="id"){const e=t.find(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function vn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function An(t,n="id",r){return t.sort(((t,e)=>vn(t,e,n,r)))}function In(t,n){return An(t,n,!1)[0]}function En(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function jn(t,n="id",r){return t.sort(((t,e)=>En(t,e,n,r)))}function Mn(t,n="id"){return jn(t,n)[0]}function xn(t,n){const r={};return d(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function On(t,n="id"){const r={};return d(t,(t=>{r[t[n]]=t})),r}function $n(t,n,r,e){return gt(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function Cn(t,n,r,e){return mt(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function Sn(t,n){if(t)return cn(n)?t[n]:gt(n,(n=>t[n]))}function Bn(t,n){return gt(t,(t=>Sn(t,n)))}function Tn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function _n(t,n="id",r){return t.sort(((t,e)=>Tn(t,e,n,r)))}function Fn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function Rn(t,n="id",r){return t.sort(((t,e)=>Fn(t,e,n,r)))}function Nn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Pn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Un(t){return n=>!!p(n)&&t.test(n)}const Dn=Un(/\.css$/),Ln=Un(/\.html$/),Zn=Un(/\.js$/),kn=Un(/\.json$/);function qn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Vn(t,n){return(...r)=>t(...r.splice(0,n))}function zn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const Gn=async(t,n,r,e)=>{if(!t)return;const o=Q(t);return p(r)?await w(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await w(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Jn(t,n,r,e){if(!t)return;const o=Q(t);return p(r)?d(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):d(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Wn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let l;const h=rr(i);if(p(c)&&i)return l=j(c)?h?n:t:st(c)||rn(c)?h?e:r:o?h?u:o:Yn(c)?u:h?e:r,l(c,i,s,f,a)}}const or=er(d,w,Jn,Gn,Qn,tr);class ur{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;or(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function cr(t){return O(ur,[t])}function ir(t,n=t.length){const r=[],e=(...o)=>{if(r.push(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function sr(t,n=t.length){const r=[],e=(...o)=>{if(r.unshift(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function fr(){}function ar(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=O(hr);function gr(t,n){return pr.set(t,n)}function dr(){ar(setTimeout(fr,0),(t=>{pr.remove(t)}))}const mr=Reflect.apply;function wr(t,n,r){if(rn(t))return mr(t,n,r)}function yr(t,n){function r(...t){!1!==r.id&&pr.remove(r.id),r.id=gr((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(pr.remove(r.id),r.id=!1)},r}function br(t,n,...r){if(rn(t))return n?t.call(n,...r):t(...r)}function vr(t){return(...n)=>!t(...n)}function Ar(t=0){return(...n)=>n[t]}const Ir=t=>{let n;return(...r)=>(p(n)||(n=t(...r)),n)};function Er(t){return t?.constructor}function jr(t,n=[]){const r=Er(t);return r===Function&&"function"===r.name?function(){}:O(r,n)}function Mr(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function xr(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function Or(t,n,r={}){if(t)return await Gn(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function $r(t,n,r={},e,o){if(t)return p(e)?Jn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Jn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Cr=er(gt,mt,$r,Or,Mr,xr);function Sr(t){return(...n)=>Cr(t,(t=>t(...n)))}async function Br(t,n){if(!t)return;return P(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Tr(t,n){if(!t)return;return N(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function _r(t,n=g){if(j(t)||Kn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function Fr(t,n=g,r){if(Yn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(j(t)||Kn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const Rr=er(N,P,Tr,Br,_r,Fr);function Nr(t){return n=>Rr(t,(t=>t(n)))}function Pr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Ur(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=gr((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{pr.remove(r.id),r.id=!1},r}function Dr(t,n){return(...r)=>n(t,...r)}const Lr=Function.prototype;function Zr(t){return Lr.call.bind(t)}const kr=Object.getOwnPropertyNames,qr=Object.getOwnPropertyDescriptor,Vr=Object.defineProperty,zr=Zr(Object.hasOwnProperty),Gr=Object.is;function Jr(t,n){return t+n}function Wr(t){return t-1}function Hr(t,n){return t/n}function Kr(t){return t+1}function Qr(t,n){return t*n}function Xr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Yr}=Math;function te(t,n=0){return Yr()*(t-n)+n}function ne(t,n){return t%n}function re(t){return t.reduce(((t,n)=>t-n),0)}function ee(t){return t.reduce(((t,n)=>t+n),0)}function oe(t,n,r){return t>n&&tr}const{sign:ce}=Math;function ie(t){return 1===ce(t)}function se(t){return 0===t}function fe(t){return!(1&~t)}function ae(t){return!(1&t)}const le=Object.entries;function he(t){if(p(t))return le(t)}function pe(t){const n=[];return Jn(t,((t,r)=>{p(t)&&n.push(r)})),n}async function ge(t,n=g,r={}){return await Gn(t,(async(t,e,o,u,c)=>{const i=await n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function de(t,n=g,r={}){return Jn(t,((t,e,o,u,c)=>{const i=n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function me(t,n,r={}){return Jn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function we(t,n,r={}){return await Gn(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function ye(t,n={}){if(t)return Jn(t,((t,r)=>{n[t]=r})),n}const be=(t,n)=>{if(t===n)return!0;const r=Q(t),e=Q(n);return r.length===e.length&&N(r,(r=>t[r]===n[r]))},ve=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Ae(t){return t.replace(ve,"\\$&")}function Ie(t,n){return n?Ie(gt(t,Ae)):RegExp(t.join("|"))}const Ee=ot("RegExp"),je=ut(Ee);function Me(t,n){if(!t)return{};if(j(n)){const r=Ie(n);return me(t,((t,n)=>!r.test(n)))}if(je(n))return me(t,((t,r)=>!n.test(r)));if(cn(n))return me(t,((t,r)=>r!==n));if(on(n)){const r=n.toString();return me(t,((t,n)=>n!==r))}return rn(n)?me(t,((t,r)=>!n(t,r))):fn({},t)}const xe=(t,n,r={})=>{if(t)return d(n,(n=>{r[n]=t[n]})),r};function Oe(t){if(!t)return;if(st(t))return Q(t).length;const n=t.length;if(p(n))return n;const r=t.size;return p(n)?r:Q(t).length}const $e=(t,n)=>{const r={};return d(t,((t,e)=>{r[t]=n[e]})),r},Ce=t=>{const n=[],r=[];return Jn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Se=/[ _-]+/g;function Be(t){let n="";return t.replace(Se," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Te=/[ _-]+/g,_e=/[ ]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Te," ").trim().toLowerCase().replace(_e,"-")}const Re=/[ _-]+/g,Ne=/[ ]+/g;function Pe(t){return t.replace(/([A-Z]+)/g," $1").replace(Re," ").trim().toLowerCase().replace(Ne,"_")}const Ue=/[ _-]+/g;function De(t){return t.replace(/([A-Z]+)/g," $1").replace(Ue," ").trim().toUpperCase()}const Le=/[ _-]+/g;function Ze(t){return t.replace(/([A-Z]+)/g," $1").replace(Le," ").trim().toLowerCase()}function ke(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function qe(t,n=1){return t[t.length-n]}function Ve(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function ze(t,n=1){return t.slice(0,-1*n)}function Ge(t,n=1){return t.substring(n)}function Je(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const We=/%(?![\da-f]{2})/gi,He=/&/g,Ke=//g,Xe=/"/g;function Ye(t){return decodeURIComponent(t.replace(We,(()=>"%25")))}function to(t){return t.replace(He,"&").replace(Ke,"<").replace(Qe,">").replace(Xe,""")}function no(t){return to(Ye(t))}const ro=/\S+/g,eo=/\w+/g;function oo(t){return t.match(ro)||[]}function uo(t){return t.match(eo)||[]}function co(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function io(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const so=/\w+/g;function fo(t){return t[0].toUpperCase()}function ao(t){return fo(t)+Ge(t)}function lo(t){return fo(t)+Ge(t).toLowerCase()}function ho(t){return t.replace(so,(t=>ao(t)))}function po(t){return t.replace(so,(t=>lo(t)))}function go(t){return Er(t)?.name}function mo(t){return!!p(t)&&"[object Arguments]"===t.toString()}const wo=ot("Map"),yo=ut(wo),bo=/Array/,vo="Array";function Ao(t){if(t){const n=go(t);if(bo.test(n)&&n!==vo)return!0}return!1}function Io(t){return!p(t)}function Eo(t,n){if(Io(t)||rn(t))return!1;if(j(t)||Ao(t))return!0;const r=t.length;if(!Io(r)||!on(r)||r<0)return!1;if(n){const n=Q(t);return!!n&&Rr(n,((t,n)=>n>=0&&on(n)))}return!0}const jo=ot("BigInt"),Mo=ut(jo),xo=ot("Boolean"),Oo=ut(xo),$o=ot("ArrayBuffer"),Co=ut($o);function So(t,n){return!(!t||!n)&&t instanceof n}const Bo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function To(t){if(p(t)){const n=t?.constructor?.name;return Bo.test(n)}return!1}const _o=ot("Date"),Fo=ut(_o);function Ro(t){return cn(t)||j(t)?!l(t):st(t)?!Oe(t):!p(t)}function No(t){return!1===t}const Po=ot("Float32Array"),Uo=ut(Po),Do=ot("Float64Array"),Lo=ut(Do),{isInteger:Zo}=Number,ko=Zo,qo=ot("Int16Array"),Vo=ut(qo),zo=ot("Int32Array"),Go=ut(zo),Jo=ot("Int8Array"),Wo=ut(Jo);function Ho(t){return p(t)&&"function"==typeof t[Symbol.iterator]}function Ko(t){return!!t&&t instanceof Promise}function Qo(t){return!!t&&(Ko(t)||rr(t)||Yn(t))}function Xo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Yo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function tu(t,n){return!Io(t)&&!Io(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:nu}=Number,ru=nu;function eu(t,n){const r=Er(t),e=Er(n);return r===e&&r.name===e.name}function ou(t){return!0===t}const uu=ot("Uint16Array"),cu=ut(uu),iu=ot("Uint32Array"),su=ut(iu),fu=ot("Uint8Array"),au=ut(fu),lu=ot("Uint8ClampedArray"),hu=ut(lu),pu=ot("WeakMap"),gu=ut(pu),du=void 0!==globalThis.Deno,mu=void 0!==globalThis.process&&process.versions&&process.versions.node;function wu(t,n=!0){return Boolean(t)&&n}function yu(t,n=!0){return!1===Boolean(t)&&n}function bu(t,n,r,e){if(p(t)){if(rn(n))return r?wr(n,r,e):n(...e);if(st(n))return n[r]=t,n}}function vu(t,n){return No(ft(t,n))}const Au=JSON;function Iu(t,n){if(t)return Au.parse(t,n)}const Eu=Au.stringify;function ju(t,n,r){const e=globalThis.options||r;let o;return rn(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Eu(t)}\n\t\tExpected: ${Eu(n)}`,e)}async function Mu(t,n,r){const e=await t;return!(rn(n)&&!1===await n(e,r))&&!vu(e,n)||ju(e,n,r)}function xu(t,n,r){if(Qo(t)||Qo(n))return Mu(t,n,r);return!(rn(n)&&!1===n(t,r))&&!vu(t,n)||ju(t,n,r)}function Ou(t,n,r){const e=Cr(t,(t=>rn(t)?t.bind(n):t));return r?ln(r,e):e}function $u(t){if(t){if(it(t))return nn(t);if(j(t))return s(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Cu=globalThis.structuredClone;function Su(t){return Cu(t)}async function Bu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;uwu(t)))}async function _u(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);p(e)&&r.push(e)}return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);p(u)&&e(u)}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);p(c)&&(u?o.set(r,c):o[r]=c)}return o}function Fu(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);p(u)&&o(u)}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);p(c)&&(o?e.set(r,c):e[r]=c)}return e}const Ru=er(m,y,de,ge,Fu,_u);function Nu(...t){return rr(t[0])?async function(...n){return Rr(t,(async t=>Rr(n,(async n=>t(n)))))}:function(...n){return Rr(t,(t=>Rr(n,(n=>t(n)))))}}function Pu(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=rn(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Uu(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=rn(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Du=er(U,D,me,we,Pu,Uu);function Lu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Zu=Lu(d),ku=Lu(F);function qu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Vu=qu(w),zu=qu(R);function Gu(t,n){const r=jr(t),e=r.push||r.add;if(e&&rn(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else rn(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Ju(t,n){const r={};return d(t,((t,e)=>{r[n[e]]=t})),r}function Wu(t,n,r){return!Io(t)&&!Io(n)&&(t===n||(cn(t)?cn(n)?t.includes(n,r):je(n)?n.test(t):rn(n)?n(t):j(n)?N(n,(n=>Wu(t,n))):Rr(n,(n=>Wu(t,n))):j(t)?je(n)?N(t,(t=>t.test(n))):rn(n)?N(t,n):j(n)?N(n,(n=>Wu(t,n))):t.includes(n,r):!!st(t)&&(je(n)?Tr(t,(t=>t.test(n))):rn(n)?Tr(t,n):st(n)?Tr(t,((t,r)=>t===n[r])):Tr(t,(t=>Wu(t,n))))))}const Hu=Un(/\./),Ku=(t,n,r)=>(n&&!p(t[n])&&(t[n]=r),t);class Qu{list=O(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Xu=O(Qu);function Yu(t,n){return Xu.set(t,n)}function tc(){ar(setTimeout(fr,0),(t=>{Xu.remove(t)}))}function nc(t,...n){return or(n,(n=>{or(n,((n,r)=>{if(t[r]&&(st(n)||j(n)||n.forEach))return nc(t[r],n);t[r]=n}))})),t}class rc{static models=new Map;constructor(t,n){p(n)?(ln(this,n),this.modelName=t,rc.models.set(t,n)):ln(this,t)}delete(t){rc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),rc.models.set(t||this.modelName,this)}has(t){return rc.models.has(t||this.modelName)}get(t){return rc.models.get(t||this.modelName)}}function ec(t,n){return p(n)?O(rc,[t,n]):H(t,rc.models)}function oc(t,n){return[t,n]}function uc(t,n,r){const e=t.length,o=[];for(let u=0;uN(r,(r=>ft(t[r],n[r])));function sc(t,n,r){return n&&st(t)||on(n)&&j(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function fc(t,n,r){return on(r)&&j(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class ac{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Jn(t,(n=>{t[n]=new ac(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new ac(r),!0)})}}function lc(){return[]}function hc(){return!1}const pc=()=>({}),gc=()=>"",dc=()=>!0;async function mc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const vc=O(bc);class Ac{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):p(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=jr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function Ic(t){return new Ac(t)}async function Ec(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{const i=o.join(u,t);if((await n(i)).isDirectory()){const n=o.join(c,t.replace(u,""));await r(n,{recursive:!0}),await Mc(i,n)}else await async function(t,n,r){const u=o.join(t,r),c=o.join(n,r);await e(u,c)}(u,c,t)})),!0}function xc(t){return globalThis.__filename?__filename:u(t.url)}function Oc(t){return globalThis.__dirname?__dirname:c.dirname(u(t.url))}export{ur as Chain,Qu as Intervals,rc as Model,ac as Store,hr as Timers,bc as UniqID,Ac as VirtualStorage,Jr as add,qn as after,wr as apply,Ie as arrayToRegex,Ju as arraysToObject,Vn as ary,xu as assert,Mu as assertAsync,ln as assign,hn as assignToClass,an as assignToObject,zn as before,Ou as bindAll,Zr as cacheNativeMethod,Xr as calcProgress,Be as camelCase,cr as chain,i as chunk,Ve as chunkString,$u as clear,s as clearArray,nn as clearBuffer,tc as clearIntervals,dr as clearTimers,Su as clone,f as cloneArray,jr as cloneType,Tu as compact,pe as compactKeys,Ru as compactMap,m as compactMapArray,y as compactMapAsyncArray,ge as compactMapAsyncObject,de as compactMapObject,Bu as concurrent,dt as concurrentEachArray,uc as concurrentStatus,O as construct,et as constructorName,Mc as copyFolder,gn as countBy,dn as countKey,mn as countWithoutKey,xc as currentFile,Oc as currentPath,ir as curry,sr as curryRight,yr as debounce,Wr as deduct,Vr as defProp,B as difference,Hr as divide,T as drop,_ as dropRight,or as each,d as eachArray,w as eachAsyncArray,Gn as eachAsyncObject,Jn as eachObject,F as eachRight,R as eachRightAsync,$ as ensureArray,tn as ensureBuffer,se as equalsZero,Ae as escapeRegex,ve as escapeRegexRegex,Rr as every,Nu as everyArg,N as everyArray,P as everyAsyncArray,Br as everyAsyncObject,Tr as everyObject,pn as extendClass,Du as filter,U as filterArray,D as filterAsyncArray,we as filterAsyncObject,me as filterObject,yn as findIndex,wn as findIndexCache,bn as findItem,L as first,Z as flatten,C as flattenDeep,Zu as flow,Vu as flowAsync,zu as flowAsyncRight,ku as flowRight,S as forEach,Wn as forEachAsync,Gu as forMap,Qn as forOf,tr as forOfAsync,Fu as forOfCompactMap,_u as forOfCompactMapAsync,_r as forOfEvery,Fr as forOfEveryAsync,Pu as forOfFilter,Uu as forOfFilterAsync,Mr as forOfMap,xr as forOfMapAsync,er as generateLoop,H as get,he as getEntries,Nn as getFileExtension,Pn as getFilename,Mn as getHighest,In as getLowest,Ut as getNumberInsertIndex,qr as getPropDesc,kr as getPropNames,Er as getType,go as getTypeName,xn as groupBy,Wu as has,tt as hasAnyKeys,Hu as hasDot,Y as hasKeys,l as hasLength,zr as hasProp,p as hasValue,to as htmlEntities,br as ifInvoke,Ku as ifNotAssign,bu as ifValue,Ec as inAsync,jc as inSync,Kr as increment,On as indexBy,k as initial,ze as initialString,ke as insertInRange,q as intersection,Yu as interval,Xu as intervals,ye as invert,V as invokeArray,$n as invokeCollection,Cn as invokeCollectionAsync,mo as isArguments,j as isArray,Co as isArrayBuffer,$o as isArrayBufferCall,Eo as isArrayLike,rr as isAsync,nr as isAsyncCall,Mo as isBigInt,jo as isBigIntCall,Oo as isBoolean,xo as isBooleanCall,it as isBuffer,ct as isBufferCall,So as isChild,To as isCloneable,nt as isConstructor,rt as isConstructorFactory,ot as isConstructorNameFactory,Fo as isDate,_o as isDateCall,du as isDeno,Ro as isEmpty,ft as isEqual,ae as isEven,Uo as isF32,Po as isF32Call,Lo as isF64,Do as isF64Call,No as isFalse,yu as isFalsy,Dn as isFileCSS,Ln as isFileHTML,Zn as isFileJS,kn as isFileJSON,ko as isFloat,rn as isFunction,Yn as isGenerator,Xn as isGeneratorCall,Vo as isI16,qo as isI16Call,Go as isI32,zo as isI32Call,Wo as isI8,Jo as isI8Call,Ho as isIterable,Qo as isKindAsync,yo as isMap,wo as isMapCall,at as isMatchArray,be as isMatchObject,v as isNegative,mu as isNodejs,M as isNotArray,un as isNotNumber,sn as isNotString,h as isNull,on as isNumber,en as isNumberCall,Bt as isNumberEqual,oe as isNumberInRange,ue as isNumberNotInRange,fe as isOdd,Xo as isParent,st as isPlainObject,ie as isPositive,Yo as isPrimitive,Ko as isPromise,je as isRegex,Ee as isRegexCall,tu as isRelated,ru as isSafeInt,Gr as isSame,eu as isSameType,Kn as isSet,Hn as isSetCall,cn as isString,ou as isTrue,wu as isTruthy,ut as isTypeFactory,Ao as isTypedArray,cu as isU16,uu as isU16Call,su as isU32,iu as isU32Call,au as isU8,hu as isU8C,lu as isU8CCall,fu as isU8Call,a as isUndefined,gu as isWeakMap,pu as isWeakMapCall,se as isZero,Iu as jsonParse,Fe as kebabCase,Q as keys,ht as largest,pt as last,Ze as lowerCase,Cr as map,gt as mapArray,mt as mapAsyncArray,Or as mapAsyncObject,$r as mapObject,wt as mapRightArray,yt as mapWhile,nc as merge,ec as model,Qr as multiply,vr as negate,Io as noValue,fr as noop,vu as notEqual,Ar as nthArg,fn as objectAssign,le as objectEntries,Oe as objectSize,Me as omit,Ir as once,Zt as onlyUnique,Sr as over,Nr as overEvery,oc as pair,At as partition,xe as pick,Bn as pluck,Sn as pluckObject,cc as promise,ic as propertyMatch,te as randomFloat,St as randomInt,E as range,I as rangeDown,A as rangeUp,Ye as rawURLDecode,Pr as reArg,Un as regexTestFactory,ne as remainder,jt as remove,Mt as removeBy,Je as replaceList,xt as rest,Ge as restString,g as returnValue,Ot as right,qe as rightString,Rt as sample,no as sanitize,sc as setKey,fc as setValue,Ft as shuffle,Pt as smallest,Pe as snakeCase,_n as sortCollectionAlphabetically,Rn as sortCollectionAlphabeticallyReverse,jn as sortCollectionAscending,En as sortCollectionAscendingFilter,An as sortCollectionDescending,vn as sortCollectionDescendingFilter,vt as sortNumberAscending,Et as sortNumberDescening,Tn as sortObjectsAlphabetically,Fn as sortObjectsAlphabeticallyReverse,kt as sortUnique,Eu as stringify,lc as stubArray,hc as stubFalse,pc as stubObject,gc as stubString,dc as stubTrue,bt as subtract,re as subtractAll,It as subtractReverse,ee as sumAll,Dt as take,Lt as takeRight,Ur as throttle,gr as timer,pr as timers,ar as times,mc as timesAsync,lr as timesMap,wc as timesMapAsync,_t as toArray,W as toPath,yc as toggle,oo as tokenize,co as truncate,io as truncateRight,Yt as unZip,Ce as unZipObject,Vt as union,vc as uniqID,qt as unique,zt as untilFalseArray,Gt as untilTrueArray,De as upperCase,ao as upperFirst,ho as upperFirstAll,fo as upperFirstLetter,lo as upperFirstOnly,po as upperFirstOnlyAll,Ic as virtualStorage,Jt as whileCompactMap,Wt as whileEachArray,Ht as whileMapArray,Kt as without,uo as words,Dr as wrap,Qt as xor,Xt as zip,$e as zipObject}; //# sourceMappingURL=index.js.map diff --git a/npm/basic.js b/npm/basic.js index ed1ef24..9477765 100644 --- a/npm/basic.js +++ b/npm/basic.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:l}=Math;function h(t){return-1===l(t)}function p(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const y=Array.isArray;const d=Reflect.construct;function m(t,n=[],e){const r=y(n)?n:[n];return e?d(t,r,e):d(t,r)}function A(t){return y(t)&&t||i(t)&&[t]||[]}function b(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=m(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function O(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function I(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function M(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function E(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const S=/\.|\[/,x=/]/g,R="";function N(t){return t.replace(x,R).split(S)}function T(t,n){if(!n)return!1;let e=n;return M(y(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function U(t){if(t)return B(t)}const P=Object.hasOwn;function k(t,...n){if(t)return M(n,(n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}}))}function $(t,n){return t?.constructor===n||!1}function D(t){return n=>$(n,t)}function L(t){return t?.constructor?.name}function q(t){return n=>L(n)===t||!1}function V(t){return function(n,...e){return e?t(n)&&M(e,t):t(n)}}const Z=q("Buffer"),K=V(Z),z=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),_=(t,n)=>{if(t===n)return!0;if(K(t))return t.equals(n);if(t.toString()===n.toString())if(z(t)){const e=U(t);if(k(n,e))return M(e,(e=>_(t[e],n[e])))}else if(y(t)&&t.length===n.length)return M(t,((t,e)=>_(t,n[e])));return!1};const W=Math.max;function G(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function J(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function H(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,ft=q("Number"),lt=V(ft);const ht=D(String);const pt=Object.assign;function gt(t,n){if(z(n))pt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:pt(t,n)}else(ht(n)||lt(n))&&(t[n]=n);return t}function yt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function bt(t,n="id",e){return t.sort(((t,r)=>At(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:G(n,(n=>t[n]))}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Mt(t){return n=>!!i(n)&&t.test(n)}const jt=Mt(/\.css$/),Ft=Mt(/\.html$/),Et=Mt(/\.js$/),St=Mt(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=U(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Rt(t,n,e,r){if(!t)return;const o=U(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Tt=V(Nt);function Bt(t,n){if(Tt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Ut=q("GeneratorFunction"),Pt=V(Ut);async function kt(t,n,e){if(Tt(t)){for(const e of t)await n(e,t);return t}if(Pt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const $t=q("AsyncFunction"),Dt=V($t);function Lt(t,n,e,r,o,c){return(s,u,a,f,l)=>{let h;const p=Dt(u);if(i(s)&&u)return h=y(s)?p?n:t:z(s)||at(s)?p?r:e:o?p?c:o:Pt(s)?c:p?r:e,h(s,u,a,f,l)}}const qt=Lt(s,a,Rt,xt,Bt,kt);class Vt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Zt(){}function Kt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const _t=m(zt);function Wt(t,n){return _t.set(t,n)}const Gt=Reflect.apply;function Jt(t,n,e){if(at(t))return Gt(t,n,e)}function Ht(t){return t?.constructor}function Qt(t,n=[]){const e=Ht(t);return e===Function&&"function"===e.name?function(){}:m(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Rt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Rt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Lt(G,J,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return j(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return M(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(y(t)||Tt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if(Pt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(y(t)||Tt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Lt(M,j,on,rn,cn,sn);const an=Function.prototype;function fn(t){return an.call.bind(t)}const ln=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,pn=Object.defineProperty,gn=fn(Object.hasOwnProperty),yn=Object.is;const{random:dn}=Math;const{sign:mn}=Math;function An(t){return 0===t}const bn=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Rt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Rt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function On(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const In=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Mn(t){return t.replace(In,"\\$&")}function jn(t,n){return n?jn(G(t,Mn)):RegExp(t.join("|"))}const Fn=q("RegExp"),En=V(Fn);function Sn(t){if(!t)return;if(z(t))return U(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:U(t).length}const xn=/[ _-]+/g;const Rn=/[ _-]+/g,Nn=/[ ]+/g;const Tn=/[ _-]+/g,Bn=/[ ]+/g;const Un=/[ _-]+/g;const Pn=/[ _-]+/g;function kn(t,n=1){return t.substring(n)}const $n=/%(?![\da-f]{2})/gi,Dn=/&/g,Ln=//g,Vn=/"/g;function Zn(t){return decodeURIComponent(t.replace($n,(()=>"%25")))}function Kn(t){return t.replace(Dn,"&").replace(Ln,"<").replace(qn,">").replace(Vn,""")}const zn=/\S+/g,_n=/\w+/g;const Wn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+kn(t)}function Hn(t){return Gn(t)+kn(t).toLowerCase()}function Qn(t){return Ht(t)?.name}const Xn=q("Map"),Yn=V(Xn),te=/Array/,ne="Array";function ee(t){if(t){const n=Qn(t);if(te.test(n)&&n!==ne)return!0}return!1}function re(t){return!i(t)}const oe=q("BigInt"),ie=V(oe),ce=q("Boolean"),se=V(ce),ue=q("ArrayBuffer"),ae=V(ue);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const le=q("Date"),he=V(le);function pe(t){return!1===t}const ge=q("Float32Array"),ye=V(ge),de=q("Float64Array"),me=V(de),{isInteger:Ae}=Number,be=Ae,we=q("Int16Array"),ve=V(we),Ce=q("Int32Array"),Oe=V(Ce),Ie=q("Int8Array"),Me=V(Ie);function je(t){return!!t&&t instanceof Promise}function Fe(t){return!!t&&(je(t)||Dt(t)||Pt(t))}const{isSafeInteger:Ee}=Number,Se=Ee;const xe=q("Uint16Array"),Re=V(xe),Ne=q("Uint32Array"),Te=V(Ne),Be=q("Uint8Array"),Ue=V(Be),Pe=q("Uint8ClampedArray"),ke=V(Pe),$e=q("WeakMap"),De=V($e),Le=void 0!==globalThis.Deno,qe=void 0!==globalThis.process&&process.versions&&process.versions.node;function Ve(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(_(t,n))}const Ke=JSON;const ze=Ke.stringify;function _e(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${ze(t)}\n\t\tExpected: ${ze(n)}`,r)}async function We(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||_e(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function He(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Qe=Lt(u,f,vn,wn,He,Je);function Xe(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function Ye(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const tr=Lt(F,E,Cn,On,Xe,Ye);function nr(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const er=nr(s),rr=nr(O);function or(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ir=or(a),cr=or(I);const sr=Mt(/\./);class ur{list=m(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ar=m(ur);class fr{static models=new Map;constructor(t,n){i(n)?(yt(this,n),this.modelName=t,fr.models.set(t,n)):yt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}class lr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Rt(t,(n=>{t[n]=new lr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new lr(e),!0)})}}class hr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const pr=m(hr);class gr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=Vt,t.Intervals=ur,t.Model=fr,t.Store=lr,t.Timers=zt,t.UniqID=hr,t.VirtualStorage=gr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Jt,t.arrayToRegex=jn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Fe(t)||Fe(n)?We(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||_e(t,n,e)},t.assertAsync=We,t.assign=yt,t.assignToClass=dt,t.assignToObject=gt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?yt(e,r):r},t.cacheNativeMethod=fn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(xn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return m(Vt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(K(t))return ut(t);if(y(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Kt(setTimeout(Zt,0),(t=>{ar.remove(t)}))},t.clearTimers=function(){Kt(setTimeout(Zt,0),(t=>{_t.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.compact=function(t){if(z(t)){const n=U(t),e=n.length,r={};for(let o=0;oVe(t)))},t.compactKeys=function(t){const n=[];return Rt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Qe,t.compactMapArray=u,t.compactMapAsyncArray=f,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&_t.remove(e.id),e.id=Wt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(_t.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=pn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Rt,t.eachRight=O,t.eachRightAsync=I,t.ensureArray=A,t.ensureBuffer=function(t){return K(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=An,t.escapeRegex=Mn,t.escapeRegexRegex=In,t.every=un,t.everyArg=function(...t){return Dt(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=M,t.everyAsyncArray=j,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rmt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=mt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>mt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e},t.flattenDeep=b,t.flow=er,t.flowAsync=ir,t.flowAsyncRight=cr,t.flowRight=rr,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=He,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Xe,t.forOfFilterAsync=Ye,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Lt,t.get=T,t.getEntries=function(t){if(i(t))return bn(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return bt(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return M(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=ln,t.getType=Ht,t.getTypeName=Qn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!re(n)&&!re(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):En(e)?e.test(n):at(e)?e(n):y(e)?M(e,(e=>t(n,e))):un(e,(e=>t(n,e))):y(n)?En(e)?M(n,(t=>t.test(e))):at(e)?M(n,e):y(e)?M(e,(e=>t(n,e))):n.includes(e,r):!!z(n)&&(En(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):z(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}})))},t.hasDot=sr,t.hasKeys=k,t.hasLength=r,t.hasProp=gn,t.hasValue=i,t.htmlEntities=Kn,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Jt(n,e,r):n(...r);if(z(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(M(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return ar.set(t,n)},t.intervals=ar,t.invert=function(t,n={}){if(t)return Rt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return J(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=y,t.isArrayBuffer=ae,t.isArrayBufferCall=ue,t.isArrayLike=function(t,n){if(re(t)||at(t))return!1;if(y(t)||ee(t))return!0;const e=t.length;if(!re(e)||!lt(e)||e<0)return!1;if(n){const n=U(t);return!!n&&un(n,((t,n)=>n>=0&<(n)))}return!0},t.isAsync=Dt,t.isAsyncCall=$t,t.isBigInt=ie,t.isBigIntCall=oe,t.isBoolean=se,t.isBooleanCall=ce,t.isBuffer=K,t.isBufferCall=Z,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=$,t.isConstructorFactory=D,t.isConstructorNameFactory=q,t.isDate=he,t.isDateCall=le,t.isDeno=Le,t.isEmpty=function(t){return ht(t)||y(t)?!r(t):z(t)?!Sn(t):!i(t)},t.isEqual=_,t.isF32=ye,t.isF32Call=ge,t.isF64=me,t.isF64Call=de,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=jt,t.isFileHTML=Ft,t.isFileJS=Et,t.isFileJSON=St,t.isFloat=be,t.isFunction=at,t.isGenerator=Pt,t.isGeneratorCall=Ut,t.isI16=ve,t.isI16Call=we,t.isI32=Oe,t.isI32Call=Ce,t.isI8=Me,t.isI8Call=Ie,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Fe,t.isMap=Yn,t.isMapCall=Xn,t.isMatchArray=function(t,n){return t.length===n.length&&M(t,((t,e)=>_(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=U(t),r=U(n);return e.length===r.length&&M(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodejs=qe,t.isNotArray=function(t){return!y(t)},t.isNotNumber=function(t){return!lt(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=lt,t.isNumberCall=ft,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=z,t.isPositive=function(t){return 1===mn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=je,t.isRegex=En,t.isRegexCall=Fn,t.isRelated=function(t,n){return!re(t)&&!re(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Se,t.isSame=yn,t.isSameType=function(t,n){const e=Ht(t),r=Ht(n);return e===r&&e.name===r.name},t.isSet=Tt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=Ve,t.isTypeFactory=V,t.isTypedArray=ee,t.isU16=Re,t.isU16Call=xe,t.isU32=Te,t.isU32Call=Ne,t.isU8=Ue,t.isU8C=ke,t.isU8CCall=Pe,t.isU8Call=Be,t.isUndefined=e,t.isWeakMap=De,t.isWeakMapCall=$e,t.isZero=An,t.jsonParse=function(t,n){if(t)return Ke.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Rn," ").trim().toLowerCase().replace(Nn,"-")},t.keys=U,t.largest=function(t){return W(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase()},t.map=en,t.mapArray=G,t.mapAsyncArray=J,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(z(e)||y(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?m(fr,[t,n]):T(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=re,t.noop=Zt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=pt,t.objectEntries=bn,t.objectSize=Sn,t.omit=function(t,n){if(!t)return{};if(y(n)){const e=jn(n);return Cn(t,((t,n)=>!e.test(n)))}if(En(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(lt(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):pt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return G(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=U(t))=>M(e,(e=>_(t[e],n[e]))),t.randomFloat=function(t,n=0){return dn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Mt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cOt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=bt,t.sortCollectionDescendingFilter=At,t.sortNumberAscending=function(t){return t.sort(H)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=Ot,t.sortObjectsAlphabeticallyReverse=It,t.sortUnique=ct,t.stringify=ze,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=H,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Wt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{_t.remove(e.id),e.id=!1},e},t.timer=Wt,t.timers=_t,t.times=Kt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Rt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(b(t))},t.uniqID=pr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Hn,t.upperFirstOnlyAll=function(t){return t.replace(Wn,(t=>Hn(t)))},t.virtualStorage=function(t){return new gr(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(_n)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=m(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e}})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:l}=Math;function h(t){return-1===l(t)}function p(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const y=Array.isArray;const d=Reflect.construct;function m(t,n=[],e){const r=y(n)?n:[n];return e?d(t,r,e):d(t,r)}function A(t){return y(t)&&t||i(t)&&[t]||[]}function b(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=m(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function O(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function I(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function M(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function E(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const S=/\.|\[/,x=/]/g,R="";function N(t){return t.replace(x,R).split(S)}function T(t,n){if(!n)return!1;let e=n;return M(y(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function U(t){if(t)return B(t)}const P=Object.hasOwn;function k(t,...n){if(t)return M(n,(n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}}))}function $(t,n){return t?.constructor===n||!1}function D(t){return n=>$(n,t)}function L(t){return t?.constructor?.name}function q(t){return n=>L(n)===t||!1}function V(t){return function(n,...e){return e?t(n)&&M(e,t):t(n)}}const Z=q("Buffer"),K=V(Z),z=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),_=(t,n)=>{if(t===n)return!0;if(K(t))return t.equals(n);if(t.toString()===n.toString())if(z(t)){const e=U(t);if(k(n,e))return M(e,(e=>_(t[e],n[e])))}else if(y(t)&&t.length===n.length)return M(t,((t,e)=>_(t,n[e])));return!1};const W=Math.max;function G(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function J(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function H(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,ft=q("Number"),lt=V(ft);const ht=D(String);const pt=Object.assign;function gt(t,n){if(z(n))pt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:pt(t,n)}else(ht(n)||lt(n))&&(t[n]=n);return t}function yt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function bt(t,n="id",e){return t.sort(((t,r)=>At(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:G(n,(n=>t[n]))}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Mt(t){return n=>!!i(n)&&t.test(n)}const jt=Mt(/\.css$/),Ft=Mt(/\.html$/),Et=Mt(/\.js$/),St=Mt(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=U(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Rt(t,n,e,r){if(!t)return;const o=U(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Tt=V(Nt);function Bt(t,n){if(Tt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Ut=q("GeneratorFunction"),Pt=V(Ut);async function kt(t,n,e){if(Tt(t)){for(const e of t)await n(e,t);return t}if(Pt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const $t=q("AsyncFunction"),Dt=V($t);function Lt(t,n,e,r,o,c){return(s,u,a,f,l)=>{let h;const p=Dt(u);if(i(s)&&u)return h=y(s)?p?n:t:z(s)||at(s)?p?r:e:o?p?c:o:Pt(s)?c:p?r:e,h(s,u,a,f,l)}}const qt=Lt(s,a,Rt,xt,Bt,kt);class Vt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Zt(){}function Kt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const _t=m(zt);function Wt(t,n){return _t.set(t,n)}const Gt=Reflect.apply;function Jt(t,n,e){if(at(t))return Gt(t,n,e)}function Ht(t){return t?.constructor}function Qt(t,n=[]){const e=Ht(t);return e===Function&&"function"===e.name?function(){}:m(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Rt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Rt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Lt(G,J,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return j(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return M(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(y(t)||Tt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if(Pt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(y(t)||Tt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Lt(M,j,on,rn,cn,sn);const an=Function.prototype;function fn(t){return an.call.bind(t)}const ln=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,pn=Object.defineProperty,gn=fn(Object.hasOwnProperty),yn=Object.is;const{random:dn}=Math;const{sign:mn}=Math;function An(t){return 0===t}const bn=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Rt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Rt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function On(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const In=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Mn(t){return t.replace(In,"\\$&")}function jn(t,n){return n?jn(G(t,Mn)):RegExp(t.join("|"))}const Fn=q("RegExp"),En=V(Fn);function Sn(t){if(!t)return;if(z(t))return U(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:U(t).length}const xn=/[ _-]+/g;const Rn=/[ _-]+/g,Nn=/[ ]+/g;const Tn=/[ _-]+/g,Bn=/[ ]+/g;const Un=/[ _-]+/g;const Pn=/[ _-]+/g;function kn(t,n=1){return t.substring(n)}const $n=/%(?![\da-f]{2})/gi,Dn=/&/g,Ln=//g,Vn=/"/g;function Zn(t){return decodeURIComponent(t.replace($n,(()=>"%25")))}function Kn(t){return t.replace(Dn,"&").replace(Ln,"<").replace(qn,">").replace(Vn,""")}const zn=/\S+/g,_n=/\w+/g;const Wn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+kn(t)}function Hn(t){return Gn(t)+kn(t).toLowerCase()}function Qn(t){return Ht(t)?.name}const Xn=q("Map"),Yn=V(Xn),te=/Array/,ne="Array";function ee(t){if(t){const n=Qn(t);if(te.test(n)&&n!==ne)return!0}return!1}function re(t){return!i(t)}const oe=q("BigInt"),ie=V(oe),ce=q("Boolean"),se=V(ce),ue=q("ArrayBuffer"),ae=V(ue);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const le=q("Date"),he=V(le);function pe(t){return!1===t}const ge=q("Float32Array"),ye=V(ge),de=q("Float64Array"),me=V(de),{isInteger:Ae}=Number,be=Ae,we=q("Int16Array"),ve=V(we),Ce=q("Int32Array"),Oe=V(Ce),Ie=q("Int8Array"),Me=V(Ie);function je(t){return!!t&&t instanceof Promise}function Fe(t){return!!t&&(je(t)||Dt(t)||Pt(t))}const{isSafeInteger:Ee}=Number,Se=Ee;const xe=q("Uint16Array"),Re=V(xe),Ne=q("Uint32Array"),Te=V(Ne),Be=q("Uint8Array"),Ue=V(Be),Pe=q("Uint8ClampedArray"),ke=V(Pe),$e=q("WeakMap"),De=V($e),Le=void 0!==globalThis.Deno,qe=void 0!==globalThis.process&&process.versions&&process.versions.node;function Ve(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(_(t,n))}const Ke=JSON;const ze=Ke.stringify;function _e(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${ze(t)}\n\t\tExpected: ${ze(n)}`,r)}async function We(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||_e(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function He(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Qe=Lt(u,f,vn,wn,He,Je);function Xe(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function Ye(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const tr=Lt(F,E,Cn,On,Xe,Ye);function nr(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const er=nr(s),rr=nr(O);function or(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ir=or(a),cr=or(I);const sr=Mt(/\./);class ur{list=m(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ar=m(ur);class fr{static models=new Map;constructor(t,n){i(n)?(yt(this,n),this.modelName=t,fr.models.set(t,n)):yt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}class lr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Rt(t,(n=>{t[n]=new lr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new lr(e),!0)})}}class hr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const pr=m(hr);class gr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=Vt,t.Intervals=ur,t.Model=fr,t.Store=lr,t.Timers=zt,t.UniqID=hr,t.VirtualStorage=gr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Jt,t.arrayToRegex=jn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Fe(t)||Fe(n)?We(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||_e(t,n,e)},t.assertAsync=We,t.assign=yt,t.assignToClass=dt,t.assignToObject=gt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?yt(e,r):r},t.cacheNativeMethod=fn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(xn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return m(Vt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(K(t))return ut(t);if(y(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Kt(setTimeout(Zt,0),(t=>{ar.remove(t)}))},t.clearTimers=function(){Kt(setTimeout(Zt,0),(t=>{_t.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.compact=function(t){if(z(t)){const n=U(t),e=n.length,r={};for(let o=0;oVe(t)))},t.compactKeys=function(t){const n=[];return Rt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Qe,t.compactMapArray=u,t.compactMapAsyncArray=f,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&_t.remove(e.id),e.id=Wt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(_t.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=pn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Rt,t.eachRight=O,t.eachRightAsync=I,t.ensureArray=A,t.ensureBuffer=function(t){return K(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=An,t.escapeRegex=Mn,t.escapeRegexRegex=In,t.every=un,t.everyArg=function(...t){return Dt(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=M,t.everyAsyncArray=j,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rmt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=mt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>mt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e},t.flattenDeep=b,t.flow=er,t.flowAsync=ir,t.flowAsyncRight=cr,t.flowRight=rr,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=He,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Xe,t.forOfFilterAsync=Ye,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Lt,t.get=T,t.getEntries=function(t){if(i(t))return bn(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return bt(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return M(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=ln,t.getType=Ht,t.getTypeName=Qn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!re(n)&&!re(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):En(e)?e.test(n):at(e)?e(n):y(e)?M(e,(e=>t(n,e))):un(e,(e=>t(n,e))):y(n)?En(e)?M(n,(t=>t.test(e))):at(e)?M(n,e):y(e)?M(e,(e=>t(n,e))):n.includes(e,r):!!z(n)&&(En(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):z(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}})))},t.hasDot=sr,t.hasKeys=k,t.hasLength=r,t.hasProp=gn,t.hasValue=i,t.htmlEntities=Kn,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Jt(n,e,r):n(...r);if(z(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(M(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return ar.set(t,n)},t.intervals=ar,t.invert=function(t,n={}){if(t)return Rt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return J(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=y,t.isArrayBuffer=ae,t.isArrayBufferCall=ue,t.isArrayLike=function(t,n){if(re(t)||at(t))return!1;if(y(t)||ee(t))return!0;const e=t.length;if(!re(e)||!lt(e)||e<0)return!1;if(n){const n=U(t);return!!n&&un(n,((t,n)=>n>=0&<(n)))}return!0},t.isAsync=Dt,t.isAsyncCall=$t,t.isBigInt=ie,t.isBigIntCall=oe,t.isBoolean=se,t.isBooleanCall=ce,t.isBuffer=K,t.isBufferCall=Z,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=$,t.isConstructorFactory=D,t.isConstructorNameFactory=q,t.isDate=he,t.isDateCall=le,t.isDeno=Le,t.isEmpty=function(t){return ht(t)||y(t)?!r(t):z(t)?!Sn(t):!i(t)},t.isEqual=_,t.isEven=function(t){return!(1&t)},t.isF32=ye,t.isF32Call=ge,t.isF64=me,t.isF64Call=de,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=jt,t.isFileHTML=Ft,t.isFileJS=Et,t.isFileJSON=St,t.isFloat=be,t.isFunction=at,t.isGenerator=Pt,t.isGeneratorCall=Ut,t.isI16=ve,t.isI16Call=we,t.isI32=Oe,t.isI32Call=Ce,t.isI8=Me,t.isI8Call=Ie,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Fe,t.isMap=Yn,t.isMapCall=Xn,t.isMatchArray=function(t,n){return t.length===n.length&&M(t,((t,e)=>_(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=U(t),r=U(n);return e.length===r.length&&M(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodejs=qe,t.isNotArray=function(t){return!y(t)},t.isNotNumber=function(t){return!lt(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=lt,t.isNumberCall=ft,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=z,t.isPositive=function(t){return 1===mn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=je,t.isRegex=En,t.isRegexCall=Fn,t.isRelated=function(t,n){return!re(t)&&!re(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Se,t.isSame=yn,t.isSameType=function(t,n){const e=Ht(t),r=Ht(n);return e===r&&e.name===r.name},t.isSet=Tt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=Ve,t.isTypeFactory=V,t.isTypedArray=ee,t.isU16=Re,t.isU16Call=xe,t.isU32=Te,t.isU32Call=Ne,t.isU8=Ue,t.isU8C=ke,t.isU8CCall=Pe,t.isU8Call=Be,t.isUndefined=e,t.isWeakMap=De,t.isWeakMapCall=$e,t.isZero=An,t.jsonParse=function(t,n){if(t)return Ke.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Rn," ").trim().toLowerCase().replace(Nn,"-")},t.keys=U,t.largest=function(t){return W(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase()},t.map=en,t.mapArray=G,t.mapAsyncArray=J,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(z(e)||y(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?m(fr,[t,n]):T(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=re,t.noop=Zt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=pt,t.objectEntries=bn,t.objectSize=Sn,t.omit=function(t,n){if(!t)return{};if(y(n)){const e=jn(n);return Cn(t,((t,n)=>!e.test(n)))}if(En(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(lt(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):pt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return G(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=U(t))=>M(e,(e=>_(t[e],n[e]))),t.randomFloat=function(t,n=0){return dn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Mt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cOt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=bt,t.sortCollectionDescendingFilter=At,t.sortNumberAscending=function(t){return t.sort(H)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=Ot,t.sortObjectsAlphabeticallyReverse=It,t.sortUnique=ct,t.stringify=ze,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=H,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Wt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{_t.remove(e.id),e.id=!1},e},t.timer=Wt,t.timers=_t,t.times=Kt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Rt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(b(t))},t.uniqID=pr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Hn,t.upperFirstOnlyAll=function(t){return t.replace(Wn,(t=>Hn(t)))},t.virtualStorage=function(t){return new gr(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(_n)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=m(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e}})); //# sourceMappingURL=basic.js.map diff --git a/npm/browser.js b/npm/browser.js index b597a51..9c92d54 100644 --- a/npm/browser.js +++ b/npm/browser.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:f}=Math;function h(t){return-1===f(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const d=Array.isArray;const m=Reflect.construct;function y(t,n=[],e){const r=d(n)?n:[n];return e?m(t,r,e):m(t,r)}function b(t){return d(t)&&t||i(t)&&[t]||[]}function A(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=y(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function I(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function O(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function E(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function M(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const j=/\.|\[/,x=/]/g,T="";function N(t){return t.replace(x,T).split(j)}function R(t,n){if(!n)return!1;let e=n;return E(d(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function L(t){if(t)return B(t)}const $=Object.hasOwn;function k(t,...n){if(t)return E(n,(n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}}))}function D(t,n){return t?.constructor===n||!1}function U(t){return n=>D(n,t)}function P(t){return t?.constructor?.name}function q(t){return n=>P(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&E(e,t):t(n)}}const W=q("Buffer"),Z=z(W),_=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(Z(t))return t.equals(n);if(t.toString()===n.toString())if(_(t)){const e=L(t);if(k(n,e))return E(e,(e=>H(t[e],n[e])))}else if(d(t)&&t.length===n.length)return E(t,((t,e)=>H(t,n[e])));return!1};const V=Math.max;function K(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function G(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function J(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,lt=q("Number"),ft=z(lt);const ht=U(String);const gt=Object.assign;function pt(t,n){if(_(n))gt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:gt(t,n)}else(ht(n)||ft(n))&&(t[n]=n);return t}function dt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function At(t,n="id",e){return t.sort(((t,r)=>bt(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:K(n,(n=>t[n]))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Et(t){return n=>!!i(n)&&t.test(n)}const St=Et(/\.css$/),Ft=Et(/\.html$/),Mt=Et(/\.js$/),jt=Et(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=L(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Tt(t,n,e,r){if(!t)return;const o=L(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Rt=z(Nt);function Bt(t,n){if(Rt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Lt=q("GeneratorFunction"),$t=z(Lt);async function kt(t,n,e){if(Rt(t)){for(const e of t)await n(e,t);return t}if($t(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const Dt=q("AsyncFunction"),Ut=z(Dt);function Pt(t,n,e,r,o,c){return(s,u,a,l,f)=>{let h;const g=Ut(u);if(i(s)&&u)return h=d(s)?g?n:t:_(s)||at(s)?g?r:e:o?g?c:o:$t(s)?c:g?r:e,h(s,u,a,l,f)}}const qt=Pt(s,a,Tt,xt,Bt,kt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Zt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=y(_t);function Vt(t,n){return Ht.set(t,n)}const Kt=Reflect.apply;function Gt(t,n,e){if(at(t))return Kt(t,n,e)}function Jt(t){return t?.constructor}function Qt(t,n=[]){const e=Jt(t);return e===Function&&"function"===e.name?function(){}:y(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Tt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Tt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Pt(K,G,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return S(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return E(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(d(t)||Rt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if($t(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(d(t)||Rt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Pt(E,S,on,rn,cn,sn);const an=Function.prototype;function ln(t){return an.call.bind(t)}const fn=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,gn=Object.defineProperty,pn=ln(Object.hasOwnProperty),dn=Object.is;const{random:mn}=Math;const{sign:yn}=Math;function bn(t){return 0===t}const An=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Tt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Tt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function In(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const On=/[()[\]{}*+?^$|#.,/\\\s-]/g;function En(t){return t.replace(On,"\\$&")}function Sn(t,n){return n?Sn(K(t,En)):RegExp(t.join("|"))}const Fn=q("RegExp"),Mn=z(Fn);function jn(t){if(!t)return;if(_(t))return L(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:L(t).length}const xn=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Tn=/[ _-]+/g;const Nn=/[ _-]+/g,Rn=/[ ]+/g;const Bn=/[ _-]+/g,Ln=/[ ]+/g;const $n=/[ _-]+/g;const kn=/[ _-]+/g;function Dn(t,n=1){return t.substring(n)}const Un=/%(?![\da-f]{2})/gi,Pn=/&/g,qn=//g,Wn=/"/g;function Zn(t){return decodeURIComponent(t.replace(Un,(()=>"%25")))}function _n(t){return t.replace(Pn,"&").replace(qn,"<").replace(zn,">").replace(Wn,""")}const Hn=/\S+/g,Vn=/\w+/g;const Kn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+Dn(t)}function Qn(t){return Gn(t)+Dn(t).toLowerCase()}function Xn(t){return Jt(t)?.name}const Yn=q("Map"),te=z(Yn),ne=/Array/,ee="Array";function re(t){if(t){const n=Xn(t);if(ne.test(n)&&n!==ee)return!0}return!1}function oe(t){return!i(t)}const ie=q("BigInt"),ce=z(ie),se=q("Boolean"),ue=z(se),ae=q("ArrayBuffer"),le=z(ae);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const he=q("Date"),ge=z(he);function pe(t){return!1===t}const de=q("Float32Array"),me=z(de),ye=q("Float64Array"),be=z(ye),{isInteger:Ae}=Number,we=Ae,ve=q("Int16Array"),Ce=z(ve),Ie=q("Int32Array"),Oe=z(Ie),Ee=q("Int8Array"),Se=z(Ee);function Fe(t){return!!t&&t instanceof Promise}function Me(t){return!!t&&(Fe(t)||Ut(t)||$t(t))}const{isSafeInteger:je}=Number,xe=je;const Te=q("Uint16Array"),Ne=z(Te),Re=q("Uint32Array"),Be=z(Re),Le=q("Uint8Array"),$e=z(Le),ke=q("Uint8ClampedArray"),De=z(ke),Ue=q("WeakMap"),Pe=z(Ue),qe=void 0!==globalThis.Deno,ze=void 0!==globalThis.process&&process.versions&&process.versions.node;function We(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(H(t,n))}const _e=JSON;const He=_e.stringify;function Ve(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${He(t)}\n\t\tExpected: ${He(n)}`,r)}async function Ke(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||Ve(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function Qe(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Xe=Pt(u,l,vn,wn,Qe,Je);function Ye(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function tr(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const nr=Pt(F,M,Cn,In,Ye,tr);function er(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const rr=er(s),or=er(I);function ir(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const cr=ir(a),sr=ir(O);const ur=Et(/\./);class ar{list=y(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const lr=y(ar);class fr{static models=new Map;constructor(t,n){i(n)?(dt(this,n),this.modelName=t,fr.models.set(t,n)):dt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}function hr(t){return new Promise(t)}class gr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Tt(t,(n=>{t[n]=new gr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new gr(e),!0)})}}class pr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const dr=y(pr);class mr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function yr(t){return new mr(t)}function br(t){return i(t)?br[t]:L(br)}const Ar=globalThis.navigator?.userAgentData;if(Ar)Tt(Ar,((t,n)=>{ue(t)&&t&&(br[n]=t)})),s(Ar.brands,(t=>{br[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{br[t]=!0}))}function wr(t,n,e,r){return t.addEventListener(n,e,r),t}const vr=document.createDocumentFragment.bind(document);function Cr(t,n){return t.appendChild(n),n}function Ir(t,n){return d(n)?xn(n,K(n,(n=>t.getAttribute(n)))):(Tt(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Or=/^.[\w_-]+$/,Er=/^[A-Za-z]+$/,Sr=/\s/,Fr=document.getElementsByClassName.bind(document),Mr=document.getElementsByTagName.bind(document),jr=document.getElementById.bind(document),xr=document.querySelector.bind(document),Tr=document.querySelectorAll.bind(document);const Nr=document.createElement.bind(document);function Rr(t){const n=ur(t)&&t||`${t}.js`;return(t=>hr((n=>{wr(t,"load",n,!0),wr(t,"error",n,!0),Cr(xr("head"),t)})))(Ir(Nr("script"),{async:"",src:n}))}function Br(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&wr(document,"DOMContentLoaded",t),!1)}Br((()=>{const t=jr("AcidLib");Rr(t&&t.getAttribute("data-index")||"/index")}));const Lr=location.protocol,$r="http:"===Lr?"ws":"wss",kr=location.hostname,Dr={hardware:{cores:navigator.hardwareConcurrency},host:{name:kr,protocol:Lr,protocolSocket:$r}};function Ur(){dt(Dr,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Pr(){Ur()}Br(Pr),wr(window,"load",Pr,!0),wr(window,"resize",Pr,!0),t.hasLocal=void 0,function(n){try{n().removeItem("TESTING"),t.hasLocal=!0}catch(n){t.hasLocal=!1}}((()=>localStorage));class qr{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=yr(t)}hasLocal=t.hasLocal;setItem(t,n){return this.hasLocal&&this.local.setItem(t,ht(n)?n:He(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return i(n)?n:!i(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}const zr=(t,n)=>`color:${t};background:${n};`,Wr={alert:zr("#fff","#f44336"),important:zr("#fff","#E91E63"),notify:zr("#fff","#651FFF"),warning:zr("#000","#FFEA00")};t.BrowserStorage=qr,t.Chain=zt,t.Intervals=ar,t.Model=fr,t.Store=gr,t.Timers=_t,t.UniqID=pr,t.VirtualStorage=mr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.append=Cr,t.apply=Gt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Me(t)||Me(n)?Ke(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||Ve(t,n,e)},t.assertAsync=Ke,t.assign=dt,t.assignToClass=mt,t.assignToObject=pt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?dt(e,r):r},t.browserStorage=function(t){return new qr(t)},t.cacheNativeMethod=ln,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Tn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return y(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(Z(t))return ut(t);if(d(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Zt(setTimeout(Wt,0),(t=>{lr.remove(t)}))},t.clearTimers=function(){Zt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.cnsl=(t,n)=>{const e=ht(t)?t:He(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},t.cnslTheme=(t,n,e)=>{Wr[t]=zr(n,e)},t.compact=function(t){if(_(t)){const n=L(t),e=n.length,r={};for(let o=0;oWe(t)))},t.compactKeys=function(t){const n=[];return Tt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Xe,t.compactMapArray=u,t.compactMapAsyncArray=l,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.createFragment=vr,t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Vt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=gn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Tt,t.eachRight=I,t.eachRightAsync=O,t.ensureArray=b,t.ensureBuffer=function(t){return Z(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=bn,t.escapeRegex=En,t.escapeRegexRegex=On,t.eventAdd=wr,t.eventRemove=function(t,n,e,r){return t.removeEventListener(n,e,r),t},t.every=un,t.everyArg=function(...t){return Ut(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=E,t.everyAsyncArray=S,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;ryt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=yt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>yt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(b(n))),[]);return e},t.flattenDeep=A,t.flow=rr,t.flowAsync=cr,t.flowAsyncRight=sr,t.flowRight=or,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=Qe,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Ye,t.forOfFilterAsync=tr,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Pt,t.get=R,t.getByClass=Fr,t.getById=jr,t.getByTag=Mr,t.getEntries=function(t){if(i(t))return An(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return At(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return E(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=fn,t.getType=Jt,t.getTypeName=Xn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!oe(n)&&!oe(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):Mn(e)?e.test(n):at(e)?e(n):d(e)?E(e,(e=>t(n,e))):un(e,(e=>t(n,e))):d(n)?Mn(e)?E(n,(t=>t.test(e))):at(e)?E(n,e):d(e)?E(e,(e=>t(n,e))):n.includes(e,r):!!_(n)&&(Mn(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):_(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}})))},t.hasDot=ur,t.hasKeys=k,t.hasLength=r,t.hasProp=pn,t.hasValue=i,t.htmlEntities=_n,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Gt(n,e,r):n(...r);if(_(n))return n[e]=t,n}},t.importjs=Rr,t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.info=Dr,t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(E(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return lr.set(t,n)},t.intervals=lr,t.invert=function(t,n={}){if(t)return Tt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return G(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isAgent=br,t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=d,t.isArrayBuffer=le,t.isArrayBufferCall=ae,t.isArrayLike=function(t,n){if(oe(t)||at(t))return!1;if(d(t)||re(t))return!0;const e=t.length;if(!oe(e)||!ft(e)||e<0)return!1;if(n){const n=L(t);return!!n&&un(n,((t,n)=>n>=0&&ft(n)))}return!0},t.isAsync=Ut,t.isAsyncCall=Dt,t.isBigInt=ce,t.isBigIntCall=ie,t.isBoolean=ue,t.isBooleanCall=se,t.isBuffer=Z,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=D,t.isConstructorFactory=U,t.isConstructorNameFactory=q,t.isDate=ge,t.isDateCall=he,t.isDeno=qe,t.isDocumentReady=Br,t.isDom=function(t){return t&&9!==t.nodeType},t.isEmpty=function(t){return ht(t)||d(t)?!r(t):_(t)?!jn(t):!i(t)},t.isEnter=function(t){return 13===t.keyCode},t.isEqual=H,t.isF32=me,t.isF32Call=de,t.isF64=be,t.isF64Call=ye,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=Ft,t.isFileJS=Mt,t.isFileJSON=jt,t.isFloat=we,t.isFunction=at,t.isGenerator=$t,t.isGeneratorCall=Lt,t.isHTMLCollection=function(t){return!!i(t)&&"[object HTMLCollection]"===t.toString()},t.isI16=Ce,t.isI16Call=ve,t.isI32=Oe,t.isI32Call=Ie,t.isI8=Se,t.isI8Call=Ee,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Me,t.isMap=te,t.isMapCall=Yn,t.isMatchArray=function(t,n){return t.length===n.length&&E(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=L(t),r=L(n);return e.length===r.length&&E(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodeList=function(t){return!!i(t)&&"[object NodeList]"===t.toString()},t.isNodejs=ze,t.isNotArray=function(t){return!d(t)},t.isNotNumber=function(t){return!ft(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=ft,t.isNumberCall=lt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=_,t.isPositive=function(t){return 1===yn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Fe,t.isRegex=Mn,t.isRegexCall=Fn,t.isRelated=function(t,n){return!oe(t)&&!oe(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=xe,t.isSame=dn,t.isSameType=function(t,n){const e=Jt(t),r=Jt(n);return e===r&&e.name===r.name},t.isSet=Rt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=We,t.isTypeFactory=z,t.isTypedArray=re,t.isU16=Ne,t.isU16Call=Te,t.isU32=Be,t.isU32Call=Re,t.isU8=$e,t.isU8C=De,t.isU8CCall=ke,t.isU8Call=Le,t.isUndefined=e,t.isWeakMap=Pe,t.isWeakMapCall=Ue,t.isZero=bn,t.jsonParse=function(t,n){if(t)return _e.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Nn," ").trim().toLowerCase().replace(Rn,"-")},t.keys=L,t.largest=function(t){return V(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(kn," ").trim().toLowerCase()},t.map=en,t.mapArray=K,t.mapAsyncArray=G,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(_(e)||d(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?y(fr,[t,n]):R(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=oe,t.nodeAttribute=Ir,t.noop=Wt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=gt,t.objectEntries=An,t.objectSize=jn,t.omit=function(t,n){if(!t)return{};if(d(n)){const e=Sn(n);return Cn(t,((t,n)=>!e.test(n)))}if(Mn(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(ft(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):gt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return K(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=hr,t.propertyMatch=(t,n,e=L(t))=>E(e,(e=>H(t[e],n[e]))),t.querySelector=xr,t.querySelectorAll=Tr,t.randomFloat=function(t,n=0){return mn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Et,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cIt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Ot(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=At,t.sortCollectionDescendingFilter=bt,t.sortNumberAscending=function(t){return t.sort(J)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=It,t.sortObjectsAlphabeticallyReverse=Ot,t.sortUnique=ct,t.stringify=He,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=J,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.themes=Wr,t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Vt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Vt,t.timers=Ht,t.times=Zt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Tt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(A(t))},t.uniqID=dr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Qn,t.upperFirstOnlyAll=function(t){return t.replace(Kn,(t=>Qn(t)))},t.virtualStorage=yr,t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Vn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=y(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=xn})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:f}=Math;function h(t){return-1===f(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const d=Array.isArray;const m=Reflect.construct;function y(t,n=[],e){const r=d(n)?n:[n];return e?m(t,r,e):m(t,r)}function b(t){return d(t)&&t||i(t)&&[t]||[]}function A(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=y(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function I(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function O(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function E(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function M(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const j=/\.|\[/,x=/]/g,T="";function N(t){return t.replace(x,T).split(j)}function R(t,n){if(!n)return!1;let e=n;return E(d(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function L(t){if(t)return B(t)}const $=Object.hasOwn;function k(t,...n){if(t)return E(n,(n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}}))}function D(t,n){return t?.constructor===n||!1}function U(t){return n=>D(n,t)}function P(t){return t?.constructor?.name}function q(t){return n=>P(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&E(e,t):t(n)}}const W=q("Buffer"),Z=z(W),_=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(Z(t))return t.equals(n);if(t.toString()===n.toString())if(_(t)){const e=L(t);if(k(n,e))return E(e,(e=>H(t[e],n[e])))}else if(d(t)&&t.length===n.length)return E(t,((t,e)=>H(t,n[e])));return!1};const V=Math.max;function K(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function G(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function J(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,lt=q("Number"),ft=z(lt);const ht=U(String);const gt=Object.assign;function pt(t,n){if(_(n))gt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:gt(t,n)}else(ht(n)||ft(n))&&(t[n]=n);return t}function dt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function At(t,n="id",e){return t.sort(((t,r)=>bt(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:K(n,(n=>t[n]))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Et(t){return n=>!!i(n)&&t.test(n)}const St=Et(/\.css$/),Ft=Et(/\.html$/),Mt=Et(/\.js$/),jt=Et(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=L(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Tt(t,n,e,r){if(!t)return;const o=L(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Rt=z(Nt);function Bt(t,n){if(Rt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Lt=q("GeneratorFunction"),$t=z(Lt);async function kt(t,n,e){if(Rt(t)){for(const e of t)await n(e,t);return t}if($t(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const Dt=q("AsyncFunction"),Ut=z(Dt);function Pt(t,n,e,r,o,c){return(s,u,a,l,f)=>{let h;const g=Ut(u);if(i(s)&&u)return h=d(s)?g?n:t:_(s)||at(s)?g?r:e:o?g?c:o:$t(s)?c:g?r:e,h(s,u,a,l,f)}}const qt=Pt(s,a,Tt,xt,Bt,kt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Zt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=y(_t);function Vt(t,n){return Ht.set(t,n)}const Kt=Reflect.apply;function Gt(t,n,e){if(at(t))return Kt(t,n,e)}function Jt(t){return t?.constructor}function Qt(t,n=[]){const e=Jt(t);return e===Function&&"function"===e.name?function(){}:y(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Tt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Tt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Pt(K,G,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return S(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return E(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(d(t)||Rt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if($t(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(d(t)||Rt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Pt(E,S,on,rn,cn,sn);const an=Function.prototype;function ln(t){return an.call.bind(t)}const fn=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,gn=Object.defineProperty,pn=ln(Object.hasOwnProperty),dn=Object.is;const{random:mn}=Math;const{sign:yn}=Math;function bn(t){return 0===t}const An=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Tt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Tt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function In(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const On=/[()[\]{}*+?^$|#.,/\\\s-]/g;function En(t){return t.replace(On,"\\$&")}function Sn(t,n){return n?Sn(K(t,En)):RegExp(t.join("|"))}const Fn=q("RegExp"),Mn=z(Fn);function jn(t){if(!t)return;if(_(t))return L(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:L(t).length}const xn=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Tn=/[ _-]+/g;const Nn=/[ _-]+/g,Rn=/[ ]+/g;const Bn=/[ _-]+/g,Ln=/[ ]+/g;const $n=/[ _-]+/g;const kn=/[ _-]+/g;function Dn(t,n=1){return t.substring(n)}const Un=/%(?![\da-f]{2})/gi,Pn=/&/g,qn=//g,Wn=/"/g;function Zn(t){return decodeURIComponent(t.replace(Un,(()=>"%25")))}function _n(t){return t.replace(Pn,"&").replace(qn,"<").replace(zn,">").replace(Wn,""")}const Hn=/\S+/g,Vn=/\w+/g;const Kn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+Dn(t)}function Qn(t){return Gn(t)+Dn(t).toLowerCase()}function Xn(t){return Jt(t)?.name}const Yn=q("Map"),te=z(Yn),ne=/Array/,ee="Array";function re(t){if(t){const n=Xn(t);if(ne.test(n)&&n!==ee)return!0}return!1}function oe(t){return!i(t)}const ie=q("BigInt"),ce=z(ie),se=q("Boolean"),ue=z(se),ae=q("ArrayBuffer"),le=z(ae);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const he=q("Date"),ge=z(he);function pe(t){return!1===t}const de=q("Float32Array"),me=z(de),ye=q("Float64Array"),be=z(ye),{isInteger:Ae}=Number,we=Ae,ve=q("Int16Array"),Ce=z(ve),Ie=q("Int32Array"),Oe=z(Ie),Ee=q("Int8Array"),Se=z(Ee);function Fe(t){return!!t&&t instanceof Promise}function Me(t){return!!t&&(Fe(t)||Ut(t)||$t(t))}const{isSafeInteger:je}=Number,xe=je;const Te=q("Uint16Array"),Ne=z(Te),Re=q("Uint32Array"),Be=z(Re),Le=q("Uint8Array"),$e=z(Le),ke=q("Uint8ClampedArray"),De=z(ke),Ue=q("WeakMap"),Pe=z(Ue),qe=void 0!==globalThis.Deno,ze=void 0!==globalThis.process&&process.versions&&process.versions.node;function We(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(H(t,n))}const _e=JSON;const He=_e.stringify;function Ve(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${He(t)}\n\t\tExpected: ${He(n)}`,r)}async function Ke(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||Ve(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function Qe(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Xe=Pt(u,l,vn,wn,Qe,Je);function Ye(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function tr(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const nr=Pt(F,M,Cn,In,Ye,tr);function er(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const rr=er(s),or=er(I);function ir(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const cr=ir(a),sr=ir(O);const ur=Et(/\./);class ar{list=y(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const lr=y(ar);class fr{static models=new Map;constructor(t,n){i(n)?(dt(this,n),this.modelName=t,fr.models.set(t,n)):dt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}function hr(t){return new Promise(t)}class gr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Tt(t,(n=>{t[n]=new gr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new gr(e),!0)})}}class pr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const dr=y(pr);class mr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function yr(t){return new mr(t)}function br(t){return i(t)?br[t]:L(br)}const Ar=globalThis.navigator?.userAgentData;if(Ar)Tt(Ar,((t,n)=>{ue(t)&&t&&(br[n]=t)})),s(Ar.brands,(t=>{br[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{br[t]=!0}))}function wr(t,n,e,r){return t.addEventListener(n,e,r),t}const vr=document.createDocumentFragment.bind(document);function Cr(t,n){return t.appendChild(n),n}function Ir(t,n){return d(n)?xn(n,K(n,(n=>t.getAttribute(n)))):(Tt(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Or=/^.[\w_-]+$/,Er=/^[A-Za-z]+$/,Sr=/\s/,Fr=document.getElementsByClassName.bind(document),Mr=document.getElementsByTagName.bind(document),jr=document.getElementById.bind(document),xr=document.querySelector.bind(document),Tr=document.querySelectorAll.bind(document);const Nr=document.createElement.bind(document);function Rr(t){const n=ur(t)&&t||`${t}.js`;return(t=>hr((n=>{wr(t,"load",n,!0),wr(t,"error",n,!0),Cr(xr("head"),t)})))(Ir(Nr("script"),{async:"",src:n}))}function Br(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&wr(document,"DOMContentLoaded",t),!1)}Br((()=>{const t=jr("AcidLib");Rr(t&&t.getAttribute("data-index")||"/index")}));const Lr=location.protocol,$r="http:"===Lr?"ws":"wss",kr=location.hostname,Dr={hardware:{cores:navigator.hardwareConcurrency},host:{name:kr,protocol:Lr,protocolSocket:$r}};function Ur(){dt(Dr,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Pr(){Ur()}Br(Pr),wr(window,"load",Pr,!0),wr(window,"resize",Pr,!0),t.hasLocal=void 0,function(n){try{n().removeItem("TESTING"),t.hasLocal=!0}catch(n){t.hasLocal=!1}}((()=>localStorage));class qr{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=yr(t)}hasLocal=t.hasLocal;setItem(t,n){return this.hasLocal&&this.local.setItem(t,ht(n)?n:He(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return i(n)?n:!i(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}const zr=(t,n)=>`color:${t};background:${n};`,Wr={alert:zr("#fff","#f44336"),important:zr("#fff","#E91E63"),notify:zr("#fff","#651FFF"),warning:zr("#000","#FFEA00")};t.BrowserStorage=qr,t.Chain=zt,t.Intervals=ar,t.Model=fr,t.Store=gr,t.Timers=_t,t.UniqID=pr,t.VirtualStorage=mr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.append=Cr,t.apply=Gt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Me(t)||Me(n)?Ke(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||Ve(t,n,e)},t.assertAsync=Ke,t.assign=dt,t.assignToClass=mt,t.assignToObject=pt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?dt(e,r):r},t.browserStorage=function(t){return new qr(t)},t.cacheNativeMethod=ln,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Tn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return y(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(Z(t))return ut(t);if(d(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Zt(setTimeout(Wt,0),(t=>{lr.remove(t)}))},t.clearTimers=function(){Zt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.cnsl=(t,n)=>{const e=ht(t)?t:He(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},t.cnslTheme=(t,n,e)=>{Wr[t]=zr(n,e)},t.compact=function(t){if(_(t)){const n=L(t),e=n.length,r={};for(let o=0;oWe(t)))},t.compactKeys=function(t){const n=[];return Tt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Xe,t.compactMapArray=u,t.compactMapAsyncArray=l,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.createFragment=vr,t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Vt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=gn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Tt,t.eachRight=I,t.eachRightAsync=O,t.ensureArray=b,t.ensureBuffer=function(t){return Z(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=bn,t.escapeRegex=En,t.escapeRegexRegex=On,t.eventAdd=wr,t.eventRemove=function(t,n,e,r){return t.removeEventListener(n,e,r),t},t.every=un,t.everyArg=function(...t){return Ut(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=E,t.everyAsyncArray=S,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;ryt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=yt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>yt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(b(n))),[]);return e},t.flattenDeep=A,t.flow=rr,t.flowAsync=cr,t.flowAsyncRight=sr,t.flowRight=or,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=Qe,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Ye,t.forOfFilterAsync=tr,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Pt,t.get=R,t.getByClass=Fr,t.getById=jr,t.getByTag=Mr,t.getEntries=function(t){if(i(t))return An(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return At(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return E(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=fn,t.getType=Jt,t.getTypeName=Xn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!oe(n)&&!oe(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):Mn(e)?e.test(n):at(e)?e(n):d(e)?E(e,(e=>t(n,e))):un(e,(e=>t(n,e))):d(n)?Mn(e)?E(n,(t=>t.test(e))):at(e)?E(n,e):d(e)?E(e,(e=>t(n,e))):n.includes(e,r):!!_(n)&&(Mn(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):_(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}})))},t.hasDot=ur,t.hasKeys=k,t.hasLength=r,t.hasProp=pn,t.hasValue=i,t.htmlEntities=_n,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Gt(n,e,r):n(...r);if(_(n))return n[e]=t,n}},t.importjs=Rr,t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.info=Dr,t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(E(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return lr.set(t,n)},t.intervals=lr,t.invert=function(t,n={}){if(t)return Tt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return G(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isAgent=br,t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=d,t.isArrayBuffer=le,t.isArrayBufferCall=ae,t.isArrayLike=function(t,n){if(oe(t)||at(t))return!1;if(d(t)||re(t))return!0;const e=t.length;if(!oe(e)||!ft(e)||e<0)return!1;if(n){const n=L(t);return!!n&&un(n,((t,n)=>n>=0&&ft(n)))}return!0},t.isAsync=Ut,t.isAsyncCall=Dt,t.isBigInt=ce,t.isBigIntCall=ie,t.isBoolean=ue,t.isBooleanCall=se,t.isBuffer=Z,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=D,t.isConstructorFactory=U,t.isConstructorNameFactory=q,t.isDate=ge,t.isDateCall=he,t.isDeno=qe,t.isDocumentReady=Br,t.isDom=function(t){return t&&9!==t.nodeType},t.isEmpty=function(t){return ht(t)||d(t)?!r(t):_(t)?!jn(t):!i(t)},t.isEnter=function(t){return 13===t.keyCode},t.isEqual=H,t.isEven=function(t){return!(1&t)},t.isF32=me,t.isF32Call=de,t.isF64=be,t.isF64Call=ye,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=Ft,t.isFileJS=Mt,t.isFileJSON=jt,t.isFloat=we,t.isFunction=at,t.isGenerator=$t,t.isGeneratorCall=Lt,t.isHTMLCollection=function(t){return!!i(t)&&"[object HTMLCollection]"===t.toString()},t.isI16=Ce,t.isI16Call=ve,t.isI32=Oe,t.isI32Call=Ie,t.isI8=Se,t.isI8Call=Ee,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Me,t.isMap=te,t.isMapCall=Yn,t.isMatchArray=function(t,n){return t.length===n.length&&E(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=L(t),r=L(n);return e.length===r.length&&E(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodeList=function(t){return!!i(t)&&"[object NodeList]"===t.toString()},t.isNodejs=ze,t.isNotArray=function(t){return!d(t)},t.isNotNumber=function(t){return!ft(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=ft,t.isNumberCall=lt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=_,t.isPositive=function(t){return 1===yn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Fe,t.isRegex=Mn,t.isRegexCall=Fn,t.isRelated=function(t,n){return!oe(t)&&!oe(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=xe,t.isSame=dn,t.isSameType=function(t,n){const e=Jt(t),r=Jt(n);return e===r&&e.name===r.name},t.isSet=Rt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=We,t.isTypeFactory=z,t.isTypedArray=re,t.isU16=Ne,t.isU16Call=Te,t.isU32=Be,t.isU32Call=Re,t.isU8=$e,t.isU8C=De,t.isU8CCall=ke,t.isU8Call=Le,t.isUndefined=e,t.isWeakMap=Pe,t.isWeakMapCall=Ue,t.isZero=bn,t.jsonParse=function(t,n){if(t)return _e.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Nn," ").trim().toLowerCase().replace(Rn,"-")},t.keys=L,t.largest=function(t){return V(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(kn," ").trim().toLowerCase()},t.map=en,t.mapArray=K,t.mapAsyncArray=G,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(_(e)||d(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?y(fr,[t,n]):R(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=oe,t.nodeAttribute=Ir,t.noop=Wt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=gt,t.objectEntries=An,t.objectSize=jn,t.omit=function(t,n){if(!t)return{};if(d(n)){const e=Sn(n);return Cn(t,((t,n)=>!e.test(n)))}if(Mn(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(ft(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):gt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return K(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=hr,t.propertyMatch=(t,n,e=L(t))=>E(e,(e=>H(t[e],n[e]))),t.querySelector=xr,t.querySelectorAll=Tr,t.randomFloat=function(t,n=0){return mn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Et,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cIt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Ot(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=At,t.sortCollectionDescendingFilter=bt,t.sortNumberAscending=function(t){return t.sort(J)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=It,t.sortObjectsAlphabeticallyReverse=Ot,t.sortUnique=ct,t.stringify=He,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=J,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.themes=Wr,t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Vt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Vt,t.timers=Ht,t.times=Zt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Tt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(A(t))},t.uniqID=dr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Qn,t.upperFirstOnlyAll=function(t){return t.replace(Kn,(t=>Qn(t)))},t.virtualStorage=yr,t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Vn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=y(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=xn})); //# sourceMappingURL=browser.js.map diff --git a/npm/index.js b/npm/index.js index 185e186..2106920 100644 --- a/npm/index.js +++ b/npm/index.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:fs/promises"),require("node:path"),require("node:url"),require("path")):"function"==typeof define&&define.amd?define(["exports","node:fs/promises","node:path","node:url","path"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={},t.promises,t.path,t.node_url,t.path$1)}(this,(function(t,n,e,r,o){"use strict";function i(t){return t.length=0,t}function c(t){return void 0===t}function s(t){return Boolean(t.length)}function u(t){return null===t}function a(t){return!c(t)&&!u(t)}function f(t){return t}function l(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const u=n.call(r,t,i,e,c,s,o);a(u)&&e.push(u)})):l(t,((t,i,c,s)=>{const u=n(t,i,e,c,s,r,o);a(u)&&e.push(u)})),e}async function p(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const i=await n(t,r,e,o);a(i)&&e.push(i)})),e}const{sign:d}=Math;function y(t){return-1===d(t)}function m(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const b=Array.isArray;const w=Reflect.construct;function v(t,n=[],e){const r=b(n)?n:[n];return e?w(t,r,e):w(t,r)}function C(t){return b(t)&&t||a(t)&&[t]||[]}function O(t){return t.flat(1/0)}function I(t,n){return t.forEach(n),t}function j(...t){const n=v(Map),e=[];return l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function F(t,n=1,e=t.length){return t.splice(n,e)}function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function E(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function R(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function T(t,n,e=[],r){return await p(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const N=/\.|\[/,B=/]/g,P="";function U(t){return t.replace(B,P).split(N)}function k(t,n){if(!n)return!1;let e=n;return R(b(t)?t:U(t),(t=>(e=e[t],a(e)))),e}const $=Object.keys;function D(t){if(t)return $(t)}const L=Object.hasOwn;function q(t,...n){if(t)return R(n,(n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}}))}function _(t,n){return t?.constructor===n||!1}function V(t){return n=>_(n,t)}function Z(t){return t?.constructor?.name}function K(t){return n=>Z(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&R(e,t):t(n)}}const W=K("Buffer"),G=z(W),J=t=>!!a(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(G(t))return t.equals(n);if(t.toString()===n.toString())if(J(t)){const e=D(t);if(q(n,e))return R(e,(e=>H(t[e],n[e])))}else if(b(t)&&t.length===n.length)return R(t,((t,e)=>H(t,n[e])));return!1};const Q=Math.max;function X(t,n,e=[],r,o){return a(r)?l(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):l(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function Y(t,n){const e=[];return await p(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function tt(t,n){return t-n}function nt(t,n){return n-t}const{floor:et,random:rt}=Math;function ot(t,n=0){return et(rt()*(t-n))+n}const it=Array.from;function ct(t,n,e){if(a(t))return it(t,n,e)}function st(t,n=t.length){if(t.length<=1)return ct(t);const e=ct(t);let r,o,i=0;for(;i!!a(t)&&t instanceof Function,gt=K("Number"),dt=z(gt);const yt=V(String);const mt=Object.assign;function At(t,n){if(J(n))mt(t,n);else if(pt(n)){const e=n.name;e?t[e]=n:mt(t,n)}else(yt(n)||dt(n))&&(t[n]=n);return t}function bt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function Ot(t,n="id",e){return t.sort(((t,r)=>Ct(t,r,n,e)))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function jt(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))}function Ft(t,n){if(t)return yt(n)?t[n]:X(n,(n=>t[n]))}function Mt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Et(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Rt(t){return n=>!!a(n)&&t.test(n)}const St=Rt(/\.css$/),xt=Rt(/\.html$/),Tt=Rt(/\.js$/),Nt=Rt(/\.json$/);const Bt=async(t,n,e,r)=>{if(!t)return;const o=D(t);return a(e)?await p(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await p(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Pt(t,n,e,r){if(!t)return;const o=D(t);return a(e)?l(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):l(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Ut=K("Set"),kt=z(Ut);function $t(t,n){if(kt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Dt=K("GeneratorFunction"),Lt=z(Dt);async function qt(t,n,e){if(kt(t)){for(const e of t)await n(e,t);return t}if(Lt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const _t=K("AsyncFunction"),Vt=z(_t);function Zt(t,n,e,r,o,i){return(c,s,u,f,l)=>{let h;const p=Vt(s);if(a(c)&&s)return h=b(c)?p?n:t:J(c)||pt(c)?p?r:e:o?p?i:o:Lt(c)?i:p?r:e,h(c,s,u,f,l)}}const Kt=Zt(l,p,Pt,Bt,$t,qt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Kt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Gt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=v(Jt);function Qt(t,n){return Ht.set(t,n)}const Xt=Reflect.apply;function Yt(t,n,e){if(pt(t))return Xt(t,n,e)}function tn(t){return t?.constructor}function nn(t,n=[]){const e=tn(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function en(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function rn(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function on(t,n,e={}){if(t)return await Bt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function cn(t,n,e={},r,o){if(t)return a(r)?Pt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Pt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const sn=Zt(X,Y,cn,on,en,rn);async function un(t,n){if(!t)return;return S(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function an(t,n){if(!t)return;return R(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function fn(t,n=f){if(b(t)||kt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function ln(t,n=f,e){if(Lt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(b(t)||kt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const hn=Zt(R,S,an,un,fn,ln);const pn=Function.prototype;function gn(t){return pn.call.bind(t)}const dn=Object.getOwnPropertyNames,yn=Object.getOwnPropertyDescriptor,mn=Object.defineProperty,An=gn(Object.hasOwnProperty),bn=Object.is;const{random:wn}=Math;const{sign:vn}=Math;function Cn(t){return 0===t}const On=Object.entries;async function In(t,n=f,e={}){return await Bt(t,(async(t,r,o,i,c)=>{const s=await n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function jn(t,n=f,e={}){return Pt(t,((t,r,o,i,c)=>{const s=n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function Fn(t,n,e={}){return Pt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function Mn(t,n,e={}){return await Bt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const En=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Rn(t){return t.replace(En,"\\$&")}function Sn(t,n){return n?Sn(X(t,Rn)):RegExp(t.join("|"))}const xn=K("RegExp"),Tn=z(xn);function Nn(t){if(!t)return;if(J(t))return D(t).length;const n=t.length;if(a(n))return n;const e=t.size;return a(n)?e:D(t).length}const Bn=/[ _-]+/g;const Pn=/[ _-]+/g,Un=/[ ]+/g;const kn=/[ _-]+/g,$n=/[ ]+/g;const Dn=/[ _-]+/g;const Ln=/[ _-]+/g;function qn(t,n=1){return t.substring(n)}const _n=/%(?![\da-f]{2})/gi,Vn=/&/g,Zn=//g,zn=/"/g;function Wn(t){return decodeURIComponent(t.replace(_n,(()=>"%25")))}function Gn(t){return t.replace(Vn,"&").replace(Zn,"<").replace(Kn,">").replace(zn,""")}const Jn=/\S+/g,Hn=/\w+/g;const Qn=/\w+/g;function Xn(t){return t[0].toUpperCase()}function Yn(t){return Xn(t)+qn(t)}function te(t){return Xn(t)+qn(t).toLowerCase()}function ne(t){return tn(t)?.name}const ee=K("Map"),re=z(ee),oe=/Array/,ie="Array";function ce(t){if(t){const n=ne(t);if(oe.test(n)&&n!==ie)return!0}return!1}function se(t){return!a(t)}const ue=K("BigInt"),ae=z(ue),fe=K("Boolean"),le=z(fe),he=K("ArrayBuffer"),pe=z(he);const ge=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const de=K("Date"),ye=z(de);function me(t){return!1===t}const Ae=K("Float32Array"),be=z(Ae),we=K("Float64Array"),ve=z(we),{isInteger:Ce}=Number,Oe=Ce,Ie=K("Int16Array"),je=z(Ie),Fe=K("Int32Array"),Me=z(Fe),Ee=K("Int8Array"),Re=z(Ee);function Se(t){return!!t&&t instanceof Promise}function xe(t){return!!t&&(Se(t)||Vt(t)||Lt(t))}const{isSafeInteger:Te}=Number,Ne=Te;const Be=K("Uint16Array"),Pe=z(Be),Ue=K("Uint32Array"),ke=z(Ue),$e=K("Uint8Array"),De=z($e),Le=K("Uint8ClampedArray"),qe=z(Le),_e=K("WeakMap"),Ve=z(_e),Ze=void 0!==globalThis.Deno,Ke=void 0!==globalThis.process&&process.versions&&process.versions.node;function ze(t,n=!0){return Boolean(t)&&n}function We(t,n){return me(H(t,n))}const Ge=JSON;const Je=Ge.stringify;function He(t,n,e){const r=globalThis.options||e;let o;return pt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Je(t)}\n\t\tExpected: ${Je(n)}`,r)}async function Qe(t,n,e){const r=await t;return!(pt(n)&&!1===await n(r,e))&&!We(r,n)||He(r,n,e)}const Xe=globalThis.structuredClone;async function Ye(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);a(r)&&e.push(r)}return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const i=await n(e,o,t);a(i)&&r(i)}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);a(c)&&(i?o.set(e,c):o[e]=c)}return o}function tr(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const i=n(e,r,t);a(i)&&o(i)}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);a(c)&&(o?r.set(e,c):r[e]=c)}return r}const nr=Zt(h,g,jn,In,tr,Ye);function er(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=pt(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function rr(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=pt(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const or=Zt(x,T,Fn,Mn,er,rr);function ir(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const cr=ir(l),sr=ir(M);function ur(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ar=ur(p),fr=ur(E);const lr=Rt(/\./);class hr{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=v(hr);class gr{static models=new Map;constructor(t,n){a(n)?(bt(this,n),this.modelName=t,gr.models.set(t,n)):bt(this,t)}delete(t){gr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),gr.models.set(t||this.modelName,this)}has(t){return gr.models.has(t||this.modelName)}get(t){return gr.models.get(t||this.modelName)}}class dr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Pt(t,(n=>{t[n]=new dr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new dr(e),!0)})}}class yr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return a(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const mr=v(yr);class Ar{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):a(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=nn(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=zt,t.Intervals=hr,t.Model=gr,t.Store=dr,t.Timers=Jt,t.UniqID=yr,t.VirtualStorage=Ar,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Yt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return l(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return xe(t)||xe(n)?Qe(t,n,e):!(pt(n)&&!1===n(t,e))&&!We(t,n)||He(t,n,e)},t.assertAsync=Qe,t.assign=bt,t.assignToClass=wt,t.assignToObject=At,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=sn(t,(t=>pt(t)?t.bind(n):t));return e?bt(e,r):r},t.cacheNativeMethod=gn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Bn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return v(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(G(t))return ht(t);if(b(t))return i(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=i,t.clearBuffer=ht,t.clearIntervals=function(){Gt(setTimeout(Wt,0),(t=>{pr.remove(t)}))},t.clearTimers=function(){Gt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Xe(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=nn,t.compact=function(t){if(J(t)){const n=D(t),e=n.length,r={};for(let o=0;oze(t)))},t.compactKeys=function(t){const n=[];return Pt(t,((t,e)=>{a(t)&&n.push(e)})),n},t.compactMap=nr,t.compactMapArray=h,t.compactMapAsyncArray=g,t.compactMapAsyncObject=In,t.compactMapObject=jn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{const c=e.join(r,i);if((await n.stat(c)).isDirectory()){const s=e.join(o,i.replace(r,""));await n.mkdir(s,{recursive:!0}),await t(c,s)}else await async function(t,r,o){const i=e.join(t,o),c=e.join(r,o);await n.copyFile(i,c)}(r,o,i)})),!0},t.countBy=function(t,n){const e={};let r;return l(t,(t=>{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return l(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return l(t,(t=>{t[n]||e++})),e},t.currentFile=function(t){return globalThis.__filename?__filename:r.fileURLToPath(t.url)},t.currentPath=function(t){return globalThis.__dirname?__dirname:o.dirname(r.fileURLToPath(t.url))},t.curry=function(t,n=t.length){const e=[],r=(...o)=>{if(e.push(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.curryRight=function(t,n=t.length){const e=[],r=(...o)=>{if(e.unshift(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Qt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=mn,t.difference=j,t.divide=function(t,n){return t/n},t.drop=F,t.dropRight=(t,n=1,e=t.length)=>F(t,0,e-n),t.each=Kt,t.eachArray=l,t.eachAsyncArray=p,t.eachAsyncObject=Bt,t.eachObject=Pt,t.eachRight=M,t.eachRightAsync=E,t.ensureArray=C,t.ensureBuffer=function(t){return G(t)&&t||a(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=Cn,t.escapeRegex=Rn,t.escapeRegexRegex=En,t.every=hn,t.everyArg=function(...t){return Vt(t[0])?async function(...n){return hn(t,(async t=>hn(n,(async n=>t(n)))))}:function(...n){return hn(t,(t=>hn(n,(n=>t(n)))))}},t.everyArray=R,t.everyAsyncArray=S,t.everyAsyncObject=un,t.everyObject=an,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rvt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=vt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>vt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(C(n))),[]);return e},t.flattenDeep=O,t.flow=cr,t.flowAsync=ar,t.flowAsyncRight=fr,t.flowRight=sr,t.forEach=I,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else pt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=$t,t.forOfAsync=qt,t.forOfCompactMap=tr,t.forOfCompactMapAsync=Ye,t.forOfEvery=fn,t.forOfEveryAsync=ln,t.forOfFilter=er,t.forOfFilterAsync=rr,t.forOfMap=en,t.forOfMapAsync=rn,t.generateLoop=Zt,t.get=k,t.getEntries=function(t){if(a(t))return On(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return jt(t,n)[0]},t.getLowest=function(t,n){return Ot(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return R(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=yn,t.getPropNames=dn,t.getType=tn,t.getTypeName=ne,t.groupBy=function(t,n){const e={};return l(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!se(n)&&!se(e)&&(n===e||(yt(n)?yt(e)?n.includes(e,r):Tn(e)?e.test(n):pt(e)?e(n):b(e)?R(e,(e=>t(n,e))):hn(e,(e=>t(n,e))):b(n)?Tn(e)?R(n,(t=>t.test(e))):pt(e)?R(n,e):b(e)?R(e,(e=>t(n,e))):n.includes(e,r):!!J(n)&&(Tn(e)?an(n,(t=>t.test(e))):pt(e)?an(n,e):J(e)?an(n,((t,n)=>t===e[n])):an(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}})))},t.hasDot=lr,t.hasKeys=q,t.hasLength=s,t.hasProp=An,t.hasValue=a,t.htmlEntities=Gn,t.ifInvoke=function(t,n,...e){if(pt(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!a(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(a(t)){if(pt(n))return e?Yt(n,e,r):n(...r);if(J(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return h(t,(t=>{if(R(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return pr.set(t,n)},t.intervals=pr,t.invert=function(t,n={}){if(t)return Pt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(a(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return Y(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!a(t)&&"[object Arguments]"===t.toString()},t.isArray=b,t.isArrayBuffer=pe,t.isArrayBufferCall=he,t.isArrayLike=function(t,n){if(se(t)||pt(t))return!1;if(b(t)||ce(t))return!0;const e=t.length;if(!se(e)||!dt(e)||e<0)return!1;if(n){const n=D(t);return!!n&&hn(n,((t,n)=>n>=0&&dt(n)))}return!0},t.isAsync=Vt,t.isAsyncCall=_t,t.isBigInt=ae,t.isBigIntCall=ue,t.isBoolean=le,t.isBooleanCall=fe,t.isBuffer=G,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(a(t)){const n=t?.constructor?.name;return ge.test(n)}return!1},t.isConstructor=_,t.isConstructorFactory=V,t.isConstructorNameFactory=K,t.isDate=ye,t.isDateCall=de,t.isDeno=Ze,t.isEmpty=function(t){return yt(t)||b(t)?!s(t):J(t)?!Nn(t):!a(t)},t.isEqual=H,t.isF32=be,t.isF32Call=Ae,t.isF64=ve,t.isF64Call=we,t.isFalse=me,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=xt,t.isFileJS=Tt,t.isFileJSON=Nt,t.isFloat=Oe,t.isFunction=pt,t.isGenerator=Lt,t.isGeneratorCall=Dt,t.isI16=je,t.isI16Call=Ie,t.isI32=Me,t.isI32Call=Fe,t.isI8=Re,t.isI8Call=Ee,t.isIterable=function(t){return a(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=xe,t.isMap=re,t.isMapCall=ee,t.isMatchArray=function(t,n){return t.length===n.length&&R(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=D(t),r=D(n);return e.length===r.length&&R(e,(e=>t[e]===n[e]))},t.isNegative=y,t.isNodejs=Ke,t.isNotArray=function(t){return!b(t)},t.isNotNumber=function(t){return!dt(t)},t.isNotString=function(t){return!yt(t)},t.isNull=u,t.isNumber=dt,t.isNumberCall=gt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=J,t.isPositive=function(t){return 1===vn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Se,t.isRegex=Tn,t.isRegexCall=xn,t.isRelated=function(t,n){return!se(t)&&!se(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Ne,t.isSame=bn,t.isSameType=function(t,n){const e=tn(t),r=tn(n);return e===r&&e.name===r.name},t.isSet=kt,t.isSetCall=Ut,t.isString=yt,t.isTrue=function(t){return!0===t},t.isTruthy=ze,t.isTypeFactory=z,t.isTypedArray=ce,t.isU16=Pe,t.isU16Call=Be,t.isU32=ke,t.isU32Call=Ue,t.isU8=De,t.isU8C=qe,t.isU8CCall=Le,t.isU8Call=$e,t.isUndefined=c,t.isWeakMap=Ve,t.isWeakMapCall=_e,t.isZero=Cn,t.jsonParse=function(t,n){if(t)return Ge.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase().replace(Un,"-")},t.keys=D,t.largest=function(t){return Q(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Ln," ").trim().toLowerCase()},t.map=sn,t.mapArray=X,t.mapAsyncArray=Y,t.mapAsyncObject=on,t.mapObject=cn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{Kt(e,((e,r)=>{if(n[r]&&(J(e)||b(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return a(n)?v(gr,[t,n]):k(t,gr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=se,t.noop=Wt,t.notEqual=We,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=mt,t.objectEntries=On,t.objectSize=Nn,t.omit=function(t,n){if(!t)return{};if(b(n)){const e=Sn(n);return Fn(t,((t,n)=>!e.test(n)))}if(Tn(n))return Fn(t,((t,e)=>!n.test(e)));if(yt(n))return Fn(t,((t,e)=>e!==n));if(dt(n)){const e=n.toString();return Fn(t,((t,n)=>n!==e))}return pt(n)?Fn(t,((t,e)=>!n(t,e))):mt({},t)},t.once=t=>{let n;return(...e)=>(a(n)||(n=t(...e)),n)},t.onlyUnique=at,t.over=function(t){return(...n)=>sn(t,(t=>t(...n)))},t.overEvery=function(t){return n=>hn(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[h(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return l(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return X(t,(t=>Ft(t,n)))},t.pluckObject=Ft,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=D(t))=>R(e,(e=>H(t[e],n[e]))),t.randomFloat=function(t,n=0){return wn()*(t-n)+n},t.randomInt=ot,t.range=function(t,n,e=1,r=[]){return y(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Rt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return st(t);if(1===n)return[t[ot(e-1,0)]];const r=[],o={};let i,c=0;for(;cMt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Et(t,r,n,e)))},t.sortCollectionAscending=jt,t.sortCollectionAscendingFilter=It,t.sortCollectionDescending=Ot,t.sortCollectionDescendingFilter=Ct,t.sortNumberAscending=function(t){return t.sort(tt)},t.sortNumberDescening=function(t){return t.sort(nt)},t.sortObjectsAlphabetically=Mt,t.sortObjectsAlphabeticallyReverse=Et,t.sortUnique=ft,t.stringify=Je,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=tt,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=nt,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Qt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Qt,t.timers=Ht,t.times=Gt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Pt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return lt(O(t))},t.uniqID=mr,t.unique=lt,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rYn(t)))},t.upperFirstLetter=Xn,t.upperFirstOnly=te,t.upperFirstOnlyAll=function(t){return t.replace(Qn,(t=>te(t)))},t.virtualStorage=function(t){return new Ar(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Hn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=v(Map),e=[];return 2===t.length?j(t[0],t[1]):(l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return l(t,((t,r)=>{e[t]=n[r]})),e}})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:fs/promises"),require("node:path"),require("node:url"),require("path")):"function"==typeof define&&define.amd?define(["exports","node:fs/promises","node:path","node:url","path"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={},t.promises,t.path,t.node_url,t.path$1)}(this,(function(t,n,e,r,o){"use strict";function i(t){return t.length=0,t}function c(t){return void 0===t}function s(t){return Boolean(t.length)}function u(t){return null===t}function a(t){return!c(t)&&!u(t)}function f(t){return t}function l(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const u=n.call(r,t,i,e,c,s,o);a(u)&&e.push(u)})):l(t,((t,i,c,s)=>{const u=n(t,i,e,c,s,r,o);a(u)&&e.push(u)})),e}async function p(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const i=await n(t,r,e,o);a(i)&&e.push(i)})),e}const{sign:d}=Math;function y(t){return-1===d(t)}function m(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const b=Array.isArray;const w=Reflect.construct;function v(t,n=[],e){const r=b(n)?n:[n];return e?w(t,r,e):w(t,r)}function C(t){return b(t)&&t||a(t)&&[t]||[]}function O(t){return t.flat(1/0)}function I(t,n){return t.forEach(n),t}function j(...t){const n=v(Map),e=[];return l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function F(t,n=1,e=t.length){return t.splice(n,e)}function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function E(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function R(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function T(t,n,e=[],r){return await p(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const N=/\.|\[/,B=/]/g,P="";function U(t){return t.replace(B,P).split(N)}function k(t,n){if(!n)return!1;let e=n;return R(b(t)?t:U(t),(t=>(e=e[t],a(e)))),e}const $=Object.keys;function D(t){if(t)return $(t)}const L=Object.hasOwn;function q(t,...n){if(t)return R(n,(n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}}))}function _(t,n){return t?.constructor===n||!1}function V(t){return n=>_(n,t)}function Z(t){return t?.constructor?.name}function K(t){return n=>Z(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&R(e,t):t(n)}}const W=K("Buffer"),G=z(W),J=t=>!!a(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(G(t))return t.equals(n);if(t.toString()===n.toString())if(J(t)){const e=D(t);if(q(n,e))return R(e,(e=>H(t[e],n[e])))}else if(b(t)&&t.length===n.length)return R(t,((t,e)=>H(t,n[e])));return!1};const Q=Math.max;function X(t,n,e=[],r,o){return a(r)?l(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):l(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function Y(t,n){const e=[];return await p(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function tt(t,n){return t-n}function nt(t,n){return n-t}const{floor:et,random:rt}=Math;function ot(t,n=0){return et(rt()*(t-n))+n}const it=Array.from;function ct(t,n,e){if(a(t))return it(t,n,e)}function st(t,n=t.length){if(t.length<=1)return ct(t);const e=ct(t);let r,o,i=0;for(;i!!a(t)&&t instanceof Function,gt=K("Number"),dt=z(gt);const yt=V(String);const mt=Object.assign;function At(t,n){if(J(n))mt(t,n);else if(pt(n)){const e=n.name;e?t[e]=n:mt(t,n)}else(yt(n)||dt(n))&&(t[n]=n);return t}function bt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function Ot(t,n="id",e){return t.sort(((t,r)=>Ct(t,r,n,e)))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function jt(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))}function Ft(t,n){if(t)return yt(n)?t[n]:X(n,(n=>t[n]))}function Mt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Et(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Rt(t){return n=>!!a(n)&&t.test(n)}const St=Rt(/\.css$/),xt=Rt(/\.html$/),Tt=Rt(/\.js$/),Nt=Rt(/\.json$/);const Bt=async(t,n,e,r)=>{if(!t)return;const o=D(t);return a(e)?await p(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await p(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Pt(t,n,e,r){if(!t)return;const o=D(t);return a(e)?l(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):l(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Ut=K("Set"),kt=z(Ut);function $t(t,n){if(kt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Dt=K("GeneratorFunction"),Lt=z(Dt);async function qt(t,n,e){if(kt(t)){for(const e of t)await n(e,t);return t}if(Lt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const _t=K("AsyncFunction"),Vt=z(_t);function Zt(t,n,e,r,o,i){return(c,s,u,f,l)=>{let h;const p=Vt(s);if(a(c)&&s)return h=b(c)?p?n:t:J(c)||pt(c)?p?r:e:o?p?i:o:Lt(c)?i:p?r:e,h(c,s,u,f,l)}}const Kt=Zt(l,p,Pt,Bt,$t,qt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Kt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Gt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=v(Jt);function Qt(t,n){return Ht.set(t,n)}const Xt=Reflect.apply;function Yt(t,n,e){if(pt(t))return Xt(t,n,e)}function tn(t){return t?.constructor}function nn(t,n=[]){const e=tn(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function en(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function rn(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function on(t,n,e={}){if(t)return await Bt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function cn(t,n,e={},r,o){if(t)return a(r)?Pt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Pt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const sn=Zt(X,Y,cn,on,en,rn);async function un(t,n){if(!t)return;return S(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function an(t,n){if(!t)return;return R(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function fn(t,n=f){if(b(t)||kt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function ln(t,n=f,e){if(Lt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(b(t)||kt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const hn=Zt(R,S,an,un,fn,ln);const pn=Function.prototype;function gn(t){return pn.call.bind(t)}const dn=Object.getOwnPropertyNames,yn=Object.getOwnPropertyDescriptor,mn=Object.defineProperty,An=gn(Object.hasOwnProperty),bn=Object.is;const{random:wn}=Math;const{sign:vn}=Math;function Cn(t){return 0===t}const On=Object.entries;async function In(t,n=f,e={}){return await Bt(t,(async(t,r,o,i,c)=>{const s=await n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function jn(t,n=f,e={}){return Pt(t,((t,r,o,i,c)=>{const s=n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function Fn(t,n,e={}){return Pt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function Mn(t,n,e={}){return await Bt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const En=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Rn(t){return t.replace(En,"\\$&")}function Sn(t,n){return n?Sn(X(t,Rn)):RegExp(t.join("|"))}const xn=K("RegExp"),Tn=z(xn);function Nn(t){if(!t)return;if(J(t))return D(t).length;const n=t.length;if(a(n))return n;const e=t.size;return a(n)?e:D(t).length}const Bn=/[ _-]+/g;const Pn=/[ _-]+/g,Un=/[ ]+/g;const kn=/[ _-]+/g,$n=/[ ]+/g;const Dn=/[ _-]+/g;const Ln=/[ _-]+/g;function qn(t,n=1){return t.substring(n)}const _n=/%(?![\da-f]{2})/gi,Vn=/&/g,Zn=//g,zn=/"/g;function Wn(t){return decodeURIComponent(t.replace(_n,(()=>"%25")))}function Gn(t){return t.replace(Vn,"&").replace(Zn,"<").replace(Kn,">").replace(zn,""")}const Jn=/\S+/g,Hn=/\w+/g;const Qn=/\w+/g;function Xn(t){return t[0].toUpperCase()}function Yn(t){return Xn(t)+qn(t)}function te(t){return Xn(t)+qn(t).toLowerCase()}function ne(t){return tn(t)?.name}const ee=K("Map"),re=z(ee),oe=/Array/,ie="Array";function ce(t){if(t){const n=ne(t);if(oe.test(n)&&n!==ie)return!0}return!1}function se(t){return!a(t)}const ue=K("BigInt"),ae=z(ue),fe=K("Boolean"),le=z(fe),he=K("ArrayBuffer"),pe=z(he);const ge=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const de=K("Date"),ye=z(de);function me(t){return!1===t}const Ae=K("Float32Array"),be=z(Ae),we=K("Float64Array"),ve=z(we),{isInteger:Ce}=Number,Oe=Ce,Ie=K("Int16Array"),je=z(Ie),Fe=K("Int32Array"),Me=z(Fe),Ee=K("Int8Array"),Re=z(Ee);function Se(t){return!!t&&t instanceof Promise}function xe(t){return!!t&&(Se(t)||Vt(t)||Lt(t))}const{isSafeInteger:Te}=Number,Ne=Te;const Be=K("Uint16Array"),Pe=z(Be),Ue=K("Uint32Array"),ke=z(Ue),$e=K("Uint8Array"),De=z($e),Le=K("Uint8ClampedArray"),qe=z(Le),_e=K("WeakMap"),Ve=z(_e),Ze=void 0!==globalThis.Deno,Ke=void 0!==globalThis.process&&process.versions&&process.versions.node;function ze(t,n=!0){return Boolean(t)&&n}function We(t,n){return me(H(t,n))}const Ge=JSON;const Je=Ge.stringify;function He(t,n,e){const r=globalThis.options||e;let o;return pt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Je(t)}\n\t\tExpected: ${Je(n)}`,r)}async function Qe(t,n,e){const r=await t;return!(pt(n)&&!1===await n(r,e))&&!We(r,n)||He(r,n,e)}const Xe=globalThis.structuredClone;async function Ye(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);a(r)&&e.push(r)}return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const i=await n(e,o,t);a(i)&&r(i)}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);a(c)&&(i?o.set(e,c):o[e]=c)}return o}function tr(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const i=n(e,r,t);a(i)&&o(i)}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);a(c)&&(o?r.set(e,c):r[e]=c)}return r}const nr=Zt(h,g,jn,In,tr,Ye);function er(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=pt(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function rr(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=pt(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const or=Zt(x,T,Fn,Mn,er,rr);function ir(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const cr=ir(l),sr=ir(M);function ur(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ar=ur(p),fr=ur(E);const lr=Rt(/\./);class hr{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=v(hr);class gr{static models=new Map;constructor(t,n){a(n)?(bt(this,n),this.modelName=t,gr.models.set(t,n)):bt(this,t)}delete(t){gr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),gr.models.set(t||this.modelName,this)}has(t){return gr.models.has(t||this.modelName)}get(t){return gr.models.get(t||this.modelName)}}class dr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Pt(t,(n=>{t[n]=new dr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new dr(e),!0)})}}class yr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return a(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const mr=v(yr);class Ar{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):a(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=nn(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=zt,t.Intervals=hr,t.Model=gr,t.Store=dr,t.Timers=Jt,t.UniqID=yr,t.VirtualStorage=Ar,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Yt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return l(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return xe(t)||xe(n)?Qe(t,n,e):!(pt(n)&&!1===n(t,e))&&!We(t,n)||He(t,n,e)},t.assertAsync=Qe,t.assign=bt,t.assignToClass=wt,t.assignToObject=At,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=sn(t,(t=>pt(t)?t.bind(n):t));return e?bt(e,r):r},t.cacheNativeMethod=gn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Bn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return v(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(G(t))return ht(t);if(b(t))return i(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=i,t.clearBuffer=ht,t.clearIntervals=function(){Gt(setTimeout(Wt,0),(t=>{pr.remove(t)}))},t.clearTimers=function(){Gt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Xe(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=nn,t.compact=function(t){if(J(t)){const n=D(t),e=n.length,r={};for(let o=0;oze(t)))},t.compactKeys=function(t){const n=[];return Pt(t,((t,e)=>{a(t)&&n.push(e)})),n},t.compactMap=nr,t.compactMapArray=h,t.compactMapAsyncArray=g,t.compactMapAsyncObject=In,t.compactMapObject=jn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{const c=e.join(r,i);if((await n.stat(c)).isDirectory()){const s=e.join(o,i.replace(r,""));await n.mkdir(s,{recursive:!0}),await t(c,s)}else await async function(t,r,o){const i=e.join(t,o),c=e.join(r,o);await n.copyFile(i,c)}(r,o,i)})),!0},t.countBy=function(t,n){const e={};let r;return l(t,(t=>{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return l(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return l(t,(t=>{t[n]||e++})),e},t.currentFile=function(t){return globalThis.__filename?__filename:r.fileURLToPath(t.url)},t.currentPath=function(t){return globalThis.__dirname?__dirname:o.dirname(r.fileURLToPath(t.url))},t.curry=function(t,n=t.length){const e=[],r=(...o)=>{if(e.push(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.curryRight=function(t,n=t.length){const e=[],r=(...o)=>{if(e.unshift(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Qt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=mn,t.difference=j,t.divide=function(t,n){return t/n},t.drop=F,t.dropRight=(t,n=1,e=t.length)=>F(t,0,e-n),t.each=Kt,t.eachArray=l,t.eachAsyncArray=p,t.eachAsyncObject=Bt,t.eachObject=Pt,t.eachRight=M,t.eachRightAsync=E,t.ensureArray=C,t.ensureBuffer=function(t){return G(t)&&t||a(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=Cn,t.escapeRegex=Rn,t.escapeRegexRegex=En,t.every=hn,t.everyArg=function(...t){return Vt(t[0])?async function(...n){return hn(t,(async t=>hn(n,(async n=>t(n)))))}:function(...n){return hn(t,(t=>hn(n,(n=>t(n)))))}},t.everyArray=R,t.everyAsyncArray=S,t.everyAsyncObject=un,t.everyObject=an,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rvt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=vt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>vt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(C(n))),[]);return e},t.flattenDeep=O,t.flow=cr,t.flowAsync=ar,t.flowAsyncRight=fr,t.flowRight=sr,t.forEach=I,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else pt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=$t,t.forOfAsync=qt,t.forOfCompactMap=tr,t.forOfCompactMapAsync=Ye,t.forOfEvery=fn,t.forOfEveryAsync=ln,t.forOfFilter=er,t.forOfFilterAsync=rr,t.forOfMap=en,t.forOfMapAsync=rn,t.generateLoop=Zt,t.get=k,t.getEntries=function(t){if(a(t))return On(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return jt(t,n)[0]},t.getLowest=function(t,n){return Ot(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return R(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=yn,t.getPropNames=dn,t.getType=tn,t.getTypeName=ne,t.groupBy=function(t,n){const e={};return l(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!se(n)&&!se(e)&&(n===e||(yt(n)?yt(e)?n.includes(e,r):Tn(e)?e.test(n):pt(e)?e(n):b(e)?R(e,(e=>t(n,e))):hn(e,(e=>t(n,e))):b(n)?Tn(e)?R(n,(t=>t.test(e))):pt(e)?R(n,e):b(e)?R(e,(e=>t(n,e))):n.includes(e,r):!!J(n)&&(Tn(e)?an(n,(t=>t.test(e))):pt(e)?an(n,e):J(e)?an(n,((t,n)=>t===e[n])):an(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}})))},t.hasDot=lr,t.hasKeys=q,t.hasLength=s,t.hasProp=An,t.hasValue=a,t.htmlEntities=Gn,t.ifInvoke=function(t,n,...e){if(pt(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!a(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(a(t)){if(pt(n))return e?Yt(n,e,r):n(...r);if(J(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return h(t,(t=>{if(R(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return pr.set(t,n)},t.intervals=pr,t.invert=function(t,n={}){if(t)return Pt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(a(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return Y(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!a(t)&&"[object Arguments]"===t.toString()},t.isArray=b,t.isArrayBuffer=pe,t.isArrayBufferCall=he,t.isArrayLike=function(t,n){if(se(t)||pt(t))return!1;if(b(t)||ce(t))return!0;const e=t.length;if(!se(e)||!dt(e)||e<0)return!1;if(n){const n=D(t);return!!n&&hn(n,((t,n)=>n>=0&&dt(n)))}return!0},t.isAsync=Vt,t.isAsyncCall=_t,t.isBigInt=ae,t.isBigIntCall=ue,t.isBoolean=le,t.isBooleanCall=fe,t.isBuffer=G,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(a(t)){const n=t?.constructor?.name;return ge.test(n)}return!1},t.isConstructor=_,t.isConstructorFactory=V,t.isConstructorNameFactory=K,t.isDate=ye,t.isDateCall=de,t.isDeno=Ze,t.isEmpty=function(t){return yt(t)||b(t)?!s(t):J(t)?!Nn(t):!a(t)},t.isEqual=H,t.isEven=function(t){return!(1&t)},t.isF32=be,t.isF32Call=Ae,t.isF64=ve,t.isF64Call=we,t.isFalse=me,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=xt,t.isFileJS=Tt,t.isFileJSON=Nt,t.isFloat=Oe,t.isFunction=pt,t.isGenerator=Lt,t.isGeneratorCall=Dt,t.isI16=je,t.isI16Call=Ie,t.isI32=Me,t.isI32Call=Fe,t.isI8=Re,t.isI8Call=Ee,t.isIterable=function(t){return a(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=xe,t.isMap=re,t.isMapCall=ee,t.isMatchArray=function(t,n){return t.length===n.length&&R(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=D(t),r=D(n);return e.length===r.length&&R(e,(e=>t[e]===n[e]))},t.isNegative=y,t.isNodejs=Ke,t.isNotArray=function(t){return!b(t)},t.isNotNumber=function(t){return!dt(t)},t.isNotString=function(t){return!yt(t)},t.isNull=u,t.isNumber=dt,t.isNumberCall=gt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=J,t.isPositive=function(t){return 1===vn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Se,t.isRegex=Tn,t.isRegexCall=xn,t.isRelated=function(t,n){return!se(t)&&!se(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Ne,t.isSame=bn,t.isSameType=function(t,n){const e=tn(t),r=tn(n);return e===r&&e.name===r.name},t.isSet=kt,t.isSetCall=Ut,t.isString=yt,t.isTrue=function(t){return!0===t},t.isTruthy=ze,t.isTypeFactory=z,t.isTypedArray=ce,t.isU16=Pe,t.isU16Call=Be,t.isU32=ke,t.isU32Call=Ue,t.isU8=De,t.isU8C=qe,t.isU8CCall=Le,t.isU8Call=$e,t.isUndefined=c,t.isWeakMap=Ve,t.isWeakMapCall=_e,t.isZero=Cn,t.jsonParse=function(t,n){if(t)return Ge.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase().replace(Un,"-")},t.keys=D,t.largest=function(t){return Q(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Ln," ").trim().toLowerCase()},t.map=sn,t.mapArray=X,t.mapAsyncArray=Y,t.mapAsyncObject=on,t.mapObject=cn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{Kt(e,((e,r)=>{if(n[r]&&(J(e)||b(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return a(n)?v(gr,[t,n]):k(t,gr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=se,t.noop=Wt,t.notEqual=We,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=mt,t.objectEntries=On,t.objectSize=Nn,t.omit=function(t,n){if(!t)return{};if(b(n)){const e=Sn(n);return Fn(t,((t,n)=>!e.test(n)))}if(Tn(n))return Fn(t,((t,e)=>!n.test(e)));if(yt(n))return Fn(t,((t,e)=>e!==n));if(dt(n)){const e=n.toString();return Fn(t,((t,n)=>n!==e))}return pt(n)?Fn(t,((t,e)=>!n(t,e))):mt({},t)},t.once=t=>{let n;return(...e)=>(a(n)||(n=t(...e)),n)},t.onlyUnique=at,t.over=function(t){return(...n)=>sn(t,(t=>t(...n)))},t.overEvery=function(t){return n=>hn(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[h(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return l(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return X(t,(t=>Ft(t,n)))},t.pluckObject=Ft,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=D(t))=>R(e,(e=>H(t[e],n[e]))),t.randomFloat=function(t,n=0){return wn()*(t-n)+n},t.randomInt=ot,t.range=function(t,n,e=1,r=[]){return y(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Rt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return st(t);if(1===n)return[t[ot(e-1,0)]];const r=[],o={};let i,c=0;for(;cMt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Et(t,r,n,e)))},t.sortCollectionAscending=jt,t.sortCollectionAscendingFilter=It,t.sortCollectionDescending=Ot,t.sortCollectionDescendingFilter=Ct,t.sortNumberAscending=function(t){return t.sort(tt)},t.sortNumberDescening=function(t){return t.sort(nt)},t.sortObjectsAlphabetically=Mt,t.sortObjectsAlphabeticallyReverse=Et,t.sortUnique=ft,t.stringify=Je,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=tt,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=nt,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Qt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Qt,t.timers=Ht,t.times=Gt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Pt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return lt(O(t))},t.uniqID=mr,t.unique=lt,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rYn(t)))},t.upperFirstLetter=Xn,t.upperFirstOnly=te,t.upperFirstOnlyAll=function(t){return t.replace(Qn,(t=>te(t)))},t.virtualStorage=function(t){return new Ar(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Hn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=v(Map),e=[];return 2===t.length?j(t[0],t[1]):(l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return l(t,((t,r)=>{e[t]=n[r]})),e}})); //# sourceMappingURL=index.js.map diff --git a/npm/module/basic.js b/npm/module/basic.js index 2344234..181af9e 100644 --- a/npm/module/basic.js +++ b/npm/module/basic.js @@ -1,2 +1,2 @@ -function t(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function n(t){return t.length=0,t}function r(t){return t.slice()}function e(t){return void 0===t}function o(t){return Boolean(t.length)}function u(t){return null===t}function c(t){return!e(t)&&!u(t)}function i(t){return t}function s(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const f=n.call(e,t,u,r,i,s,o);c(f)&&r.push(f)})):s(t,((t,u,i,s)=>{const f=n(t,u,r,i,s,e,o);c(f)&&r.push(f)})),r}async function l(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const u=await n(t,e,r,o);c(u)&&r.push(u)})),r}const{sign:h}=Math;function g(t){return-1===h(t)}function p(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function m(t,n,r=1,e=[]){return g(r)?e:t{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function x(t,n=1,r=t.length){return t.splice(n,r)}const O=(t,n=1,r=t.length)=>x(t,0,r-n);function $(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function j(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function C(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function F(t,n,r=[],e){return await l(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function R(t,n){return n?t.slice(0,n):t[0]}function N(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat(A(n))),[]);return r}function T(t){return t.slice(0,t.length-1)}function P(t,...n){return f(t,(t=>{if(C(n,(n=>n.includes(t))))return t}))}function U(t,n,r){if(!t)return;const e=t.length;if(c(r))for(let o=0;o(r=r[t],c(r)))),r}const q=Object.keys;function V(t){if(t)return q(t)}const z=Object.hasOwn;function G(t,...n){if(t)return C(n,(n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}}))}function J(t,...n){if(t)return Boolean(n.find((n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}})))}function W(t,n){return t?.constructor===n||!1}function H(t){return n=>W(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...r){return r?t(n)&&C(r,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!c(t)&&"Object("===t.constructor.toString().trim().slice(9,16),rt=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const r=V(t);if(G(n,r))return C(r,(r=>rt(t[r],n[r])))}else if(w(t)&&t.length===n.length)return C(t,((t,r)=>rt(t,n[r])));return!1};function et(t,n){return t.length===n.length&&C(t,((t,r)=>rt(n[r],t)))}const ot=Math.max;function ut(t){return ot(...t)}function ct(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function it(t,n,r=[],e,o){return c(e)?s(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):s(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function st(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function lt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function at(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function dt(t,n){return n-t}function mt(t){return t.sort(dt)}function wt(t,n){let r=t.length;for(let e=0;er)return $t(t);if(1===n)return[t[Et(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Ft(t,n=1){return t.slice(0,n)}function Rt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Nt(t,n,r){return r.indexOf(t)===n}function Tt(t,n,r){return t!==r[n-1]}function Pt(t,n){return n?t.filter(Tt):t.filter(Nt)}function Ut(...t){return Pt(I(t))}function Lt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Vt(...t){const n=v(Map),r=[];return 2===t.length?M(t[0],t[1]):(s(t,((t,r)=>{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&r.push(t.child)})),r)}function zt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Gt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Jt(t){return tt(t)&&t||c(t)&&Buffer.from(t)||Buffer.alloc(0)}function Wt(t){return t.fill(0),t}const Ht=t=>!!c(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=H(String);function tn(t){return!Yt(t)}const nn=Object.assign;function rn(t,n){if(nt(n))nn(t,n);else if(Ht(n)){const r=n.name;r?t[r]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function en(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function sn(t,n){let r=0;return s(t,(t=>{t[n]&&r++})),r}function fn(t,n){let r=0;return s(t,(t=>{t[n]||r++})),r}function ln(t,n,r,e,o){if(t[o]===e)return!0}function an(t,n,r="id"){const e=t.findIndex(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function hn(t,n,r="id"){const e=t.find(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function gn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function pn(t,n="id",r){return t.sort(((t,e)=>gn(t,e,n,r)))}function dn(t,n){return pn(t,n,!1)[0]}function mn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function wn(t,n="id",r){return t.sort(((t,e)=>mn(t,e,n,r)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const r={};return s(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function vn(t,n="id"){const r={};return s(t,(t=>{r[t[n]]=t})),r}function An(t,n,r,e){return it(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function In(t,n,r,e){return ft(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function Mn(t,n){return it(t,(t=>En(t,n)))}function xn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function On(t,n="id",r){return t.sort(((t,e)=>xn(t,e,n,r)))}function $n(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function jn(t,n="id",r){return t.sort(((t,e)=>$n(t,e,n,r)))}function Cn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Sn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Bn(t){return n=>!!c(n)&&t.test(n)}const Fn=Bn(/\.css$/),Rn=Bn(/\.html$/),Nn=Bn(/\.js$/),Tn=Bn(/\.json$/);function Pn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Un(t,n){return(...r)=>t(...r.splice(0,n))}function Ln(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const _n=async(t,n,r,e)=>{if(!t)return;const o=V(t);return c(r)?await l(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await l(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Dn(t,n,r,e){if(!t)return;const o=V(t);return c(r)?s(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):s(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Zn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let h;const g=Hn(s);if(c(i)&&s)return h=w(i)?g?n:t:nt(i)||Ht(i)?g?e:r:o?g?u:o:Gn(i)?u:g?e:r,h(i,s,f,l,a)}}const Qn=Kn(s,l,Dn,_n,Vn,Jn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function tr(t,r=t.length){const e=[],o=(...u)=>{if(e.push(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function nr(t,r=t.length){const e=[],o=(...u)=>{if(e.unshift(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function rr(){}function er(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const cr=v(ur);function ir(t,n){return cr.set(t,n)}function sr(){er(setTimeout(rr,0),(t=>{cr.remove(t)}))}const fr=Reflect.apply;function lr(t,n,r){if(Ht(t))return fr(t,n,r)}function ar(t,n){function r(...t){!1!==r.id&&cr.remove(r.id),r.id=ir((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(cr.remove(r.id),r.id=!1)},r}function hr(t,n,...r){if(Ht(t))return n?t.call(n,...r):t(...r)}function gr(t){return(...n)=>!t(...n)}function pr(t=0){return(...n)=>n[t]}const dr=t=>{let n;return(...r)=>(c(n)||(n=t(...r)),n)};function mr(t){return t?.constructor}function wr(t,n=[]){const r=mr(t);return r===Function&&"function"===r.name?function(){}:v(r,n)}function yr(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=Ht(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function br(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=Ht(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function vr(t,n,r={}){if(t)return await _n(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function Ar(t,n,r={},e,o){if(t)return c(e)?Dn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Dn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Ir=Kn(it,ft,Ar,vr,yr,br);function Er(t){return(...n)=>Ir(t,(t=>t(...n)))}async function Mr(t,n){if(!t)return;return S(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function xr(t,n){if(!t)return;return C(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Or(t,n=i){if(w(t)||qn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function $r(t,n=i,r){if(Gn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(w(t)||qn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const jr=Kn(C,S,xr,Mr,Or,$r);function Cr(t){return n=>jr(t,(t=>t(n)))}function Sr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Br(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=ir((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{cr.remove(r.id),r.id=!1},r}function Fr(t,n){return(...r)=>n(t,...r)}const Rr=Function.prototype;function Nr(t){return Rr.call.bind(t)}const Tr=Object.getOwnPropertyNames,Pr=Object.getOwnPropertyDescriptor,Ur=Object.defineProperty,Lr=Nr(Object.hasOwnProperty),_r=Object.is;function Dr(t,n){return t+n}function Zr(t){return t-1}function kr(t,n){return t/n}function qr(t){return t+1}function Vr(t,n){return t*n}function zr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Gr}=Math;function Jr(t,n=0){return Gr()*(t-n)+n}function Wr(t,n){return t%n}function Hr(t){return t.reduce(((t,n)=>t-n),0)}function Kr(t){return t.reduce(((t,n)=>t+n),0)}function Qr(t,n,r){return t>n&&tr}const{sign:Yr}=Math;function te(t){return 1===Yr(t)}function ne(t){return 0===t}const re=Object.entries;function ee(t){if(c(t))return re(t)}function oe(t){const n=[];return Dn(t,((t,r)=>{c(t)&&n.push(r)})),n}async function ue(t,n=i,r={}){return await _n(t,(async(t,e,o,u,i)=>{const s=await n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function ce(t,n=i,r={}){return Dn(t,((t,e,o,u,i)=>{const s=n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function ie(t,n,r={}){return Dn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function se(t,n,r={}){return await _n(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function fe(t,n={}){if(t)return Dn(t,((t,r)=>{n[t]=r})),n}const le=(t,n)=>{if(t===n)return!0;const r=V(t),e=V(n);return r.length===e.length&&C(r,(r=>t[r]===n[r]))},ae=/[()[\]{}*+?^$|#.,/\\\s-]/g;function he(t){return t.replace(ae,"\\$&")}function ge(t,n){return n?ge(it(t,he)):RegExp(t.join("|"))}const pe=Q("RegExp"),de=X(pe);function me(t,n){if(!t)return{};if(w(n)){const r=ge(n);return ie(t,((t,n)=>!r.test(n)))}if(de(n))return ie(t,((t,r)=>!n.test(r)));if(Yt(n))return ie(t,((t,r)=>r!==n));if(Qt(n)){const r=n.toString();return ie(t,((t,n)=>n!==r))}return Ht(n)?ie(t,((t,r)=>!n(t,r))):nn({},t)}const we=(t,n,r={})=>{if(t)return s(n,(n=>{r[n]=t[n]})),r};function ye(t){if(!t)return;if(nt(t))return V(t).length;const n=t.length;if(c(n))return n;const r=t.size;return c(n)?r:V(t).length}const be=(t,n)=>{const r={};return s(t,((t,e)=>{r[t]=n[e]})),r},ve=t=>{const n=[],r=[];return Dn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Ae=/[ _-]+/g;function Ie(t){let n="";return t.replace(Ae," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Ee=/[ _-]+/g,Me=/[ ]+/g;function xe(t){return t.replace(/([A-Z]+)/g," $1").replace(Ee," ").trim().toLowerCase().replace(Me,"-")}const Oe=/[ _-]+/g,$e=/[ ]+/g;function je(t){return t.replace(/([A-Z]+)/g," $1").replace(Oe," ").trim().toLowerCase().replace($e,"_")}const Ce=/[ _-]+/g;function Se(t){return t.replace(/([A-Z]+)/g," $1").replace(Ce," ").trim().toUpperCase()}const Be=/[ _-]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Be," ").trim().toLowerCase()}function Re(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Ne(t,n=1){return t[t.length-n]}function Te(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Pe(t,n=1){return t.slice(0,-1*n)}function Ue(t,n=1){return t.substring(n)}function Le(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const _e=/%(?![\da-f]{2})/gi,De=/&/g,Ze=//g,qe=/"/g;function Ve(t){return decodeURIComponent(t.replace(_e,(()=>"%25")))}function ze(t){return t.replace(De,"&").replace(Ze,"<").replace(ke,">").replace(qe,""")}function Ge(t){return ze(Ve(t))}const Je=/\S+/g,We=/\w+/g;function He(t){return t.match(Je)||[]}function Ke(t){return t.match(We)||[]}function Qe(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function Xe(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const Ye=/\w+/g;function to(t){return t[0].toUpperCase()}function no(t){return to(t)+Ue(t)}function ro(t){return to(t)+Ue(t).toLowerCase()}function eo(t){return t.replace(Ye,(t=>no(t)))}function oo(t){return t.replace(Ye,(t=>ro(t)))}function uo(t){return mr(t)?.name}function co(t){return!!c(t)&&"[object Arguments]"===t.toString()}const io=Q("Map"),so=X(io),fo=/Array/,lo="Array";function ao(t){if(t){const n=uo(t);if(fo.test(n)&&n!==lo)return!0}return!1}function ho(t){return!c(t)}function go(t,n){if(ho(t)||Ht(t))return!1;if(w(t)||ao(t))return!0;const r=t.length;if(!ho(r)||!Qt(r)||r<0)return!1;if(n){const n=V(t);return!!n&&jr(n,((t,n)=>n>=0&&Qt(n)))}return!0}const po=Q("BigInt"),mo=X(po),wo=Q("Boolean"),yo=X(wo),bo=Q("ArrayBuffer"),vo=X(bo);function Ao(t,n){return!(!t||!n)&&t instanceof n}const Io=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function Eo(t){if(c(t)){const n=t?.constructor?.name;return Io.test(n)}return!1}const Mo=Q("Date"),xo=X(Mo);function Oo(t){return Yt(t)||w(t)?!o(t):nt(t)?!ye(t):!c(t)}function $o(t){return!1===t}const jo=Q("Float32Array"),Co=X(jo),So=Q("Float64Array"),Bo=X(So),{isInteger:Fo}=Number,Ro=Fo,No=Q("Int16Array"),To=X(No),Po=Q("Int32Array"),Uo=X(Po),Lo=Q("Int8Array"),_o=X(Lo);function Do(t){return c(t)&&"function"==typeof t[Symbol.iterator]}function Zo(t){return!!t&&t instanceof Promise}function ko(t){return!!t&&(Zo(t)||Hn(t)||Gn(t))}function qo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Vo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function zo(t,n){return!ho(t)&&!ho(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Go}=Number,Jo=Go;function Wo(t,n){const r=mr(t),e=mr(n);return r===e&&r.name===e.name}function Ho(t){return!0===t}const Ko=Q("Uint16Array"),Qo=X(Ko),Xo=Q("Uint32Array"),Yo=X(Xo),tu=Q("Uint8Array"),nu=X(tu),ru=Q("Uint8ClampedArray"),eu=X(ru),ou=Q("WeakMap"),uu=X(ou),cu=void 0!==globalThis.Deno,iu=void 0!==globalThis.process&&process.versions&&process.versions.node;function su(t,n=!0){return Boolean(t)&&n}function fu(t,n=!0){return!1===Boolean(t)&&n}function lu(t,n,r,e){if(c(t)){if(Ht(n))return r?lr(n,r,e):n(...e);if(nt(n))return n[r]=t,n}}function au(t,n){return $o(rt(t,n))}const hu=JSON;function gu(t,n){if(t)return hu.parse(t,n)}const pu=hu.stringify;function du(t,n,r){const e=globalThis.options||r;let o;return Ht(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${pu(t)}\n\t\tExpected: ${pu(n)}`,e)}async function mu(t,n,r){const e=await t;return!(Ht(n)&&!1===await n(e,r))&&!au(e,n)||du(e,n,r)}function wu(t,n,r){if(ko(t)||ko(n))return mu(t,n,r);return!(Ht(n)&&!1===n(t,r))&&!au(t,n)||du(t,n,r)}function yu(t,n,r){const e=Ir(t,(t=>Ht(t)?t.bind(n):t));return r?en(r,e):e}function bu(t){if(t){if(tt(t))return Wt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const vu=globalThis.structuredClone;function Au(t){return vu(t)}async function Iu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;usu(t)))}async function Mu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);c(e)&&r.push(e)}return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);c(u)&&e(u)}return o}const u=Ht(o.set);for await(const[r,e]of t){const i=await n(e,r,o,t);c(i)&&(u?o.set(r,i):o[r]=i)}return o}function xu(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);c(u)&&o(u)}return e}const o=Ht(e.set);for(const[r,u]of t){const i=n(u,r,e,t);c(i)&&(o?e.set(r,i):e[r]=i)}return e}const Ou=Kn(f,a,ce,ue,xu,Mu);function $u(...t){return Hn(t[0])?async function(...n){return jr(t,(async t=>jr(n,(async n=>t(n)))))}:function(...n){return jr(t,(t=>jr(n,(n=>t(n)))))}}function ju(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=Ht(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Cu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=Ht(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Su=Kn(B,F,ie,se,ju,Cu);function Bu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Fu=Bu(s),Ru=Bu($);function Nu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Tu=Nu(l),Pu=Nu(j);function Uu(t,n){const r=wr(t),e=r.push||r.add;if(e&&Ht(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else Ht(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Lu(t,n){const r={};return s(t,((t,e)=>{r[n[e]]=t})),r}function _u(t,n,r){return!ho(t)&&!ho(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,r):de(n)?n.test(t):Ht(n)?n(t):w(n)?C(n,(n=>_u(t,n))):jr(n,(n=>_u(t,n))):w(t)?de(n)?C(t,(t=>t.test(n))):Ht(n)?C(t,n):w(n)?C(n,(n=>_u(t,n))):t.includes(n,r):!!nt(t)&&(de(n)?xr(t,(t=>t.test(n))):Ht(n)?xr(t,n):nt(n)?xr(t,((t,r)=>t===n[r])):xr(t,(t=>_u(t,n))))))}const Du=Bn(/\./),Zu=(t,n,r)=>(n&&!c(t[n])&&(t[n]=r),t);class ku{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const qu=v(ku);function Vu(t,n){return qu.set(t,n)}function zu(){er(setTimeout(rr,0),(t=>{qu.remove(t)}))}function Gu(t,...n){return Qn(n,(n=>{Qn(n,((n,r)=>{if(t[r]&&(nt(n)||w(n)||n.forEach))return Gu(t[r],n);t[r]=n}))})),t}class Ju{static models=new Map;constructor(t,n){c(n)?(en(this,n),this.modelName=t,Ju.models.set(t,n)):en(this,t)}delete(t){Ju.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Ju.models.set(t||this.modelName,this)}has(t){return Ju.models.has(t||this.modelName)}get(t){return Ju.models.get(t||this.modelName)}}function Wu(t,n){return c(n)?v(Ju,[t,n]):k(t,Ju.models)}function Hu(t,n){return[t,n]}function Ku(t,n,r){const e=t.length,o=[];for(let u=0;uC(r,(r=>rt(t[r],n[r])));function Yu(t,n,r){return n&&nt(t)||Qt(n)&&w(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function tc(t,n,r){return Qt(r)&&w(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class nc{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Dn(t,(n=>{t[n]=new nc(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new nc(r),!0)})}}function rc(){return[]}function ec(){return!1}const oc=()=>({}),uc=()=>"",cc=()=>!0;async function ic(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const ac=v(lc);class hc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):c(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=wr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function gc(t){return new hc(t)}async function pc(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function n(t){return t.length=0,t}function r(t){return t.slice()}function e(t){return void 0===t}function o(t){return Boolean(t.length)}function u(t){return null===t}function c(t){return!e(t)&&!u(t)}function i(t){return t}function s(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const f=n.call(e,t,u,r,i,s,o);c(f)&&r.push(f)})):s(t,((t,u,i,s)=>{const f=n(t,u,r,i,s,e,o);c(f)&&r.push(f)})),r}async function l(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const u=await n(t,e,r,o);c(u)&&r.push(u)})),r}const{sign:h}=Math;function g(t){return-1===h(t)}function p(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function m(t,n,r=1,e=[]){return g(r)?e:t{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function x(t,n=1,r=t.length){return t.splice(n,r)}const O=(t,n=1,r=t.length)=>x(t,0,r-n);function $(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function j(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function C(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function F(t,n,r=[],e){return await l(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function R(t,n){return n?t.slice(0,n):t[0]}function N(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat(A(n))),[]);return r}function T(t){return t.slice(0,t.length-1)}function P(t,...n){return f(t,(t=>{if(C(n,(n=>n.includes(t))))return t}))}function U(t,n,r){if(!t)return;const e=t.length;if(c(r))for(let o=0;o(r=r[t],c(r)))),r}const q=Object.keys;function V(t){if(t)return q(t)}const z=Object.hasOwn;function G(t,...n){if(t)return C(n,(n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}}))}function J(t,...n){if(t)return Boolean(n.find((n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}})))}function W(t,n){return t?.constructor===n||!1}function H(t){return n=>W(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...r){return r?t(n)&&C(r,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!c(t)&&"Object("===t.constructor.toString().trim().slice(9,16),rt=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const r=V(t);if(G(n,r))return C(r,(r=>rt(t[r],n[r])))}else if(w(t)&&t.length===n.length)return C(t,((t,r)=>rt(t,n[r])));return!1};function et(t,n){return t.length===n.length&&C(t,((t,r)=>rt(n[r],t)))}const ot=Math.max;function ut(t){return ot(...t)}function ct(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function it(t,n,r=[],e,o){return c(e)?s(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):s(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function st(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function lt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function at(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function dt(t,n){return n-t}function mt(t){return t.sort(dt)}function wt(t,n){let r=t.length;for(let e=0;er)return $t(t);if(1===n)return[t[Et(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Ft(t,n=1){return t.slice(0,n)}function Rt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Nt(t,n,r){return r.indexOf(t)===n}function Tt(t,n,r){return t!==r[n-1]}function Pt(t,n){return n?t.filter(Tt):t.filter(Nt)}function Ut(...t){return Pt(I(t))}function Lt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Vt(...t){const n=v(Map),r=[];return 2===t.length?M(t[0],t[1]):(s(t,((t,r)=>{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&r.push(t.child)})),r)}function zt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Gt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Jt(t){return tt(t)&&t||c(t)&&Buffer.from(t)||Buffer.alloc(0)}function Wt(t){return t.fill(0),t}const Ht=t=>!!c(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=H(String);function tn(t){return!Yt(t)}const nn=Object.assign;function rn(t,n){if(nt(n))nn(t,n);else if(Ht(n)){const r=n.name;r?t[r]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function en(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function sn(t,n){let r=0;return s(t,(t=>{t[n]&&r++})),r}function fn(t,n){let r=0;return s(t,(t=>{t[n]||r++})),r}function ln(t,n,r,e,o){if(t[o]===e)return!0}function an(t,n,r="id"){const e=t.findIndex(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function hn(t,n,r="id"){const e=t.find(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function gn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function pn(t,n="id",r){return t.sort(((t,e)=>gn(t,e,n,r)))}function dn(t,n){return pn(t,n,!1)[0]}function mn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function wn(t,n="id",r){return t.sort(((t,e)=>mn(t,e,n,r)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const r={};return s(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function vn(t,n="id"){const r={};return s(t,(t=>{r[t[n]]=t})),r}function An(t,n,r,e){return it(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function In(t,n,r,e){return ft(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function Mn(t,n){return it(t,(t=>En(t,n)))}function xn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function On(t,n="id",r){return t.sort(((t,e)=>xn(t,e,n,r)))}function $n(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function jn(t,n="id",r){return t.sort(((t,e)=>$n(t,e,n,r)))}function Cn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Sn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Bn(t){return n=>!!c(n)&&t.test(n)}const Fn=Bn(/\.css$/),Rn=Bn(/\.html$/),Nn=Bn(/\.js$/),Tn=Bn(/\.json$/);function Pn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Un(t,n){return(...r)=>t(...r.splice(0,n))}function Ln(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const _n=async(t,n,r,e)=>{if(!t)return;const o=V(t);return c(r)?await l(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await l(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Dn(t,n,r,e){if(!t)return;const o=V(t);return c(r)?s(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):s(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Zn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let h;const g=Hn(s);if(c(i)&&s)return h=w(i)?g?n:t:nt(i)||Ht(i)?g?e:r:o?g?u:o:Gn(i)?u:g?e:r,h(i,s,f,l,a)}}const Qn=Kn(s,l,Dn,_n,Vn,Jn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function tr(t,r=t.length){const e=[],o=(...u)=>{if(e.push(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function nr(t,r=t.length){const e=[],o=(...u)=>{if(e.unshift(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function rr(){}function er(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const cr=v(ur);function ir(t,n){return cr.set(t,n)}function sr(){er(setTimeout(rr,0),(t=>{cr.remove(t)}))}const fr=Reflect.apply;function lr(t,n,r){if(Ht(t))return fr(t,n,r)}function ar(t,n){function r(...t){!1!==r.id&&cr.remove(r.id),r.id=ir((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(cr.remove(r.id),r.id=!1)},r}function hr(t,n,...r){if(Ht(t))return n?t.call(n,...r):t(...r)}function gr(t){return(...n)=>!t(...n)}function pr(t=0){return(...n)=>n[t]}const dr=t=>{let n;return(...r)=>(c(n)||(n=t(...r)),n)};function mr(t){return t?.constructor}function wr(t,n=[]){const r=mr(t);return r===Function&&"function"===r.name?function(){}:v(r,n)}function yr(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=Ht(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function br(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=Ht(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function vr(t,n,r={}){if(t)return await _n(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function Ar(t,n,r={},e,o){if(t)return c(e)?Dn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Dn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Ir=Kn(it,ft,Ar,vr,yr,br);function Er(t){return(...n)=>Ir(t,(t=>t(...n)))}async function Mr(t,n){if(!t)return;return S(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function xr(t,n){if(!t)return;return C(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Or(t,n=i){if(w(t)||qn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function $r(t,n=i,r){if(Gn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(w(t)||qn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const jr=Kn(C,S,xr,Mr,Or,$r);function Cr(t){return n=>jr(t,(t=>t(n)))}function Sr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Br(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=ir((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{cr.remove(r.id),r.id=!1},r}function Fr(t,n){return(...r)=>n(t,...r)}const Rr=Function.prototype;function Nr(t){return Rr.call.bind(t)}const Tr=Object.getOwnPropertyNames,Pr=Object.getOwnPropertyDescriptor,Ur=Object.defineProperty,Lr=Nr(Object.hasOwnProperty),_r=Object.is;function Dr(t,n){return t+n}function Zr(t){return t-1}function kr(t,n){return t/n}function qr(t){return t+1}function Vr(t,n){return t*n}function zr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Gr}=Math;function Jr(t,n=0){return Gr()*(t-n)+n}function Wr(t,n){return t%n}function Hr(t){return t.reduce(((t,n)=>t-n),0)}function Kr(t){return t.reduce(((t,n)=>t+n),0)}function Qr(t,n,r){return t>n&&tr}const{sign:Yr}=Math;function te(t){return 1===Yr(t)}function ne(t){return 0===t}function re(t){return!(1&~t)}function ee(t){return!(1&t)}const oe=Object.entries;function ue(t){if(c(t))return oe(t)}function ce(t){const n=[];return Dn(t,((t,r)=>{c(t)&&n.push(r)})),n}async function ie(t,n=i,r={}){return await _n(t,(async(t,e,o,u,i)=>{const s=await n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function se(t,n=i,r={}){return Dn(t,((t,e,o,u,i)=>{const s=n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function fe(t,n,r={}){return Dn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function le(t,n,r={}){return await _n(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function ae(t,n={}){if(t)return Dn(t,((t,r)=>{n[t]=r})),n}const he=(t,n)=>{if(t===n)return!0;const r=V(t),e=V(n);return r.length===e.length&&C(r,(r=>t[r]===n[r]))},ge=/[()[\]{}*+?^$|#.,/\\\s-]/g;function pe(t){return t.replace(ge,"\\$&")}function de(t,n){return n?de(it(t,pe)):RegExp(t.join("|"))}const me=Q("RegExp"),we=X(me);function ye(t,n){if(!t)return{};if(w(n)){const r=de(n);return fe(t,((t,n)=>!r.test(n)))}if(we(n))return fe(t,((t,r)=>!n.test(r)));if(Yt(n))return fe(t,((t,r)=>r!==n));if(Qt(n)){const r=n.toString();return fe(t,((t,n)=>n!==r))}return Ht(n)?fe(t,((t,r)=>!n(t,r))):nn({},t)}const be=(t,n,r={})=>{if(t)return s(n,(n=>{r[n]=t[n]})),r};function ve(t){if(!t)return;if(nt(t))return V(t).length;const n=t.length;if(c(n))return n;const r=t.size;return c(n)?r:V(t).length}const Ae=(t,n)=>{const r={};return s(t,((t,e)=>{r[t]=n[e]})),r},Ie=t=>{const n=[],r=[];return Dn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Ee=/[ _-]+/g;function Me(t){let n="";return t.replace(Ee," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const xe=/[ _-]+/g,Oe=/[ ]+/g;function $e(t){return t.replace(/([A-Z]+)/g," $1").replace(xe," ").trim().toLowerCase().replace(Oe,"-")}const je=/[ _-]+/g,Ce=/[ ]+/g;function Se(t){return t.replace(/([A-Z]+)/g," $1").replace(je," ").trim().toLowerCase().replace(Ce,"_")}const Be=/[ _-]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Be," ").trim().toUpperCase()}const Re=/[ _-]+/g;function Ne(t){return t.replace(/([A-Z]+)/g," $1").replace(Re," ").trim().toLowerCase()}function Te(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Pe(t,n=1){return t[t.length-n]}function Ue(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Le(t,n=1){return t.slice(0,-1*n)}function _e(t,n=1){return t.substring(n)}function De(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const Ze=/%(?![\da-f]{2})/gi,ke=/&/g,qe=//g,ze=/"/g;function Ge(t){return decodeURIComponent(t.replace(Ze,(()=>"%25")))}function Je(t){return t.replace(ke,"&").replace(qe,"<").replace(Ve,">").replace(ze,""")}function We(t){return Je(Ge(t))}const He=/\S+/g,Ke=/\w+/g;function Qe(t){return t.match(He)||[]}function Xe(t){return t.match(Ke)||[]}function Ye(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function to(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const no=/\w+/g;function ro(t){return t[0].toUpperCase()}function eo(t){return ro(t)+_e(t)}function oo(t){return ro(t)+_e(t).toLowerCase()}function uo(t){return t.replace(no,(t=>eo(t)))}function co(t){return t.replace(no,(t=>oo(t)))}function io(t){return mr(t)?.name}function so(t){return!!c(t)&&"[object Arguments]"===t.toString()}const fo=Q("Map"),lo=X(fo),ao=/Array/,ho="Array";function go(t){if(t){const n=io(t);if(ao.test(n)&&n!==ho)return!0}return!1}function po(t){return!c(t)}function mo(t,n){if(po(t)||Ht(t))return!1;if(w(t)||go(t))return!0;const r=t.length;if(!po(r)||!Qt(r)||r<0)return!1;if(n){const n=V(t);return!!n&&jr(n,((t,n)=>n>=0&&Qt(n)))}return!0}const wo=Q("BigInt"),yo=X(wo),bo=Q("Boolean"),vo=X(bo),Ao=Q("ArrayBuffer"),Io=X(Ao);function Eo(t,n){return!(!t||!n)&&t instanceof n}const Mo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function xo(t){if(c(t)){const n=t?.constructor?.name;return Mo.test(n)}return!1}const Oo=Q("Date"),$o=X(Oo);function jo(t){return Yt(t)||w(t)?!o(t):nt(t)?!ve(t):!c(t)}function Co(t){return!1===t}const So=Q("Float32Array"),Bo=X(So),Fo=Q("Float64Array"),Ro=X(Fo),{isInteger:No}=Number,To=No,Po=Q("Int16Array"),Uo=X(Po),Lo=Q("Int32Array"),_o=X(Lo),Do=Q("Int8Array"),Zo=X(Do);function ko(t){return c(t)&&"function"==typeof t[Symbol.iterator]}function qo(t){return!!t&&t instanceof Promise}function Vo(t){return!!t&&(qo(t)||Hn(t)||Gn(t))}function zo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Go(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Jo(t,n){return!po(t)&&!po(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Wo}=Number,Ho=Wo;function Ko(t,n){const r=mr(t),e=mr(n);return r===e&&r.name===e.name}function Qo(t){return!0===t}const Xo=Q("Uint16Array"),Yo=X(Xo),tu=Q("Uint32Array"),nu=X(tu),ru=Q("Uint8Array"),eu=X(ru),ou=Q("Uint8ClampedArray"),uu=X(ou),cu=Q("WeakMap"),iu=X(cu),su=void 0!==globalThis.Deno,fu=void 0!==globalThis.process&&process.versions&&process.versions.node;function lu(t,n=!0){return Boolean(t)&&n}function au(t,n=!0){return!1===Boolean(t)&&n}function hu(t,n,r,e){if(c(t)){if(Ht(n))return r?lr(n,r,e):n(...e);if(nt(n))return n[r]=t,n}}function gu(t,n){return Co(rt(t,n))}const pu=JSON;function du(t,n){if(t)return pu.parse(t,n)}const mu=pu.stringify;function wu(t,n,r){const e=globalThis.options||r;let o;return Ht(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${mu(t)}\n\t\tExpected: ${mu(n)}`,e)}async function yu(t,n,r){const e=await t;return!(Ht(n)&&!1===await n(e,r))&&!gu(e,n)||wu(e,n,r)}function bu(t,n,r){if(Vo(t)||Vo(n))return yu(t,n,r);return!(Ht(n)&&!1===n(t,r))&&!gu(t,n)||wu(t,n,r)}function vu(t,n,r){const e=Ir(t,(t=>Ht(t)?t.bind(n):t));return r?en(r,e):e}function Au(t){if(t){if(tt(t))return Wt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Iu=globalThis.structuredClone;function Eu(t){return Iu(t)}async function Mu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;ulu(t)))}async function Ou(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);c(e)&&r.push(e)}return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);c(u)&&e(u)}return o}const u=Ht(o.set);for await(const[r,e]of t){const i=await n(e,r,o,t);c(i)&&(u?o.set(r,i):o[r]=i)}return o}function $u(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);c(u)&&o(u)}return e}const o=Ht(e.set);for(const[r,u]of t){const i=n(u,r,e,t);c(i)&&(o?e.set(r,i):e[r]=i)}return e}const ju=Kn(f,a,se,ie,$u,Ou);function Cu(...t){return Hn(t[0])?async function(...n){return jr(t,(async t=>jr(n,(async n=>t(n)))))}:function(...n){return jr(t,(t=>jr(n,(n=>t(n)))))}}function Su(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=Ht(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Bu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=Ht(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Fu=Kn(B,F,fe,le,Su,Bu);function Ru(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Nu=Ru(s),Tu=Ru($);function Pu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Uu=Pu(l),Lu=Pu(j);function _u(t,n){const r=wr(t),e=r.push||r.add;if(e&&Ht(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else Ht(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Du(t,n){const r={};return s(t,((t,e)=>{r[n[e]]=t})),r}function Zu(t,n,r){return!po(t)&&!po(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,r):we(n)?n.test(t):Ht(n)?n(t):w(n)?C(n,(n=>Zu(t,n))):jr(n,(n=>Zu(t,n))):w(t)?we(n)?C(t,(t=>t.test(n))):Ht(n)?C(t,n):w(n)?C(n,(n=>Zu(t,n))):t.includes(n,r):!!nt(t)&&(we(n)?xr(t,(t=>t.test(n))):Ht(n)?xr(t,n):nt(n)?xr(t,((t,r)=>t===n[r])):xr(t,(t=>Zu(t,n))))))}const ku=Bn(/\./),qu=(t,n,r)=>(n&&!c(t[n])&&(t[n]=r),t);class Vu{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const zu=v(Vu);function Gu(t,n){return zu.set(t,n)}function Ju(){er(setTimeout(rr,0),(t=>{zu.remove(t)}))}function Wu(t,...n){return Qn(n,(n=>{Qn(n,((n,r)=>{if(t[r]&&(nt(n)||w(n)||n.forEach))return Wu(t[r],n);t[r]=n}))})),t}class Hu{static models=new Map;constructor(t,n){c(n)?(en(this,n),this.modelName=t,Hu.models.set(t,n)):en(this,t)}delete(t){Hu.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Hu.models.set(t||this.modelName,this)}has(t){return Hu.models.has(t||this.modelName)}get(t){return Hu.models.get(t||this.modelName)}}function Ku(t,n){return c(n)?v(Hu,[t,n]):k(t,Hu.models)}function Qu(t,n){return[t,n]}function Xu(t,n,r){const e=t.length,o=[];for(let u=0;uC(r,(r=>rt(t[r],n[r])));function nc(t,n,r){return n&&nt(t)||Qt(n)&&w(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function rc(t,n,r){return Qt(r)&&w(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class ec{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Dn(t,(n=>{t[n]=new ec(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new ec(r),!0)})}}function oc(){return[]}function uc(){return!1}const cc=()=>({}),ic=()=>"",sc=()=>!0;async function fc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const gc=v(hc);class pc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):c(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=wr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function dc(t){return new pc(t)}async function mc(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{o%n||(e.push([]),o&&r++),e[r].push(t)})),e}function n(t){return t.length=0,t}function e(t){return t.slice()}function r(t){return void 0===t}function o(t){return Boolean(t.length)}function c(t){return null===t}function u(t){return!r(t)&&!c(t)}function i(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const f=n.call(r,t,c,e,i,s,o);u(f)&&e.push(f)})):s(t,((t,c,i,s)=>{const f=n(t,c,e,i,s,r,o);u(f)&&e.push(f)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const c=await n(t,r,e,o);u(c)&&e.push(c)})),e}const{sign:h}=Math;function d(t){return-1===h(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}function m(t,n,e=1,r=[]){return d(e)?r:t{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function $(t,n=1,e=t.length){return t.splice(n,e)}const S=(t,n=1,e=t.length)=>$(t,0,e-n);function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function C(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function j(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,c,u,r)&&e.push(t)})),e}async function L(t,n,e=[],r){return await a(t,(async(t,o,c,u)=>{!0===await n(t,o,e,c,u,r)&&e.push(t)})),e}function T(t,n){return n?t.slice(0,n):t[0]}function B(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e}function N(t){return t.slice(0,t.length-1)}function R(t,...n){return f(t,(t=>{if(j(n,(n=>n.includes(t))))return t}))}function P(t,n,e){if(!t)return;const r=t.length;if(u(e))for(let o=0;o(e=e[t],u(e)))),e}const q=Object.keys;function z(t){if(t)return q(t)}const H=Object.hasOwn;function W(t,...n){if(t)return j(n,(n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}}))}function G(t,...n){if(t)return Boolean(n.find((n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}})))}function V(t,n){return t?.constructor===n||!1}function J(t){return n=>V(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...e){return e?t(n)&&j(e,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!u(t)&&"Object("===t.constructor.toString().trim().slice(9,16),et=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const e=z(t);if(W(n,e))return j(e,(e=>et(t[e],n[e])))}else if(w(t)&&t.length===n.length)return j(t,((t,e)=>et(t,n[e])));return!1};function rt(t,n){return t.length===n.length&&j(t,((t,e)=>et(n[e],t)))}const ot=Math.max;function ct(t){return ot(...t)}function ut(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]}function it(t,n,e=[],r,o){return u(r)?s(t,((t,c,u,i)=>{e[c]=n.call(r,t,c,e,u,i,o)})):s(t,((t,r,c,u)=>{e[r]=n(t,r,e,c,u,o)})),e}async function st(t,n,e){if(!t)return;const r=[],o=t.length;if(e)for(let c=0;c{e[r]=await n(t,r,e,o)})),e}function at(t,n,e=[],r){let o=0;const c=t.length;for(let u=c-1;u>=0;u--)e[o]=n(t[u],u,t,c,r),o++;return e}function lt(t,n,e=[],r){const o=t.length;for(let c=0;c{if(n(t,r))return t;e.push(t)})),e]}function pt(t,n){return n-t}function mt(t){return t.sort(pt)}function wt(t,n){let e=t.length;for(let r=0;re)return Mt(t);if(1===n)return[t[Et(e-1,0)]];const r=[],o={};let c,u=0;for(;u(e=r,n>=t&&(e=r+1,!0)))),e}function Lt(t,n=1){return t.slice(0,n)}function Tt(t,n=1){const e=t.length;return t.slice(e-n,e)}function Bt(t,n,e){return e.indexOf(t)===n}function Nt(t,n,e){return t!==e[n-1]}function Rt(t,n){return n?t.filter(Nt):t.filter(Bt)}function Pt(...t){return Rt(I(t))}function Ut(t,n){const e=t.length;for(let r=0;r!e.has(t)))}function zt(...t){const n=v(Map),e=[];return 2===t.length?x(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&e.push(t.child)})),e)}function Ht(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Wt(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Gt(t){return tt(t)&&t||u(t)&&Buffer.from(t)||Buffer.alloc(0)}function Vt(t){return t.fill(0),t}const Jt=t=>!!u(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=J(String);function tn(t){return!Yt(t)}const nn=Object.assign;function en(t,n){if(nt(n))nn(t,n);else if(Jt(n)){const e=n.name;e?t[e]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function rn(t,...n){const e=n.length;for(let r=0;r{r=n(t),e[r]||(e[r]=0),e[r]++})),e}function sn(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e}function fn(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e}function an(t,n,e,r,o){if(t[o]===r)return!0}function ln(t,n,e="id"){const r=t.findIndex(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function hn(t,n,e="id"){const r=t.find(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function dn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?-1:0:1:-1}function gn(t,n="id",e){return t.sort(((t,r)=>dn(t,r,n,e)))}function pn(t,n){return gn(t,n,!1)[0]}function mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?1:0:-1:1}function wn(t,n="id",e){return t.sort(((t,r)=>mn(t,r,n,e)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e}function vn(t,n="id"){const e={};return s(t,(t=>{e[t[n]]=t})),e}function An(t,n,e,r){return it(t,r?(t,o)=>t[n].call(r,e):(t,r)=>t[n](e))}function In(t,n,e,r){return ft(t,r?t=>t[n].call(r,e):async t=>t[n](e))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function xn(t,n){return it(t,(t=>En(t,n)))}function $n(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):o.localeCompare(c)}function Sn(t,n="id",e){return t.sort(((t,r)=>$n(t,r,n,e)))}function Mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c.localeCompare(o)}function Cn(t,n="id",e){return t.sort(((t,r)=>Mn(t,r,n,e)))}function jn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function On(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Fn(t){return n=>!!u(n)&&t.test(n)}const Ln=Fn(/\.css$/),Tn=Fn(/\.html$/),Bn=Fn(/\.js$/),Nn=Fn(/\.json$/);function Rn(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)}function Pn(t,n){return(...e)=>t(...e.splice(0,n))}function Un(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)}const _n=async(t,n,e,r)=>{if(!t)return;const o=z(t);return u(e)?await a(o,((c,u,i,s)=>n.call(e,t[c],c,t,s,o,r))):await a(o,((e,c,u,i)=>n(t[e],e,t,i,o,r))),t};function kn(t,n,e,r){if(!t)return;const o=z(t);return u(e)?s(o,((o,c,u,i)=>{n.call(e,t[o],o,t,i,u,r)})):s(o,((e,o,c,u)=>{n(t[e],e,t,u,c,r)})),t}async function Dn(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{let h;const d=Jn(s);if(u(i)&&s)return h=w(i)?d?n:t:nt(i)||Jt(i)?d?r:e:o?d?c:o:Wn(i)?c:d?r:e,h(i,s,f,a,l)}}const Qn=Kn(s,a,kn,_n,zn,Gn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function te(t,e=t.length){const r=[],o=(...c)=>{if(r.push(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ne(t,e=t.length){const r=[],o=(...c)=>{if(r.unshift(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ee(){}function re(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ue=v(ce);function ie(t,n){return ue.set(t,n)}function se(){re(setTimeout(ee,0),(t=>{ue.remove(t)}))}const fe=Reflect.apply;function ae(t,n,e){if(Jt(t))return fe(t,n,e)}function le(t,n){function e(...t){!1!==e.id&&ue.remove(e.id),e.id=ie((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(ue.remove(e.id),e.id=!1)},e}function he(t,n,...e){if(Jt(t))return n?t.call(n,...e):t(...e)}function de(t){return(...n)=>!t(...n)}function ge(t=0){return(...n)=>n[t]}const pe=t=>{let n;return(...e)=>(u(n)||(n=t(...e)),n)};function me(t){return t?.constructor}function we(t,n=[]){const e=me(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function ye(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=Jt(r.set);for(const[e,c]of t){const u=n(c,e,r,t);o?r.set(e,u):r[e]=u}return r}async function be(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const c=Jt(o.set);for await(const[e,r]of t){const u=await n(r,e,o,t);c?o.set(e,u):o[e]=u}return o}async function ve(t,n,e={}){if(t)return await _n(t,(async(t,r,o,c,u)=>{e[r]=await n(t,r,e,o,c,u)})),e}function Ae(t,n,e={},r,o){if(t)return u(r)?kn(t,((t,c,u,i,s)=>{e[c]=n.call(r,t,c,e,u,i,s,o)})):kn(t,((t,r,c,u,i)=>{e[r]=n(t,r,e,c,u,i,o)})),e}const Ie=Kn(it,ft,Ae,ve,ye,be);function Ee(t){return(...n)=>Ie(t,(t=>t(...n)))}async function xe(t,n){if(!t)return;return O(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function $e(t,n){if(!t)return;return j(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function Se(t,n=i){if(w(t)||qn(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function Me(t,n=i,e){if(Wn(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(w(t)||qn(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const Ce=Kn(j,O,$e,xe,Se,Me);function je(t){return n=>Ce(t,(t=>t(n)))}function Oe(t,n){return(...e)=>t(...n.map((t=>e[t])))}function Fe(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=ie((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{ue.remove(e.id),e.id=!1},e}function Le(t,n){return(...e)=>n(t,...e)}const Te=Function.prototype;function Be(t){return Te.call.bind(t)}const Ne=Object.getOwnPropertyNames,Re=Object.getOwnPropertyDescriptor,Pe=Object.defineProperty,Ue=Be(Object.hasOwnProperty),_e=Object.is;function ke(t,n){return t+n}function De(t){return t-1}function Ze(t,n){return t/n}function qe(t){return t+1}function ze(t,n){return t*n}function He(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:We}=Math;function Ge(t,n=0){return We()*(t-n)+n}function Ve(t,n){return t%n}function Je(t){return t.reduce(((t,n)=>t-n),0)}function Ke(t){return t.reduce(((t,n)=>t+n),0)}function Qe(t,n,e){return t>n&&te}const{sign:Ye}=Math;function tr(t){return 1===Ye(t)}function nr(t){return 0===t}const er=Object.entries;function rr(t){if(u(t))return er(t)}function or(t){const n=[];return kn(t,((t,e)=>{u(t)&&n.push(e)})),n}async function cr(t,n=i,e={}){return await _n(t,(async(t,r,o,c,i)=>{const s=await n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function ur(t,n=i,e={}){return kn(t,((t,r,o,c,i)=>{const s=n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function ir(t,n,e={}){return kn(t,((t,r,o,c,u)=>{!0===n(t,r,e,o,c,u)&&(e[r]=t)})),e}async function sr(t,n,e={}){return await _n(t,(async(t,r,o,c,u)=>{!0===await n(t,r,e,o,c,u)&&(e[r]=t)})),e}function fr(t,n={}){if(t)return kn(t,((t,e)=>{n[t]=e})),n}const ar=(t,n)=>{if(t===n)return!0;const e=z(t),r=z(n);return e.length===r.length&&j(e,(e=>t[e]===n[e]))},lr=/[()[\]{}*+?^$|#.,/\\\s-]/g;function hr(t){return t.replace(lr,"\\$&")}function dr(t,n){return n?dr(it(t,hr)):RegExp(t.join("|"))}const gr=Q("RegExp"),pr=X(gr);function mr(t,n){if(!t)return{};if(w(n)){const e=dr(n);return ir(t,((t,n)=>!e.test(n)))}if(pr(n))return ir(t,((t,e)=>!n.test(e)));if(Yt(n))return ir(t,((t,e)=>e!==n));if(Qt(n)){const e=n.toString();return ir(t,((t,n)=>n!==e))}return Jt(n)?ir(t,((t,e)=>!n(t,e))):nn({},t)}const wr=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e};function yr(t){if(!t)return;if(nt(t))return z(t).length;const n=t.length;if(u(n))return n;const e=t.size;return u(n)?e:z(t).length}const br=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},vr=t=>{const n=[],e=[];return kn(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},Ar=/[ _-]+/g;function Ir(t){let n="";return t.replace(Ar," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Er=/[ _-]+/g,xr=/[ ]+/g;function $r(t){return t.replace(/([A-Z]+)/g," $1").replace(Er," ").trim().toLowerCase().replace(xr,"-")}const Sr=/[ _-]+/g,Mr=/[ ]+/g;function Cr(t){return t.replace(/([A-Z]+)/g," $1").replace(Sr," ").trim().toLowerCase().replace(Mr,"_")}const jr=/[ _-]+/g;function Or(t){return t.replace(/([A-Z]+)/g," $1").replace(jr," ").trim().toUpperCase()}const Fr=/[ _-]+/g;function Lr(t){return t.replace(/([A-Z]+)/g," $1").replace(Fr," ").trim().toLowerCase()}function Tr(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)}function Br(t,n=1){return t[t.length-n]}function Nr(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Rr(t,n=1){return t.slice(0,-1*n)}function Pr(t,n=1){return t.substring(n)}function Ur(t,n,e){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),e)}const _r=/%(?![\da-f]{2})/gi,kr=/&/g,Dr=//g,qr=/"/g;function zr(t){return decodeURIComponent(t.replace(_r,(()=>"%25")))}function Hr(t){return t.replace(kr,"&").replace(Dr,"<").replace(Zr,">").replace(qr,""")}function Wr(t){return Hr(zr(t))}const Gr=/\S+/g,Vr=/\w+/g;function Jr(t){return t.match(Gr)||[]}function Kr(t){return t.match(Vr)||[]}function Qr(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=e-n;for(;u=0&&(c=r[u]," "!==c);u--);return t.slice(0,u).trim()})(t,n,e):t}function Xr(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=n;for(;u0&&(c=r[u]," "!==c);u++);return t.substring(u,e).trim()})(t,n,e):t}const Yr=/\w+/g;function to(t){return t[0].toUpperCase()}function no(t){return to(t)+Pr(t)}function eo(t){return to(t)+Pr(t).toLowerCase()}function ro(t){return t.replace(Yr,(t=>no(t)))}function oo(t){return t.replace(Yr,(t=>eo(t)))}function co(t){return me(t)?.name}function uo(t){return!!u(t)&&"[object Arguments]"===t.toString()}const io=Q("Map"),so=X(io),fo=/Array/,ao="Array";function lo(t){if(t){const n=co(t);if(fo.test(n)&&n!==ao)return!0}return!1}function ho(t){return!u(t)}function go(t,n){if(ho(t)||Jt(t))return!1;if(w(t)||lo(t))return!0;const e=t.length;if(!ho(e)||!Qt(e)||e<0)return!1;if(n){const n=z(t);return!!n&&Ce(n,((t,n)=>n>=0&&Qt(n)))}return!0}const po=Q("BigInt"),mo=X(po),wo=Q("Boolean"),yo=X(wo),bo=Q("ArrayBuffer"),vo=X(bo);function Ao(t,n){return!(!t||!n)&&t instanceof n}const Io=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function Eo(t){if(u(t)){const n=t?.constructor?.name;return Io.test(n)}return!1}const xo=Q("Date"),$o=X(xo);function So(t){return Yt(t)||w(t)?!o(t):nt(t)?!yr(t):!u(t)}function Mo(t){return!1===t}const Co=Q("Float32Array"),jo=X(Co),Oo=Q("Float64Array"),Fo=X(Oo),{isInteger:Lo}=Number,To=Lo,Bo=Q("Int16Array"),No=X(Bo),Ro=Q("Int32Array"),Po=X(Ro),Uo=Q("Int8Array"),_o=X(Uo);function ko(t){return u(t)&&"function"==typeof t[Symbol.iterator]}function Do(t){return!!t&&t instanceof Promise}function Zo(t){return!!t&&(Do(t)||Jn(t)||Wn(t))}function qo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function zo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Ho(t,n){return!ho(t)&&!ho(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Wo}=Number,Go=Wo;function Vo(t,n){const e=me(t),r=me(n);return e===r&&e.name===r.name}function Jo(t){return!0===t}const Ko=Q("Uint16Array"),Qo=X(Ko),Xo=Q("Uint32Array"),Yo=X(Xo),tc=Q("Uint8Array"),nc=X(tc),ec=Q("Uint8ClampedArray"),rc=X(ec),oc=Q("WeakMap"),cc=X(oc),uc=void 0!==globalThis.Deno,ic=void 0!==globalThis.process&&process.versions&&process.versions.node;function sc(t,n=!0){return Boolean(t)&&n}function fc(t,n=!0){return!1===Boolean(t)&&n}function ac(t,n,e,r){if(u(t)){if(Jt(n))return e?ae(n,e,r):n(...r);if(nt(n))return n[e]=t,n}}function lc(t,n){return Mo(et(t,n))}const hc=JSON;function dc(t,n){if(t)return hc.parse(t,n)}const gc=hc.stringify;function pc(t,n,e){const r=globalThis.options||e;let o;return Jt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${gc(t)}\n\t\tExpected: ${gc(n)}`,r)}async function mc(t,n,e){const r=await t;return!(Jt(n)&&!1===await n(r,e))&&!lc(r,n)||pc(r,n,e)}function wc(t,n,e){if(Zo(t)||Zo(n))return mc(t,n,e);return!(Jt(n)&&!1===n(t,e))&&!lc(t,n)||pc(t,n,e)}function yc(t,n,e){const r=Ie(t,(t=>Jt(t)?t.bind(n):t));return e?rn(e,r):r}function bc(t){if(t){if(tt(t))return Vt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const vc=globalThis.structuredClone;function Ac(t){return vc(t)}async function Ic(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;csc(t)))}async function xc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);u(r)&&e.push(r)}return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);u(c)&&r(c)}return o}const c=Jt(o.set);for await(const[e,r]of t){const i=await n(r,e,o,t);u(i)&&(c?o.set(e,i):o[e]=i)}return o}function $c(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);u(c)&&o(c)}return r}const o=Jt(r.set);for(const[e,c]of t){const i=n(c,e,r,t);u(i)&&(o?r.set(e,i):r[e]=i)}return r}const Sc=Kn(f,l,ur,cr,$c,xc);function Mc(...t){return Jn(t[0])?async function(...n){return Ce(t,(async t=>Ce(n,(async n=>t(n)))))}:function(...n){return Ce(t,(t=>Ce(n,(n=>t(n)))))}}function Cc(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=Jt(r.set);for(const[o,c]of t){!0===n(c,o,r,t)&&(e?r.set(o,c):r[o]=c)}}return r}async function jc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=Jt(o.set);for await(const[r,c]of t){!0===await n(c,r,o,t)&&(e?o.set(r,c):o[r]=c)}}return o}const Oc=Kn(F,L,ir,sr,Cc,jc);function Fc(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const Lc=Fc(s),Tc=Fc(M);function Bc(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const Nc=Bc(a),Rc=Bc(C);function Pc(t,n){const e=we(t),r=e.push||e.add;if(r&&Jt(r)){const o=r.bind(e);t.forEach((t=>{const r=n(t,e);o(r)}))}else Jt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e}function Uc(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e}function _c(t,n,e){return!ho(t)&&!ho(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,e):pr(n)?n.test(t):Jt(n)?n(t):w(n)?j(n,(n=>_c(t,n))):Ce(n,(n=>_c(t,n))):w(t)?pr(n)?j(t,(t=>t.test(n))):Jt(n)?j(t,n):w(n)?j(n,(n=>_c(t,n))):t.includes(n,e):!!nt(t)&&(pr(n)?$e(t,(t=>t.test(n))):Jt(n)?$e(t,n):nt(n)?$e(t,((t,e)=>t===n[e])):$e(t,(t=>_c(t,n))))))}const kc=Fn(/\./),Dc=(t,n,e)=>(n&&!u(t[n])&&(t[n]=e),t);class Zc{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const qc=v(Zc);function zc(t,n){return qc.set(t,n)}function Hc(){re(setTimeout(ee,0),(t=>{qc.remove(t)}))}function Wc(t,...n){return Qn(n,(n=>{Qn(n,((n,e)=>{if(t[e]&&(nt(n)||w(n)||n.forEach))return Wc(t[e],n);t[e]=n}))})),t}class Gc{static models=new Map;constructor(t,n){u(n)?(rn(this,n),this.modelName=t,Gc.models.set(t,n)):rn(this,t)}delete(t){Gc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Gc.models.set(t||this.modelName,this)}has(t){return Gc.models.has(t||this.modelName)}get(t){return Gc.models.get(t||this.modelName)}}function Vc(t,n){return u(n)?v(Gc,[t,n]):Z(t,Gc.models)}function Jc(t,n){return[t,n]}function Kc(t,n,e){const r=t.length,o=[];for(let c=0;cj(e,(e=>et(t[e],n[e])));function Yc(t,n,e){return n&&nt(t)||Qt(n)&&w(t)?t[n]=e:t.set?t.set(n,e):t.push?t.push(e):t.add?t.add(e):t[n]=e,t}function tu(t,n,e){return Qt(e)&&w(t)?t[e]=n:t.push?t.push(n):t.add?t.add(n):t[e]=n,t}class nu{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;kn(t,(n=>{t[n]=new nu(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new nu(e),!0)})}}function eu(){return[]}function ru(){return!1}const ou=()=>({}),cu=()=>"",uu=()=>!0;async function iu(t,n){for(let e=0;e0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const lu=v(au);class hu{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):u(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=we(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function du(t){return new hu(t)}async function gu(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;c{yo(t)&&t&&(mu[n]=t)})),s(wu.brands,(t=>{mu[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{mu[t]=!0}))}function yu(t,n,e,r){return t.addEventListener(n,e,r),t}function bu(t,n,e,r){return t.removeEventListener(n,e,r),t}function vu(t){return 13===t.keyCode}const Au=document.createDocumentFragment.bind(document);function Iu(t,n){return t.appendChild(n),n}function Eu(t,n){return w(n)?br(n,it(n,(n=>t.getAttribute(n)))):(kn(n,((n,e)=>{t.setAttribute(e,n)})),t)}const xu=/^.[\w_-]+$/,$u=/^[A-Za-z]+$/,Su=/\s/,Mu=document.getElementsByClassName.bind(document),Cu=document.getElementsByTagName.bind(document),ju=document.getElementById.bind(document),Ou=document.querySelector.bind(document),Fu=document.querySelectorAll.bind(document);function Lu(t){switch(t[0]){case"#":if(!Su.test(t))return ju(Pr(t));break;case".":if(xu.test(t))return Mu(Pr(t));break;default:if($u.test(t))return Cu(t)}return Fu(t)}const Tu=document.createElement.bind(document);function Bu(t){const n=kc(t)&&t||`${t}.js`;return(t=>Qc((n=>{yu(t,"load",n,!0),yu(t,"error",n,!0),Iu(Ou("head"),t)})))(Eu(Tu("script"),{async:"",src:n}))}function Nu(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&yu(document,"DOMContentLoaded",t),!1)}Nu((()=>{const t=ju("AcidLib");Bu(t&&t.getAttribute("data-index")||"/index")}));const Ru=location.protocol,Pu="http:"===Ru?"ws":"wss",Uu=location.hostname,_u={hardware:{cores:navigator.hardwareConcurrency},host:{name:Uu,protocol:Ru,protocolSocket:Pu}};function ku(){rn(_u,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Du(){ku()}let Zu;Nu(Du),yu(window,"load",Du,!0),yu(window,"resize",Du,!0),function(t){try{t().removeItem("TESTING"),Zu=!0}catch(t){Zu=!1}}((()=>localStorage));class qu{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=du(t)}hasLocal=Zu;setItem(t,n){return this.hasLocal&&this.local.setItem(t,Yt(n)?n:gc(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return u(n)?n:!u(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}function zu(t){return new qu(t)}const Hu=(t,n)=>`color:${t};background:${n};`,Wu={alert:Hu("#fff","#f44336"),important:Hu("#fff","#E91E63"),notify:Hu("#fff","#651FFF"),warning:Hu("#000","#FFEA00")},Gu=(t,n)=>{const e=Yt(t)?t:gc(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},Vu=(t,n,e)=>{Wu[t]=Hu(n,e)};function Ju(t){return t&&9!==t.nodeType}function Ku(t){return!!u(t)&&"[object HTMLCollection]"===t.toString()}function Qu(t){return!!u(t)&&"[object NodeList]"===t.toString()}export{qu as BrowserStorage,Xn as Chain,Zc as Intervals,Gc as Model,nu as Store,ce as Timers,au as UniqID,hu as VirtualStorage,ke as add,Rn as after,Iu as append,ae as apply,dr as arrayToRegex,Uc as arraysToObject,Pn as ary,wc as assert,mc as assertAsync,rn as assign,on as assignToClass,en as assignToObject,Un as before,yc as bindAll,zu as browserStorage,Be as cacheNativeMethod,He as calcProgress,Ir as camelCase,Yn as chain,t as chunk,Nr as chunkString,bc as clear,n as clearArray,Vt as clearBuffer,Hc as clearIntervals,se as clearTimers,Ac as clone,e as cloneArray,we as cloneType,Gu as cnsl,Vu as cnslTheme,Ec as compact,or as compactKeys,Sc as compactMap,f as compactMapArray,l as compactMapAsyncArray,cr as compactMapAsyncObject,ur as compactMapObject,Ic as concurrent,st as concurrentEachArray,Kc as concurrentStatus,v as construct,K as constructorName,un as countBy,sn as countKey,fn as countWithoutKey,Au as createFragment,te as curry,ne as curryRight,le as debounce,De as deduct,Pe as defProp,x as difference,Ze as divide,$ as drop,S as dropRight,Qn as each,s as eachArray,a as eachAsyncArray,_n as eachAsyncObject,kn as eachObject,M as eachRight,C as eachRightAsync,A as ensureArray,Gt as ensureBuffer,nr as equalsZero,hr as escapeRegex,lr as escapeRegexRegex,yu as eventAdd,bu as eventRemove,Ce as every,Mc as everyArg,j as everyArray,O as everyAsyncArray,xe as everyAsyncObject,$e as everyObject,cn as extendClass,Oc as filter,F as filterArray,L as filterAsyncArray,sr as filterAsyncObject,ir as filterObject,ln as findIndex,an as findIndexCache,hn as findItem,T as first,B as flatten,I as flattenDeep,Lc as flow,Nc as flowAsync,Rc as flowAsyncRight,Tc as flowRight,E as forEach,Dn as forEachAsync,Pc as forMap,zn as forOf,Gn as forOfAsync,$c as forOfCompactMap,xc as forOfCompactMapAsync,Se as forOfEvery,Me as forOfEveryAsync,Cc as forOfFilter,jc as forOfFilterAsync,ye as forOfMap,be as forOfMapAsync,Kn as generateLoop,Z as get,Mu as getByClass,ju as getById,Cu as getByTag,rr as getEntries,jn as getFileExtension,On as getFilename,yn as getHighest,pn as getLowest,Ft as getNumberInsertIndex,Re as getPropDesc,Ne as getPropNames,me as getType,co as getTypeName,bn as groupBy,_c as has,G as hasAnyKeys,kc as hasDot,W as hasKeys,o as hasLength,Zu as hasLocal,Ue as hasProp,u as hasValue,Hr as htmlEntities,he as ifInvoke,Dc as ifNotAssign,ac as ifValue,Bu as importjs,gu as inAsync,pu as inSync,qe as increment,vn as indexBy,_u as info,N as initial,Rr as initialString,Tr as insertInRange,R as intersection,zc as interval,qc as intervals,fr as invert,P as invokeArray,An as invokeCollection,In as invokeCollectionAsync,mu as isAgent,uo as isArguments,w as isArray,vo as isArrayBuffer,bo as isArrayBufferCall,go as isArrayLike,Jn as isAsync,Vn as isAsyncCall,mo as isBigInt,po as isBigIntCall,yo as isBoolean,wo as isBooleanCall,tt as isBuffer,Y as isBufferCall,Ao as isChild,Eo as isCloneable,V as isConstructor,J as isConstructorFactory,Q as isConstructorNameFactory,$o as isDate,xo as isDateCall,uc as isDeno,Nu as isDocumentReady,Ju as isDom,So as isEmpty,vu as isEnter,et as isEqual,jo as isF32,Co as isF32Call,Fo as isF64,Oo as isF64Call,Mo as isFalse,fc as isFalsy,Ln as isFileCSS,Tn as isFileHTML,Bn as isFileJS,Nn as isFileJSON,To as isFloat,Jt as isFunction,Wn as isGenerator,Hn as isGeneratorCall,Ku as isHTMLCollection,No as isI16,Bo as isI16Call,Po as isI32,Ro as isI32Call,_o as isI8,Uo as isI8Call,ko as isIterable,Zo as isKindAsync,so as isMap,io as isMapCall,rt as isMatchArray,ar as isMatchObject,d as isNegative,Qu as isNodeList,ic as isNodejs,y as isNotArray,Xt as isNotNumber,tn as isNotString,c as isNull,Qt as isNumber,Kt as isNumberCall,xt as isNumberEqual,Qe as isNumberInRange,Xe as isNumberNotInRange,qo as isParent,nt as isPlainObject,tr as isPositive,zo as isPrimitive,Do as isPromise,pr as isRegex,gr as isRegexCall,Ho as isRelated,Go as isSafeInt,_e as isSame,Vo as isSameType,qn as isSet,Zn as isSetCall,Yt as isString,Jo as isTrue,sc as isTruthy,X as isTypeFactory,lo as isTypedArray,Qo as isU16,Ko as isU16Call,Yo as isU32,Xo as isU32Call,nc as isU8,rc as isU8C,ec as isU8CCall,tc as isU8Call,r as isUndefined,cc as isWeakMap,oc as isWeakMapCall,nr as isZero,dc as jsonParse,$r as kebabCase,z as keys,ct as largest,ut as last,Lr as lowerCase,Ie as map,it as mapArray,ft as mapAsyncArray,ve as mapAsyncObject,Ae as mapObject,at as mapRightArray,lt as mapWhile,Wc as merge,Vc as model,ze as multiply,de as negate,ho as noValue,Eu as nodeAttribute,ee as noop,lc as notEqual,ge as nthArg,nn as objectAssign,er as objectEntries,yr as objectSize,mr as omit,pe as once,Bt as onlyUnique,Ee as over,je as overEvery,Jc as pair,gt as partition,wr as pick,xn as pluck,En as pluckObject,Qc as promise,Xc as propertyMatch,Ou as querySelector,Fu as querySelectorAll,Ge as randomFloat,Et as randomInt,m as range,p as rangeDown,g as rangeUp,zr as rawURLDecode,Oe as reArg,Fn as regexTestFactory,Ve as remainder,wt as remove,yt as removeBy,Ur as replaceList,bt as rest,Pr as restString,i as returnValue,vt as right,Br as rightString,Ct as sample,Wr as sanitize,ku as saveDimensions,Lu as selector,Yc as setKey,tu as setValue,Mt as shuffle,Ot as smallest,Cr as snakeCase,Sn as sortCollectionAlphabetically,Cn as sortCollectionAlphabeticallyReverse,wn as sortCollectionAscending,mn as sortCollectionAscendingFilter,gn as sortCollectionDescending,dn as sortCollectionDescendingFilter,dt as sortNumberAscending,mt as sortNumberDescening,$n as sortObjectsAlphabetically,Mn as sortObjectsAlphabeticallyReverse,Nt as sortUnique,gc as stringify,eu as stubArray,ru as stubFalse,ou as stubObject,cu as stubString,uu as stubTrue,ht as subtract,Je as subtractAll,pt as subtractReverse,Ke as sumAll,Lt as take,Tt as takeRight,Wu as themes,Fe as throttle,ie as timer,ue as timers,re as times,iu as timesAsync,oe as timesMap,su as timesMapAsync,St as toArray,D as toPath,fu as toggle,Jr as tokenize,Qr as truncate,Xr as truncateRight,Wt as unZip,vr as unZipObject,Pt as union,lu as uniqID,Rt as unique,Ut as untilFalseArray,_t as untilTrueArray,Du as updateDimensions,Or as upperCase,no as upperFirst,ro as upperFirstAll,to as upperFirstLetter,eo as upperFirstOnly,oo as upperFirstOnlyAll,du as virtualStorage,kt as whileCompactMap,Dt as whileEachArray,Zt as whileMapArray,qt as without,Kr as words,Le as wrap,zt as xor,Ht as zip,br as zipObject}; +function t(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e}function n(t){return t.length=0,t}function e(t){return t.slice()}function r(t){return void 0===t}function o(t){return Boolean(t.length)}function c(t){return null===t}function u(t){return!r(t)&&!c(t)}function i(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const f=n.call(r,t,c,e,i,s,o);u(f)&&e.push(f)})):s(t,((t,c,i,s)=>{const f=n(t,c,e,i,s,r,o);u(f)&&e.push(f)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const c=await n(t,r,e,o);u(c)&&e.push(c)})),e}const{sign:h}=Math;function d(t){return-1===h(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}function m(t,n,e=1,r=[]){return d(e)?r:t{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function $(t,n=1,e=t.length){return t.splice(n,e)}const S=(t,n=1,e=t.length)=>$(t,0,e-n);function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function C(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function j(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,c,u,r)&&e.push(t)})),e}async function L(t,n,e=[],r){return await a(t,(async(t,o,c,u)=>{!0===await n(t,o,e,c,u,r)&&e.push(t)})),e}function T(t,n){return n?t.slice(0,n):t[0]}function B(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e}function N(t){return t.slice(0,t.length-1)}function R(t,...n){return f(t,(t=>{if(j(n,(n=>n.includes(t))))return t}))}function P(t,n,e){if(!t)return;const r=t.length;if(u(e))for(let o=0;o(e=e[t],u(e)))),e}const q=Object.keys;function z(t){if(t)return q(t)}const H=Object.hasOwn;function W(t,...n){if(t)return j(n,(n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}}))}function G(t,...n){if(t)return Boolean(n.find((n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}})))}function V(t,n){return t?.constructor===n||!1}function J(t){return n=>V(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...e){return e?t(n)&&j(e,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!u(t)&&"Object("===t.constructor.toString().trim().slice(9,16),et=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const e=z(t);if(W(n,e))return j(e,(e=>et(t[e],n[e])))}else if(w(t)&&t.length===n.length)return j(t,((t,e)=>et(t,n[e])));return!1};function rt(t,n){return t.length===n.length&&j(t,((t,e)=>et(n[e],t)))}const ot=Math.max;function ct(t){return ot(...t)}function ut(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]}function it(t,n,e=[],r,o){return u(r)?s(t,((t,c,u,i)=>{e[c]=n.call(r,t,c,e,u,i,o)})):s(t,((t,r,c,u)=>{e[r]=n(t,r,e,c,u,o)})),e}async function st(t,n,e){if(!t)return;const r=[],o=t.length;if(e)for(let c=0;c{e[r]=await n(t,r,e,o)})),e}function at(t,n,e=[],r){let o=0;const c=t.length;for(let u=c-1;u>=0;u--)e[o]=n(t[u],u,t,c,r),o++;return e}function lt(t,n,e=[],r){const o=t.length;for(let c=0;c{if(n(t,r))return t;e.push(t)})),e]}function pt(t,n){return n-t}function mt(t){return t.sort(pt)}function wt(t,n){let e=t.length;for(let r=0;re)return Mt(t);if(1===n)return[t[Et(e-1,0)]];const r=[],o={};let c,u=0;for(;u(e=r,n>=t&&(e=r+1,!0)))),e}function Lt(t,n=1){return t.slice(0,n)}function Tt(t,n=1){const e=t.length;return t.slice(e-n,e)}function Bt(t,n,e){return e.indexOf(t)===n}function Nt(t,n,e){return t!==e[n-1]}function Rt(t,n){return n?t.filter(Nt):t.filter(Bt)}function Pt(...t){return Rt(I(t))}function Ut(t,n){const e=t.length;for(let r=0;r!e.has(t)))}function zt(...t){const n=v(Map),e=[];return 2===t.length?x(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&e.push(t.child)})),e)}function Ht(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Wt(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Gt(t){return tt(t)&&t||u(t)&&Buffer.from(t)||Buffer.alloc(0)}function Vt(t){return t.fill(0),t}const Jt=t=>!!u(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=J(String);function tn(t){return!Yt(t)}const nn=Object.assign;function en(t,n){if(nt(n))nn(t,n);else if(Jt(n)){const e=n.name;e?t[e]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function rn(t,...n){const e=n.length;for(let r=0;r{r=n(t),e[r]||(e[r]=0),e[r]++})),e}function sn(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e}function fn(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e}function an(t,n,e,r,o){if(t[o]===r)return!0}function ln(t,n,e="id"){const r=t.findIndex(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function hn(t,n,e="id"){const r=t.find(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function dn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?-1:0:1:-1}function gn(t,n="id",e){return t.sort(((t,r)=>dn(t,r,n,e)))}function pn(t,n){return gn(t,n,!1)[0]}function mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?1:0:-1:1}function wn(t,n="id",e){return t.sort(((t,r)=>mn(t,r,n,e)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e}function vn(t,n="id"){const e={};return s(t,(t=>{e[t[n]]=t})),e}function An(t,n,e,r){return it(t,r?(t,o)=>t[n].call(r,e):(t,r)=>t[n](e))}function In(t,n,e,r){return ft(t,r?t=>t[n].call(r,e):async t=>t[n](e))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function xn(t,n){return it(t,(t=>En(t,n)))}function $n(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):o.localeCompare(c)}function Sn(t,n="id",e){return t.sort(((t,r)=>$n(t,r,n,e)))}function Mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c.localeCompare(o)}function Cn(t,n="id",e){return t.sort(((t,r)=>Mn(t,r,n,e)))}function jn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function On(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Fn(t){return n=>!!u(n)&&t.test(n)}const Ln=Fn(/\.css$/),Tn=Fn(/\.html$/),Bn=Fn(/\.js$/),Nn=Fn(/\.json$/);function Rn(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)}function Pn(t,n){return(...e)=>t(...e.splice(0,n))}function Un(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)}const _n=async(t,n,e,r)=>{if(!t)return;const o=z(t);return u(e)?await a(o,((c,u,i,s)=>n.call(e,t[c],c,t,s,o,r))):await a(o,((e,c,u,i)=>n(t[e],e,t,i,o,r))),t};function kn(t,n,e,r){if(!t)return;const o=z(t);return u(e)?s(o,((o,c,u,i)=>{n.call(e,t[o],o,t,i,u,r)})):s(o,((e,o,c,u)=>{n(t[e],e,t,u,c,r)})),t}async function Dn(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{let h;const d=Jn(s);if(u(i)&&s)return h=w(i)?d?n:t:nt(i)||Jt(i)?d?r:e:o?d?c:o:Wn(i)?c:d?r:e,h(i,s,f,a,l)}}const Qn=Kn(s,a,kn,_n,zn,Gn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function te(t,e=t.length){const r=[],o=(...c)=>{if(r.push(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ne(t,e=t.length){const r=[],o=(...c)=>{if(r.unshift(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ee(){}function re(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ue=v(ce);function ie(t,n){return ue.set(t,n)}function se(){re(setTimeout(ee,0),(t=>{ue.remove(t)}))}const fe=Reflect.apply;function ae(t,n,e){if(Jt(t))return fe(t,n,e)}function le(t,n){function e(...t){!1!==e.id&&ue.remove(e.id),e.id=ie((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(ue.remove(e.id),e.id=!1)},e}function he(t,n,...e){if(Jt(t))return n?t.call(n,...e):t(...e)}function de(t){return(...n)=>!t(...n)}function ge(t=0){return(...n)=>n[t]}const pe=t=>{let n;return(...e)=>(u(n)||(n=t(...e)),n)};function me(t){return t?.constructor}function we(t,n=[]){const e=me(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function ye(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=Jt(r.set);for(const[e,c]of t){const u=n(c,e,r,t);o?r.set(e,u):r[e]=u}return r}async function be(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const c=Jt(o.set);for await(const[e,r]of t){const u=await n(r,e,o,t);c?o.set(e,u):o[e]=u}return o}async function ve(t,n,e={}){if(t)return await _n(t,(async(t,r,o,c,u)=>{e[r]=await n(t,r,e,o,c,u)})),e}function Ae(t,n,e={},r,o){if(t)return u(r)?kn(t,((t,c,u,i,s)=>{e[c]=n.call(r,t,c,e,u,i,s,o)})):kn(t,((t,r,c,u,i)=>{e[r]=n(t,r,e,c,u,i,o)})),e}const Ie=Kn(it,ft,Ae,ve,ye,be);function Ee(t){return(...n)=>Ie(t,(t=>t(...n)))}async function xe(t,n){if(!t)return;return O(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function $e(t,n){if(!t)return;return j(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function Se(t,n=i){if(w(t)||qn(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function Me(t,n=i,e){if(Wn(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(w(t)||qn(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const Ce=Kn(j,O,$e,xe,Se,Me);function je(t){return n=>Ce(t,(t=>t(n)))}function Oe(t,n){return(...e)=>t(...n.map((t=>e[t])))}function Fe(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=ie((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{ue.remove(e.id),e.id=!1},e}function Le(t,n){return(...e)=>n(t,...e)}const Te=Function.prototype;function Be(t){return Te.call.bind(t)}const Ne=Object.getOwnPropertyNames,Re=Object.getOwnPropertyDescriptor,Pe=Object.defineProperty,Ue=Be(Object.hasOwnProperty),_e=Object.is;function ke(t,n){return t+n}function De(t){return t-1}function Ze(t,n){return t/n}function qe(t){return t+1}function ze(t,n){return t*n}function He(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:We}=Math;function Ge(t,n=0){return We()*(t-n)+n}function Ve(t,n){return t%n}function Je(t){return t.reduce(((t,n)=>t-n),0)}function Ke(t){return t.reduce(((t,n)=>t+n),0)}function Qe(t,n,e){return t>n&&te}const{sign:Ye}=Math;function tr(t){return 1===Ye(t)}function nr(t){return 0===t}function er(t){return!(1&~t)}function rr(t){return!(1&t)}const or=Object.entries;function cr(t){if(u(t))return or(t)}function ur(t){const n=[];return kn(t,((t,e)=>{u(t)&&n.push(e)})),n}async function ir(t,n=i,e={}){return await _n(t,(async(t,r,o,c,i)=>{const s=await n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function sr(t,n=i,e={}){return kn(t,((t,r,o,c,i)=>{const s=n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function fr(t,n,e={}){return kn(t,((t,r,o,c,u)=>{!0===n(t,r,e,o,c,u)&&(e[r]=t)})),e}async function ar(t,n,e={}){return await _n(t,(async(t,r,o,c,u)=>{!0===await n(t,r,e,o,c,u)&&(e[r]=t)})),e}function lr(t,n={}){if(t)return kn(t,((t,e)=>{n[t]=e})),n}const hr=(t,n)=>{if(t===n)return!0;const e=z(t),r=z(n);return e.length===r.length&&j(e,(e=>t[e]===n[e]))},dr=/[()[\]{}*+?^$|#.,/\\\s-]/g;function gr(t){return t.replace(dr,"\\$&")}function pr(t,n){return n?pr(it(t,gr)):RegExp(t.join("|"))}const mr=Q("RegExp"),wr=X(mr);function yr(t,n){if(!t)return{};if(w(n)){const e=pr(n);return fr(t,((t,n)=>!e.test(n)))}if(wr(n))return fr(t,((t,e)=>!n.test(e)));if(Yt(n))return fr(t,((t,e)=>e!==n));if(Qt(n)){const e=n.toString();return fr(t,((t,n)=>n!==e))}return Jt(n)?fr(t,((t,e)=>!n(t,e))):nn({},t)}const br=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e};function vr(t){if(!t)return;if(nt(t))return z(t).length;const n=t.length;if(u(n))return n;const e=t.size;return u(n)?e:z(t).length}const Ar=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Ir=t=>{const n=[],e=[];return kn(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},Er=/[ _-]+/g;function xr(t){let n="";return t.replace(Er," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const $r=/[ _-]+/g,Sr=/[ ]+/g;function Mr(t){return t.replace(/([A-Z]+)/g," $1").replace($r," ").trim().toLowerCase().replace(Sr,"-")}const Cr=/[ _-]+/g,jr=/[ ]+/g;function Or(t){return t.replace(/([A-Z]+)/g," $1").replace(Cr," ").trim().toLowerCase().replace(jr,"_")}const Fr=/[ _-]+/g;function Lr(t){return t.replace(/([A-Z]+)/g," $1").replace(Fr," ").trim().toUpperCase()}const Tr=/[ _-]+/g;function Br(t){return t.replace(/([A-Z]+)/g," $1").replace(Tr," ").trim().toLowerCase()}function Nr(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)}function Rr(t,n=1){return t[t.length-n]}function Pr(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Ur(t,n=1){return t.slice(0,-1*n)}function _r(t,n=1){return t.substring(n)}function kr(t,n,e){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),e)}const Dr=/%(?![\da-f]{2})/gi,Zr=/&/g,qr=//g,Hr=/"/g;function Wr(t){return decodeURIComponent(t.replace(Dr,(()=>"%25")))}function Gr(t){return t.replace(Zr,"&").replace(qr,"<").replace(zr,">").replace(Hr,""")}function Vr(t){return Gr(Wr(t))}const Jr=/\S+/g,Kr=/\w+/g;function Qr(t){return t.match(Jr)||[]}function Xr(t){return t.match(Kr)||[]}function Yr(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=e-n;for(;u=0&&(c=r[u]," "!==c);u--);return t.slice(0,u).trim()})(t,n,e):t}function to(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=n;for(;u0&&(c=r[u]," "!==c);u++);return t.substring(u,e).trim()})(t,n,e):t}const no=/\w+/g;function eo(t){return t[0].toUpperCase()}function ro(t){return eo(t)+_r(t)}function oo(t){return eo(t)+_r(t).toLowerCase()}function co(t){return t.replace(no,(t=>ro(t)))}function uo(t){return t.replace(no,(t=>oo(t)))}function io(t){return me(t)?.name}function so(t){return!!u(t)&&"[object Arguments]"===t.toString()}const fo=Q("Map"),ao=X(fo),lo=/Array/,ho="Array";function go(t){if(t){const n=io(t);if(lo.test(n)&&n!==ho)return!0}return!1}function po(t){return!u(t)}function mo(t,n){if(po(t)||Jt(t))return!1;if(w(t)||go(t))return!0;const e=t.length;if(!po(e)||!Qt(e)||e<0)return!1;if(n){const n=z(t);return!!n&&Ce(n,((t,n)=>n>=0&&Qt(n)))}return!0}const wo=Q("BigInt"),yo=X(wo),bo=Q("Boolean"),vo=X(bo),Ao=Q("ArrayBuffer"),Io=X(Ao);function Eo(t,n){return!(!t||!n)&&t instanceof n}const xo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function $o(t){if(u(t)){const n=t?.constructor?.name;return xo.test(n)}return!1}const So=Q("Date"),Mo=X(So);function Co(t){return Yt(t)||w(t)?!o(t):nt(t)?!vr(t):!u(t)}function jo(t){return!1===t}const Oo=Q("Float32Array"),Fo=X(Oo),Lo=Q("Float64Array"),To=X(Lo),{isInteger:Bo}=Number,No=Bo,Ro=Q("Int16Array"),Po=X(Ro),Uo=Q("Int32Array"),_o=X(Uo),ko=Q("Int8Array"),Do=X(ko);function Zo(t){return u(t)&&"function"==typeof t[Symbol.iterator]}function qo(t){return!!t&&t instanceof Promise}function zo(t){return!!t&&(qo(t)||Jn(t)||Wn(t))}function Ho(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Wo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Go(t,n){return!po(t)&&!po(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Vo}=Number,Jo=Vo;function Ko(t,n){const e=me(t),r=me(n);return e===r&&e.name===r.name}function Qo(t){return!0===t}const Xo=Q("Uint16Array"),Yo=X(Xo),tc=Q("Uint32Array"),nc=X(tc),ec=Q("Uint8Array"),rc=X(ec),oc=Q("Uint8ClampedArray"),cc=X(oc),uc=Q("WeakMap"),ic=X(uc),sc=void 0!==globalThis.Deno,fc=void 0!==globalThis.process&&process.versions&&process.versions.node;function ac(t,n=!0){return Boolean(t)&&n}function lc(t,n=!0){return!1===Boolean(t)&&n}function hc(t,n,e,r){if(u(t)){if(Jt(n))return e?ae(n,e,r):n(...r);if(nt(n))return n[e]=t,n}}function dc(t,n){return jo(et(t,n))}const gc=JSON;function pc(t,n){if(t)return gc.parse(t,n)}const mc=gc.stringify;function wc(t,n,e){const r=globalThis.options||e;let o;return Jt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${mc(t)}\n\t\tExpected: ${mc(n)}`,r)}async function yc(t,n,e){const r=await t;return!(Jt(n)&&!1===await n(r,e))&&!dc(r,n)||wc(r,n,e)}function bc(t,n,e){if(zo(t)||zo(n))return yc(t,n,e);return!(Jt(n)&&!1===n(t,e))&&!dc(t,n)||wc(t,n,e)}function vc(t,n,e){const r=Ie(t,(t=>Jt(t)?t.bind(n):t));return e?rn(e,r):r}function Ac(t){if(t){if(tt(t))return Vt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Ic=globalThis.structuredClone;function Ec(t){return Ic(t)}async function xc(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;cac(t)))}async function Sc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);u(r)&&e.push(r)}return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);u(c)&&r(c)}return o}const c=Jt(o.set);for await(const[e,r]of t){const i=await n(r,e,o,t);u(i)&&(c?o.set(e,i):o[e]=i)}return o}function Mc(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);u(c)&&o(c)}return r}const o=Jt(r.set);for(const[e,c]of t){const i=n(c,e,r,t);u(i)&&(o?r.set(e,i):r[e]=i)}return r}const Cc=Kn(f,l,sr,ir,Mc,Sc);function jc(...t){return Jn(t[0])?async function(...n){return Ce(t,(async t=>Ce(n,(async n=>t(n)))))}:function(...n){return Ce(t,(t=>Ce(n,(n=>t(n)))))}}function Oc(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=Jt(r.set);for(const[o,c]of t){!0===n(c,o,r,t)&&(e?r.set(o,c):r[o]=c)}}return r}async function Fc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=Jt(o.set);for await(const[r,c]of t){!0===await n(c,r,o,t)&&(e?o.set(r,c):o[r]=c)}}return o}const Lc=Kn(F,L,fr,ar,Oc,Fc);function Tc(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const Bc=Tc(s),Nc=Tc(M);function Rc(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const Pc=Rc(a),Uc=Rc(C);function _c(t,n){const e=we(t),r=e.push||e.add;if(r&&Jt(r)){const o=r.bind(e);t.forEach((t=>{const r=n(t,e);o(r)}))}else Jt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e}function kc(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e}function Dc(t,n,e){return!po(t)&&!po(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,e):wr(n)?n.test(t):Jt(n)?n(t):w(n)?j(n,(n=>Dc(t,n))):Ce(n,(n=>Dc(t,n))):w(t)?wr(n)?j(t,(t=>t.test(n))):Jt(n)?j(t,n):w(n)?j(n,(n=>Dc(t,n))):t.includes(n,e):!!nt(t)&&(wr(n)?$e(t,(t=>t.test(n))):Jt(n)?$e(t,n):nt(n)?$e(t,((t,e)=>t===n[e])):$e(t,(t=>Dc(t,n))))))}const Zc=Fn(/\./),qc=(t,n,e)=>(n&&!u(t[n])&&(t[n]=e),t);class zc{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Hc=v(zc);function Wc(t,n){return Hc.set(t,n)}function Gc(){re(setTimeout(ee,0),(t=>{Hc.remove(t)}))}function Vc(t,...n){return Qn(n,(n=>{Qn(n,((n,e)=>{if(t[e]&&(nt(n)||w(n)||n.forEach))return Vc(t[e],n);t[e]=n}))})),t}class Jc{static models=new Map;constructor(t,n){u(n)?(rn(this,n),this.modelName=t,Jc.models.set(t,n)):rn(this,t)}delete(t){Jc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Jc.models.set(t||this.modelName,this)}has(t){return Jc.models.has(t||this.modelName)}get(t){return Jc.models.get(t||this.modelName)}}function Kc(t,n){return u(n)?v(Jc,[t,n]):Z(t,Jc.models)}function Qc(t,n){return[t,n]}function Xc(t,n,e){const r=t.length,o=[];for(let c=0;cj(e,(e=>et(t[e],n[e])));function nu(t,n,e){return n&&nt(t)||Qt(n)&&w(t)?t[n]=e:t.set?t.set(n,e):t.push?t.push(e):t.add?t.add(e):t[n]=e,t}function eu(t,n,e){return Qt(e)&&w(t)?t[e]=n:t.push?t.push(n):t.add?t.add(n):t[e]=n,t}class ru{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;kn(t,(n=>{t[n]=new ru(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new ru(e),!0)})}}function ou(){return[]}function cu(){return!1}const uu=()=>({}),iu=()=>"",su=()=>!0;async function fu(t,n){for(let e=0;e0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const du=v(hu);class gu{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):u(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=we(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function pu(t){return new gu(t)}async function mu(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;c{vo(t)&&t&&(yu[n]=t)})),s(bu.brands,(t=>{yu[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{yu[t]=!0}))}function vu(t,n,e,r){return t.addEventListener(n,e,r),t}function Au(t,n,e,r){return t.removeEventListener(n,e,r),t}function Iu(t){return 13===t.keyCode}const Eu=document.createDocumentFragment.bind(document);function xu(t,n){return t.appendChild(n),n}function $u(t,n){return w(n)?Ar(n,it(n,(n=>t.getAttribute(n)))):(kn(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Su=/^.[\w_-]+$/,Mu=/^[A-Za-z]+$/,Cu=/\s/,ju=document.getElementsByClassName.bind(document),Ou=document.getElementsByTagName.bind(document),Fu=document.getElementById.bind(document),Lu=document.querySelector.bind(document),Tu=document.querySelectorAll.bind(document);function Bu(t){switch(t[0]){case"#":if(!Cu.test(t))return Fu(_r(t));break;case".":if(Su.test(t))return ju(_r(t));break;default:if(Mu.test(t))return Ou(t)}return Tu(t)}const Nu=document.createElement.bind(document);function Ru(t){const n=Zc(t)&&t||`${t}.js`;return(t=>Yc((n=>{vu(t,"load",n,!0),vu(t,"error",n,!0),xu(Lu("head"),t)})))($u(Nu("script"),{async:"",src:n}))}function Pu(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&vu(document,"DOMContentLoaded",t),!1)}Pu((()=>{const t=Fu("AcidLib");Ru(t&&t.getAttribute("data-index")||"/index")}));const Uu=location.protocol,_u="http:"===Uu?"ws":"wss",ku=location.hostname,Du={hardware:{cores:navigator.hardwareConcurrency},host:{name:ku,protocol:Uu,protocolSocket:_u}};function Zu(){rn(Du,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function qu(){Zu()}let zu;Pu(qu),vu(window,"load",qu,!0),vu(window,"resize",qu,!0),function(t){try{t().removeItem("TESTING"),zu=!0}catch(t){zu=!1}}((()=>localStorage));class Hu{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=pu(t)}hasLocal=zu;setItem(t,n){return this.hasLocal&&this.local.setItem(t,Yt(n)?n:mc(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return u(n)?n:!u(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}function Wu(t){return new Hu(t)}const Gu=(t,n)=>`color:${t};background:${n};`,Vu={alert:Gu("#fff","#f44336"),important:Gu("#fff","#E91E63"),notify:Gu("#fff","#651FFF"),warning:Gu("#000","#FFEA00")},Ju=(t,n)=>{const e=Yt(t)?t:mc(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Vu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Vu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},Ku=(t,n,e)=>{Vu[t]=Gu(n,e)};function Qu(t){return t&&9!==t.nodeType}function Xu(t){return!!u(t)&&"[object HTMLCollection]"===t.toString()}function Yu(t){return!!u(t)&&"[object NodeList]"===t.toString()}export{Hu as BrowserStorage,Xn as Chain,zc as Intervals,Jc as Model,ru as Store,ce as Timers,hu as UniqID,gu as VirtualStorage,ke as add,Rn as after,xu as append,ae as apply,pr as arrayToRegex,kc as arraysToObject,Pn as ary,bc as assert,yc as assertAsync,rn as assign,on as assignToClass,en as assignToObject,Un as before,vc as bindAll,Wu as browserStorage,Be as cacheNativeMethod,He as calcProgress,xr as camelCase,Yn as chain,t as chunk,Pr as chunkString,Ac as clear,n as clearArray,Vt as clearBuffer,Gc as clearIntervals,se as clearTimers,Ec as clone,e as cloneArray,we as cloneType,Ju as cnsl,Ku as cnslTheme,$c as compact,ur as compactKeys,Cc as compactMap,f as compactMapArray,l as compactMapAsyncArray,ir as compactMapAsyncObject,sr as compactMapObject,xc as concurrent,st as concurrentEachArray,Xc as concurrentStatus,v as construct,K as constructorName,un as countBy,sn as countKey,fn as countWithoutKey,Eu as createFragment,te as curry,ne as curryRight,le as debounce,De as deduct,Pe as defProp,x as difference,Ze as divide,$ as drop,S as dropRight,Qn as each,s as eachArray,a as eachAsyncArray,_n as eachAsyncObject,kn as eachObject,M as eachRight,C as eachRightAsync,A as ensureArray,Gt as ensureBuffer,nr as equalsZero,gr as escapeRegex,dr as escapeRegexRegex,vu as eventAdd,Au as eventRemove,Ce as every,jc as everyArg,j as everyArray,O as everyAsyncArray,xe as everyAsyncObject,$e as everyObject,cn as extendClass,Lc as filter,F as filterArray,L as filterAsyncArray,ar as filterAsyncObject,fr as filterObject,ln as findIndex,an as findIndexCache,hn as findItem,T as first,B as flatten,I as flattenDeep,Bc as flow,Pc as flowAsync,Uc as flowAsyncRight,Nc as flowRight,E as forEach,Dn as forEachAsync,_c as forMap,zn as forOf,Gn as forOfAsync,Mc as forOfCompactMap,Sc as forOfCompactMapAsync,Se as forOfEvery,Me as forOfEveryAsync,Oc as forOfFilter,Fc as forOfFilterAsync,ye as forOfMap,be as forOfMapAsync,Kn as generateLoop,Z as get,ju as getByClass,Fu as getById,Ou as getByTag,cr as getEntries,jn as getFileExtension,On as getFilename,yn as getHighest,pn as getLowest,Ft as getNumberInsertIndex,Re as getPropDesc,Ne as getPropNames,me as getType,io as getTypeName,bn as groupBy,Dc as has,G as hasAnyKeys,Zc as hasDot,W as hasKeys,o as hasLength,zu as hasLocal,Ue as hasProp,u as hasValue,Gr as htmlEntities,he as ifInvoke,qc as ifNotAssign,hc as ifValue,Ru as importjs,mu as inAsync,wu as inSync,qe as increment,vn as indexBy,Du as info,N as initial,Ur as initialString,Nr as insertInRange,R as intersection,Wc as interval,Hc as intervals,lr as invert,P as invokeArray,An as invokeCollection,In as invokeCollectionAsync,yu as isAgent,so as isArguments,w as isArray,Io as isArrayBuffer,Ao as isArrayBufferCall,mo as isArrayLike,Jn as isAsync,Vn as isAsyncCall,yo as isBigInt,wo as isBigIntCall,vo as isBoolean,bo as isBooleanCall,tt as isBuffer,Y as isBufferCall,Eo as isChild,$o as isCloneable,V as isConstructor,J as isConstructorFactory,Q as isConstructorNameFactory,Mo as isDate,So as isDateCall,sc as isDeno,Pu as isDocumentReady,Qu as isDom,Co as isEmpty,Iu as isEnter,et as isEqual,rr as isEven,Fo as isF32,Oo as isF32Call,To as isF64,Lo as isF64Call,jo as isFalse,lc as isFalsy,Ln as isFileCSS,Tn as isFileHTML,Bn as isFileJS,Nn as isFileJSON,No as isFloat,Jt as isFunction,Wn as isGenerator,Hn as isGeneratorCall,Xu as isHTMLCollection,Po as isI16,Ro as isI16Call,_o as isI32,Uo as isI32Call,Do as isI8,ko as isI8Call,Zo as isIterable,zo as isKindAsync,ao as isMap,fo as isMapCall,rt as isMatchArray,hr as isMatchObject,d as isNegative,Yu as isNodeList,fc as isNodejs,y as isNotArray,Xt as isNotNumber,tn as isNotString,c as isNull,Qt as isNumber,Kt as isNumberCall,xt as isNumberEqual,Qe as isNumberInRange,Xe as isNumberNotInRange,er as isOdd,Ho as isParent,nt as isPlainObject,tr as isPositive,Wo as isPrimitive,qo as isPromise,wr as isRegex,mr as isRegexCall,Go as isRelated,Jo as isSafeInt,_e as isSame,Ko as isSameType,qn as isSet,Zn as isSetCall,Yt as isString,Qo as isTrue,ac as isTruthy,X as isTypeFactory,go as isTypedArray,Yo as isU16,Xo as isU16Call,nc as isU32,tc as isU32Call,rc as isU8,cc as isU8C,oc as isU8CCall,ec as isU8Call,r as isUndefined,ic as isWeakMap,uc as isWeakMapCall,nr as isZero,pc as jsonParse,Mr as kebabCase,z as keys,ct as largest,ut as last,Br as lowerCase,Ie as map,it as mapArray,ft as mapAsyncArray,ve as mapAsyncObject,Ae as mapObject,at as mapRightArray,lt as mapWhile,Vc as merge,Kc as model,ze as multiply,de as negate,po as noValue,$u as nodeAttribute,ee as noop,dc as notEqual,ge as nthArg,nn as objectAssign,or as objectEntries,vr as objectSize,yr as omit,pe as once,Bt as onlyUnique,Ee as over,je as overEvery,Qc as pair,gt as partition,br as pick,xn as pluck,En as pluckObject,Yc as promise,tu as propertyMatch,Lu as querySelector,Tu as querySelectorAll,Ge as randomFloat,Et as randomInt,m as range,p as rangeDown,g as rangeUp,Wr as rawURLDecode,Oe as reArg,Fn as regexTestFactory,Ve as remainder,wt as remove,yt as removeBy,kr as replaceList,bt as rest,_r as restString,i as returnValue,vt as right,Rr as rightString,Ct as sample,Vr as sanitize,Zu as saveDimensions,Bu as selector,nu as setKey,eu as setValue,Mt as shuffle,Ot as smallest,Or as snakeCase,Sn as sortCollectionAlphabetically,Cn as sortCollectionAlphabeticallyReverse,wn as sortCollectionAscending,mn as sortCollectionAscendingFilter,gn as sortCollectionDescending,dn as sortCollectionDescendingFilter,dt as sortNumberAscending,mt as sortNumberDescening,$n as sortObjectsAlphabetically,Mn as sortObjectsAlphabeticallyReverse,Nt as sortUnique,mc as stringify,ou as stubArray,cu as stubFalse,uu as stubObject,iu as stubString,su as stubTrue,ht as subtract,Je as subtractAll,pt as subtractReverse,Ke as sumAll,Lt as take,Tt as takeRight,Vu as themes,Fe as throttle,ie as timer,ue as timers,re as times,fu as timesAsync,oe as timesMap,au as timesMapAsync,St as toArray,D as toPath,lu as toggle,Qr as tokenize,Yr as truncate,to as truncateRight,Wt as unZip,Ir as unZipObject,Pt as union,du as uniqID,Rt as unique,Ut as untilFalseArray,_t as untilTrueArray,qu as updateDimensions,Lr as upperCase,ro as upperFirst,co as upperFirstAll,eo as upperFirstLetter,oo as upperFirstOnly,uo as upperFirstOnlyAll,pu as virtualStorage,kt as whileCompactMap,Dt as whileEachArray,Zt as whileMapArray,qt as without,Xr as words,Le as wrap,zt as xor,Ht as zip,Ar as zipObject}; //# sourceMappingURL=index.js.map diff --git a/npm/module/index.js b/npm/module/index.js index d8f8b32..d9d37f6 100644 --- a/npm/module/index.js +++ b/npm/module/index.js @@ -1,2 +1,2 @@ -import{readdir as t,stat as n,mkdir as r,copyFile as e}from"node:fs/promises";import o from"node:path";import{fileURLToPath as u}from"node:url";import c from"path";function i(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function s(t){return t.length=0,t}function f(t){return t.slice()}function a(t){return void 0===t}function l(t){return Boolean(t.length)}function h(t){return null===t}function p(t){return!a(t)&&!h(t)}function g(t){return t}function d(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const s=n.call(e,t,u,r,c,i,o);p(s)&&r.push(s)})):d(t,((t,u,c,i)=>{const s=n(t,u,r,c,i,e,o);p(s)&&r.push(s)})),r}async function w(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const u=await n(t,e,r,o);p(u)&&r.push(u)})),r}const{sign:b}=Math;function v(t){return-1===b(t)}function A(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function E(t,n,r=1,e=[]){return v(r)?e:t{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function T(t,n=1,r=t.length){return t.splice(n,r)}const _=(t,n=1,r=t.length)=>T(t,0,r-n);function F(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function R(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function N(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function D(t,n,r=[],e){return await w(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function L(t,n){return n?t.slice(0,n):t[0]}function Z(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat($(n))),[]);return r}function k(t){return t.slice(0,t.length-1)}function q(t,...n){return m(t,(t=>{if(N(n,(n=>n.includes(t))))return t}))}function V(t,n,r){if(!t)return;const e=t.length;if(p(r))for(let o=0;o(r=r[t],p(r)))),r}const K=Object.keys;function Q(t){if(t)return K(t)}const X=Object.hasOwn;function Y(t,...n){if(t)return N(n,(n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}}))}function tt(t,...n){if(t)return Boolean(n.find((n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}})))}function nt(t,n){return t?.constructor===n||!1}function rt(t){return n=>nt(n,t)}function et(t){return t?.constructor?.name}function ot(t){return n=>et(n)===t||!1}function ut(t){return function(n,...r){return r?t(n)&&N(r,t):t(n)}}const ct=ot("Buffer"),it=ut(ct),st=t=>!!p(t)&&"Object("===t.constructor.toString().trim().slice(9,16),ft=(t,n)=>{if(t===n)return!0;if(it(t))return t.equals(n);if(t.toString()===n.toString())if(st(t)){const r=Q(t);if(Y(n,r))return N(r,(r=>ft(t[r],n[r])))}else if(j(t)&&t.length===n.length)return N(t,((t,r)=>ft(t,n[r])));return!1};function at(t,n){return t.length===n.length&&N(t,((t,r)=>ft(n[r],t)))}const lt=Math.max;function ht(t){return lt(...t)}function pt(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function gt(t,n,r=[],e,o){return p(e)?d(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):d(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function dt(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function wt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function yt(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function It(t,n){return n-t}function Et(t){return t.sort(It)}function jt(t,n){let r=t.length;for(let e=0;er)return Ft(t);if(1===n)return[t[St(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Dt(t,n=1){return t.slice(0,n)}function Lt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Zt(t,n,r){return r.indexOf(t)===n}function kt(t,n,r){return t!==r[n-1]}function qt(t,n){return n?t.filter(kt):t.filter(Zt)}function Vt(...t){return qt(C(t))}function zt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Qt(...t){const n=O(Map),r=[];return 2===t.length?B(t[0],t[1]):(d(t,((t,r)=>{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&r.push(t.child)})),r)}function Xt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Yt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function tn(t){return it(t)&&t||p(t)&&Buffer.from(t)||Buffer.alloc(0)}function nn(t){return t.fill(0),t}const rn=t=>!!p(t)&&t instanceof Function,en=ot("Number"),on=ut(en);function un(t){return!on(t)}const cn=rt(String);function sn(t){return!cn(t)}const fn=Object.assign;function an(t,n){if(st(n))fn(t,n);else if(rn(n)){const r=n.name;r?t[r]=n:fn(t,n)}else(cn(n)||on(n))&&(t[n]=n);return t}function ln(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function dn(t,n){let r=0;return d(t,(t=>{t[n]&&r++})),r}function mn(t,n){let r=0;return d(t,(t=>{t[n]||r++})),r}function wn(t,n,r,e,o){if(t[o]===e)return!0}function yn(t,n,r="id"){const e=t.findIndex(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function bn(t,n,r="id"){const e=t.find(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function vn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function An(t,n="id",r){return t.sort(((t,e)=>vn(t,e,n,r)))}function In(t,n){return An(t,n,!1)[0]}function En(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function jn(t,n="id",r){return t.sort(((t,e)=>En(t,e,n,r)))}function Mn(t,n="id"){return jn(t,n)[0]}function xn(t,n){const r={};return d(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function On(t,n="id"){const r={};return d(t,(t=>{r[t[n]]=t})),r}function $n(t,n,r,e){return gt(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function Cn(t,n,r,e){return mt(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function Sn(t,n){if(t)return cn(n)?t[n]:gt(n,(n=>t[n]))}function Bn(t,n){return gt(t,(t=>Sn(t,n)))}function Tn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function _n(t,n="id",r){return t.sort(((t,e)=>Tn(t,e,n,r)))}function Fn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function Rn(t,n="id",r){return t.sort(((t,e)=>Fn(t,e,n,r)))}function Nn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Pn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Un(t){return n=>!!p(n)&&t.test(n)}const Dn=Un(/\.css$/),Ln=Un(/\.html$/),Zn=Un(/\.js$/),kn=Un(/\.json$/);function qn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Vn(t,n){return(...r)=>t(...r.splice(0,n))}function zn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const Gn=async(t,n,r,e)=>{if(!t)return;const o=Q(t);return p(r)?await w(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await w(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Jn(t,n,r,e){if(!t)return;const o=Q(t);return p(r)?d(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):d(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Wn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let l;const h=rr(i);if(p(c)&&i)return l=j(c)?h?n:t:st(c)||rn(c)?h?e:r:o?h?u:o:Yn(c)?u:h?e:r,l(c,i,s,f,a)}}const or=er(d,w,Jn,Gn,Qn,tr);class ur{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;or(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function cr(t){return O(ur,[t])}function ir(t,n=t.length){const r=[],e=(...o)=>{if(r.push(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function sr(t,n=t.length){const r=[],e=(...o)=>{if(r.unshift(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function fr(){}function ar(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=O(hr);function gr(t,n){return pr.set(t,n)}function dr(){ar(setTimeout(fr,0),(t=>{pr.remove(t)}))}const mr=Reflect.apply;function wr(t,n,r){if(rn(t))return mr(t,n,r)}function yr(t,n){function r(...t){!1!==r.id&&pr.remove(r.id),r.id=gr((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(pr.remove(r.id),r.id=!1)},r}function br(t,n,...r){if(rn(t))return n?t.call(n,...r):t(...r)}function vr(t){return(...n)=>!t(...n)}function Ar(t=0){return(...n)=>n[t]}const Ir=t=>{let n;return(...r)=>(p(n)||(n=t(...r)),n)};function Er(t){return t?.constructor}function jr(t,n=[]){const r=Er(t);return r===Function&&"function"===r.name?function(){}:O(r,n)}function Mr(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function xr(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function Or(t,n,r={}){if(t)return await Gn(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function $r(t,n,r={},e,o){if(t)return p(e)?Jn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Jn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Cr=er(gt,mt,$r,Or,Mr,xr);function Sr(t){return(...n)=>Cr(t,(t=>t(...n)))}async function Br(t,n){if(!t)return;return P(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Tr(t,n){if(!t)return;return N(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function _r(t,n=g){if(j(t)||Kn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function Fr(t,n=g,r){if(Yn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(j(t)||Kn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const Rr=er(N,P,Tr,Br,_r,Fr);function Nr(t){return n=>Rr(t,(t=>t(n)))}function Pr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Ur(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=gr((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{pr.remove(r.id),r.id=!1},r}function Dr(t,n){return(...r)=>n(t,...r)}const Lr=Function.prototype;function Zr(t){return Lr.call.bind(t)}const kr=Object.getOwnPropertyNames,qr=Object.getOwnPropertyDescriptor,Vr=Object.defineProperty,zr=Zr(Object.hasOwnProperty),Gr=Object.is;function Jr(t,n){return t+n}function Wr(t){return t-1}function Hr(t,n){return t/n}function Kr(t){return t+1}function Qr(t,n){return t*n}function Xr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Yr}=Math;function te(t,n=0){return Yr()*(t-n)+n}function ne(t,n){return t%n}function re(t){return t.reduce(((t,n)=>t-n),0)}function ee(t){return t.reduce(((t,n)=>t+n),0)}function oe(t,n,r){return t>n&&tr}const{sign:ce}=Math;function ie(t){return 1===ce(t)}function se(t){return 0===t}const fe=Object.entries;function ae(t){if(p(t))return fe(t)}function le(t){const n=[];return Jn(t,((t,r)=>{p(t)&&n.push(r)})),n}async function he(t,n=g,r={}){return await Gn(t,(async(t,e,o,u,c)=>{const i=await n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function pe(t,n=g,r={}){return Jn(t,((t,e,o,u,c)=>{const i=n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function ge(t,n,r={}){return Jn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function de(t,n,r={}){return await Gn(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function me(t,n={}){if(t)return Jn(t,((t,r)=>{n[t]=r})),n}const we=(t,n)=>{if(t===n)return!0;const r=Q(t),e=Q(n);return r.length===e.length&&N(r,(r=>t[r]===n[r]))},ye=/[()[\]{}*+?^$|#.,/\\\s-]/g;function be(t){return t.replace(ye,"\\$&")}function ve(t,n){return n?ve(gt(t,be)):RegExp(t.join("|"))}const Ae=ot("RegExp"),Ie=ut(Ae);function Ee(t,n){if(!t)return{};if(j(n)){const r=ve(n);return ge(t,((t,n)=>!r.test(n)))}if(Ie(n))return ge(t,((t,r)=>!n.test(r)));if(cn(n))return ge(t,((t,r)=>r!==n));if(on(n)){const r=n.toString();return ge(t,((t,n)=>n!==r))}return rn(n)?ge(t,((t,r)=>!n(t,r))):fn({},t)}const je=(t,n,r={})=>{if(t)return d(n,(n=>{r[n]=t[n]})),r};function Me(t){if(!t)return;if(st(t))return Q(t).length;const n=t.length;if(p(n))return n;const r=t.size;return p(n)?r:Q(t).length}const xe=(t,n)=>{const r={};return d(t,((t,e)=>{r[t]=n[e]})),r},Oe=t=>{const n=[],r=[];return Jn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},$e=/[ _-]+/g;function Ce(t){let n="";return t.replace($e," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Se=/[ _-]+/g,Be=/[ ]+/g;function Te(t){return t.replace(/([A-Z]+)/g," $1").replace(Se," ").trim().toLowerCase().replace(Be,"-")}const _e=/[ _-]+/g,Fe=/[ ]+/g;function Re(t){return t.replace(/([A-Z]+)/g," $1").replace(_e," ").trim().toLowerCase().replace(Fe,"_")}const Ne=/[ _-]+/g;function Pe(t){return t.replace(/([A-Z]+)/g," $1").replace(Ne," ").trim().toUpperCase()}const Ue=/[ _-]+/g;function De(t){return t.replace(/([A-Z]+)/g," $1").replace(Ue," ").trim().toLowerCase()}function Le(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Ze(t,n=1){return t[t.length-n]}function ke(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function qe(t,n=1){return t.slice(0,-1*n)}function Ve(t,n=1){return t.substring(n)}function ze(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const Ge=/%(?![\da-f]{2})/gi,Je=/&/g,We=//g,Ke=/"/g;function Qe(t){return decodeURIComponent(t.replace(Ge,(()=>"%25")))}function Xe(t){return t.replace(Je,"&").replace(We,"<").replace(He,">").replace(Ke,""")}function Ye(t){return Xe(Qe(t))}const to=/\S+/g,no=/\w+/g;function ro(t){return t.match(to)||[]}function eo(t){return t.match(no)||[]}function oo(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function uo(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const co=/\w+/g;function io(t){return t[0].toUpperCase()}function so(t){return io(t)+Ve(t)}function fo(t){return io(t)+Ve(t).toLowerCase()}function ao(t){return t.replace(co,(t=>so(t)))}function lo(t){return t.replace(co,(t=>fo(t)))}function ho(t){return Er(t)?.name}function po(t){return!!p(t)&&"[object Arguments]"===t.toString()}const go=ot("Map"),mo=ut(go),wo=/Array/,yo="Array";function bo(t){if(t){const n=ho(t);if(wo.test(n)&&n!==yo)return!0}return!1}function vo(t){return!p(t)}function Ao(t,n){if(vo(t)||rn(t))return!1;if(j(t)||bo(t))return!0;const r=t.length;if(!vo(r)||!on(r)||r<0)return!1;if(n){const n=Q(t);return!!n&&Rr(n,((t,n)=>n>=0&&on(n)))}return!0}const Io=ot("BigInt"),Eo=ut(Io),jo=ot("Boolean"),Mo=ut(jo),xo=ot("ArrayBuffer"),Oo=ut(xo);function $o(t,n){return!(!t||!n)&&t instanceof n}const Co=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function So(t){if(p(t)){const n=t?.constructor?.name;return Co.test(n)}return!1}const Bo=ot("Date"),To=ut(Bo);function _o(t){return cn(t)||j(t)?!l(t):st(t)?!Me(t):!p(t)}function Fo(t){return!1===t}const Ro=ot("Float32Array"),No=ut(Ro),Po=ot("Float64Array"),Uo=ut(Po),{isInteger:Do}=Number,Lo=Do,Zo=ot("Int16Array"),ko=ut(Zo),qo=ot("Int32Array"),Vo=ut(qo),zo=ot("Int8Array"),Go=ut(zo);function Jo(t){return p(t)&&"function"==typeof t[Symbol.iterator]}function Wo(t){return!!t&&t instanceof Promise}function Ho(t){return!!t&&(Wo(t)||rr(t)||Yn(t))}function Ko(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Qo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Xo(t,n){return!vo(t)&&!vo(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Yo}=Number,tu=Yo;function nu(t,n){const r=Er(t),e=Er(n);return r===e&&r.name===e.name}function ru(t){return!0===t}const eu=ot("Uint16Array"),ou=ut(eu),uu=ot("Uint32Array"),cu=ut(uu),iu=ot("Uint8Array"),su=ut(iu),fu=ot("Uint8ClampedArray"),au=ut(fu),lu=ot("WeakMap"),hu=ut(lu),pu=void 0!==globalThis.Deno,gu=void 0!==globalThis.process&&process.versions&&process.versions.node;function du(t,n=!0){return Boolean(t)&&n}function mu(t,n=!0){return!1===Boolean(t)&&n}function wu(t,n,r,e){if(p(t)){if(rn(n))return r?wr(n,r,e):n(...e);if(st(n))return n[r]=t,n}}function yu(t,n){return Fo(ft(t,n))}const bu=JSON;function vu(t,n){if(t)return bu.parse(t,n)}const Au=bu.stringify;function Iu(t,n,r){const e=globalThis.options||r;let o;return rn(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Au(t)}\n\t\tExpected: ${Au(n)}`,e)}async function Eu(t,n,r){const e=await t;return!(rn(n)&&!1===await n(e,r))&&!yu(e,n)||Iu(e,n,r)}function ju(t,n,r){if(Ho(t)||Ho(n))return Eu(t,n,r);return!(rn(n)&&!1===n(t,r))&&!yu(t,n)||Iu(t,n,r)}function Mu(t,n,r){const e=Cr(t,(t=>rn(t)?t.bind(n):t));return r?ln(r,e):e}function xu(t){if(t){if(it(t))return nn(t);if(j(t))return s(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Ou=globalThis.structuredClone;function $u(t){return Ou(t)}async function Cu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;udu(t)))}async function Bu(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);p(e)&&r.push(e)}return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);p(u)&&e(u)}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);p(c)&&(u?o.set(r,c):o[r]=c)}return o}function Tu(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);p(u)&&o(u)}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);p(c)&&(o?e.set(r,c):e[r]=c)}return e}const _u=er(m,y,pe,he,Tu,Bu);function Fu(...t){return rr(t[0])?async function(...n){return Rr(t,(async t=>Rr(n,(async n=>t(n)))))}:function(...n){return Rr(t,(t=>Rr(n,(n=>t(n)))))}}function Ru(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=rn(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Nu(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=rn(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Pu=er(U,D,ge,de,Ru,Nu);function Uu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Du=Uu(d),Lu=Uu(F);function Zu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const ku=Zu(w),qu=Zu(R);function Vu(t,n){const r=jr(t),e=r.push||r.add;if(e&&rn(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else rn(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function zu(t,n){const r={};return d(t,((t,e)=>{r[n[e]]=t})),r}function Gu(t,n,r){return!vo(t)&&!vo(n)&&(t===n||(cn(t)?cn(n)?t.includes(n,r):Ie(n)?n.test(t):rn(n)?n(t):j(n)?N(n,(n=>Gu(t,n))):Rr(n,(n=>Gu(t,n))):j(t)?Ie(n)?N(t,(t=>t.test(n))):rn(n)?N(t,n):j(n)?N(n,(n=>Gu(t,n))):t.includes(n,r):!!st(t)&&(Ie(n)?Tr(t,(t=>t.test(n))):rn(n)?Tr(t,n):st(n)?Tr(t,((t,r)=>t===n[r])):Tr(t,(t=>Gu(t,n))))))}const Ju=Un(/\./),Wu=(t,n,r)=>(n&&!p(t[n])&&(t[n]=r),t);class Hu{list=O(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ku=O(Hu);function Qu(t,n){return Ku.set(t,n)}function Xu(){ar(setTimeout(fr,0),(t=>{Ku.remove(t)}))}function Yu(t,...n){return or(n,(n=>{or(n,((n,r)=>{if(t[r]&&(st(n)||j(n)||n.forEach))return Yu(t[r],n);t[r]=n}))})),t}class tc{static models=new Map;constructor(t,n){p(n)?(ln(this,n),this.modelName=t,tc.models.set(t,n)):ln(this,t)}delete(t){tc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),tc.models.set(t||this.modelName,this)}has(t){return tc.models.has(t||this.modelName)}get(t){return tc.models.get(t||this.modelName)}}function nc(t,n){return p(n)?O(tc,[t,n]):H(t,tc.models)}function rc(t,n){return[t,n]}function ec(t,n,r){const e=t.length,o=[];for(let u=0;uN(r,(r=>ft(t[r],n[r])));function cc(t,n,r){return n&&st(t)||on(n)&&j(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function ic(t,n,r){return on(r)&&j(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class sc{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Jn(t,(n=>{t[n]=new sc(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new sc(r),!0)})}}function fc(){return[]}function ac(){return!1}const lc=()=>({}),hc=()=>"",pc=()=>!0;async function gc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const yc=O(wc);class bc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):p(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=jr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function vc(t){return new bc(t)}async function Ac(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{const i=o.join(u,t);if((await n(i)).isDirectory()){const n=o.join(c,t.replace(u,""));await r(n,{recursive:!0}),await Ec(i,n)}else await async function(t,n,r){const u=o.join(t,r),c=o.join(n,r);await e(u,c)}(u,c,t)})),!0}function jc(t){return globalThis.__filename?__filename:u(t.url)}function Mc(t){return globalThis.__dirname?__dirname:c.dirname(u(t.url))}export{ur as Chain,Hu as Intervals,tc as Model,sc as Store,hr as Timers,wc as UniqID,bc as VirtualStorage,Jr as add,qn as after,wr as apply,ve as arrayToRegex,zu as arraysToObject,Vn as ary,ju as assert,Eu as assertAsync,ln as assign,hn as assignToClass,an as assignToObject,zn as before,Mu as bindAll,Zr as cacheNativeMethod,Xr as calcProgress,Ce as camelCase,cr as chain,i as chunk,ke as chunkString,xu as clear,s as clearArray,nn as clearBuffer,Xu as clearIntervals,dr as clearTimers,$u as clone,f as cloneArray,jr as cloneType,Su as compact,le as compactKeys,_u as compactMap,m as compactMapArray,y as compactMapAsyncArray,he as compactMapAsyncObject,pe as compactMapObject,Cu as concurrent,dt as concurrentEachArray,ec as concurrentStatus,O as construct,et as constructorName,Ec as copyFolder,gn as countBy,dn as countKey,mn as countWithoutKey,jc as currentFile,Mc as currentPath,ir as curry,sr as curryRight,yr as debounce,Wr as deduct,Vr as defProp,B as difference,Hr as divide,T as drop,_ as dropRight,or as each,d as eachArray,w as eachAsyncArray,Gn as eachAsyncObject,Jn as eachObject,F as eachRight,R as eachRightAsync,$ as ensureArray,tn as ensureBuffer,se as equalsZero,be as escapeRegex,ye as escapeRegexRegex,Rr as every,Fu as everyArg,N as everyArray,P as everyAsyncArray,Br as everyAsyncObject,Tr as everyObject,pn as extendClass,Pu as filter,U as filterArray,D as filterAsyncArray,de as filterAsyncObject,ge as filterObject,yn as findIndex,wn as findIndexCache,bn as findItem,L as first,Z as flatten,C as flattenDeep,Du as flow,ku as flowAsync,qu as flowAsyncRight,Lu as flowRight,S as forEach,Wn as forEachAsync,Vu as forMap,Qn as forOf,tr as forOfAsync,Tu as forOfCompactMap,Bu as forOfCompactMapAsync,_r as forOfEvery,Fr as forOfEveryAsync,Ru as forOfFilter,Nu as forOfFilterAsync,Mr as forOfMap,xr as forOfMapAsync,er as generateLoop,H as get,ae as getEntries,Nn as getFileExtension,Pn as getFilename,Mn as getHighest,In as getLowest,Ut as getNumberInsertIndex,qr as getPropDesc,kr as getPropNames,Er as getType,ho as getTypeName,xn as groupBy,Gu as has,tt as hasAnyKeys,Ju as hasDot,Y as hasKeys,l as hasLength,zr as hasProp,p as hasValue,Xe as htmlEntities,br as ifInvoke,Wu as ifNotAssign,wu as ifValue,Ac as inAsync,Ic as inSync,Kr as increment,On as indexBy,k as initial,qe as initialString,Le as insertInRange,q as intersection,Qu as interval,Ku as intervals,me as invert,V as invokeArray,$n as invokeCollection,Cn as invokeCollectionAsync,po as isArguments,j as isArray,Oo as isArrayBuffer,xo as isArrayBufferCall,Ao as isArrayLike,rr as isAsync,nr as isAsyncCall,Eo as isBigInt,Io as isBigIntCall,Mo as isBoolean,jo as isBooleanCall,it as isBuffer,ct as isBufferCall,$o as isChild,So as isCloneable,nt as isConstructor,rt as isConstructorFactory,ot as isConstructorNameFactory,To as isDate,Bo as isDateCall,pu as isDeno,_o as isEmpty,ft as isEqual,No as isF32,Ro as isF32Call,Uo as isF64,Po as isF64Call,Fo as isFalse,mu as isFalsy,Dn as isFileCSS,Ln as isFileHTML,Zn as isFileJS,kn as isFileJSON,Lo as isFloat,rn as isFunction,Yn as isGenerator,Xn as isGeneratorCall,ko as isI16,Zo as isI16Call,Vo as isI32,qo as isI32Call,Go as isI8,zo as isI8Call,Jo as isIterable,Ho as isKindAsync,mo as isMap,go as isMapCall,at as isMatchArray,we as isMatchObject,v as isNegative,gu as isNodejs,M as isNotArray,un as isNotNumber,sn as isNotString,h as isNull,on as isNumber,en as isNumberCall,Bt as isNumberEqual,oe as isNumberInRange,ue as isNumberNotInRange,Ko as isParent,st as isPlainObject,ie as isPositive,Qo as isPrimitive,Wo as isPromise,Ie as isRegex,Ae as isRegexCall,Xo as isRelated,tu as isSafeInt,Gr as isSame,nu as isSameType,Kn as isSet,Hn as isSetCall,cn as isString,ru as isTrue,du as isTruthy,ut as isTypeFactory,bo as isTypedArray,ou as isU16,eu as isU16Call,cu as isU32,uu as isU32Call,su as isU8,au as isU8C,fu as isU8CCall,iu as isU8Call,a as isUndefined,hu as isWeakMap,lu as isWeakMapCall,se as isZero,vu as jsonParse,Te as kebabCase,Q as keys,ht as largest,pt as last,De as lowerCase,Cr as map,gt as mapArray,mt as mapAsyncArray,Or as mapAsyncObject,$r as mapObject,wt as mapRightArray,yt as mapWhile,Yu as merge,nc as model,Qr as multiply,vr as negate,vo as noValue,fr as noop,yu as notEqual,Ar as nthArg,fn as objectAssign,fe as objectEntries,Me as objectSize,Ee as omit,Ir as once,Zt as onlyUnique,Sr as over,Nr as overEvery,rc as pair,At as partition,je as pick,Bn as pluck,Sn as pluckObject,oc as promise,uc as propertyMatch,te as randomFloat,St as randomInt,E as range,I as rangeDown,A as rangeUp,Qe as rawURLDecode,Pr as reArg,Un as regexTestFactory,ne as remainder,jt as remove,Mt as removeBy,ze as replaceList,xt as rest,Ve as restString,g as returnValue,Ot as right,Ze as rightString,Rt as sample,Ye as sanitize,cc as setKey,ic as setValue,Ft as shuffle,Pt as smallest,Re as snakeCase,_n as sortCollectionAlphabetically,Rn as sortCollectionAlphabeticallyReverse,jn as sortCollectionAscending,En as sortCollectionAscendingFilter,An as sortCollectionDescending,vn as sortCollectionDescendingFilter,vt as sortNumberAscending,Et as sortNumberDescening,Tn as sortObjectsAlphabetically,Fn as sortObjectsAlphabeticallyReverse,kt as sortUnique,Au as stringify,fc as stubArray,ac as stubFalse,lc as stubObject,hc as stubString,pc as stubTrue,bt as subtract,re as subtractAll,It as subtractReverse,ee as sumAll,Dt as take,Lt as takeRight,Ur as throttle,gr as timer,pr as timers,ar as times,gc as timesAsync,lr as timesMap,dc as timesMapAsync,_t as toArray,W as toPath,mc as toggle,ro as tokenize,oo as truncate,uo as truncateRight,Yt as unZip,Oe as unZipObject,Vt as union,yc as uniqID,qt as unique,zt as untilFalseArray,Gt as untilTrueArray,Pe as upperCase,so as upperFirst,ao as upperFirstAll,io as upperFirstLetter,fo as upperFirstOnly,lo as upperFirstOnlyAll,vc as virtualStorage,Jt as whileCompactMap,Wt as whileEachArray,Ht as whileMapArray,Kt as without,eo as words,Dr as wrap,Qt as xor,Xt as zip,xe as zipObject}; +import{readdir as t,stat as n,mkdir as r,copyFile as e}from"node:fs/promises";import o from"node:path";import{fileURLToPath as u}from"node:url";import c from"path";function i(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function s(t){return t.length=0,t}function f(t){return t.slice()}function a(t){return void 0===t}function l(t){return Boolean(t.length)}function h(t){return null===t}function p(t){return!a(t)&&!h(t)}function g(t){return t}function d(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const s=n.call(e,t,u,r,c,i,o);p(s)&&r.push(s)})):d(t,((t,u,c,i)=>{const s=n(t,u,r,c,i,e,o);p(s)&&r.push(s)})),r}async function w(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const u=await n(t,e,r,o);p(u)&&r.push(u)})),r}const{sign:b}=Math;function v(t){return-1===b(t)}function A(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function E(t,n,r=1,e=[]){return v(r)?e:t{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function T(t,n=1,r=t.length){return t.splice(n,r)}const _=(t,n=1,r=t.length)=>T(t,0,r-n);function F(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function R(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function N(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function D(t,n,r=[],e){return await w(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function L(t,n){return n?t.slice(0,n):t[0]}function Z(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat($(n))),[]);return r}function k(t){return t.slice(0,t.length-1)}function q(t,...n){return m(t,(t=>{if(N(n,(n=>n.includes(t))))return t}))}function V(t,n,r){if(!t)return;const e=t.length;if(p(r))for(let o=0;o(r=r[t],p(r)))),r}const K=Object.keys;function Q(t){if(t)return K(t)}const X=Object.hasOwn;function Y(t,...n){if(t)return N(n,(n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}}))}function tt(t,...n){if(t)return Boolean(n.find((n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}})))}function nt(t,n){return t?.constructor===n||!1}function rt(t){return n=>nt(n,t)}function et(t){return t?.constructor?.name}function ot(t){return n=>et(n)===t||!1}function ut(t){return function(n,...r){return r?t(n)&&N(r,t):t(n)}}const ct=ot("Buffer"),it=ut(ct),st=t=>!!p(t)&&"Object("===t.constructor.toString().trim().slice(9,16),ft=(t,n)=>{if(t===n)return!0;if(it(t))return t.equals(n);if(t.toString()===n.toString())if(st(t)){const r=Q(t);if(Y(n,r))return N(r,(r=>ft(t[r],n[r])))}else if(j(t)&&t.length===n.length)return N(t,((t,r)=>ft(t,n[r])));return!1};function at(t,n){return t.length===n.length&&N(t,((t,r)=>ft(n[r],t)))}const lt=Math.max;function ht(t){return lt(...t)}function pt(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function gt(t,n,r=[],e,o){return p(e)?d(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):d(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function dt(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function wt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function yt(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function It(t,n){return n-t}function Et(t){return t.sort(It)}function jt(t,n){let r=t.length;for(let e=0;er)return Ft(t);if(1===n)return[t[St(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Dt(t,n=1){return t.slice(0,n)}function Lt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Zt(t,n,r){return r.indexOf(t)===n}function kt(t,n,r){return t!==r[n-1]}function qt(t,n){return n?t.filter(kt):t.filter(Zt)}function Vt(...t){return qt(C(t))}function zt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Qt(...t){const n=O(Map),r=[];return 2===t.length?B(t[0],t[1]):(d(t,((t,r)=>{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&r.push(t.child)})),r)}function Xt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Yt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function tn(t){return it(t)&&t||p(t)&&Buffer.from(t)||Buffer.alloc(0)}function nn(t){return t.fill(0),t}const rn=t=>!!p(t)&&t instanceof Function,en=ot("Number"),on=ut(en);function un(t){return!on(t)}const cn=rt(String);function sn(t){return!cn(t)}const fn=Object.assign;function an(t,n){if(st(n))fn(t,n);else if(rn(n)){const r=n.name;r?t[r]=n:fn(t,n)}else(cn(n)||on(n))&&(t[n]=n);return t}function ln(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function dn(t,n){let r=0;return d(t,(t=>{t[n]&&r++})),r}function mn(t,n){let r=0;return d(t,(t=>{t[n]||r++})),r}function wn(t,n,r,e,o){if(t[o]===e)return!0}function yn(t,n,r="id"){const e=t.findIndex(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function bn(t,n,r="id"){const e=t.find(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function vn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function An(t,n="id",r){return t.sort(((t,e)=>vn(t,e,n,r)))}function In(t,n){return An(t,n,!1)[0]}function En(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function jn(t,n="id",r){return t.sort(((t,e)=>En(t,e,n,r)))}function Mn(t,n="id"){return jn(t,n)[0]}function xn(t,n){const r={};return d(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function On(t,n="id"){const r={};return d(t,(t=>{r[t[n]]=t})),r}function $n(t,n,r,e){return gt(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function Cn(t,n,r,e){return mt(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function Sn(t,n){if(t)return cn(n)?t[n]:gt(n,(n=>t[n]))}function Bn(t,n){return gt(t,(t=>Sn(t,n)))}function Tn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function _n(t,n="id",r){return t.sort(((t,e)=>Tn(t,e,n,r)))}function Fn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function Rn(t,n="id",r){return t.sort(((t,e)=>Fn(t,e,n,r)))}function Nn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Pn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Un(t){return n=>!!p(n)&&t.test(n)}const Dn=Un(/\.css$/),Ln=Un(/\.html$/),Zn=Un(/\.js$/),kn=Un(/\.json$/);function qn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Vn(t,n){return(...r)=>t(...r.splice(0,n))}function zn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const Gn=async(t,n,r,e)=>{if(!t)return;const o=Q(t);return p(r)?await w(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await w(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Jn(t,n,r,e){if(!t)return;const o=Q(t);return p(r)?d(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):d(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Wn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let l;const h=rr(i);if(p(c)&&i)return l=j(c)?h?n:t:st(c)||rn(c)?h?e:r:o?h?u:o:Yn(c)?u:h?e:r,l(c,i,s,f,a)}}const or=er(d,w,Jn,Gn,Qn,tr);class ur{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;or(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function cr(t){return O(ur,[t])}function ir(t,n=t.length){const r=[],e=(...o)=>{if(r.push(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function sr(t,n=t.length){const r=[],e=(...o)=>{if(r.unshift(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function fr(){}function ar(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=O(hr);function gr(t,n){return pr.set(t,n)}function dr(){ar(setTimeout(fr,0),(t=>{pr.remove(t)}))}const mr=Reflect.apply;function wr(t,n,r){if(rn(t))return mr(t,n,r)}function yr(t,n){function r(...t){!1!==r.id&&pr.remove(r.id),r.id=gr((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(pr.remove(r.id),r.id=!1)},r}function br(t,n,...r){if(rn(t))return n?t.call(n,...r):t(...r)}function vr(t){return(...n)=>!t(...n)}function Ar(t=0){return(...n)=>n[t]}const Ir=t=>{let n;return(...r)=>(p(n)||(n=t(...r)),n)};function Er(t){return t?.constructor}function jr(t,n=[]){const r=Er(t);return r===Function&&"function"===r.name?function(){}:O(r,n)}function Mr(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function xr(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function Or(t,n,r={}){if(t)return await Gn(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function $r(t,n,r={},e,o){if(t)return p(e)?Jn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Jn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Cr=er(gt,mt,$r,Or,Mr,xr);function Sr(t){return(...n)=>Cr(t,(t=>t(...n)))}async function Br(t,n){if(!t)return;return P(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Tr(t,n){if(!t)return;return N(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function _r(t,n=g){if(j(t)||Kn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function Fr(t,n=g,r){if(Yn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(j(t)||Kn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const Rr=er(N,P,Tr,Br,_r,Fr);function Nr(t){return n=>Rr(t,(t=>t(n)))}function Pr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Ur(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=gr((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{pr.remove(r.id),r.id=!1},r}function Dr(t,n){return(...r)=>n(t,...r)}const Lr=Function.prototype;function Zr(t){return Lr.call.bind(t)}const kr=Object.getOwnPropertyNames,qr=Object.getOwnPropertyDescriptor,Vr=Object.defineProperty,zr=Zr(Object.hasOwnProperty),Gr=Object.is;function Jr(t,n){return t+n}function Wr(t){return t-1}function Hr(t,n){return t/n}function Kr(t){return t+1}function Qr(t,n){return t*n}function Xr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Yr}=Math;function te(t,n=0){return Yr()*(t-n)+n}function ne(t,n){return t%n}function re(t){return t.reduce(((t,n)=>t-n),0)}function ee(t){return t.reduce(((t,n)=>t+n),0)}function oe(t,n,r){return t>n&&tr}const{sign:ce}=Math;function ie(t){return 1===ce(t)}function se(t){return 0===t}function fe(t){return!(1&~t)}function ae(t){return!(1&t)}const le=Object.entries;function he(t){if(p(t))return le(t)}function pe(t){const n=[];return Jn(t,((t,r)=>{p(t)&&n.push(r)})),n}async function ge(t,n=g,r={}){return await Gn(t,(async(t,e,o,u,c)=>{const i=await n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function de(t,n=g,r={}){return Jn(t,((t,e,o,u,c)=>{const i=n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function me(t,n,r={}){return Jn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function we(t,n,r={}){return await Gn(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function ye(t,n={}){if(t)return Jn(t,((t,r)=>{n[t]=r})),n}const be=(t,n)=>{if(t===n)return!0;const r=Q(t),e=Q(n);return r.length===e.length&&N(r,(r=>t[r]===n[r]))},ve=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Ae(t){return t.replace(ve,"\\$&")}function Ie(t,n){return n?Ie(gt(t,Ae)):RegExp(t.join("|"))}const Ee=ot("RegExp"),je=ut(Ee);function Me(t,n){if(!t)return{};if(j(n)){const r=Ie(n);return me(t,((t,n)=>!r.test(n)))}if(je(n))return me(t,((t,r)=>!n.test(r)));if(cn(n))return me(t,((t,r)=>r!==n));if(on(n)){const r=n.toString();return me(t,((t,n)=>n!==r))}return rn(n)?me(t,((t,r)=>!n(t,r))):fn({},t)}const xe=(t,n,r={})=>{if(t)return d(n,(n=>{r[n]=t[n]})),r};function Oe(t){if(!t)return;if(st(t))return Q(t).length;const n=t.length;if(p(n))return n;const r=t.size;return p(n)?r:Q(t).length}const $e=(t,n)=>{const r={};return d(t,((t,e)=>{r[t]=n[e]})),r},Ce=t=>{const n=[],r=[];return Jn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Se=/[ _-]+/g;function Be(t){let n="";return t.replace(Se," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Te=/[ _-]+/g,_e=/[ ]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Te," ").trim().toLowerCase().replace(_e,"-")}const Re=/[ _-]+/g,Ne=/[ ]+/g;function Pe(t){return t.replace(/([A-Z]+)/g," $1").replace(Re," ").trim().toLowerCase().replace(Ne,"_")}const Ue=/[ _-]+/g;function De(t){return t.replace(/([A-Z]+)/g," $1").replace(Ue," ").trim().toUpperCase()}const Le=/[ _-]+/g;function Ze(t){return t.replace(/([A-Z]+)/g," $1").replace(Le," ").trim().toLowerCase()}function ke(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function qe(t,n=1){return t[t.length-n]}function Ve(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function ze(t,n=1){return t.slice(0,-1*n)}function Ge(t,n=1){return t.substring(n)}function Je(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const We=/%(?![\da-f]{2})/gi,He=/&/g,Ke=//g,Xe=/"/g;function Ye(t){return decodeURIComponent(t.replace(We,(()=>"%25")))}function to(t){return t.replace(He,"&").replace(Ke,"<").replace(Qe,">").replace(Xe,""")}function no(t){return to(Ye(t))}const ro=/\S+/g,eo=/\w+/g;function oo(t){return t.match(ro)||[]}function uo(t){return t.match(eo)||[]}function co(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function io(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const so=/\w+/g;function fo(t){return t[0].toUpperCase()}function ao(t){return fo(t)+Ge(t)}function lo(t){return fo(t)+Ge(t).toLowerCase()}function ho(t){return t.replace(so,(t=>ao(t)))}function po(t){return t.replace(so,(t=>lo(t)))}function go(t){return Er(t)?.name}function mo(t){return!!p(t)&&"[object Arguments]"===t.toString()}const wo=ot("Map"),yo=ut(wo),bo=/Array/,vo="Array";function Ao(t){if(t){const n=go(t);if(bo.test(n)&&n!==vo)return!0}return!1}function Io(t){return!p(t)}function Eo(t,n){if(Io(t)||rn(t))return!1;if(j(t)||Ao(t))return!0;const r=t.length;if(!Io(r)||!on(r)||r<0)return!1;if(n){const n=Q(t);return!!n&&Rr(n,((t,n)=>n>=0&&on(n)))}return!0}const jo=ot("BigInt"),Mo=ut(jo),xo=ot("Boolean"),Oo=ut(xo),$o=ot("ArrayBuffer"),Co=ut($o);function So(t,n){return!(!t||!n)&&t instanceof n}const Bo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function To(t){if(p(t)){const n=t?.constructor?.name;return Bo.test(n)}return!1}const _o=ot("Date"),Fo=ut(_o);function Ro(t){return cn(t)||j(t)?!l(t):st(t)?!Oe(t):!p(t)}function No(t){return!1===t}const Po=ot("Float32Array"),Uo=ut(Po),Do=ot("Float64Array"),Lo=ut(Do),{isInteger:Zo}=Number,ko=Zo,qo=ot("Int16Array"),Vo=ut(qo),zo=ot("Int32Array"),Go=ut(zo),Jo=ot("Int8Array"),Wo=ut(Jo);function Ho(t){return p(t)&&"function"==typeof t[Symbol.iterator]}function Ko(t){return!!t&&t instanceof Promise}function Qo(t){return!!t&&(Ko(t)||rr(t)||Yn(t))}function Xo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Yo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function tu(t,n){return!Io(t)&&!Io(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:nu}=Number,ru=nu;function eu(t,n){const r=Er(t),e=Er(n);return r===e&&r.name===e.name}function ou(t){return!0===t}const uu=ot("Uint16Array"),cu=ut(uu),iu=ot("Uint32Array"),su=ut(iu),fu=ot("Uint8Array"),au=ut(fu),lu=ot("Uint8ClampedArray"),hu=ut(lu),pu=ot("WeakMap"),gu=ut(pu),du=void 0!==globalThis.Deno,mu=void 0!==globalThis.process&&process.versions&&process.versions.node;function wu(t,n=!0){return Boolean(t)&&n}function yu(t,n=!0){return!1===Boolean(t)&&n}function bu(t,n,r,e){if(p(t)){if(rn(n))return r?wr(n,r,e):n(...e);if(st(n))return n[r]=t,n}}function vu(t,n){return No(ft(t,n))}const Au=JSON;function Iu(t,n){if(t)return Au.parse(t,n)}const Eu=Au.stringify;function ju(t,n,r){const e=globalThis.options||r;let o;return rn(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Eu(t)}\n\t\tExpected: ${Eu(n)}`,e)}async function Mu(t,n,r){const e=await t;return!(rn(n)&&!1===await n(e,r))&&!vu(e,n)||ju(e,n,r)}function xu(t,n,r){if(Qo(t)||Qo(n))return Mu(t,n,r);return!(rn(n)&&!1===n(t,r))&&!vu(t,n)||ju(t,n,r)}function Ou(t,n,r){const e=Cr(t,(t=>rn(t)?t.bind(n):t));return r?ln(r,e):e}function $u(t){if(t){if(it(t))return nn(t);if(j(t))return s(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Cu=globalThis.structuredClone;function Su(t){return Cu(t)}async function Bu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;uwu(t)))}async function _u(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);p(e)&&r.push(e)}return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);p(u)&&e(u)}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);p(c)&&(u?o.set(r,c):o[r]=c)}return o}function Fu(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);p(u)&&o(u)}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);p(c)&&(o?e.set(r,c):e[r]=c)}return e}const Ru=er(m,y,de,ge,Fu,_u);function Nu(...t){return rr(t[0])?async function(...n){return Rr(t,(async t=>Rr(n,(async n=>t(n)))))}:function(...n){return Rr(t,(t=>Rr(n,(n=>t(n)))))}}function Pu(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=rn(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Uu(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=rn(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Du=er(U,D,me,we,Pu,Uu);function Lu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Zu=Lu(d),ku=Lu(F);function qu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Vu=qu(w),zu=qu(R);function Gu(t,n){const r=jr(t),e=r.push||r.add;if(e&&rn(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else rn(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Ju(t,n){const r={};return d(t,((t,e)=>{r[n[e]]=t})),r}function Wu(t,n,r){return!Io(t)&&!Io(n)&&(t===n||(cn(t)?cn(n)?t.includes(n,r):je(n)?n.test(t):rn(n)?n(t):j(n)?N(n,(n=>Wu(t,n))):Rr(n,(n=>Wu(t,n))):j(t)?je(n)?N(t,(t=>t.test(n))):rn(n)?N(t,n):j(n)?N(n,(n=>Wu(t,n))):t.includes(n,r):!!st(t)&&(je(n)?Tr(t,(t=>t.test(n))):rn(n)?Tr(t,n):st(n)?Tr(t,((t,r)=>t===n[r])):Tr(t,(t=>Wu(t,n))))))}const Hu=Un(/\./),Ku=(t,n,r)=>(n&&!p(t[n])&&(t[n]=r),t);class Qu{list=O(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Xu=O(Qu);function Yu(t,n){return Xu.set(t,n)}function tc(){ar(setTimeout(fr,0),(t=>{Xu.remove(t)}))}function nc(t,...n){return or(n,(n=>{or(n,((n,r)=>{if(t[r]&&(st(n)||j(n)||n.forEach))return nc(t[r],n);t[r]=n}))})),t}class rc{static models=new Map;constructor(t,n){p(n)?(ln(this,n),this.modelName=t,rc.models.set(t,n)):ln(this,t)}delete(t){rc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),rc.models.set(t||this.modelName,this)}has(t){return rc.models.has(t||this.modelName)}get(t){return rc.models.get(t||this.modelName)}}function ec(t,n){return p(n)?O(rc,[t,n]):H(t,rc.models)}function oc(t,n){return[t,n]}function uc(t,n,r){const e=t.length,o=[];for(let u=0;uN(r,(r=>ft(t[r],n[r])));function sc(t,n,r){return n&&st(t)||on(n)&&j(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function fc(t,n,r){return on(r)&&j(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class ac{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Jn(t,(n=>{t[n]=new ac(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new ac(r),!0)})}}function lc(){return[]}function hc(){return!1}const pc=()=>({}),gc=()=>"",dc=()=>!0;async function mc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const vc=O(bc);class Ac{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):p(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=jr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function Ic(t){return new Ac(t)}async function Ec(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{const i=o.join(u,t);if((await n(i)).isDirectory()){const n=o.join(c,t.replace(u,""));await r(n,{recursive:!0}),await Mc(i,n)}else await async function(t,n,r){const u=o.join(t,r),c=o.join(n,r);await e(u,c)}(u,c,t)})),!0}function xc(t){return globalThis.__filename?__filename:u(t.url)}function Oc(t){return globalThis.__dirname?__dirname:c.dirname(u(t.url))}export{ur as Chain,Qu as Intervals,rc as Model,ac as Store,hr as Timers,bc as UniqID,Ac as VirtualStorage,Jr as add,qn as after,wr as apply,Ie as arrayToRegex,Ju as arraysToObject,Vn as ary,xu as assert,Mu as assertAsync,ln as assign,hn as assignToClass,an as assignToObject,zn as before,Ou as bindAll,Zr as cacheNativeMethod,Xr as calcProgress,Be as camelCase,cr as chain,i as chunk,Ve as chunkString,$u as clear,s as clearArray,nn as clearBuffer,tc as clearIntervals,dr as clearTimers,Su as clone,f as cloneArray,jr as cloneType,Tu as compact,pe as compactKeys,Ru as compactMap,m as compactMapArray,y as compactMapAsyncArray,ge as compactMapAsyncObject,de as compactMapObject,Bu as concurrent,dt as concurrentEachArray,uc as concurrentStatus,O as construct,et as constructorName,Mc as copyFolder,gn as countBy,dn as countKey,mn as countWithoutKey,xc as currentFile,Oc as currentPath,ir as curry,sr as curryRight,yr as debounce,Wr as deduct,Vr as defProp,B as difference,Hr as divide,T as drop,_ as dropRight,or as each,d as eachArray,w as eachAsyncArray,Gn as eachAsyncObject,Jn as eachObject,F as eachRight,R as eachRightAsync,$ as ensureArray,tn as ensureBuffer,se as equalsZero,Ae as escapeRegex,ve as escapeRegexRegex,Rr as every,Nu as everyArg,N as everyArray,P as everyAsyncArray,Br as everyAsyncObject,Tr as everyObject,pn as extendClass,Du as filter,U as filterArray,D as filterAsyncArray,we as filterAsyncObject,me as filterObject,yn as findIndex,wn as findIndexCache,bn as findItem,L as first,Z as flatten,C as flattenDeep,Zu as flow,Vu as flowAsync,zu as flowAsyncRight,ku as flowRight,S as forEach,Wn as forEachAsync,Gu as forMap,Qn as forOf,tr as forOfAsync,Fu as forOfCompactMap,_u as forOfCompactMapAsync,_r as forOfEvery,Fr as forOfEveryAsync,Pu as forOfFilter,Uu as forOfFilterAsync,Mr as forOfMap,xr as forOfMapAsync,er as generateLoop,H as get,he as getEntries,Nn as getFileExtension,Pn as getFilename,Mn as getHighest,In as getLowest,Ut as getNumberInsertIndex,qr as getPropDesc,kr as getPropNames,Er as getType,go as getTypeName,xn as groupBy,Wu as has,tt as hasAnyKeys,Hu as hasDot,Y as hasKeys,l as hasLength,zr as hasProp,p as hasValue,to as htmlEntities,br as ifInvoke,Ku as ifNotAssign,bu as ifValue,Ec as inAsync,jc as inSync,Kr as increment,On as indexBy,k as initial,ze as initialString,ke as insertInRange,q as intersection,Yu as interval,Xu as intervals,ye as invert,V as invokeArray,$n as invokeCollection,Cn as invokeCollectionAsync,mo as isArguments,j as isArray,Co as isArrayBuffer,$o as isArrayBufferCall,Eo as isArrayLike,rr as isAsync,nr as isAsyncCall,Mo as isBigInt,jo as isBigIntCall,Oo as isBoolean,xo as isBooleanCall,it as isBuffer,ct as isBufferCall,So as isChild,To as isCloneable,nt as isConstructor,rt as isConstructorFactory,ot as isConstructorNameFactory,Fo as isDate,_o as isDateCall,du as isDeno,Ro as isEmpty,ft as isEqual,ae as isEven,Uo as isF32,Po as isF32Call,Lo as isF64,Do as isF64Call,No as isFalse,yu as isFalsy,Dn as isFileCSS,Ln as isFileHTML,Zn as isFileJS,kn as isFileJSON,ko as isFloat,rn as isFunction,Yn as isGenerator,Xn as isGeneratorCall,Vo as isI16,qo as isI16Call,Go as isI32,zo as isI32Call,Wo as isI8,Jo as isI8Call,Ho as isIterable,Qo as isKindAsync,yo as isMap,wo as isMapCall,at as isMatchArray,be as isMatchObject,v as isNegative,mu as isNodejs,M as isNotArray,un as isNotNumber,sn as isNotString,h as isNull,on as isNumber,en as isNumberCall,Bt as isNumberEqual,oe as isNumberInRange,ue as isNumberNotInRange,fe as isOdd,Xo as isParent,st as isPlainObject,ie as isPositive,Yo as isPrimitive,Ko as isPromise,je as isRegex,Ee as isRegexCall,tu as isRelated,ru as isSafeInt,Gr as isSame,eu as isSameType,Kn as isSet,Hn as isSetCall,cn as isString,ou as isTrue,wu as isTruthy,ut as isTypeFactory,Ao as isTypedArray,cu as isU16,uu as isU16Call,su as isU32,iu as isU32Call,au as isU8,hu as isU8C,lu as isU8CCall,fu as isU8Call,a as isUndefined,gu as isWeakMap,pu as isWeakMapCall,se as isZero,Iu as jsonParse,Fe as kebabCase,Q as keys,ht as largest,pt as last,Ze as lowerCase,Cr as map,gt as mapArray,mt as mapAsyncArray,Or as mapAsyncObject,$r as mapObject,wt as mapRightArray,yt as mapWhile,nc as merge,ec as model,Qr as multiply,vr as negate,Io as noValue,fr as noop,vu as notEqual,Ar as nthArg,fn as objectAssign,le as objectEntries,Oe as objectSize,Me as omit,Ir as once,Zt as onlyUnique,Sr as over,Nr as overEvery,oc as pair,At as partition,xe as pick,Bn as pluck,Sn as pluckObject,cc as promise,ic as propertyMatch,te as randomFloat,St as randomInt,E as range,I as rangeDown,A as rangeUp,Ye as rawURLDecode,Pr as reArg,Un as regexTestFactory,ne as remainder,jt as remove,Mt as removeBy,Je as replaceList,xt as rest,Ge as restString,g as returnValue,Ot as right,qe as rightString,Rt as sample,no as sanitize,sc as setKey,fc as setValue,Ft as shuffle,Pt as smallest,Pe as snakeCase,_n as sortCollectionAlphabetically,Rn as sortCollectionAlphabeticallyReverse,jn as sortCollectionAscending,En as sortCollectionAscendingFilter,An as sortCollectionDescending,vn as sortCollectionDescendingFilter,vt as sortNumberAscending,Et as sortNumberDescening,Tn as sortObjectsAlphabetically,Fn as sortObjectsAlphabeticallyReverse,kt as sortUnique,Eu as stringify,lc as stubArray,hc as stubFalse,pc as stubObject,gc as stubString,dc as stubTrue,bt as subtract,re as subtractAll,It as subtractReverse,ee as sumAll,Dt as take,Lt as takeRight,Ur as throttle,gr as timer,pr as timers,ar as times,mc as timesAsync,lr as timesMap,wc as timesMapAsync,_t as toArray,W as toPath,yc as toggle,oo as tokenize,co as truncate,io as truncateRight,Yt as unZip,Ce as unZipObject,Vt as union,vc as uniqID,qt as unique,zt as untilFalseArray,Gt as untilTrueArray,De as upperCase,ao as upperFirst,ho as upperFirstAll,fo as upperFirstLetter,lo as upperFirstOnly,po as upperFirstOnlyAll,Ic as virtualStorage,Jt as whileCompactMap,Wt as whileEachArray,Ht as whileMapArray,Kt as without,uo as words,Dr as wrap,Qt as xor,Xt as zip,$e as zipObject}; //# sourceMappingURL=index.js.map diff --git a/package-lock.json b/package-lock.json index d415d3d..810bda7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,52 +56,52 @@ } }, "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", - "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz", - "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", + "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.4", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.7", - "@babel/parser": "^7.23.6", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6", + "@babel/helpers": "^7.24.4", + "@babel/parser": "^7.24.4", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -117,9 +117,9 @@ } }, "node_modules/@babel/eslint-parser": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.23.3.tgz", - "integrity": "sha512-9bTuNlyx7oSstodm1cR1bECj4fkiknsDa1YniISkJemMY3DGhJNYBECbe6QD/q54mp2J8VO66jW3/7uP//iFCw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.24.1.tgz", + "integrity": "sha512-d5guuzMlPeDfZIbpQ8+g1NaCNuAGBBGNECh0HVqz1sjOeVLh2CEaifuOysCH18URW6R7pqXINvf5PaR/dC6jLQ==", "dependencies": { "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", "eslint-visitor-keys": "^2.1.0", @@ -134,13 +134,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", - "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", + "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", "dependencies": { - "@babel/types": "^7.23.6", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -185,16 +185,16 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.7.tgz", - "integrity": "sha512-xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.4.tgz", + "integrity": "sha512-lG75yeuUSVu0pIcbhiYMXBXANHrpUPaOfu7ryAzskCgKUHuAxRQI5ssrtmF0X9UXldPlvT0XM/A4F44OXRt6iQ==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-member-expression-to-functions": "^7.23.0", "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", + "@babel/helper-replace-supers": "^7.24.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", "semver": "^6.3.1" @@ -223,9 +223,9 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz", - "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", + "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", "@babel/helper-plugin-utils": "^7.22.5", @@ -280,11 +280,11 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", + "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", "dependencies": { - "@babel/types": "^7.22.15" + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -320,9 +320,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "engines": { "node": ">=6.9.0" } @@ -344,12 +344,12 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", - "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz", + "integrity": "sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==", "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-member-expression-to-functions": "^7.23.0", "@babel/helper-optimise-call-expression": "^7.22.5" }, "engines": { @@ -393,9 +393,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "engines": { "node": ">=6.9.0" } @@ -430,35 +430,36 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.8.tgz", - "integrity": "sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", + "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", - "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "bin": { "parser": "bin/babel-parser.js" }, @@ -466,12 +467,27 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.4.tgz", + "integrity": "sha512-qpl6vOOEEzTLLcsuqYYo8yDtrTocmu2xkGvgNebvPjT9DTtfFYGmgDqY+rBYXNlqL4s9qLDn6xkrJv4RxAPiTA==", + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz", - "integrity": "sha512-iRkKcCqb7iGnq9+3G6rZ+Ciz5VywC4XNRHe57lKM+jOeYAoR0lVqdeeDRfh0tQcTfw/+vBhHn926FmQhLtlFLQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.1.tgz", + "integrity": "sha512-y4HqEnkelJIOQGd+3g1bTeKsA5c6qM7eOn7VggGVbBc0y8MLSKHacwcIE2PplNlQSj0PqS9rrXL/nkPVK+kUNg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -481,13 +497,13 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.23.3.tgz", - "integrity": "sha512-WwlxbfMNdVEpQjZmK5mhm7oSwD3dS6eU+Iwsi4Knl9wAletWem7kaRsGOG+8UEbRyqxY4SS5zvtfXwX+jMxUwQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.1.tgz", + "integrity": "sha512-Hj791Ii4ci8HqnaKHAlLNs+zaLXb0EzSDhiAWp5VNlyvCNymYfacs64pxTxbH1znW/NcArSmwpmG9IKE/TUVVQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.23.3" + "@babel/plugin-transform-optional-chaining": "^7.24.1" }, "engines": { "node": ">=6.9.0" @@ -497,12 +513,12 @@ } }, "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.7.tgz", - "integrity": "sha512-LlRT7HgaifEpQA1ZgLVOIJZZFVPWN5iReq/7/JixwBtwcoeVGDBD53ZV28rrsLYOZs1Y/EHhA8N/Z6aazHR8cw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.1.tgz", + "integrity": "sha512-m9m/fXsXLiHfwdgydIFnpk+7jlVbnvlK5B2EKiPdLUb6WX654ZaaEWJUjk8TftRbZpK0XibovlLWX4KIZhV6jw==", "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -581,11 +597,11 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.23.3.tgz", - "integrity": "sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.1.tgz", + "integrity": "sha512-IuwnI5XnuF189t91XbxmXeCDz3qs6iDRO7GJ++wcfgeXNs/8FmIlKcpDSXNVyuLQxlwvskmI3Ct73wUODkJBlQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -595,11 +611,11 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.23.3.tgz", - "integrity": "sha512-pawnE0P9g10xgoP7yKr6CK63K2FMsTE+FZidZO/1PwRdzmAPVs+HS1mAURUsgaoxammTJvULUdIkEK0gOcU2tA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.1.tgz", + "integrity": "sha512-zhQTMH0X2nVLnb04tz+s7AMuasX8U0FnpE+nHTOhSOINjWMnopoZTxtIKsd45n4GQ/HIZLyfIpoul8e2m0DnRA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -740,11 +756,11 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.23.3.tgz", - "integrity": "sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.1.tgz", + "integrity": "sha512-ngT/3NkRhsaep9ck9uj2Xhv9+xB1zShY3tM3g6om4xxCELwCDN4g4Aq5dRn48+0hasAql7s2hdBOysCfNpr4fw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -754,12 +770,12 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.7.tgz", - "integrity": "sha512-PdxEpL71bJp1byMG0va5gwQcXHxuEYC/BgI/e88mGTtohbZN28O5Yit0Plkkm/dBzCF/BxmbNcses1RH1T+urA==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.3.tgz", + "integrity": "sha512-Qe26CMYVjpQxJ8zxM1340JFNjZaF+ISWpr1Kt/jGo+ZTUzKkfw/pphEWbRCb+lmSM6k/TOgfYLvmbHkUQ0asIg==", "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-remap-async-to-generator": "^7.22.20", "@babel/plugin-syntax-async-generators": "^7.8.4" }, @@ -771,12 +787,12 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.23.3.tgz", - "integrity": "sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.1.tgz", + "integrity": "sha512-AawPptitRXp1y0n4ilKcGbRYWfbbzFWz2NqNu7dacYDtFtz0CMjG64b3LQsb3KIgnf4/obcUL78hfaOS7iCUfw==", "dependencies": { - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-module-imports": "^7.24.1", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-remap-async-to-generator": "^7.22.20" }, "engines": { @@ -787,11 +803,11 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz", - "integrity": "sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.1.tgz", + "integrity": "sha512-TWWC18OShZutrv9C6mye1xwtam+uNi2bnTOCBUd5sZxyHOiWbU6ztSROofIMrK84uweEZC219POICK/sTYwfgg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -801,11 +817,11 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz", - "integrity": "sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.4.tgz", + "integrity": "sha512-nIFUZIpGKDf9O9ttyRXpHFpKC+X3Y5mtshZONuEUYBomAKoM4y029Jr+uB1bHGPhNmK8YXHevDtKDOLmtRrp6g==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -815,12 +831,12 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.23.3.tgz", - "integrity": "sha512-uM+AN8yCIjDPccsKGlw271xjJtGii+xQIF/uMPS8H15L12jZTsLfF4o5vNO7d/oUguOyfdikHGc/yi9ge4SGIg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.1.tgz", + "integrity": "sha512-OMLCXi0NqvJfORTaPQBwqLXHhb93wkBKZ4aNwMl6WtehO7ar+cmp+89iPEQPqxAnxsOKTaMcs3POz3rKayJ72g==", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-class-features-plugin": "^7.24.1", + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -830,12 +846,12 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz", - "integrity": "sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.4.tgz", + "integrity": "sha512-B8q7Pz870Hz/q9UgP8InNpY01CSLDSCyqX7zcRuv3FcPl87A2G17lASroHWaCtbdIcbYzOZ7kWmXFKbijMSmFg==", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.24.4", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-class-static-block": "^7.14.5" }, "engines": { @@ -846,16 +862,16 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.8.tgz", - "integrity": "sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.1.tgz", + "integrity": "sha512-ZTIe3W7UejJd3/3R4p7ScyyOoafetUShSf4kCqV0O7F/RiHxVj/wRaRnQlrGwflvcehNA8M42HkAiEDYZu2F1Q==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-replace-supers": "^7.24.1", "@babel/helper-split-export-declaration": "^7.22.6", "globals": "^11.1.0" }, @@ -867,12 +883,12 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.23.3.tgz", - "integrity": "sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.1.tgz", + "integrity": "sha512-5pJGVIUfJpOS+pAqBQd+QMaTD2vCL/HcePooON6pDpHgRp4gNRmzyHTPIkXntwKsq3ayUFVfJaIKPw2pOkOcTw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/template": "^7.22.15" + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/template": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -882,11 +898,11 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz", - "integrity": "sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.1.tgz", + "integrity": "sha512-ow8jciWqNxR3RYbSNVuF4U2Jx130nwnBnhRw6N6h1bOejNkABmcI5X5oz29K4alWX7vf1C+o6gtKXikzRKkVdw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -896,12 +912,12 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.23.3.tgz", - "integrity": "sha512-vgnFYDHAKzFaTVp+mneDsIEbnJ2Np/9ng9iviHw3P/KVcgONxpNULEW/51Z/BaFojG2GI2GwwXck5uV1+1NOYQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.1.tgz", + "integrity": "sha512-p7uUxgSoZwZ2lPNMzUkqCts3xlp8n+o05ikjy7gbtFJSt9gdU88jAmtfmOxHM14noQXBxfgzf2yRWECiNVhTCw==", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -911,11 +927,11 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.23.3.tgz", - "integrity": "sha512-RrqQ+BQmU3Oyav3J+7/myfvRCq7Tbz+kKLLshUmMwNlDHExbGL7ARhajvoBJEvc+fCguPPu887N+3RRXBVKZUA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.1.tgz", + "integrity": "sha512-msyzuUnvsjsaSaocV6L7ErfNsa5nDWL1XKNnDePLgmz+WdU4w/J8+AxBMrWfi9m4IxfL5sZQKUPQKDQeeAT6lA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -925,11 +941,11 @@ } }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz", - "integrity": "sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.1.tgz", + "integrity": "sha512-av2gdSTyXcJVdI+8aFZsCAtR29xJt0S5tas+Ef8NvBNmD1a+N/3ecMLeMBgfcK+xzsjdLDT6oHt+DFPyeqUbDA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { @@ -940,12 +956,12 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.23.3.tgz", - "integrity": "sha512-5fhCsl1odX96u7ILKHBj4/Y8vipoqwsJMh4csSA8qFfxrZDEA4Ssku2DyNvMJSmZNOEBT750LfFPbtrnTP90BQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.1.tgz", + "integrity": "sha512-U1yX13dVBSwS23DEAqU+Z/PkwE9/m7QQy8Y9/+Tdb8UWYaGNDYwTLi19wqIAiROr8sXVum9A/rtiH5H0boUcTw==", "dependencies": { "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -955,11 +971,11 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz", - "integrity": "sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.1.tgz", + "integrity": "sha512-Ft38m/KFOyzKw2UaJFkWG9QnHPG/Q/2SkOrRk4pNBPg5IPZ+dOxcmkK5IyuBcxiNPyyYowPGUReyBvrvZs7IlQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { @@ -970,11 +986,11 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.6.tgz", - "integrity": "sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.1.tgz", + "integrity": "sha512-OxBdcnF04bpdQdR3i4giHZNZQn7cm8RQKcSwA17wAAqEELo1ZOwp5FFgeptWUQXFyT9kwHo10aqqauYkRZPCAg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" }, "engines": { @@ -985,13 +1001,13 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.23.3.tgz", - "integrity": "sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.1.tgz", + "integrity": "sha512-BXmDZpPlh7jwicKArQASrj8n22/w6iymRnvHYYd2zO30DbE277JO20/7yXJT3QxDPtiQiOxQBbZH4TpivNXIxA==", "dependencies": { - "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-function-name": "^7.23.0", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1001,11 +1017,11 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz", - "integrity": "sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.1.tgz", + "integrity": "sha512-U7RMFmRvoasscrIFy5xA4gIp8iWnWubnKkKuUGJjsuOH7GfbMkB+XZzeslx2kLdEGdOJDamEmCqOks6e8nv8DQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { @@ -1016,11 +1032,11 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.23.3.tgz", - "integrity": "sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.1.tgz", + "integrity": "sha512-zn9pwz8U7nCqOYIiBaOxoQOtYmMODXTJnkxG4AtX8fPmnCRYWBOHD0qcpwS9e2VDSp1zNJYpdnFMIKb8jmwu6g==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1030,11 +1046,11 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz", - "integrity": "sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.1.tgz", + "integrity": "sha512-OhN6J4Bpz+hIBqItTeWJujDOfNP+unqv/NJgyhlpSqgBTPm37KkMmZV6SYcOj+pnDbdcl1qRGV/ZiIjX9Iy34w==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" }, "engines": { @@ -1045,11 +1061,11 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz", - "integrity": "sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.1.tgz", + "integrity": "sha512-4ojai0KysTWXzHseJKa1XPNXKRbuUrhkOPY4rEGeR+7ChlJVKxFa3H3Bz+7tWaGKgJAXUWKOGmltN+u9B3+CVg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1059,12 +1075,12 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.3.tgz", - "integrity": "sha512-vJYQGxeKM4t8hYCKVBlZX/gtIY2I7mRGFNcm85sgXGMTBcoV3QdVtdpbcWEbzbfUIUZKwvgFT82mRvaQIebZzw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.1.tgz", + "integrity": "sha512-lAxNHi4HVtjnHd5Rxg3D5t99Xm6H7b04hUS7EHIXcUl2EV4yl1gWdqZrNzXnSrHveL9qMdbODlLF55mvgjAfaQ==", "dependencies": { "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1074,12 +1090,12 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz", - "integrity": "sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.1.tgz", + "integrity": "sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw==", "dependencies": { "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-simple-access": "^7.22.5" }, "engines": { @@ -1090,13 +1106,13 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.3.tgz", - "integrity": "sha512-ZxyKGTkF9xT9YJuKQRo19ewf3pXpopuYQd8cDXqNzc3mUNbOME0RKMoZxviQk74hwzfQsEe66dE92MaZbdHKNQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.1.tgz", + "integrity": "sha512-mqQ3Zh9vFO1Tpmlt8QPnbwGHzNz3lpNEMxQb1kAemn/erstyqw1r9KeOlOfo3y6xAnFEcOv2tSyrXfmMk+/YZA==", "dependencies": { "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { @@ -1107,12 +1123,12 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.23.3.tgz", - "integrity": "sha512-zHsy9iXX2nIsCBFPud3jKn1IRPWg3Ing1qOZgeKV39m1ZgIdpJqvlWVeiHBZC6ITRG0MfskhYe9cLgntfSFPIg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.1.tgz", + "integrity": "sha512-tuA3lpPj+5ITfcCluy6nWonSL7RvaG0AOTeAuvXqEKS34lnLzXpDb0dcP6K8jD0zWZFNDVly90AGFJPnm4fOYg==", "dependencies": { "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1137,11 +1153,11 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.23.3.tgz", - "integrity": "sha512-YJ3xKqtJMAT5/TIZnpAR3I+K+WaDowYbN3xyxI8zxx/Gsypwf9B9h0VB+1Nh6ACAAPRS5NSRje0uVv5i79HYGQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.1.tgz", + "integrity": "sha512-/rurytBM34hYy0HKZQyA0nHbQgQNFm4Q/BOc9Hflxi2X3twRof7NaE5W46j4kQitm7SvACVRXsa6N/tSZxvPug==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1151,11 +1167,11 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz", - "integrity": "sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.1.tgz", + "integrity": "sha512-iQ+caew8wRrhCikO5DrUYx0mrmdhkaELgFa+7baMcVuhxIkN7oxt06CZ51D65ugIb1UWRQ8oQe+HXAVM6qHFjw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" }, "engines": { @@ -1166,11 +1182,11 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz", - "integrity": "sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.1.tgz", + "integrity": "sha512-7GAsGlK4cNL2OExJH1DzmDeKnRv/LXq0eLUSvudrehVA5Rgg4bIrqEUW29FbKMBRT0ztSqisv7kjP+XIC4ZMNw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { @@ -1181,15 +1197,14 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz", - "integrity": "sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.1.tgz", + "integrity": "sha512-XjD5f0YqOtebto4HGISLNfiNMTTs6tbkFf2TOqJlYKYmbo+mN9Dnpl4SRoofiziuOWMIyq3sZEUqLo3hLITFEA==", "dependencies": { - "@babel/compat-data": "^7.23.3", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.23.3" + "@babel/plugin-transform-parameters": "^7.24.1" }, "engines": { "node": ">=6.9.0" @@ -1199,12 +1214,12 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz", - "integrity": "sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.1.tgz", + "integrity": "sha512-oKJqR3TeI5hSLRxudMjFQ9re9fBVUU0GICqM3J1mi8MqlhVr6hC/ZN4ttAyMuQR6EZZIY6h/exe5swqGNNIkWQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20" + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-replace-supers": "^7.24.1" }, "engines": { "node": ">=6.9.0" @@ -1214,11 +1229,11 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz", - "integrity": "sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.1.tgz", + "integrity": "sha512-oBTH7oURV4Y+3EUrf6cWn1OHio3qG/PVwO5J03iSJmBg6m2EhKjkAu/xuaXaYwWW9miYtvbWv4LNf0AmR43LUA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { @@ -1229,11 +1244,11 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz", - "integrity": "sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.1.tgz", + "integrity": "sha512-n03wmDt+987qXwAgcBlnUUivrZBPZ8z1plL0YvgQalLm+ZE5BMhGm94jhxXtA1wzv1Cu2aaOv1BM9vbVttrzSg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, @@ -1245,11 +1260,11 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.23.3.tgz", - "integrity": "sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.1.tgz", + "integrity": "sha512-8Jl6V24g+Uw5OGPeWNKrKqXPDw2YDjLc53ojwfMcKwlEoETKU9rU0mHUtcg9JntWI/QYzGAXNWEcVHZ+fR+XXg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1259,12 +1274,12 @@ } }, "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz", - "integrity": "sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.1.tgz", + "integrity": "sha512-tGvisebwBO5em4PaYNqt4fkw56K2VALsAbAakY0FjTYqJp7gfdrgr7YX76Or8/cpik0W6+tj3rZ0uHU9Oil4tw==", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-class-features-plugin": "^7.24.1", + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1274,13 +1289,13 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz", - "integrity": "sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.1.tgz", + "integrity": "sha512-pTHxDVa0BpUbvAgX3Gat+7cSciXqUcY9j2VZKTbSB6+VQGpNgNO9ailxTGHSXlqOnX1Hcx1Enme2+yv7VqP9bg==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.24.1", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { @@ -1291,11 +1306,11 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz", - "integrity": "sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.1.tgz", + "integrity": "sha512-LetvD7CrHmEx0G442gOomRr66d7q8HzzGGr4PMHGr+5YIm6++Yke+jxj246rpvsbyhJwCLxcTn6zW1P1BSenqA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1305,11 +1320,11 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.23.3.tgz", - "integrity": "sha512-KP+75h0KghBMcVpuKisx3XTu9Ncut8Q8TuvGO4IhY+9D5DFEckQefOuIsB/gQ2tG71lCke4NMrtIPS8pOj18BQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.1.tgz", + "integrity": "sha512-sJwZBCzIBE4t+5Q4IGLaaun5ExVMRY0lYwos/jNecjMrVCygCdph3IKv0tkP5Fc87e/1+bebAmEAGBfnRD+cnw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "regenerator-transform": "^0.15.2" }, "engines": { @@ -1320,11 +1335,11 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.23.3.tgz", - "integrity": "sha512-QnNTazY54YqgGxwIexMZva9gqbPa15t/x9VS+0fsEFWplwVpXYZivtgl43Z1vMpc1bdPP2PP8siFeVcnFvA3Cg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.1.tgz", + "integrity": "sha512-JAclqStUfIwKN15HrsQADFgeZt+wexNQ0uLhuqvqAUFoqPMjEcFCYZBhq0LUdz6dZK/mD+rErhW71fbx8RYElg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1334,11 +1349,11 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz", - "integrity": "sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.1.tgz", + "integrity": "sha512-LyjVB1nsJ6gTTUKRjRWx9C1s9hE7dLfP/knKdrfeH9UPtAGjYGgxIbFfx7xyLIEWs7Xe1Gnf8EWiUqfjLhInZA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1348,11 +1363,11 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.23.3.tgz", - "integrity": "sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.1.tgz", + "integrity": "sha512-KjmcIM+fxgY+KxPVbjelJC6hrH1CgtPmTvdXAfn3/a9CnWGSTY7nH4zm5+cjmWJybdcPSsD0++QssDsjcpe47g==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" }, "engines": { @@ -1363,11 +1378,11 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.23.3.tgz", - "integrity": "sha512-HZOyN9g+rtvnOU3Yh7kSxXrKbzgrm5X4GncPY1QOquu7epga5MxKHVpYu2hvQnry/H+JjckSYRb93iNfsioAGg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.1.tgz", + "integrity": "sha512-9v0f1bRXgPVcPrngOQvLXeGNNVLc8UjMVfebo9ka0WF3/7+aVUHmaJVT3sa0XCzEFioPfPHZiOcYG9qOsH63cw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1377,11 +1392,11 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz", - "integrity": "sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.1.tgz", + "integrity": "sha512-WRkhROsNzriarqECASCNu/nojeXCDTE/F2HmRgOzi7NGvyfYGq1NEjKBK3ckLfRgGc6/lPAqP0vDOSw3YtG34g==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1391,11 +1406,11 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.23.3.tgz", - "integrity": "sha512-4t15ViVnaFdrPC74be1gXBSMzXk3B4Us9lP7uLRQHTFpV5Dvt33pn+2MyyNxmN3VTTm3oTrZVMUmuw3oBnQ2oQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.1.tgz", + "integrity": "sha512-CBfU4l/A+KruSUoW+vTQthwcAdwuqbpRNB8HQKlZABwHRhsdHZ9fezp4Sn18PeAlYxTNiLMlx4xUBV3AWfg1BA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1405,11 +1420,11 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.23.3.tgz", - "integrity": "sha512-OMCUx/bU6ChE3r4+ZdylEqAjaQgHAgipgW8nsCfu5pGqDcFytVd91AwRvUJSBZDz0exPGgnjoqhgRYLRjFZc9Q==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.1.tgz", + "integrity": "sha512-RlkVIcWT4TLI96zM660S877E7beKlQw7Ig+wqkKBiWfj0zH5Q4h50q6er4wzZKRNSYpfo6ILJ+hrJAGSX2qcNw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1419,12 +1434,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.23.3.tgz", - "integrity": "sha512-KcLIm+pDZkWZQAFJ9pdfmh89EwVfmNovFBcXko8szpBeF8z68kWIPeKlmSOkT9BXJxs2C0uk+5LxoxIv62MROA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.1.tgz", + "integrity": "sha512-Ss4VvlfYV5huWApFsF8/Sq0oXnGO+jB+rijFEFugTd3cwSObUSnUi88djgR5528Csl0uKlrI331kRqe56Ov2Ng==", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1434,12 +1449,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.23.3.tgz", - "integrity": "sha512-wMHpNA4x2cIA32b/ci3AfwNgheiva2W0WUKWTK7vBHBhDKfPsc5cFGNWm69WBqpwd86u1qwZ9PWevKqm1A3yAw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.1.tgz", + "integrity": "sha512-2A/94wgZgxfTsiLaQ2E36XAOdcZmGAaEEgVmxQWwZXWkGhvoHbaqXcKnU8zny4ycpu3vNqg0L/PcCiYtHtA13g==", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1449,12 +1464,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.23.3.tgz", - "integrity": "sha512-W7lliA/v9bNR83Qc3q1ip9CQMZ09CcHDbHfbLRDNuAhn1Mvkr1ZNF7hPmztMQvtTGVLJ9m8IZqWsTkXOml8dbw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.1.tgz", + "integrity": "sha512-fqj4WuzzS+ukpgerpAoOnMfQXwUHFxXUZUE84oL2Kao2N8uSlvcpnAidKASgsNgzZHBsHWvcm8s9FPWUhAb8fA==", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1464,25 +1479,26 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.8.tgz", - "integrity": "sha512-lFlpmkApLkEP6woIKprO6DO60RImpatTQKtz4sUcDjVcK8M8mQ4sZsuxaTMNOZf0sqAq/ReYW1ZBHnOQwKpLWA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.4.tgz", + "integrity": "sha512-7Kl6cSmYkak0FK/FXjSEnLJ1N9T/WA2RkMhu17gZ/dsxKJUuTYNIylahPTzqpLyJN4WhDif8X0XK1R8Wsguo/A==", "dependencies": { - "@babel/compat-data": "^7.23.5", + "@babel/compat-data": "^7.24.4", "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-validator-option": "^7.23.5", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.7", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.4", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.1", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.1", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.1", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.23.3", - "@babel/plugin-syntax-import-attributes": "^7.23.3", + "@babel/plugin-syntax-import-assertions": "^7.24.1", + "@babel/plugin-syntax-import-attributes": "^7.24.1", "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", @@ -1494,58 +1510,58 @@ "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.23.3", - "@babel/plugin-transform-async-generator-functions": "^7.23.7", - "@babel/plugin-transform-async-to-generator": "^7.23.3", - "@babel/plugin-transform-block-scoped-functions": "^7.23.3", - "@babel/plugin-transform-block-scoping": "^7.23.4", - "@babel/plugin-transform-class-properties": "^7.23.3", - "@babel/plugin-transform-class-static-block": "^7.23.4", - "@babel/plugin-transform-classes": "^7.23.8", - "@babel/plugin-transform-computed-properties": "^7.23.3", - "@babel/plugin-transform-destructuring": "^7.23.3", - "@babel/plugin-transform-dotall-regex": "^7.23.3", - "@babel/plugin-transform-duplicate-keys": "^7.23.3", - "@babel/plugin-transform-dynamic-import": "^7.23.4", - "@babel/plugin-transform-exponentiation-operator": "^7.23.3", - "@babel/plugin-transform-export-namespace-from": "^7.23.4", - "@babel/plugin-transform-for-of": "^7.23.6", - "@babel/plugin-transform-function-name": "^7.23.3", - "@babel/plugin-transform-json-strings": "^7.23.4", - "@babel/plugin-transform-literals": "^7.23.3", - "@babel/plugin-transform-logical-assignment-operators": "^7.23.4", - "@babel/plugin-transform-member-expression-literals": "^7.23.3", - "@babel/plugin-transform-modules-amd": "^7.23.3", - "@babel/plugin-transform-modules-commonjs": "^7.23.3", - "@babel/plugin-transform-modules-systemjs": "^7.23.3", - "@babel/plugin-transform-modules-umd": "^7.23.3", + "@babel/plugin-transform-arrow-functions": "^7.24.1", + "@babel/plugin-transform-async-generator-functions": "^7.24.3", + "@babel/plugin-transform-async-to-generator": "^7.24.1", + "@babel/plugin-transform-block-scoped-functions": "^7.24.1", + "@babel/plugin-transform-block-scoping": "^7.24.4", + "@babel/plugin-transform-class-properties": "^7.24.1", + "@babel/plugin-transform-class-static-block": "^7.24.4", + "@babel/plugin-transform-classes": "^7.24.1", + "@babel/plugin-transform-computed-properties": "^7.24.1", + "@babel/plugin-transform-destructuring": "^7.24.1", + "@babel/plugin-transform-dotall-regex": "^7.24.1", + "@babel/plugin-transform-duplicate-keys": "^7.24.1", + "@babel/plugin-transform-dynamic-import": "^7.24.1", + "@babel/plugin-transform-exponentiation-operator": "^7.24.1", + "@babel/plugin-transform-export-namespace-from": "^7.24.1", + "@babel/plugin-transform-for-of": "^7.24.1", + "@babel/plugin-transform-function-name": "^7.24.1", + "@babel/plugin-transform-json-strings": "^7.24.1", + "@babel/plugin-transform-literals": "^7.24.1", + "@babel/plugin-transform-logical-assignment-operators": "^7.24.1", + "@babel/plugin-transform-member-expression-literals": "^7.24.1", + "@babel/plugin-transform-modules-amd": "^7.24.1", + "@babel/plugin-transform-modules-commonjs": "^7.24.1", + "@babel/plugin-transform-modules-systemjs": "^7.24.1", + "@babel/plugin-transform-modules-umd": "^7.24.1", "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", - "@babel/plugin-transform-new-target": "^7.23.3", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4", - "@babel/plugin-transform-numeric-separator": "^7.23.4", - "@babel/plugin-transform-object-rest-spread": "^7.23.4", - "@babel/plugin-transform-object-super": "^7.23.3", - "@babel/plugin-transform-optional-catch-binding": "^7.23.4", - "@babel/plugin-transform-optional-chaining": "^7.23.4", - "@babel/plugin-transform-parameters": "^7.23.3", - "@babel/plugin-transform-private-methods": "^7.23.3", - "@babel/plugin-transform-private-property-in-object": "^7.23.4", - "@babel/plugin-transform-property-literals": "^7.23.3", - "@babel/plugin-transform-regenerator": "^7.23.3", - "@babel/plugin-transform-reserved-words": "^7.23.3", - "@babel/plugin-transform-shorthand-properties": "^7.23.3", - "@babel/plugin-transform-spread": "^7.23.3", - "@babel/plugin-transform-sticky-regex": "^7.23.3", - "@babel/plugin-transform-template-literals": "^7.23.3", - "@babel/plugin-transform-typeof-symbol": "^7.23.3", - "@babel/plugin-transform-unicode-escapes": "^7.23.3", - "@babel/plugin-transform-unicode-property-regex": "^7.23.3", - "@babel/plugin-transform-unicode-regex": "^7.23.3", - "@babel/plugin-transform-unicode-sets-regex": "^7.23.3", + "@babel/plugin-transform-new-target": "^7.24.1", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.1", + "@babel/plugin-transform-numeric-separator": "^7.24.1", + "@babel/plugin-transform-object-rest-spread": "^7.24.1", + "@babel/plugin-transform-object-super": "^7.24.1", + "@babel/plugin-transform-optional-catch-binding": "^7.24.1", + "@babel/plugin-transform-optional-chaining": "^7.24.1", + "@babel/plugin-transform-parameters": "^7.24.1", + "@babel/plugin-transform-private-methods": "^7.24.1", + "@babel/plugin-transform-private-property-in-object": "^7.24.1", + "@babel/plugin-transform-property-literals": "^7.24.1", + "@babel/plugin-transform-regenerator": "^7.24.1", + "@babel/plugin-transform-reserved-words": "^7.24.1", + "@babel/plugin-transform-shorthand-properties": "^7.24.1", + "@babel/plugin-transform-spread": "^7.24.1", + "@babel/plugin-transform-sticky-regex": "^7.24.1", + "@babel/plugin-transform-template-literals": "^7.24.1", + "@babel/plugin-transform-typeof-symbol": "^7.24.1", + "@babel/plugin-transform-unicode-escapes": "^7.24.1", + "@babel/plugin-transform-unicode-property-regex": "^7.24.1", + "@babel/plugin-transform-unicode-regex": "^7.24.1", + "@babel/plugin-transform-unicode-sets-regex": "^7.24.1", "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.7", - "babel-plugin-polyfill-corejs3": "^0.8.7", - "babel-plugin-polyfill-regenerator": "^0.5.4", + "babel-plugin-polyfill-corejs2": "^0.4.10", + "babel-plugin-polyfill-corejs3": "^0.10.4", + "babel-plugin-polyfill-regenerator": "^0.6.1", "core-js-compat": "^3.31.0", "semver": "^6.3.1" }, @@ -1575,9 +1591,9 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "node_modules/@babel/runtime": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.8.tgz", - "integrity": "sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", + "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -1586,31 +1602,31 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz", - "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.6", - "@babel/types": "^7.23.6", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1619,9 +1635,9 @@ } }, "node_modules/@babel/types": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", - "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dependencies": { "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", @@ -1632,9 +1648,9 @@ } }, "node_modules/@csstools/css-parser-algorithms": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.5.0.tgz", - "integrity": "sha512-abypo6m9re3clXA00eu5syw+oaPHbJTPapu9C4pzNsJ4hdZDzushT50Zhu+iIYXgEe1CxnRMn7ngsbV+MLrlpQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.6.1.tgz", + "integrity": "sha512-ubEkAaTfVZa+WwGhs5jbo5Xfqpeaybr/RvWzvFxRs4jfq16wH8l8Ty/QEEpINxll4xhuGfdMbipRyz5QZh9+FA==", "funding": [ { "type": "github", @@ -1649,13 +1665,13 @@ "node": "^14 || ^16 || >=18" }, "peerDependencies": { - "@csstools/css-tokenizer": "^2.2.3" + "@csstools/css-tokenizer": "^2.2.4" } }, "node_modules/@csstools/css-tokenizer": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.2.3.tgz", - "integrity": "sha512-pp//EvZ9dUmGuGtG1p+n17gTHEOqu9jO+FiCUjNN3BDmyhdA2Jq9QsVeR7K8/2QCK17HSsioPlTW9ZkzoWb3Lg==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.2.4.tgz", + "integrity": "sha512-PuWRAewQLbDhGeTvFuq2oClaSCKPIBmHyIobCV39JHRYN0byDcUWJl5baPeNUcqrjtdMNqFooE0FGl31I3JOqw==", "funding": [ { "type": "github", @@ -1671,9 +1687,9 @@ } }, "node_modules/@csstools/media-query-list-parser": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.7.tgz", - "integrity": "sha512-lHPKJDkPUECsyAvD60joYfDmp8UERYxHGkFfyLJFTVK/ERJe0sVlIFLXU5XFxdjNDTerp5L4KeaKG+Z5S94qxQ==", + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.9.tgz", + "integrity": "sha512-qqGuFfbn4rUmyOB0u8CVISIp5FfJ5GAR3mBrZ9/TKndHakdnm6pY0L/fbLcpPnrzwCyyTEZl1nUcXAYHEWneTA==", "funding": [ { "type": "github", @@ -1688,14 +1704,14 @@ "node": "^14 || ^16 || >=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.5.0", - "@csstools/css-tokenizer": "^2.2.3" + "@csstools/css-parser-algorithms": "^2.6.1", + "@csstools/css-tokenizer": "^2.2.4" } }, "node_modules/@csstools/selector-specificity": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.1.tgz", - "integrity": "sha512-NPljRHkq4a14YzZ3YD406uaxh7s0g6eAq3L9aLOWywoqe8PkYamAvtsh7KNX6c++ihDrJ0RiU+/z7rGnhlZ5ww==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.3.tgz", + "integrity": "sha512-KEPNw4+WW5AVEIyzC80rTbWEUatTW2lXpN8+8ILC8PiPeWPjwUzrPZDIOZ2wwqDmeqOYTdSGyL3+vE5GC3FB3Q==", "funding": [ { "type": "github", @@ -1827,9 +1843,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -1880,9 +1896,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==" }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -1958,41 +1974,41 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { @@ -2001,18 +2017,18 @@ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.21", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz", - "integrity": "sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@microsoft/eslint-formatter-sarif": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@microsoft/eslint-formatter-sarif/-/eslint-formatter-sarif-3.0.0.tgz", - "integrity": "sha512-KIKkT44hEqCzqxODYwFMUvYEK0CrdHx/Ll9xiOWgFbBSRuzbxmVy4d/tzfgoucGz72HJZNOMjuyzFTBKntRK5Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@microsoft/eslint-formatter-sarif/-/eslint-formatter-sarif-3.1.0.tgz", + "integrity": "sha512-/mn4UXziHzGXnKCg+r8HGgPy+w4RzpgdoqFuqaKOqUVBT5x2CygGefIrO4SusaY7t0C4gyIWMNu6YQT6Jw64Cw==", "dependencies": { "eslint": "^8.9.0", "jschardet": "latest", @@ -2139,9 +2155,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.5.tgz", - "integrity": "sha512-idWaG8xeSRCfRq9KpRysDHJ/rEHBEXcHuJ82XY0yYFIWnLMjZv9vF/7DOq8djQ2n3Lk6+3qfSH8AqlmHlmi1MA==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.16.2.tgz", + "integrity": "sha512-VGodkwtEuZ+ENPz/CpDSl091koMv8ao5jHVMbG1vNK+sbx/48/wVzP84M5xSfDAC69mAKKoEkSo+ym9bXYRK9w==", "cpu": [ "arm" ], @@ -2151,9 +2167,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.5.tgz", - "integrity": "sha512-f14d7uhAMtsCGjAYwZGv6TwuS3IFaM4ZnGMUn3aCBgkcHAYErhV1Ad97WzBvS2o0aaDv4mVz+syiN0ElMyfBPg==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.16.2.tgz", + "integrity": "sha512-5/W1xyIdc7jw6c/f1KEtg1vYDBWnWCsLiipK41NiaWGLG93eH2edgE6EgQJ3AGiPERhiOLUqlDSfjRK08C9xFg==", "cpu": [ "arm64" ], @@ -2163,9 +2179,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.5.tgz", - "integrity": "sha512-ndoXeLx455FffL68OIUrVr89Xu1WLzAG4n65R8roDlCoYiQcGGg6MALvs2Ap9zs7AHg8mpHtMpwC8jBBjZrT/w==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.16.2.tgz", + "integrity": "sha512-vOAKMqZSTbPfyPVu1jBiy+YniIQd3MG7LUnqV0dA6Q5tyhdqYtxacTHP1+S/ksKl6qCtMG1qQ0grcIgk/19JEA==", "cpu": [ "arm64" ], @@ -2175,9 +2191,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.5.tgz", - "integrity": "sha512-UmElV1OY2m/1KEEqTlIjieKfVwRg0Zwg4PLgNf0s3glAHXBN99KLpw5A5lrSYCa1Kp63czTpVll2MAqbZYIHoA==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.16.2.tgz", + "integrity": "sha512-aIJVRUS3Dnj6MqocBMrcXlatKm64O3ITeQAdAxVSE9swyhNyV1dwnRgw7IGKIkDQofatd8UqMSyUxuFEa42EcA==", "cpu": [ "x64" ], @@ -2187,9 +2203,21 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.5.tgz", - "integrity": "sha512-Q0LcU61v92tQB6ae+udZvOyZ0wfpGojtAKrrpAaIqmJ7+psq4cMIhT/9lfV6UQIpeItnq/2QDROhNLo00lOD1g==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.16.2.tgz", + "integrity": "sha512-/bjfUiXwy3P5vYr6/ezv//Yle2Y0ak3a+Av/BKoi76nFryjWCkki8AuVoPR7ZU/ckcvAWFo77OnFK14B9B5JsA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.16.2.tgz", + "integrity": "sha512-S24b+tJHwpq2TNRz9T+r71FjMvyBBApY8EkYxz8Cwi/rhH6h+lu/iDUxyc9PuHf9UvyeBFYkWWcrDahai/NCGw==", "cpu": [ "arm" ], @@ -2199,9 +2227,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.5.tgz", - "integrity": "sha512-dkRscpM+RrR2Ee3eOQmRWFjmV/payHEOrjyq1VZegRUa5OrZJ2MAxBNs05bZuY0YCtpqETDy1Ix4i/hRqX98cA==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.16.2.tgz", + "integrity": "sha512-UN7VAXLyeyGbCQWiOtQN7BqmjTDw1ON2Oos4lfk0YR7yNhFEJWZiwGtvj9Ay4lsT/ueT04sh80Sg2MlWVVZ+Ug==", "cpu": [ "arm64" ], @@ -2211,9 +2239,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.5.tgz", - "integrity": "sha512-QaKFVOzzST2xzY4MAmiDmURagWLFh+zZtttuEnuNn19AiZ0T3fhPyjPPGwLNdiDT82ZE91hnfJsUiDwF9DClIQ==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.16.2.tgz", + "integrity": "sha512-ZBKvz3+rIhQjusKMccuJiPsStCrPOtejCHxTe+yWp3tNnuPWtyCh9QLGPKz6bFNFbwbw28E2T6zDgzJZ05F1JQ==", "cpu": [ "arm64" ], @@ -2222,10 +2250,22 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.16.2.tgz", + "integrity": "sha512-LjMMFiVBRL3wOe095vHAekL4b7nQqf4KZEpdMWd3/W+nIy5o9q/8tlVKiqMbfieDypNXLsxM9fexOxd9Qcklyg==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.5.tgz", - "integrity": "sha512-HeGqmRJuyVg6/X6MpE2ur7GbymBPS8Np0S/vQFHDmocfORT+Zt76qu+69NUoxXzGqVP1pzaY6QIi0FJWLC3OPA==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.16.2.tgz", + "integrity": "sha512-ohkPt0lKoCU0s4B6twro2aft+QROPdUiWwOjPNTzwTsBK5w+2+iT9kySdtOdq0gzWJAdiqsV4NFtXOwGZmIsHA==", "cpu": [ "riscv64" ], @@ -2234,10 +2274,22 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.16.2.tgz", + "integrity": "sha512-jm2lvLc+/gqXfndlpDw05jKvsl/HKYxUEAt1h5UXcMFVpO4vGpoWmJVUfKDtTqSaHcCNw1his1XjkgR9aort3w==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.5.tgz", - "integrity": "sha512-Dq1bqBdLaZ1Gb/l2e5/+o3B18+8TI9ANlA1SkejZqDgdU/jK/ThYaMPMJpVMMXy2uRHvGKbkz9vheVGdq3cJfA==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.16.2.tgz", + "integrity": "sha512-oc5/SlITI/Vj/qL4UM+lXN7MERpiy1HEOnrE+SegXwzf7WP9bzmZd6+MDljCEZTdSY84CpvUv9Rq7bCaftn1+g==", "cpu": [ "x64" ], @@ -2247,9 +2299,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.5.tgz", - "integrity": "sha512-ezyFUOwldYpj7AbkwyW9AJ203peub81CaAIVvckdkyH8EvhEIoKzaMFJj0G4qYJ5sw3BpqhFrsCc30t54HV8vg==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.16.2.tgz", + "integrity": "sha512-/2VWEBG6mKbS2itm7hzPwhIPaxfZh/KLWrYg20pCRLHhNFtF+epLgcBtwy3m07bl/k86Q3PFRAf2cX+VbZbwzQ==", "cpu": [ "x64" ], @@ -2259,9 +2311,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.5.tgz", - "integrity": "sha512-aHSsMnUw+0UETB0Hlv7B/ZHOGY5bQdwMKJSzGfDfvyhnpmVxLMGnQPGNE9wgqkLUs3+gbG1Qx02S2LLfJ5GaRQ==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.16.2.tgz", + "integrity": "sha512-Wg7ANh7+hSilF0lG3e/0Oy8GtfTIfEk1327Bw8juZOMOoKmJLs3R+a4JDa/4cHJp2Gs7QfCDTepXXcyFD0ubBg==", "cpu": [ "arm64" ], @@ -2271,9 +2323,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.5.tgz", - "integrity": "sha512-AiqiLkb9KSf7Lj/o1U3SEP9Zn+5NuVKgFdRIZkvd4N0+bYrTOovVd0+LmYCPQGbocT4kvFyK+LXCDiXPBF3fyA==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.16.2.tgz", + "integrity": "sha512-J/jCDKVMWp0Y2ELnTjpQFYUCUWv1Jr+LdFrJVZtdqGyjDo0PHPa7pCamjHvJel6zBFM3doFFqAr7cmXYWBAbfw==", "cpu": [ "ia32" ], @@ -2283,9 +2335,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.5.tgz", - "integrity": "sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.16.2.tgz", + "integrity": "sha512-3nIf+SJMs2ZzrCh+SKNqgLVV9hS/UY0UjT1YU8XQYFGLiUfmHYJ/5trOU1XSvmHjV5gTF/K3DjrWxtyzKKcAHA==", "cpu": [ "x64" ], @@ -2300,14 +2352,15 @@ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" }, "node_modules/@stylistic/eslint-plugin": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-1.5.4.tgz", - "integrity": "sha512-zWPXr+O67GC9KDAFkbL1U9UVqE6Iv69YMKhkIECCmE0GvClUJwdfsimm4XebEDondV7kfjMrTDZaYfrI5aS0Jg==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-1.7.2.tgz", + "integrity": "sha512-TesaPR4AOCeD4unwu9gZCdTe8SsUpykriICuwXV8GFBgESuVbfVp+S8g6xTWe9ntVR803bNMtnr2UhxHW0iFqg==", "dependencies": { - "@stylistic/eslint-plugin-js": "1.5.4", - "@stylistic/eslint-plugin-jsx": "1.5.4", - "@stylistic/eslint-plugin-plus": "1.5.4", - "@stylistic/eslint-plugin-ts": "1.5.4" + "@stylistic/eslint-plugin-js": "1.7.2", + "@stylistic/eslint-plugin-jsx": "1.7.2", + "@stylistic/eslint-plugin-plus": "1.7.2", + "@stylistic/eslint-plugin-ts": "1.7.2", + "@types/eslint": "^8.56.8" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2317,10 +2370,11 @@ } }, "node_modules/@stylistic/eslint-plugin-js": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.5.4.tgz", - "integrity": "sha512-3ctWb3NvJNV1MsrZN91cYp2EGInLPSoZKphXIbIRx/zjZxKwLDr9z4LMOWtqjq14li/OgqUUcMq5pj8fgbLoTw==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.7.2.tgz", + "integrity": "sha512-ZYX7C5p7zlHbACwFLU+lISVh6tdcRP/++PWegh2Sy0UgMT5kU0XkPa2tKWEtJYzZmPhJxu9LxbnWcnE/tTwSDQ==", "dependencies": { + "@types/eslint": "^8.56.8", "acorn": "^8.11.3", "escape-string-regexp": "^4.0.0", "eslint-visitor-keys": "^3.4.3", @@ -2345,12 +2399,14 @@ } }, "node_modules/@stylistic/eslint-plugin-jsx": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-1.5.4.tgz", - "integrity": "sha512-JUfrpCkeBCqt1IZ4QsP4WgxGza4PhK4LPbc0VnCjHKygl+rgqoDAovqOuzFJ49wJ4Ix3r6OIHFuwiBGswZEVvg==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-1.7.2.tgz", + "integrity": "sha512-lNZR5PR0HLJPs+kY0y8fy6KroKlYqA5PwsYWpVYWzqZWiL5jgAeUo4s9yLFYjJjzildJ5MsTVMy/xP81Qz6GXg==", "dependencies": { - "@stylistic/eslint-plugin-js": "^1.5.4", - "estraverse": "^5.3.0" + "@stylistic/eslint-plugin-js": "^1.7.2", + "@types/eslint": "^8.56.8", + "estraverse": "^5.3.0", + "picomatch": "^4.0.2" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2359,24 +2415,37 @@ "eslint": ">=8.40.0" } }, + "node_modules/@stylistic/eslint-plugin-jsx/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@stylistic/eslint-plugin-plus": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-1.5.4.tgz", - "integrity": "sha512-dI0Cs5vYX/0uMhQDY+NK0cKQ0Pe9B6jWYxd0Ndud+mNloDaVLrsmJocK4zn+YfhGEDs1E4Nk5uAPZEumIpDuSg==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-1.7.2.tgz", + "integrity": "sha512-luUfRVbBVtt0+/FNt8/76BANJEzb/nHWasHD7UUjyMrch2U9xUKpObrkTCzqBuisKek+uFupwGjqXqDP07+fQw==", "dependencies": { - "@typescript-eslint/utils": "^6.19.0" + "@types/eslint": "^8.56.8", + "@typescript-eslint/utils": "^6.21.0" }, "peerDependencies": { "eslint": "*" } }, "node_modules/@stylistic/eslint-plugin-ts": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-1.5.4.tgz", - "integrity": "sha512-NZDFVIlVNjuPvhT+0Cidm5IS3emtx338xbJTqs2xfOVRDGTpYwRHhNVEGa1rFOpYHmv0sAj6+OXbMDn7ul0K/g==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-1.7.2.tgz", + "integrity": "sha512-szX89YPocwCe4T0eT3alj7MwEzDHt5+B+kb/vQfSSLIjI9CGgoWrgj50zU8PtaDctTh4ZieFBzU/lRmkSUo0RQ==", "dependencies": { - "@stylistic/eslint-plugin-js": "1.5.4", - "@typescript-eslint/utils": "^6.19.0" + "@stylistic/eslint-plugin-js": "1.7.2", + "@types/eslint": "^8.56.8", + "@typescript-eslint/utils": "^6.21.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2385,6 +2454,15 @@ "eslint": ">=8.40.0" } }, + "node_modules/@types/eslint": { + "version": "8.56.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", + "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, "node_modules/@types/eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", @@ -2416,9 +2494,9 @@ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==" }, "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==" + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==" }, "node_modules/@typescript-eslint/experimental-utils": { "version": "1.13.0", @@ -2477,14 +2555,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.19.0.tgz", - "integrity": "sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow==", - "dependencies": { - "@typescript-eslint/scope-manager": "6.19.0", - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/typescript-estree": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4" }, "engines": { @@ -2504,12 +2582,12 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.19.0.tgz", - "integrity": "sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", "dependencies": { - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0" + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2520,9 +2598,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.19.0.tgz", - "integrity": "sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", "engines": { "node": "^16.0.0 || >=18.0.0" }, @@ -2532,12 +2610,12 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.19.0.tgz", - "integrity": "sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", "dependencies": { - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2570,9 +2648,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -2589,16 +2667,16 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@typescript-eslint/utils": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.19.0.tgz", - "integrity": "sha512-QR41YXySiuN++/dC9UArYOg4X86OAYP83OWTewpVx5ct1IZhjjgTLocj7QNxGhWoTqknsgpl7L+hGygCO+sdYw==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.19.0", - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/typescript-estree": "6.19.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", "semver": "^7.5.4" }, "engines": { @@ -2624,9 +2702,9 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -2643,11 +2721,11 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.19.0.tgz", - "integrity": "sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", "dependencies": { - "@typescript-eslint/types": "6.19.0", + "@typescript-eslint/types": "6.21.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2861,9 +2939,9 @@ } }, "node_modules/auto-changelog/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -2880,9 +2958,9 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/autoprefixer": { - "version": "10.4.17", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz", - "integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==", + "version": "10.4.19", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", + "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==", "funding": [ { "type": "opencollective", @@ -2899,8 +2977,8 @@ ], "peer": true, "dependencies": { - "browserslist": "^4.22.2", - "caniuse-lite": "^1.0.30001578", + "browserslist": "^4.23.0", + "caniuse-lite": "^1.0.30001599", "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -2917,12 +2995,12 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.8", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.8.tgz", - "integrity": "sha512-OtIuQfafSzpo/LhnJaykc0R/MMnuLSSVjVYy9mHArIZ9qTCSZ6TpWCuEKZYVoN//t8HqBNScHrOtCrIK5IaGLg==", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", + "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", "dependencies": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.5.0", + "@babel/helper-define-polyfill-provider": "^0.6.2", "semver": "^6.3.1" }, "peerDependencies": { @@ -2930,38 +3008,23 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.8.7", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.7.tgz", - "integrity": "sha512-KyDvZYxAzkC0Aj2dAPyDzi2Ym15e5JKZSK+maI7NAwSqofvuFglbSsxE7wUOvTg9oFVnHMzVzBKcqEb4PJgtOA==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz", + "integrity": "sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.4", - "core-js-compat": "^3.33.1" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs3/node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.4.tgz", - "integrity": "sha512-QcJMILQCu2jm5TFPGA3lCpJJTeEP+mqeXooG/NZbg/h5FTFi6V0+99ahlRsW8/kRLyb24LZVCCiclDedhLKcBA==", - "dependencies": { - "@babel/helper-compilation-targets": "^7.22.6", - "@babel/helper-plugin-utils": "^7.22.5", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2" + "@babel/helper-define-polyfill-provider": "^0.6.1", + "core-js-compat": "^3.36.1" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.5.tgz", - "integrity": "sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", + "integrity": "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.5.0" + "@babel/helper-define-polyfill-provider": "^0.6.2" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -2973,11 +3036,14 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/body": { @@ -3064,9 +3130,9 @@ } }, "node_modules/browserslist": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", - "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "funding": [ { "type": "opencollective", @@ -3082,8 +3148,8 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001565", - "electron-to-chromium": "^1.4.601", + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, @@ -3119,13 +3185,18 @@ } }, "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3176,9 +3247,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001579", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz", - "integrity": "sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==", + "version": "1.0.30001612", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001612.tgz", + "integrity": "sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g==", "funding": [ { "type": "opencollective", @@ -3221,15 +3292,9 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -3242,6 +3307,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -3395,9 +3463,9 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { "node": ">= 0.6" } @@ -3408,9 +3476,9 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/core-js": { - "version": "3.35.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.35.0.tgz", - "integrity": "sha512-ntakECeqg81KqMueeGJ79Q5ZgQNR+6eaE8sxGCx62zMbAIj65q+uYvatToew3m6eAGdU4gNZwpZ34NMe4GYswg==", + "version": "3.37.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.0.tgz", + "integrity": "sha512-fu5vHevQ8ZG4og+LXug8ulUtVxjOcEYvifJr7L5Bfq9GOztVqsKd9/59hUk2ZSbCrS3BqUr3EpaYGIYzq7g3Ug==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -3418,11 +3486,11 @@ } }, "node_modules/core-js-compat": { - "version": "3.35.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.35.0.tgz", - "integrity": "sha512-5blwFAddknKeNgsjBzilkdQ0+YK8L1PfqPYq40NOYMYFSS38qj+hpTcLLWwpIwA2A5bje/x5jmVn2tzUMg9IVw==", + "version": "3.37.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.0.tgz", + "integrity": "sha512-vYq4L+T8aS5UuFg4UwDhc7YNRWVeVZwltad9C/jV3R2LgVOpS9BDr7l/WL6BN0dbV3k1XejPTHqqEzJgsa0frA==", "dependencies": { - "browserslist": "^4.22.2" + "browserslist": "^4.23.0" }, "funding": { "type": "opencollective", @@ -3468,9 +3536,9 @@ } }, "node_modules/css-functions-list": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.1.tgz", - "integrity": "sha512-Nj5YcaGgBtuUmn1D7oHqPW0c9iui7xsTsj5lIX8ZgevdfhmjFfKB3r8moHJtNJnctnYXJyYX5I1pp90HM4TPgQ==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.2.tgz", + "integrity": "sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==", "engines": { "node": ">=12 || >=16" } @@ -3598,16 +3666,19 @@ } }, "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/depd": { @@ -3670,9 +3741,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.637", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.637.tgz", - "integrity": "sha512-G7j3UCOukFtxVO1vWrPQUoDk3kL70mtvjc/DC/k2o7lE0wAdq+Vwp1ipagOow+BH0uVztFysLWbkM/RTIrbK3w==" + "version": "1.4.746", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.746.tgz", + "integrity": "sha512-jeWaIta2rIG2FzHaYIhSuVWqC6KJYo7oSBX4Jv7g+aVujKztfvdpf+n6MGwZdC5hQXbax4nntykLH2juIQrfPg==" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -3708,10 +3779,29 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "engines": { "node": ">=6" } @@ -3733,15 +3823,15 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -3820,9 +3910,9 @@ } }, "node_modules/eslint-plugin-jsdoc/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -4111,16 +4201,16 @@ } }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -4151,29 +4241,6 @@ "node": ">= 0.10.0" } }, - "node_modules/express/node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, "node_modules/express/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -4187,20 +4254,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/express/node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -4269,9 +4322,9 @@ "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==" }, "node_modules/fastq": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dependencies": { "reusify": "^1.0.4" } @@ -4387,9 +4440,9 @@ } }, "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" }, "node_modules/foreground-child": { "version": "3.1.1", @@ -4475,15 +4528,19 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { + "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4677,20 +4734,20 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dependencies": { - "get-intrinsic": "^1.2.2" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "engines": { "node": ">= 0.4" }, @@ -4710,9 +4767,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -4790,9 +4847,9 @@ } }, "node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "engines": { "node": ">= 4" } @@ -5096,9 +5153,9 @@ } }, "node_modules/jschardet": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-3.0.0.tgz", - "integrity": "sha512-lJH6tJ77V8Nzd5QWRkFYCLc13a3vADkh3r/Fi8HupZGWk2OVVDfnZP8V/VgQgZ+lzW0kG2UGb5hFgt3V3ndotQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-3.1.2.tgz", + "integrity": "sha512-mw3CBZGzW8nUBPYhFU2ztZ/kJ6NClQUQVpyzvFMfznZsoC///ZQ30J2RCUanNsr5yF22LqhgYr/lj807/ZleWA==", "engines": { "node": ">=0.1.90" } @@ -5244,9 +5301,9 @@ "integrity": "sha512-DhhGRshNS1aX6s5YdBE3njCCouPgnG29ebyHvImlZzXZf2SHgt+J08DHgytTPnpywNbO1Y8mNUFyQuIDBq2JZg==" }, "node_modules/loglevel": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz", - "integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", + "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==", "engines": { "node": ">= 0.6.0" }, @@ -5336,14 +5393,11 @@ "integrity": "sha512-TV085RqH+CaZu0/njOjHvDwVMNA8MILwRPHMq58TUUUI/Gfcrv55BU0xS9GiVSLQ3YWaPszFZVEaxgfLl5wVaQ==" }, "node_modules/magic-string": { - "version": "0.30.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", - "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" } }, "node_modules/map-obj": { @@ -5655,9 +5709,9 @@ } }, "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -5878,11 +5932,11 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", + "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { @@ -5893,9 +5947,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "engines": { "node": "14 || >=16.14" } @@ -5946,9 +6000,9 @@ } }, "node_modules/postcss": { - "version": "8.4.33", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", - "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "funding": [ { "type": "opencollective", @@ -5966,7 +6020,7 @@ "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -6041,11 +6095,14 @@ } }, "node_modules/postcss-load-config/node_modules/lilconfig": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", - "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz", + "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==", "engines": { "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/postcss-nested": { @@ -6087,9 +6144,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.15", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", - "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "version": "6.0.16", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.16.tgz", + "integrity": "sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -6112,9 +6169,9 @@ } }, "node_modules/prettier": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz", - "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -6126,9 +6183,9 @@ } }, "node_modules/prettier-eslint": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-16.2.0.tgz", - "integrity": "sha512-GDTSKc62VaLceiaI/qMaKo2oco2CIWtbj4Zr6ckhbTgcBL/uR0d9jkMzh9OtBIT/Z7iBoCB4OHj/aJ5YuNgAuA==", + "version": "16.3.0", + "resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-16.3.0.tgz", + "integrity": "sha512-Lh102TIFCr11PJKUMQ2kwNmxGhTsv/KzUg9QYF2Gkw259g/kPgndZDWavk7/ycbRvj2oz4BPZ1gCU8bhfZH/Xg==", "dependencies": { "@typescript-eslint/parser": "^6.7.5", "common-tags": "^1.4.0", @@ -6145,6 +6202,18 @@ }, "engines": { "node": ">=16.10.0" + }, + "peerDependencies": { + "prettier-plugin-svelte": "^3.0.0", + "svelte-eslint-parser": "*" + }, + "peerDependenciesMeta": { + "prettier-plugin-svelte": { + "optional": true + }, + "svelte-eslint-parser": { + "optional": true + } } }, "node_modules/pretty-format": { @@ -6506,9 +6575,9 @@ } }, "node_modules/rollup": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.5.tgz", - "integrity": "sha512-E4vQW0H/mbNMw2yLSqJyjtkHY9dslf/p0zuT1xehNRqUTBOFMqEjguDvqhXr7N7r/4ttb2jr4T41d3dncmIgbQ==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.16.2.tgz", + "integrity": "sha512-sxDP0+pya/Yi5ZtptF4p3avI+uWCIf/OdrfdH2Gbv1kWddLKk0U7WE3PmQokhi5JrektxsK3sK8s4hzAmjqahw==", "dependencies": { "@types/estree": "1.0.5" }, @@ -6520,19 +6589,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.5", - "@rollup/rollup-android-arm64": "4.9.5", - "@rollup/rollup-darwin-arm64": "4.9.5", - "@rollup/rollup-darwin-x64": "4.9.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.5", - "@rollup/rollup-linux-arm64-gnu": "4.9.5", - "@rollup/rollup-linux-arm64-musl": "4.9.5", - "@rollup/rollup-linux-riscv64-gnu": "4.9.5", - "@rollup/rollup-linux-x64-gnu": "4.9.5", - "@rollup/rollup-linux-x64-musl": "4.9.5", - "@rollup/rollup-win32-arm64-msvc": "4.9.5", - "@rollup/rollup-win32-ia32-msvc": "4.9.5", - "@rollup/rollup-win32-x64-msvc": "4.9.5", + "@rollup/rollup-android-arm-eabi": "4.16.2", + "@rollup/rollup-android-arm64": "4.16.2", + "@rollup/rollup-darwin-arm64": "4.16.2", + "@rollup/rollup-darwin-x64": "4.16.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.16.2", + "@rollup/rollup-linux-arm-musleabihf": "4.16.2", + "@rollup/rollup-linux-arm64-gnu": "4.16.2", + "@rollup/rollup-linux-arm64-musl": "4.16.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.16.2", + "@rollup/rollup-linux-riscv64-gnu": "4.16.2", + "@rollup/rollup-linux-s390x-gnu": "4.16.2", + "@rollup/rollup-linux-x64-gnu": "4.16.2", + "@rollup/rollup-linux-x64-musl": "4.16.2", + "@rollup/rollup-win32-arm64-msvc": "4.16.2", + "@rollup/rollup-win32-ia32-msvc": "4.16.2", + "@rollup/rollup-win32-x64-msvc": "4.16.2", "fsevents": "~2.3.2" } }, @@ -6689,15 +6761,16 @@ } }, "node_modules/set-function-length": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", - "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dependencies": { - "define-data-property": "^1.1.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.2", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -6728,13 +6801,17 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6814,9 +6891,9 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/smob": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/smob/-/smob-1.4.1.tgz", - "integrity": "sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", + "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==" }, "node_modules/source-map": { "version": "0.6.1", @@ -6827,9 +6904,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "engines": { "node": ">=0.10.0" } @@ -6862,9 +6939,9 @@ } }, "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==" }, "node_modules/spdx-expression-parse": { "version": "4.0.0", @@ -6876,9 +6953,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", - "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==" + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", + "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==" }, "node_modules/sprintf-js": { "version": "1.0.3", @@ -7113,15 +7190,15 @@ } }, "node_modules/sucrase/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.3.12", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", + "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", + "jackspeak": "^2.3.6", "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "minipass": "^7.0.4", + "path-scurry": "^1.10.2" }, "bin": { "glob": "dist/esm/bin.mjs" @@ -7192,9 +7269,9 @@ "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==" }, "node_modules/table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", + "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", "dependencies": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", @@ -7227,9 +7304,9 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/tailwindcss": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz", - "integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz", + "integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==", "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -7239,7 +7316,7 @@ "fast-glob": "^3.3.0", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", - "jiti": "^1.19.1", + "jiti": "^1.21.0", "lilconfig": "^2.1.0", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", @@ -7263,9 +7340,9 @@ } }, "node_modules/terser": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.27.0.tgz", - "integrity": "sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==", + "version": "5.30.4", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.4.tgz", + "integrity": "sha512-xRdd0v64a8mFK9bnsKVdoNP9GQIKUAaJPTaqEQDL4w/J8WaW4sWXXoMZ+6SimPkfT5bElreXf8m9HnmPc3E1BQ==", "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -7984,11 +8061,11 @@ } }, "node_modules/ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "engines": { - "node": ">=16.13.0" + "node": ">=16" }, "peerDependencies": { "typescript": ">=4.2.0" @@ -8039,9 +8116,9 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -8188,9 +8265,9 @@ } }, "node_modules/vue-eslint-parser": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.0.tgz", - "integrity": "sha512-7KsNBb6gHFA75BtneJsoK/dbZ281whUIwFYdQxA68QrCrGMXYzUMbPDHGcOQ0OocIVKrWSKWXZ4mL7tonCXoUw==", + "version": "9.4.2", + "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.2.tgz", + "integrity": "sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==", "dependencies": { "debug": "^4.3.4", "eslint-scope": "^7.1.1", @@ -8248,9 +8325,9 @@ } }, "node_modules/vue-eslint-parser/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -8482,9 +8559,12 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "node_modules/yaml": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", - "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", + "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", + "bin": { + "yaml": "bin.mjs" + }, "engines": { "node": ">= 14" } diff --git a/package/basic.js b/package/basic.js index ed1ef24..9477765 100644 --- a/package/basic.js +++ b/package/basic.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:l}=Math;function h(t){return-1===l(t)}function p(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const y=Array.isArray;const d=Reflect.construct;function m(t,n=[],e){const r=y(n)?n:[n];return e?d(t,r,e):d(t,r)}function A(t){return y(t)&&t||i(t)&&[t]||[]}function b(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=m(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function O(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function I(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function M(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function E(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const S=/\.|\[/,x=/]/g,R="";function N(t){return t.replace(x,R).split(S)}function T(t,n){if(!n)return!1;let e=n;return M(y(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function U(t){if(t)return B(t)}const P=Object.hasOwn;function k(t,...n){if(t)return M(n,(n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}}))}function $(t,n){return t?.constructor===n||!1}function D(t){return n=>$(n,t)}function L(t){return t?.constructor?.name}function q(t){return n=>L(n)===t||!1}function V(t){return function(n,...e){return e?t(n)&&M(e,t):t(n)}}const Z=q("Buffer"),K=V(Z),z=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),_=(t,n)=>{if(t===n)return!0;if(K(t))return t.equals(n);if(t.toString()===n.toString())if(z(t)){const e=U(t);if(k(n,e))return M(e,(e=>_(t[e],n[e])))}else if(y(t)&&t.length===n.length)return M(t,((t,e)=>_(t,n[e])));return!1};const W=Math.max;function G(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function J(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function H(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,ft=q("Number"),lt=V(ft);const ht=D(String);const pt=Object.assign;function gt(t,n){if(z(n))pt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:pt(t,n)}else(ht(n)||lt(n))&&(t[n]=n);return t}function yt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function bt(t,n="id",e){return t.sort(((t,r)=>At(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:G(n,(n=>t[n]))}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Mt(t){return n=>!!i(n)&&t.test(n)}const jt=Mt(/\.css$/),Ft=Mt(/\.html$/),Et=Mt(/\.js$/),St=Mt(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=U(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Rt(t,n,e,r){if(!t)return;const o=U(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Tt=V(Nt);function Bt(t,n){if(Tt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Ut=q("GeneratorFunction"),Pt=V(Ut);async function kt(t,n,e){if(Tt(t)){for(const e of t)await n(e,t);return t}if(Pt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const $t=q("AsyncFunction"),Dt=V($t);function Lt(t,n,e,r,o,c){return(s,u,a,f,l)=>{let h;const p=Dt(u);if(i(s)&&u)return h=y(s)?p?n:t:z(s)||at(s)?p?r:e:o?p?c:o:Pt(s)?c:p?r:e,h(s,u,a,f,l)}}const qt=Lt(s,a,Rt,xt,Bt,kt);class Vt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Zt(){}function Kt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const _t=m(zt);function Wt(t,n){return _t.set(t,n)}const Gt=Reflect.apply;function Jt(t,n,e){if(at(t))return Gt(t,n,e)}function Ht(t){return t?.constructor}function Qt(t,n=[]){const e=Ht(t);return e===Function&&"function"===e.name?function(){}:m(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Rt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Rt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Lt(G,J,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return j(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return M(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(y(t)||Tt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if(Pt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(y(t)||Tt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Lt(M,j,on,rn,cn,sn);const an=Function.prototype;function fn(t){return an.call.bind(t)}const ln=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,pn=Object.defineProperty,gn=fn(Object.hasOwnProperty),yn=Object.is;const{random:dn}=Math;const{sign:mn}=Math;function An(t){return 0===t}const bn=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Rt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Rt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function On(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const In=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Mn(t){return t.replace(In,"\\$&")}function jn(t,n){return n?jn(G(t,Mn)):RegExp(t.join("|"))}const Fn=q("RegExp"),En=V(Fn);function Sn(t){if(!t)return;if(z(t))return U(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:U(t).length}const xn=/[ _-]+/g;const Rn=/[ _-]+/g,Nn=/[ ]+/g;const Tn=/[ _-]+/g,Bn=/[ ]+/g;const Un=/[ _-]+/g;const Pn=/[ _-]+/g;function kn(t,n=1){return t.substring(n)}const $n=/%(?![\da-f]{2})/gi,Dn=/&/g,Ln=//g,Vn=/"/g;function Zn(t){return decodeURIComponent(t.replace($n,(()=>"%25")))}function Kn(t){return t.replace(Dn,"&").replace(Ln,"<").replace(qn,">").replace(Vn,""")}const zn=/\S+/g,_n=/\w+/g;const Wn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+kn(t)}function Hn(t){return Gn(t)+kn(t).toLowerCase()}function Qn(t){return Ht(t)?.name}const Xn=q("Map"),Yn=V(Xn),te=/Array/,ne="Array";function ee(t){if(t){const n=Qn(t);if(te.test(n)&&n!==ne)return!0}return!1}function re(t){return!i(t)}const oe=q("BigInt"),ie=V(oe),ce=q("Boolean"),se=V(ce),ue=q("ArrayBuffer"),ae=V(ue);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const le=q("Date"),he=V(le);function pe(t){return!1===t}const ge=q("Float32Array"),ye=V(ge),de=q("Float64Array"),me=V(de),{isInteger:Ae}=Number,be=Ae,we=q("Int16Array"),ve=V(we),Ce=q("Int32Array"),Oe=V(Ce),Ie=q("Int8Array"),Me=V(Ie);function je(t){return!!t&&t instanceof Promise}function Fe(t){return!!t&&(je(t)||Dt(t)||Pt(t))}const{isSafeInteger:Ee}=Number,Se=Ee;const xe=q("Uint16Array"),Re=V(xe),Ne=q("Uint32Array"),Te=V(Ne),Be=q("Uint8Array"),Ue=V(Be),Pe=q("Uint8ClampedArray"),ke=V(Pe),$e=q("WeakMap"),De=V($e),Le=void 0!==globalThis.Deno,qe=void 0!==globalThis.process&&process.versions&&process.versions.node;function Ve(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(_(t,n))}const Ke=JSON;const ze=Ke.stringify;function _e(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${ze(t)}\n\t\tExpected: ${ze(n)}`,r)}async function We(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||_e(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function He(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Qe=Lt(u,f,vn,wn,He,Je);function Xe(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function Ye(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const tr=Lt(F,E,Cn,On,Xe,Ye);function nr(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const er=nr(s),rr=nr(O);function or(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ir=or(a),cr=or(I);const sr=Mt(/\./);class ur{list=m(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ar=m(ur);class fr{static models=new Map;constructor(t,n){i(n)?(yt(this,n),this.modelName=t,fr.models.set(t,n)):yt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}class lr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Rt(t,(n=>{t[n]=new lr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new lr(e),!0)})}}class hr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const pr=m(hr);class gr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=Vt,t.Intervals=ur,t.Model=fr,t.Store=lr,t.Timers=zt,t.UniqID=hr,t.VirtualStorage=gr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Jt,t.arrayToRegex=jn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Fe(t)||Fe(n)?We(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||_e(t,n,e)},t.assertAsync=We,t.assign=yt,t.assignToClass=dt,t.assignToObject=gt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?yt(e,r):r},t.cacheNativeMethod=fn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(xn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return m(Vt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(K(t))return ut(t);if(y(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Kt(setTimeout(Zt,0),(t=>{ar.remove(t)}))},t.clearTimers=function(){Kt(setTimeout(Zt,0),(t=>{_t.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.compact=function(t){if(z(t)){const n=U(t),e=n.length,r={};for(let o=0;oVe(t)))},t.compactKeys=function(t){const n=[];return Rt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Qe,t.compactMapArray=u,t.compactMapAsyncArray=f,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&_t.remove(e.id),e.id=Wt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(_t.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=pn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Rt,t.eachRight=O,t.eachRightAsync=I,t.ensureArray=A,t.ensureBuffer=function(t){return K(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=An,t.escapeRegex=Mn,t.escapeRegexRegex=In,t.every=un,t.everyArg=function(...t){return Dt(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=M,t.everyAsyncArray=j,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rmt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=mt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>mt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e},t.flattenDeep=b,t.flow=er,t.flowAsync=ir,t.flowAsyncRight=cr,t.flowRight=rr,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=He,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Xe,t.forOfFilterAsync=Ye,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Lt,t.get=T,t.getEntries=function(t){if(i(t))return bn(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return bt(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return M(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=ln,t.getType=Ht,t.getTypeName=Qn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!re(n)&&!re(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):En(e)?e.test(n):at(e)?e(n):y(e)?M(e,(e=>t(n,e))):un(e,(e=>t(n,e))):y(n)?En(e)?M(n,(t=>t.test(e))):at(e)?M(n,e):y(e)?M(e,(e=>t(n,e))):n.includes(e,r):!!z(n)&&(En(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):z(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}})))},t.hasDot=sr,t.hasKeys=k,t.hasLength=r,t.hasProp=gn,t.hasValue=i,t.htmlEntities=Kn,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Jt(n,e,r):n(...r);if(z(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(M(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return ar.set(t,n)},t.intervals=ar,t.invert=function(t,n={}){if(t)return Rt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return J(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=y,t.isArrayBuffer=ae,t.isArrayBufferCall=ue,t.isArrayLike=function(t,n){if(re(t)||at(t))return!1;if(y(t)||ee(t))return!0;const e=t.length;if(!re(e)||!lt(e)||e<0)return!1;if(n){const n=U(t);return!!n&&un(n,((t,n)=>n>=0&<(n)))}return!0},t.isAsync=Dt,t.isAsyncCall=$t,t.isBigInt=ie,t.isBigIntCall=oe,t.isBoolean=se,t.isBooleanCall=ce,t.isBuffer=K,t.isBufferCall=Z,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=$,t.isConstructorFactory=D,t.isConstructorNameFactory=q,t.isDate=he,t.isDateCall=le,t.isDeno=Le,t.isEmpty=function(t){return ht(t)||y(t)?!r(t):z(t)?!Sn(t):!i(t)},t.isEqual=_,t.isF32=ye,t.isF32Call=ge,t.isF64=me,t.isF64Call=de,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=jt,t.isFileHTML=Ft,t.isFileJS=Et,t.isFileJSON=St,t.isFloat=be,t.isFunction=at,t.isGenerator=Pt,t.isGeneratorCall=Ut,t.isI16=ve,t.isI16Call=we,t.isI32=Oe,t.isI32Call=Ce,t.isI8=Me,t.isI8Call=Ie,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Fe,t.isMap=Yn,t.isMapCall=Xn,t.isMatchArray=function(t,n){return t.length===n.length&&M(t,((t,e)=>_(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=U(t),r=U(n);return e.length===r.length&&M(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodejs=qe,t.isNotArray=function(t){return!y(t)},t.isNotNumber=function(t){return!lt(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=lt,t.isNumberCall=ft,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=z,t.isPositive=function(t){return 1===mn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=je,t.isRegex=En,t.isRegexCall=Fn,t.isRelated=function(t,n){return!re(t)&&!re(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Se,t.isSame=yn,t.isSameType=function(t,n){const e=Ht(t),r=Ht(n);return e===r&&e.name===r.name},t.isSet=Tt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=Ve,t.isTypeFactory=V,t.isTypedArray=ee,t.isU16=Re,t.isU16Call=xe,t.isU32=Te,t.isU32Call=Ne,t.isU8=Ue,t.isU8C=ke,t.isU8CCall=Pe,t.isU8Call=Be,t.isUndefined=e,t.isWeakMap=De,t.isWeakMapCall=$e,t.isZero=An,t.jsonParse=function(t,n){if(t)return Ke.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Rn," ").trim().toLowerCase().replace(Nn,"-")},t.keys=U,t.largest=function(t){return W(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase()},t.map=en,t.mapArray=G,t.mapAsyncArray=J,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(z(e)||y(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?m(fr,[t,n]):T(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=re,t.noop=Zt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=pt,t.objectEntries=bn,t.objectSize=Sn,t.omit=function(t,n){if(!t)return{};if(y(n)){const e=jn(n);return Cn(t,((t,n)=>!e.test(n)))}if(En(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(lt(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):pt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return G(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=U(t))=>M(e,(e=>_(t[e],n[e]))),t.randomFloat=function(t,n=0){return dn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Mt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cOt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=bt,t.sortCollectionDescendingFilter=At,t.sortNumberAscending=function(t){return t.sort(H)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=Ot,t.sortObjectsAlphabeticallyReverse=It,t.sortUnique=ct,t.stringify=ze,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=H,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Wt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{_t.remove(e.id),e.id=!1},e},t.timer=Wt,t.timers=_t,t.times=Kt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Rt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(b(t))},t.uniqID=pr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Hn,t.upperFirstOnlyAll=function(t){return t.replace(Wn,(t=>Hn(t)))},t.virtualStorage=function(t){return new gr(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(_n)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=m(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e}})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:l}=Math;function h(t){return-1===l(t)}function p(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const y=Array.isArray;const d=Reflect.construct;function m(t,n=[],e){const r=y(n)?n:[n];return e?d(t,r,e):d(t,r)}function A(t){return y(t)&&t||i(t)&&[t]||[]}function b(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=m(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function O(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function I(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function M(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function E(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const S=/\.|\[/,x=/]/g,R="";function N(t){return t.replace(x,R).split(S)}function T(t,n){if(!n)return!1;let e=n;return M(y(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function U(t){if(t)return B(t)}const P=Object.hasOwn;function k(t,...n){if(t)return M(n,(n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}}))}function $(t,n){return t?.constructor===n||!1}function D(t){return n=>$(n,t)}function L(t){return t?.constructor?.name}function q(t){return n=>L(n)===t||!1}function V(t){return function(n,...e){return e?t(n)&&M(e,t):t(n)}}const Z=q("Buffer"),K=V(Z),z=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),_=(t,n)=>{if(t===n)return!0;if(K(t))return t.equals(n);if(t.toString()===n.toString())if(z(t)){const e=U(t);if(k(n,e))return M(e,(e=>_(t[e],n[e])))}else if(y(t)&&t.length===n.length)return M(t,((t,e)=>_(t,n[e])));return!1};const W=Math.max;function G(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function J(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function H(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,ft=q("Number"),lt=V(ft);const ht=D(String);const pt=Object.assign;function gt(t,n){if(z(n))pt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:pt(t,n)}else(ht(n)||lt(n))&&(t[n]=n);return t}function yt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function bt(t,n="id",e){return t.sort(((t,r)=>At(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:G(n,(n=>t[n]))}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Mt(t){return n=>!!i(n)&&t.test(n)}const jt=Mt(/\.css$/),Ft=Mt(/\.html$/),Et=Mt(/\.js$/),St=Mt(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=U(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Rt(t,n,e,r){if(!t)return;const o=U(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Tt=V(Nt);function Bt(t,n){if(Tt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Ut=q("GeneratorFunction"),Pt=V(Ut);async function kt(t,n,e){if(Tt(t)){for(const e of t)await n(e,t);return t}if(Pt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const $t=q("AsyncFunction"),Dt=V($t);function Lt(t,n,e,r,o,c){return(s,u,a,f,l)=>{let h;const p=Dt(u);if(i(s)&&u)return h=y(s)?p?n:t:z(s)||at(s)?p?r:e:o?p?c:o:Pt(s)?c:p?r:e,h(s,u,a,f,l)}}const qt=Lt(s,a,Rt,xt,Bt,kt);class Vt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Zt(){}function Kt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const _t=m(zt);function Wt(t,n){return _t.set(t,n)}const Gt=Reflect.apply;function Jt(t,n,e){if(at(t))return Gt(t,n,e)}function Ht(t){return t?.constructor}function Qt(t,n=[]){const e=Ht(t);return e===Function&&"function"===e.name?function(){}:m(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Rt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Rt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Lt(G,J,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return j(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return M(U(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(y(t)||Tt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if(Pt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(y(t)||Tt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Lt(M,j,on,rn,cn,sn);const an=Function.prototype;function fn(t){return an.call.bind(t)}const ln=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,pn=Object.defineProperty,gn=fn(Object.hasOwnProperty),yn=Object.is;const{random:dn}=Math;const{sign:mn}=Math;function An(t){return 0===t}const bn=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Rt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Rt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function On(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const In=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Mn(t){return t.replace(In,"\\$&")}function jn(t,n){return n?jn(G(t,Mn)):RegExp(t.join("|"))}const Fn=q("RegExp"),En=V(Fn);function Sn(t){if(!t)return;if(z(t))return U(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:U(t).length}const xn=/[ _-]+/g;const Rn=/[ _-]+/g,Nn=/[ ]+/g;const Tn=/[ _-]+/g,Bn=/[ ]+/g;const Un=/[ _-]+/g;const Pn=/[ _-]+/g;function kn(t,n=1){return t.substring(n)}const $n=/%(?![\da-f]{2})/gi,Dn=/&/g,Ln=//g,Vn=/"/g;function Zn(t){return decodeURIComponent(t.replace($n,(()=>"%25")))}function Kn(t){return t.replace(Dn,"&").replace(Ln,"<").replace(qn,">").replace(Vn,""")}const zn=/\S+/g,_n=/\w+/g;const Wn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+kn(t)}function Hn(t){return Gn(t)+kn(t).toLowerCase()}function Qn(t){return Ht(t)?.name}const Xn=q("Map"),Yn=V(Xn),te=/Array/,ne="Array";function ee(t){if(t){const n=Qn(t);if(te.test(n)&&n!==ne)return!0}return!1}function re(t){return!i(t)}const oe=q("BigInt"),ie=V(oe),ce=q("Boolean"),se=V(ce),ue=q("ArrayBuffer"),ae=V(ue);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const le=q("Date"),he=V(le);function pe(t){return!1===t}const ge=q("Float32Array"),ye=V(ge),de=q("Float64Array"),me=V(de),{isInteger:Ae}=Number,be=Ae,we=q("Int16Array"),ve=V(we),Ce=q("Int32Array"),Oe=V(Ce),Ie=q("Int8Array"),Me=V(Ie);function je(t){return!!t&&t instanceof Promise}function Fe(t){return!!t&&(je(t)||Dt(t)||Pt(t))}const{isSafeInteger:Ee}=Number,Se=Ee;const xe=q("Uint16Array"),Re=V(xe),Ne=q("Uint32Array"),Te=V(Ne),Be=q("Uint8Array"),Ue=V(Be),Pe=q("Uint8ClampedArray"),ke=V(Pe),$e=q("WeakMap"),De=V($e),Le=void 0!==globalThis.Deno,qe=void 0!==globalThis.process&&process.versions&&process.versions.node;function Ve(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(_(t,n))}const Ke=JSON;const ze=Ke.stringify;function _e(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${ze(t)}\n\t\tExpected: ${ze(n)}`,r)}async function We(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||_e(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function He(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Qe=Lt(u,f,vn,wn,He,Je);function Xe(t,n=c,e){const r=e||Qt(t);if(y(t)||Tt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function Ye(t,n=c,e,r){if(Pt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(y(t)||Tt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const tr=Lt(F,E,Cn,On,Xe,Ye);function nr(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const er=nr(s),rr=nr(O);function or(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ir=or(a),cr=or(I);const sr=Mt(/\./);class ur{list=m(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ar=m(ur);class fr{static models=new Map;constructor(t,n){i(n)?(yt(this,n),this.modelName=t,fr.models.set(t,n)):yt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}class lr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Rt(t,(n=>{t[n]=new lr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new lr(e),!0)})}}class hr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const pr=m(hr);class gr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=Vt,t.Intervals=ur,t.Model=fr,t.Store=lr,t.Timers=zt,t.UniqID=hr,t.VirtualStorage=gr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Jt,t.arrayToRegex=jn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Fe(t)||Fe(n)?We(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||_e(t,n,e)},t.assertAsync=We,t.assign=yt,t.assignToClass=dt,t.assignToObject=gt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?yt(e,r):r},t.cacheNativeMethod=fn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(xn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return m(Vt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(K(t))return ut(t);if(y(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Kt(setTimeout(Zt,0),(t=>{ar.remove(t)}))},t.clearTimers=function(){Kt(setTimeout(Zt,0),(t=>{_t.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.compact=function(t){if(z(t)){const n=U(t),e=n.length,r={};for(let o=0;oVe(t)))},t.compactKeys=function(t){const n=[];return Rt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Qe,t.compactMapArray=u,t.compactMapAsyncArray=f,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&_t.remove(e.id),e.id=Wt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(_t.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=pn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Rt,t.eachRight=O,t.eachRightAsync=I,t.ensureArray=A,t.ensureBuffer=function(t){return K(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=An,t.escapeRegex=Mn,t.escapeRegexRegex=In,t.every=un,t.everyArg=function(...t){return Dt(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=M,t.everyAsyncArray=j,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rmt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=mt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>mt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e},t.flattenDeep=b,t.flow=er,t.flowAsync=ir,t.flowAsyncRight=cr,t.flowRight=rr,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=He,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Xe,t.forOfFilterAsync=Ye,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Lt,t.get=T,t.getEntries=function(t){if(i(t))return bn(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return bt(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return M(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=ln,t.getType=Ht,t.getTypeName=Qn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!re(n)&&!re(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):En(e)?e.test(n):at(e)?e(n):y(e)?M(e,(e=>t(n,e))):un(e,(e=>t(n,e))):y(n)?En(e)?M(n,(t=>t.test(e))):at(e)?M(n,e):y(e)?M(e,(e=>t(n,e))):n.includes(e,r):!!z(n)&&(En(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):z(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return P(t,n);{const n=e.pop(),r=T(e,t);return!!r&&P(r,n)}})))},t.hasDot=sr,t.hasKeys=k,t.hasLength=r,t.hasProp=gn,t.hasValue=i,t.htmlEntities=Kn,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Jt(n,e,r):n(...r);if(z(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(M(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return ar.set(t,n)},t.intervals=ar,t.invert=function(t,n={}){if(t)return Rt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return J(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=y,t.isArrayBuffer=ae,t.isArrayBufferCall=ue,t.isArrayLike=function(t,n){if(re(t)||at(t))return!1;if(y(t)||ee(t))return!0;const e=t.length;if(!re(e)||!lt(e)||e<0)return!1;if(n){const n=U(t);return!!n&&un(n,((t,n)=>n>=0&<(n)))}return!0},t.isAsync=Dt,t.isAsyncCall=$t,t.isBigInt=ie,t.isBigIntCall=oe,t.isBoolean=se,t.isBooleanCall=ce,t.isBuffer=K,t.isBufferCall=Z,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=$,t.isConstructorFactory=D,t.isConstructorNameFactory=q,t.isDate=he,t.isDateCall=le,t.isDeno=Le,t.isEmpty=function(t){return ht(t)||y(t)?!r(t):z(t)?!Sn(t):!i(t)},t.isEqual=_,t.isEven=function(t){return!(1&t)},t.isF32=ye,t.isF32Call=ge,t.isF64=me,t.isF64Call=de,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=jt,t.isFileHTML=Ft,t.isFileJS=Et,t.isFileJSON=St,t.isFloat=be,t.isFunction=at,t.isGenerator=Pt,t.isGeneratorCall=Ut,t.isI16=ve,t.isI16Call=we,t.isI32=Oe,t.isI32Call=Ce,t.isI8=Me,t.isI8Call=Ie,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Fe,t.isMap=Yn,t.isMapCall=Xn,t.isMatchArray=function(t,n){return t.length===n.length&&M(t,((t,e)=>_(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=U(t),r=U(n);return e.length===r.length&&M(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodejs=qe,t.isNotArray=function(t){return!y(t)},t.isNotNumber=function(t){return!lt(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=lt,t.isNumberCall=ft,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=z,t.isPositive=function(t){return 1===mn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=je,t.isRegex=En,t.isRegexCall=Fn,t.isRelated=function(t,n){return!re(t)&&!re(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Se,t.isSame=yn,t.isSameType=function(t,n){const e=Ht(t),r=Ht(n);return e===r&&e.name===r.name},t.isSet=Tt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=Ve,t.isTypeFactory=V,t.isTypedArray=ee,t.isU16=Re,t.isU16Call=xe,t.isU32=Te,t.isU32Call=Ne,t.isU8=Ue,t.isU8C=ke,t.isU8CCall=Pe,t.isU8Call=Be,t.isUndefined=e,t.isWeakMap=De,t.isWeakMapCall=$e,t.isZero=An,t.jsonParse=function(t,n){if(t)return Ke.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Rn," ").trim().toLowerCase().replace(Nn,"-")},t.keys=U,t.largest=function(t){return W(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase()},t.map=en,t.mapArray=G,t.mapAsyncArray=J,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(z(e)||y(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?m(fr,[t,n]):T(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=re,t.noop=Zt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=pt,t.objectEntries=bn,t.objectSize=Sn,t.omit=function(t,n){if(!t)return{};if(y(n)){const e=jn(n);return Cn(t,((t,n)=>!e.test(n)))}if(En(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(lt(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):pt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return G(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=U(t))=>M(e,(e=>_(t[e],n[e]))),t.randomFloat=function(t,n=0){return dn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Mt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cOt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=bt,t.sortCollectionDescendingFilter=At,t.sortNumberAscending=function(t){return t.sort(H)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=Ot,t.sortObjectsAlphabeticallyReverse=It,t.sortUnique=ct,t.stringify=ze,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=H,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Wt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{_t.remove(e.id),e.id=!1},e},t.timer=Wt,t.timers=_t,t.times=Kt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Rt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(b(t))},t.uniqID=pr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Hn,t.upperFirstOnlyAll=function(t){return t.replace(Wn,(t=>Hn(t)))},t.virtualStorage=function(t){return new gr(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(_n)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=m(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e}})); //# sourceMappingURL=basic.js.map diff --git a/package/browser.js b/package/browser.js index b597a51..9c92d54 100644 --- a/package/browser.js +++ b/package/browser.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:f}=Math;function h(t){return-1===f(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const d=Array.isArray;const m=Reflect.construct;function y(t,n=[],e){const r=d(n)?n:[n];return e?m(t,r,e):m(t,r)}function b(t){return d(t)&&t||i(t)&&[t]||[]}function A(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=y(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function I(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function O(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function E(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function M(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const j=/\.|\[/,x=/]/g,T="";function N(t){return t.replace(x,T).split(j)}function R(t,n){if(!n)return!1;let e=n;return E(d(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function L(t){if(t)return B(t)}const $=Object.hasOwn;function k(t,...n){if(t)return E(n,(n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}}))}function D(t,n){return t?.constructor===n||!1}function U(t){return n=>D(n,t)}function P(t){return t?.constructor?.name}function q(t){return n=>P(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&E(e,t):t(n)}}const W=q("Buffer"),Z=z(W),_=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(Z(t))return t.equals(n);if(t.toString()===n.toString())if(_(t)){const e=L(t);if(k(n,e))return E(e,(e=>H(t[e],n[e])))}else if(d(t)&&t.length===n.length)return E(t,((t,e)=>H(t,n[e])));return!1};const V=Math.max;function K(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function G(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function J(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,lt=q("Number"),ft=z(lt);const ht=U(String);const gt=Object.assign;function pt(t,n){if(_(n))gt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:gt(t,n)}else(ht(n)||ft(n))&&(t[n]=n);return t}function dt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function At(t,n="id",e){return t.sort(((t,r)=>bt(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:K(n,(n=>t[n]))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Et(t){return n=>!!i(n)&&t.test(n)}const St=Et(/\.css$/),Ft=Et(/\.html$/),Mt=Et(/\.js$/),jt=Et(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=L(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Tt(t,n,e,r){if(!t)return;const o=L(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Rt=z(Nt);function Bt(t,n){if(Rt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Lt=q("GeneratorFunction"),$t=z(Lt);async function kt(t,n,e){if(Rt(t)){for(const e of t)await n(e,t);return t}if($t(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const Dt=q("AsyncFunction"),Ut=z(Dt);function Pt(t,n,e,r,o,c){return(s,u,a,l,f)=>{let h;const g=Ut(u);if(i(s)&&u)return h=d(s)?g?n:t:_(s)||at(s)?g?r:e:o?g?c:o:$t(s)?c:g?r:e,h(s,u,a,l,f)}}const qt=Pt(s,a,Tt,xt,Bt,kt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Zt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=y(_t);function Vt(t,n){return Ht.set(t,n)}const Kt=Reflect.apply;function Gt(t,n,e){if(at(t))return Kt(t,n,e)}function Jt(t){return t?.constructor}function Qt(t,n=[]){const e=Jt(t);return e===Function&&"function"===e.name?function(){}:y(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Tt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Tt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Pt(K,G,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return S(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return E(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(d(t)||Rt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if($t(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(d(t)||Rt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Pt(E,S,on,rn,cn,sn);const an=Function.prototype;function ln(t){return an.call.bind(t)}const fn=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,gn=Object.defineProperty,pn=ln(Object.hasOwnProperty),dn=Object.is;const{random:mn}=Math;const{sign:yn}=Math;function bn(t){return 0===t}const An=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Tt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Tt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function In(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const On=/[()[\]{}*+?^$|#.,/\\\s-]/g;function En(t){return t.replace(On,"\\$&")}function Sn(t,n){return n?Sn(K(t,En)):RegExp(t.join("|"))}const Fn=q("RegExp"),Mn=z(Fn);function jn(t){if(!t)return;if(_(t))return L(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:L(t).length}const xn=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Tn=/[ _-]+/g;const Nn=/[ _-]+/g,Rn=/[ ]+/g;const Bn=/[ _-]+/g,Ln=/[ ]+/g;const $n=/[ _-]+/g;const kn=/[ _-]+/g;function Dn(t,n=1){return t.substring(n)}const Un=/%(?![\da-f]{2})/gi,Pn=/&/g,qn=//g,Wn=/"/g;function Zn(t){return decodeURIComponent(t.replace(Un,(()=>"%25")))}function _n(t){return t.replace(Pn,"&").replace(qn,"<").replace(zn,">").replace(Wn,""")}const Hn=/\S+/g,Vn=/\w+/g;const Kn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+Dn(t)}function Qn(t){return Gn(t)+Dn(t).toLowerCase()}function Xn(t){return Jt(t)?.name}const Yn=q("Map"),te=z(Yn),ne=/Array/,ee="Array";function re(t){if(t){const n=Xn(t);if(ne.test(n)&&n!==ee)return!0}return!1}function oe(t){return!i(t)}const ie=q("BigInt"),ce=z(ie),se=q("Boolean"),ue=z(se),ae=q("ArrayBuffer"),le=z(ae);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const he=q("Date"),ge=z(he);function pe(t){return!1===t}const de=q("Float32Array"),me=z(de),ye=q("Float64Array"),be=z(ye),{isInteger:Ae}=Number,we=Ae,ve=q("Int16Array"),Ce=z(ve),Ie=q("Int32Array"),Oe=z(Ie),Ee=q("Int8Array"),Se=z(Ee);function Fe(t){return!!t&&t instanceof Promise}function Me(t){return!!t&&(Fe(t)||Ut(t)||$t(t))}const{isSafeInteger:je}=Number,xe=je;const Te=q("Uint16Array"),Ne=z(Te),Re=q("Uint32Array"),Be=z(Re),Le=q("Uint8Array"),$e=z(Le),ke=q("Uint8ClampedArray"),De=z(ke),Ue=q("WeakMap"),Pe=z(Ue),qe=void 0!==globalThis.Deno,ze=void 0!==globalThis.process&&process.versions&&process.versions.node;function We(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(H(t,n))}const _e=JSON;const He=_e.stringify;function Ve(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${He(t)}\n\t\tExpected: ${He(n)}`,r)}async function Ke(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||Ve(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function Qe(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Xe=Pt(u,l,vn,wn,Qe,Je);function Ye(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function tr(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const nr=Pt(F,M,Cn,In,Ye,tr);function er(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const rr=er(s),or=er(I);function ir(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const cr=ir(a),sr=ir(O);const ur=Et(/\./);class ar{list=y(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const lr=y(ar);class fr{static models=new Map;constructor(t,n){i(n)?(dt(this,n),this.modelName=t,fr.models.set(t,n)):dt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}function hr(t){return new Promise(t)}class gr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Tt(t,(n=>{t[n]=new gr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new gr(e),!0)})}}class pr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const dr=y(pr);class mr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function yr(t){return new mr(t)}function br(t){return i(t)?br[t]:L(br)}const Ar=globalThis.navigator?.userAgentData;if(Ar)Tt(Ar,((t,n)=>{ue(t)&&t&&(br[n]=t)})),s(Ar.brands,(t=>{br[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{br[t]=!0}))}function wr(t,n,e,r){return t.addEventListener(n,e,r),t}const vr=document.createDocumentFragment.bind(document);function Cr(t,n){return t.appendChild(n),n}function Ir(t,n){return d(n)?xn(n,K(n,(n=>t.getAttribute(n)))):(Tt(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Or=/^.[\w_-]+$/,Er=/^[A-Za-z]+$/,Sr=/\s/,Fr=document.getElementsByClassName.bind(document),Mr=document.getElementsByTagName.bind(document),jr=document.getElementById.bind(document),xr=document.querySelector.bind(document),Tr=document.querySelectorAll.bind(document);const Nr=document.createElement.bind(document);function Rr(t){const n=ur(t)&&t||`${t}.js`;return(t=>hr((n=>{wr(t,"load",n,!0),wr(t,"error",n,!0),Cr(xr("head"),t)})))(Ir(Nr("script"),{async:"",src:n}))}function Br(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&wr(document,"DOMContentLoaded",t),!1)}Br((()=>{const t=jr("AcidLib");Rr(t&&t.getAttribute("data-index")||"/index")}));const Lr=location.protocol,$r="http:"===Lr?"ws":"wss",kr=location.hostname,Dr={hardware:{cores:navigator.hardwareConcurrency},host:{name:kr,protocol:Lr,protocolSocket:$r}};function Ur(){dt(Dr,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Pr(){Ur()}Br(Pr),wr(window,"load",Pr,!0),wr(window,"resize",Pr,!0),t.hasLocal=void 0,function(n){try{n().removeItem("TESTING"),t.hasLocal=!0}catch(n){t.hasLocal=!1}}((()=>localStorage));class qr{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=yr(t)}hasLocal=t.hasLocal;setItem(t,n){return this.hasLocal&&this.local.setItem(t,ht(n)?n:He(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return i(n)?n:!i(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}const zr=(t,n)=>`color:${t};background:${n};`,Wr={alert:zr("#fff","#f44336"),important:zr("#fff","#E91E63"),notify:zr("#fff","#651FFF"),warning:zr("#000","#FFEA00")};t.BrowserStorage=qr,t.Chain=zt,t.Intervals=ar,t.Model=fr,t.Store=gr,t.Timers=_t,t.UniqID=pr,t.VirtualStorage=mr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.append=Cr,t.apply=Gt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Me(t)||Me(n)?Ke(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||Ve(t,n,e)},t.assertAsync=Ke,t.assign=dt,t.assignToClass=mt,t.assignToObject=pt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?dt(e,r):r},t.browserStorage=function(t){return new qr(t)},t.cacheNativeMethod=ln,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Tn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return y(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(Z(t))return ut(t);if(d(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Zt(setTimeout(Wt,0),(t=>{lr.remove(t)}))},t.clearTimers=function(){Zt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.cnsl=(t,n)=>{const e=ht(t)?t:He(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},t.cnslTheme=(t,n,e)=>{Wr[t]=zr(n,e)},t.compact=function(t){if(_(t)){const n=L(t),e=n.length,r={};for(let o=0;oWe(t)))},t.compactKeys=function(t){const n=[];return Tt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Xe,t.compactMapArray=u,t.compactMapAsyncArray=l,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.createFragment=vr,t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Vt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=gn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Tt,t.eachRight=I,t.eachRightAsync=O,t.ensureArray=b,t.ensureBuffer=function(t){return Z(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=bn,t.escapeRegex=En,t.escapeRegexRegex=On,t.eventAdd=wr,t.eventRemove=function(t,n,e,r){return t.removeEventListener(n,e,r),t},t.every=un,t.everyArg=function(...t){return Ut(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=E,t.everyAsyncArray=S,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;ryt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=yt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>yt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(b(n))),[]);return e},t.flattenDeep=A,t.flow=rr,t.flowAsync=cr,t.flowAsyncRight=sr,t.flowRight=or,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=Qe,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Ye,t.forOfFilterAsync=tr,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Pt,t.get=R,t.getByClass=Fr,t.getById=jr,t.getByTag=Mr,t.getEntries=function(t){if(i(t))return An(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return At(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return E(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=fn,t.getType=Jt,t.getTypeName=Xn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!oe(n)&&!oe(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):Mn(e)?e.test(n):at(e)?e(n):d(e)?E(e,(e=>t(n,e))):un(e,(e=>t(n,e))):d(n)?Mn(e)?E(n,(t=>t.test(e))):at(e)?E(n,e):d(e)?E(e,(e=>t(n,e))):n.includes(e,r):!!_(n)&&(Mn(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):_(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}})))},t.hasDot=ur,t.hasKeys=k,t.hasLength=r,t.hasProp=pn,t.hasValue=i,t.htmlEntities=_n,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Gt(n,e,r):n(...r);if(_(n))return n[e]=t,n}},t.importjs=Rr,t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.info=Dr,t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(E(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return lr.set(t,n)},t.intervals=lr,t.invert=function(t,n={}){if(t)return Tt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return G(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isAgent=br,t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=d,t.isArrayBuffer=le,t.isArrayBufferCall=ae,t.isArrayLike=function(t,n){if(oe(t)||at(t))return!1;if(d(t)||re(t))return!0;const e=t.length;if(!oe(e)||!ft(e)||e<0)return!1;if(n){const n=L(t);return!!n&&un(n,((t,n)=>n>=0&&ft(n)))}return!0},t.isAsync=Ut,t.isAsyncCall=Dt,t.isBigInt=ce,t.isBigIntCall=ie,t.isBoolean=ue,t.isBooleanCall=se,t.isBuffer=Z,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=D,t.isConstructorFactory=U,t.isConstructorNameFactory=q,t.isDate=ge,t.isDateCall=he,t.isDeno=qe,t.isDocumentReady=Br,t.isDom=function(t){return t&&9!==t.nodeType},t.isEmpty=function(t){return ht(t)||d(t)?!r(t):_(t)?!jn(t):!i(t)},t.isEnter=function(t){return 13===t.keyCode},t.isEqual=H,t.isF32=me,t.isF32Call=de,t.isF64=be,t.isF64Call=ye,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=Ft,t.isFileJS=Mt,t.isFileJSON=jt,t.isFloat=we,t.isFunction=at,t.isGenerator=$t,t.isGeneratorCall=Lt,t.isHTMLCollection=function(t){return!!i(t)&&"[object HTMLCollection]"===t.toString()},t.isI16=Ce,t.isI16Call=ve,t.isI32=Oe,t.isI32Call=Ie,t.isI8=Se,t.isI8Call=Ee,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Me,t.isMap=te,t.isMapCall=Yn,t.isMatchArray=function(t,n){return t.length===n.length&&E(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=L(t),r=L(n);return e.length===r.length&&E(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodeList=function(t){return!!i(t)&&"[object NodeList]"===t.toString()},t.isNodejs=ze,t.isNotArray=function(t){return!d(t)},t.isNotNumber=function(t){return!ft(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=ft,t.isNumberCall=lt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=_,t.isPositive=function(t){return 1===yn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Fe,t.isRegex=Mn,t.isRegexCall=Fn,t.isRelated=function(t,n){return!oe(t)&&!oe(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=xe,t.isSame=dn,t.isSameType=function(t,n){const e=Jt(t),r=Jt(n);return e===r&&e.name===r.name},t.isSet=Rt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=We,t.isTypeFactory=z,t.isTypedArray=re,t.isU16=Ne,t.isU16Call=Te,t.isU32=Be,t.isU32Call=Re,t.isU8=$e,t.isU8C=De,t.isU8CCall=ke,t.isU8Call=Le,t.isUndefined=e,t.isWeakMap=Pe,t.isWeakMapCall=Ue,t.isZero=bn,t.jsonParse=function(t,n){if(t)return _e.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Nn," ").trim().toLowerCase().replace(Rn,"-")},t.keys=L,t.largest=function(t){return V(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(kn," ").trim().toLowerCase()},t.map=en,t.mapArray=K,t.mapAsyncArray=G,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(_(e)||d(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?y(fr,[t,n]):R(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=oe,t.nodeAttribute=Ir,t.noop=Wt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=gt,t.objectEntries=An,t.objectSize=jn,t.omit=function(t,n){if(!t)return{};if(d(n)){const e=Sn(n);return Cn(t,((t,n)=>!e.test(n)))}if(Mn(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(ft(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):gt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return K(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=hr,t.propertyMatch=(t,n,e=L(t))=>E(e,(e=>H(t[e],n[e]))),t.querySelector=xr,t.querySelectorAll=Tr,t.randomFloat=function(t,n=0){return mn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Et,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cIt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Ot(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=At,t.sortCollectionDescendingFilter=bt,t.sortNumberAscending=function(t){return t.sort(J)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=It,t.sortObjectsAlphabeticallyReverse=Ot,t.sortUnique=ct,t.stringify=He,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=J,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.themes=Wr,t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Vt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Vt,t.timers=Ht,t.times=Zt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Tt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(A(t))},t.uniqID=dr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Qn,t.upperFirstOnlyAll=function(t){return t.replace(Kn,(t=>Qn(t)))},t.virtualStorage=yr,t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Vn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=y(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=xn})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,(function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function c(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const a=n.call(r,t,c,e,s,u,o);i(a)&&e.push(a)})):s(t,((t,c,s,u)=>{const a=n(t,c,e,s,u,r,o);i(a)&&e.push(a)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i{const c=await n(t,r,e,o);i(c)&&e.push(c)})),e}const{sign:f}=Math;function h(t){return-1===f(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const d=Array.isArray;const m=Reflect.construct;function y(t,n=[],e){const r=d(n)?n:[n];return e?m(t,r,e):m(t,r)}function b(t){return d(t)&&t||i(t)&&[t]||[]}function A(t){return t.flat(1/0)}function w(t,n){return t.forEach(n),t}function v(...t){const n=y(Map),e=[];return s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function C(t,n=1,e=t.length){return t.splice(n,e)}function I(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function O(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function E(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function M(t,n,e=[],r){return await a(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const j=/\.|\[/,x=/]/g,T="";function N(t){return t.replace(x,T).split(j)}function R(t,n){if(!n)return!1;let e=n;return E(d(t)?t:N(t),(t=>(e=e[t],i(e)))),e}const B=Object.keys;function L(t){if(t)return B(t)}const $=Object.hasOwn;function k(t,...n){if(t)return E(n,(n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}}))}function D(t,n){return t?.constructor===n||!1}function U(t){return n=>D(n,t)}function P(t){return t?.constructor?.name}function q(t){return n=>P(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&E(e,t):t(n)}}const W=q("Buffer"),Z=z(W),_=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(Z(t))return t.equals(n);if(t.toString()===n.toString())if(_(t)){const e=L(t);if(k(n,e))return E(e,(e=>H(t[e],n[e])))}else if(d(t)&&t.length===n.length)return E(t,((t,e)=>H(t,n[e])));return!1};const V=Math.max;function K(t,n,e=[],r,o){return i(r)?s(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):s(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function G(t,n){const e=[];return await a(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function J(t,n){return t-n}function Q(t,n){return n-t}const{floor:X,random:Y}=Math;function tt(t,n=0){return X(Y()*(t-n))+n}const nt=Array.from;function et(t,n,e){if(i(t))return nt(t,n,e)}function rt(t,n=t.length){if(t.length<=1)return et(t);const e=et(t);let r,o,i=0;for(;i!!i(t)&&t instanceof Function,lt=q("Number"),ft=z(lt);const ht=U(String);const gt=Object.assign;function pt(t,n){if(_(n))gt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:gt(t,n)}else(ht(n)||ft(n))&&(t[n]=n);return t}function dt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function At(t,n="id",e){return t.sort(((t,r)=>bt(t,r,n,e)))}function wt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function vt(t,n="id",e){return t.sort(((t,r)=>wt(t,r,n,e)))}function Ct(t,n){if(t)return ht(n)?t[n]:K(n,(n=>t[n]))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Ot(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Et(t){return n=>!!i(n)&&t.test(n)}const St=Et(/\.css$/),Ft=Et(/\.html$/),Mt=Et(/\.js$/),jt=Et(/\.json$/);const xt=async(t,n,e,r)=>{if(!t)return;const o=L(t);return i(e)?await a(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await a(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Tt(t,n,e,r){if(!t)return;const o=L(t);return i(e)?s(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):s(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Nt=q("Set"),Rt=z(Nt);function Bt(t,n){if(Rt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Lt=q("GeneratorFunction"),$t=z(Lt);async function kt(t,n,e){if(Rt(t)){for(const e of t)await n(e,t);return t}if($t(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const Dt=q("AsyncFunction"),Ut=z(Dt);function Pt(t,n,e,r,o,c){return(s,u,a,l,f)=>{let h;const g=Ut(u);if(i(s)&&u)return h=d(s)?g?n:t:_(s)||at(s)?g?r:e:o?g?c:o:$t(s)?c:g?r:e,h(s,u,a,l,f)}}const qt=Pt(s,a,Tt,xt,Bt,kt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;qt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Zt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=y(_t);function Vt(t,n){return Ht.set(t,n)}const Kt=Reflect.apply;function Gt(t,n,e){if(at(t))return Kt(t,n,e)}function Jt(t){return t?.constructor}function Qt(t,n=[]){const e=Jt(t);return e===Function&&"function"===e.name?function(){}:y(e,n)}function Xt(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function Yt(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function tn(t,n,e={}){if(t)return await xt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function nn(t,n,e={},r,o){if(t)return i(r)?Tt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Tt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const en=Pt(K,G,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return S(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function on(t,n){if(!t)return;return E(L(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function cn(t,n=c){if(d(t)||Rt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function sn(t,n=c,e){if($t(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(d(t)||Rt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Pt(E,S,on,rn,cn,sn);const an=Function.prototype;function ln(t){return an.call.bind(t)}const fn=Object.getOwnPropertyNames,hn=Object.getOwnPropertyDescriptor,gn=Object.defineProperty,pn=ln(Object.hasOwnProperty),dn=Object.is;const{random:mn}=Math;const{sign:yn}=Math;function bn(t){return 0===t}const An=Object.entries;async function wn(t,n=c,e={}){return await xt(t,(async(t,r,o,c,s)=>{const u=await n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function vn(t,n=c,e={}){return Tt(t,((t,r,o,c,s)=>{const u=n(t,r,e,o,c,s);i(u)&&(e[r]=u)})),e}function Cn(t,n,e={}){return Tt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function In(t,n,e={}){return await xt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const On=/[()[\]{}*+?^$|#.,/\\\s-]/g;function En(t){return t.replace(On,"\\$&")}function Sn(t,n){return n?Sn(K(t,En)):RegExp(t.join("|"))}const Fn=q("RegExp"),Mn=z(Fn);function jn(t){if(!t)return;if(_(t))return L(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:L(t).length}const xn=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Tn=/[ _-]+/g;const Nn=/[ _-]+/g,Rn=/[ ]+/g;const Bn=/[ _-]+/g,Ln=/[ ]+/g;const $n=/[ _-]+/g;const kn=/[ _-]+/g;function Dn(t,n=1){return t.substring(n)}const Un=/%(?![\da-f]{2})/gi,Pn=/&/g,qn=//g,Wn=/"/g;function Zn(t){return decodeURIComponent(t.replace(Un,(()=>"%25")))}function _n(t){return t.replace(Pn,"&").replace(qn,"<").replace(zn,">").replace(Wn,""")}const Hn=/\S+/g,Vn=/\w+/g;const Kn=/\w+/g;function Gn(t){return t[0].toUpperCase()}function Jn(t){return Gn(t)+Dn(t)}function Qn(t){return Gn(t)+Dn(t).toLowerCase()}function Xn(t){return Jt(t)?.name}const Yn=q("Map"),te=z(Yn),ne=/Array/,ee="Array";function re(t){if(t){const n=Xn(t);if(ne.test(n)&&n!==ee)return!0}return!1}function oe(t){return!i(t)}const ie=q("BigInt"),ce=z(ie),se=q("Boolean"),ue=z(se),ae=q("ArrayBuffer"),le=z(ae);const fe=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const he=q("Date"),ge=z(he);function pe(t){return!1===t}const de=q("Float32Array"),me=z(de),ye=q("Float64Array"),be=z(ye),{isInteger:Ae}=Number,we=Ae,ve=q("Int16Array"),Ce=z(ve),Ie=q("Int32Array"),Oe=z(Ie),Ee=q("Int8Array"),Se=z(Ee);function Fe(t){return!!t&&t instanceof Promise}function Me(t){return!!t&&(Fe(t)||Ut(t)||$t(t))}const{isSafeInteger:je}=Number,xe=je;const Te=q("Uint16Array"),Ne=z(Te),Re=q("Uint32Array"),Be=z(Re),Le=q("Uint8Array"),$e=z(Le),ke=q("Uint8ClampedArray"),De=z(ke),Ue=q("WeakMap"),Pe=z(Ue),qe=void 0!==globalThis.Deno,ze=void 0!==globalThis.process&&process.versions&&process.versions.node;function We(t,n=!0){return Boolean(t)&&n}function Ze(t,n){return pe(H(t,n))}const _e=JSON;const He=_e.stringify;function Ve(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${He(t)}\n\t\tExpected: ${He(n)}`,r)}async function Ke(t,n,e){const r=await t;return!(at(n)&&!1===await n(r,e))&&!Ze(r,n)||Ve(r,n,e)}const Ge=globalThis.structuredClone;async function Je(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);i(c)&&r(c)}return o}const s=at(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i(c)&&(s?o.set(e,c):o[e]=c)}return o}function Qe(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);i(c)&&o(c)}return r}const o=at(r.set);for(const[e,c]of t){const s=n(c,e,r,t);i(s)&&(o?r.set(e,s):r[e]=s)}return r}const Xe=Pt(u,l,vn,wn,Qe,Je);function Ye(t,n=c,e){const r=e||Qt(t);if(d(t)||Rt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function tr(t,n=c,e,r){if($t(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(d(t)||Rt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const nr=Pt(F,M,Cn,In,Ye,tr);function er(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const rr=er(s),or=er(I);function ir(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const cr=ir(a),sr=ir(O);const ur=Et(/\./);class ar{list=y(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const lr=y(ar);class fr{static models=new Map;constructor(t,n){i(n)?(dt(this,n),this.modelName=t,fr.models.set(t,n)):dt(this,t)}delete(t){fr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),fr.models.set(t||this.modelName,this)}has(t){return fr.models.has(t||this.modelName)}get(t){return fr.models.get(t||this.modelName)}}function hr(t){return new Promise(t)}class gr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Tt(t,(n=>{t[n]=new gr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new gr(e),!0)})}}class pr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const dr=y(pr);class mr{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function yr(t){return new mr(t)}function br(t){return i(t)?br[t]:L(br)}const Ar=globalThis.navigator?.userAgentData;if(Ar)Tt(Ar,((t,n)=>{ue(t)&&t&&(br[n]=t)})),s(Ar.brands,(t=>{br[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{br[t]=!0}))}function wr(t,n,e,r){return t.addEventListener(n,e,r),t}const vr=document.createDocumentFragment.bind(document);function Cr(t,n){return t.appendChild(n),n}function Ir(t,n){return d(n)?xn(n,K(n,(n=>t.getAttribute(n)))):(Tt(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Or=/^.[\w_-]+$/,Er=/^[A-Za-z]+$/,Sr=/\s/,Fr=document.getElementsByClassName.bind(document),Mr=document.getElementsByTagName.bind(document),jr=document.getElementById.bind(document),xr=document.querySelector.bind(document),Tr=document.querySelectorAll.bind(document);const Nr=document.createElement.bind(document);function Rr(t){const n=ur(t)&&t||`${t}.js`;return(t=>hr((n=>{wr(t,"load",n,!0),wr(t,"error",n,!0),Cr(xr("head"),t)})))(Ir(Nr("script"),{async:"",src:n}))}function Br(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&wr(document,"DOMContentLoaded",t),!1)}Br((()=>{const t=jr("AcidLib");Rr(t&&t.getAttribute("data-index")||"/index")}));const Lr=location.protocol,$r="http:"===Lr?"ws":"wss",kr=location.hostname,Dr={hardware:{cores:navigator.hardwareConcurrency},host:{name:kr,protocol:Lr,protocolSocket:$r}};function Ur(){dt(Dr,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Pr(){Ur()}Br(Pr),wr(window,"load",Pr,!0),wr(window,"resize",Pr,!0),t.hasLocal=void 0,function(n){try{n().removeItem("TESTING"),t.hasLocal=!0}catch(n){t.hasLocal=!1}}((()=>localStorage));class qr{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=yr(t)}hasLocal=t.hasLocal;setItem(t,n){return this.hasLocal&&this.local.setItem(t,ht(n)?n:He(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return i(n)?n:!i(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}const zr=(t,n)=>`color:${t};background:${n};`,Wr={alert:zr("#fff","#f44336"),important:zr("#fff","#E91E63"),notify:zr("#fff","#651FFF"),warning:zr("#000","#FFEA00")};t.BrowserStorage=qr,t.Chain=zt,t.Intervals=ar,t.Model=fr,t.Store=gr,t.Timers=_t,t.UniqID=pr,t.VirtualStorage=mr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.append=Cr,t.apply=Gt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return Me(t)||Me(n)?Ke(t,n,e):!(at(n)&&!1===n(t,e))&&!Ze(t,n)||Ve(t,n,e)},t.assertAsync=Ke,t.assign=dt,t.assignToClass=mt,t.assignToObject=pt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,(t=>at(t)?t.bind(n):t));return e?dt(e,r):r},t.browserStorage=function(t){return new qr(t)},t.cacheNativeMethod=ln,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Tn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return y(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(Z(t))return ut(t);if(d(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ut,t.clearIntervals=function(){Zt(setTimeout(Wt,0),(t=>{lr.remove(t)}))},t.clearTimers=function(){Zt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Ge(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.cnsl=(t,n)=>{const e=ht(t)?t:He(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wr[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},t.cnslTheme=(t,n,e)=>{Wr[t]=zr(n,e)},t.compact=function(t){if(_(t)){const n=L(t),e=n.length,r={};for(let o=0;oWe(t)))},t.compactKeys=function(t){const n=[];return Tt(t,((t,e)=>{i(t)&&n.push(e)})),n},t.compactMap=Xe,t.compactMapArray=u,t.compactMapAsyncArray=l,t.compactMapAsyncObject=wn,t.compactMapObject=vn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e},t.createFragment=vr,t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Vt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=gn,t.difference=v,t.divide=function(t,n){return t/n},t.drop=C,t.dropRight=(t,n=1,e=t.length)=>C(t,0,e-n),t.each=qt,t.eachArray=s,t.eachAsyncArray=a,t.eachAsyncObject=xt,t.eachObject=Tt,t.eachRight=I,t.eachRightAsync=O,t.ensureArray=b,t.ensureBuffer=function(t){return Z(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=bn,t.escapeRegex=En,t.escapeRegexRegex=On,t.eventAdd=wr,t.eventRemove=function(t,n,e,r){return t.removeEventListener(n,e,r),t},t.every=un,t.everyArg=function(...t){return Ut(t[0])?async function(...n){return un(t,(async t=>un(n,(async n=>t(n)))))}:function(...n){return un(t,(t=>un(n,(n=>t(n)))))}},t.everyArray=E,t.everyAsyncArray=S,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;ryt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=yt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>yt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(b(n))),[]);return e},t.flattenDeep=A,t.flow=rr,t.flowAsync=cr,t.flowAsyncRight=sr,t.flowRight=or,t.forEach=w,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else at(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=Bt,t.forOfAsync=kt,t.forOfCompactMap=Qe,t.forOfCompactMapAsync=Je,t.forOfEvery=cn,t.forOfEveryAsync=sn,t.forOfFilter=Ye,t.forOfFilterAsync=tr,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Pt,t.get=R,t.getByClass=Fr,t.getById=jr,t.getByTag=Mr,t.getEntries=function(t){if(i(t))return An(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return vt(t,n)[0]},t.getLowest=function(t,n){return At(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return E(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=hn,t.getPropNames=fn,t.getType=Jt,t.getTypeName=Xn,t.groupBy=function(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!oe(n)&&!oe(e)&&(n===e||(ht(n)?ht(e)?n.includes(e,r):Mn(e)?e.test(n):at(e)?e(n):d(e)?E(e,(e=>t(n,e))):un(e,(e=>t(n,e))):d(n)?Mn(e)?E(n,(t=>t.test(e))):at(e)?E(n,e):d(e)?E(e,(e=>t(n,e))):n.includes(e,r):!!_(n)&&(Mn(e)?on(n,(t=>t.test(e))):at(e)?on(n,e):_(e)?on(n,((t,n)=>t===e[n])):on(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=N(n);if(1===e.length)return $(t,n);{const n=e.pop(),r=R(e,t);return!!r&&$(r,n)}})))},t.hasDot=ur,t.hasKeys=k,t.hasLength=r,t.hasProp=pn,t.hasValue=i,t.htmlEntities=_n,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Gt(n,e,r):n(...r);if(_(n))return n[e]=t,n}},t.importjs=Rr,t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.info=Dr,t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,(t=>{if(E(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return lr.set(t,n)},t.intervals=lr,t.invert=function(t,n={}){if(t)return Tt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return G(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isAgent=br,t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=d,t.isArrayBuffer=le,t.isArrayBufferCall=ae,t.isArrayLike=function(t,n){if(oe(t)||at(t))return!1;if(d(t)||re(t))return!0;const e=t.length;if(!oe(e)||!ft(e)||e<0)return!1;if(n){const n=L(t);return!!n&&un(n,((t,n)=>n>=0&&ft(n)))}return!0},t.isAsync=Ut,t.isAsyncCall=Dt,t.isBigInt=ce,t.isBigIntCall=ie,t.isBoolean=ue,t.isBooleanCall=se,t.isBuffer=Z,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return fe.test(n)}return!1},t.isConstructor=D,t.isConstructorFactory=U,t.isConstructorNameFactory=q,t.isDate=ge,t.isDateCall=he,t.isDeno=qe,t.isDocumentReady=Br,t.isDom=function(t){return t&&9!==t.nodeType},t.isEmpty=function(t){return ht(t)||d(t)?!r(t):_(t)?!jn(t):!i(t)},t.isEnter=function(t){return 13===t.keyCode},t.isEqual=H,t.isEven=function(t){return!(1&t)},t.isF32=me,t.isF32Call=de,t.isF64=be,t.isF64Call=ye,t.isFalse=pe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=Ft,t.isFileJS=Mt,t.isFileJSON=jt,t.isFloat=we,t.isFunction=at,t.isGenerator=$t,t.isGeneratorCall=Lt,t.isHTMLCollection=function(t){return!!i(t)&&"[object HTMLCollection]"===t.toString()},t.isI16=Ce,t.isI16Call=ve,t.isI32=Oe,t.isI32Call=Ie,t.isI8=Se,t.isI8Call=Ee,t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Me,t.isMap=te,t.isMapCall=Yn,t.isMatchArray=function(t,n){return t.length===n.length&&E(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=L(t),r=L(n);return e.length===r.length&&E(e,(e=>t[e]===n[e]))},t.isNegative=h,t.isNodeList=function(t){return!!i(t)&&"[object NodeList]"===t.toString()},t.isNodejs=ze,t.isNotArray=function(t){return!d(t)},t.isNotNumber=function(t){return!ft(t)},t.isNotString=function(t){return!ht(t)},t.isNull=o,t.isNumber=ft,t.isNumberCall=lt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=_,t.isPositive=function(t){return 1===yn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Fe,t.isRegex=Mn,t.isRegexCall=Fn,t.isRelated=function(t,n){return!oe(t)&&!oe(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=xe,t.isSame=dn,t.isSameType=function(t,n){const e=Jt(t),r=Jt(n);return e===r&&e.name===r.name},t.isSet=Rt,t.isSetCall=Nt,t.isString=ht,t.isTrue=function(t){return!0===t},t.isTruthy=We,t.isTypeFactory=z,t.isTypedArray=re,t.isU16=Ne,t.isU16Call=Te,t.isU32=Be,t.isU32Call=Re,t.isU8=$e,t.isU8C=De,t.isU8CCall=ke,t.isU8Call=Le,t.isUndefined=e,t.isWeakMap=Pe,t.isWeakMapCall=Ue,t.isZero=bn,t.jsonParse=function(t,n){if(t)return _e.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Nn," ").trim().toLowerCase().replace(Rn,"-")},t.keys=L,t.largest=function(t){return V(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(kn," ").trim().toLowerCase()},t.map=en,t.mapArray=K,t.mapAsyncArray=G,t.mapAsyncObject=tn,t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{qt(e,((e,r)=>{if(n[r]&&(_(e)||d(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return i(n)?y(fr,[t,n]):R(t,fr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=oe,t.nodeAttribute=Ir,t.noop=Wt,t.notEqual=Ze,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=gt,t.objectEntries=An,t.objectSize=jn,t.omit=function(t,n){if(!t)return{};if(d(n)){const e=Sn(n);return Cn(t,((t,n)=>!e.test(n)))}if(Mn(n))return Cn(t,((t,e)=>!n.test(e)));if(ht(n))return Cn(t,((t,e)=>e!==n));if(ft(n)){const e=n.toString();return Cn(t,((t,n)=>n!==e))}return at(n)?Cn(t,((t,e)=>!n(t,e))):gt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=it,t.over=function(t){return(...n)=>en(t,(t=>t(...n)))},t.overEvery=function(t){return n=>un(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return K(t,(t=>Ct(t,n)))},t.pluckObject=Ct,t.promise=hr,t.propertyMatch=(t,n,e=L(t))=>E(e,(e=>H(t[e],n[e]))),t.querySelector=xr,t.querySelectorAll=Tr,t.randomFloat=function(t,n=0){return mn()*(t-n)+n},t.randomInt=tt,t.range=function(t,n,e=1,r=[]){return h(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Et,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return rt(t);if(1===n)return[t[tt(e-1,0)]];const r=[],o={};let i,c=0;for(;cIt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Ot(t,r,n,e)))},t.sortCollectionAscending=vt,t.sortCollectionAscendingFilter=wt,t.sortCollectionDescending=At,t.sortCollectionDescendingFilter=bt,t.sortNumberAscending=function(t){return t.sort(J)},t.sortNumberDescening=function(t){return t.sort(Q)},t.sortObjectsAlphabetically=It,t.sortObjectsAlphabeticallyReverse=Ot,t.sortUnique=ct,t.stringify=He,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=J,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=Q,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.themes=Wr,t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Vt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Vt,t.timers=Ht,t.times=Zt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Tt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return st(A(t))},t.uniqID=dr,t.unique=st,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rJn(t)))},t.upperFirstLetter=Gn,t.upperFirstOnly=Qn,t.upperFirstOnlyAll=function(t){return t.replace(Kn,(t=>Qn(t)))},t.virtualStorage=yr,t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Vn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=y(Map),e=[];return 2===t.length?v(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),w(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=xn})); //# sourceMappingURL=browser.js.map diff --git a/package/index.js b/package/index.js index 185e186..2106920 100644 --- a/package/index.js +++ b/package/index.js @@ -1,2 +1,2 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:fs/promises"),require("node:path"),require("node:url"),require("path")):"function"==typeof define&&define.amd?define(["exports","node:fs/promises","node:path","node:url","path"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={},t.promises,t.path,t.node_url,t.path$1)}(this,(function(t,n,e,r,o){"use strict";function i(t){return t.length=0,t}function c(t){return void 0===t}function s(t){return Boolean(t.length)}function u(t){return null===t}function a(t){return!c(t)&&!u(t)}function f(t){return t}function l(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const u=n.call(r,t,i,e,c,s,o);a(u)&&e.push(u)})):l(t,((t,i,c,s)=>{const u=n(t,i,e,c,s,r,o);a(u)&&e.push(u)})),e}async function p(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const i=await n(t,r,e,o);a(i)&&e.push(i)})),e}const{sign:d}=Math;function y(t){return-1===d(t)}function m(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const b=Array.isArray;const w=Reflect.construct;function v(t,n=[],e){const r=b(n)?n:[n];return e?w(t,r,e):w(t,r)}function C(t){return b(t)&&t||a(t)&&[t]||[]}function O(t){return t.flat(1/0)}function I(t,n){return t.forEach(n),t}function j(...t){const n=v(Map),e=[];return l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function F(t,n=1,e=t.length){return t.splice(n,e)}function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function E(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function R(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function T(t,n,e=[],r){return await p(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const N=/\.|\[/,B=/]/g,P="";function U(t){return t.replace(B,P).split(N)}function k(t,n){if(!n)return!1;let e=n;return R(b(t)?t:U(t),(t=>(e=e[t],a(e)))),e}const $=Object.keys;function D(t){if(t)return $(t)}const L=Object.hasOwn;function q(t,...n){if(t)return R(n,(n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}}))}function _(t,n){return t?.constructor===n||!1}function V(t){return n=>_(n,t)}function Z(t){return t?.constructor?.name}function K(t){return n=>Z(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&R(e,t):t(n)}}const W=K("Buffer"),G=z(W),J=t=>!!a(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(G(t))return t.equals(n);if(t.toString()===n.toString())if(J(t)){const e=D(t);if(q(n,e))return R(e,(e=>H(t[e],n[e])))}else if(b(t)&&t.length===n.length)return R(t,((t,e)=>H(t,n[e])));return!1};const Q=Math.max;function X(t,n,e=[],r,o){return a(r)?l(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):l(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function Y(t,n){const e=[];return await p(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function tt(t,n){return t-n}function nt(t,n){return n-t}const{floor:et,random:rt}=Math;function ot(t,n=0){return et(rt()*(t-n))+n}const it=Array.from;function ct(t,n,e){if(a(t))return it(t,n,e)}function st(t,n=t.length){if(t.length<=1)return ct(t);const e=ct(t);let r,o,i=0;for(;i!!a(t)&&t instanceof Function,gt=K("Number"),dt=z(gt);const yt=V(String);const mt=Object.assign;function At(t,n){if(J(n))mt(t,n);else if(pt(n)){const e=n.name;e?t[e]=n:mt(t,n)}else(yt(n)||dt(n))&&(t[n]=n);return t}function bt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function Ot(t,n="id",e){return t.sort(((t,r)=>Ct(t,r,n,e)))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function jt(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))}function Ft(t,n){if(t)return yt(n)?t[n]:X(n,(n=>t[n]))}function Mt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Et(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Rt(t){return n=>!!a(n)&&t.test(n)}const St=Rt(/\.css$/),xt=Rt(/\.html$/),Tt=Rt(/\.js$/),Nt=Rt(/\.json$/);const Bt=async(t,n,e,r)=>{if(!t)return;const o=D(t);return a(e)?await p(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await p(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Pt(t,n,e,r){if(!t)return;const o=D(t);return a(e)?l(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):l(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Ut=K("Set"),kt=z(Ut);function $t(t,n){if(kt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Dt=K("GeneratorFunction"),Lt=z(Dt);async function qt(t,n,e){if(kt(t)){for(const e of t)await n(e,t);return t}if(Lt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const _t=K("AsyncFunction"),Vt=z(_t);function Zt(t,n,e,r,o,i){return(c,s,u,f,l)=>{let h;const p=Vt(s);if(a(c)&&s)return h=b(c)?p?n:t:J(c)||pt(c)?p?r:e:o?p?i:o:Lt(c)?i:p?r:e,h(c,s,u,f,l)}}const Kt=Zt(l,p,Pt,Bt,$t,qt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Kt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Gt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=v(Jt);function Qt(t,n){return Ht.set(t,n)}const Xt=Reflect.apply;function Yt(t,n,e){if(pt(t))return Xt(t,n,e)}function tn(t){return t?.constructor}function nn(t,n=[]){const e=tn(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function en(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function rn(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function on(t,n,e={}){if(t)return await Bt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function cn(t,n,e={},r,o){if(t)return a(r)?Pt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Pt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const sn=Zt(X,Y,cn,on,en,rn);async function un(t,n){if(!t)return;return S(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function an(t,n){if(!t)return;return R(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function fn(t,n=f){if(b(t)||kt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function ln(t,n=f,e){if(Lt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(b(t)||kt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const hn=Zt(R,S,an,un,fn,ln);const pn=Function.prototype;function gn(t){return pn.call.bind(t)}const dn=Object.getOwnPropertyNames,yn=Object.getOwnPropertyDescriptor,mn=Object.defineProperty,An=gn(Object.hasOwnProperty),bn=Object.is;const{random:wn}=Math;const{sign:vn}=Math;function Cn(t){return 0===t}const On=Object.entries;async function In(t,n=f,e={}){return await Bt(t,(async(t,r,o,i,c)=>{const s=await n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function jn(t,n=f,e={}){return Pt(t,((t,r,o,i,c)=>{const s=n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function Fn(t,n,e={}){return Pt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function Mn(t,n,e={}){return await Bt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const En=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Rn(t){return t.replace(En,"\\$&")}function Sn(t,n){return n?Sn(X(t,Rn)):RegExp(t.join("|"))}const xn=K("RegExp"),Tn=z(xn);function Nn(t){if(!t)return;if(J(t))return D(t).length;const n=t.length;if(a(n))return n;const e=t.size;return a(n)?e:D(t).length}const Bn=/[ _-]+/g;const Pn=/[ _-]+/g,Un=/[ ]+/g;const kn=/[ _-]+/g,$n=/[ ]+/g;const Dn=/[ _-]+/g;const Ln=/[ _-]+/g;function qn(t,n=1){return t.substring(n)}const _n=/%(?![\da-f]{2})/gi,Vn=/&/g,Zn=//g,zn=/"/g;function Wn(t){return decodeURIComponent(t.replace(_n,(()=>"%25")))}function Gn(t){return t.replace(Vn,"&").replace(Zn,"<").replace(Kn,">").replace(zn,""")}const Jn=/\S+/g,Hn=/\w+/g;const Qn=/\w+/g;function Xn(t){return t[0].toUpperCase()}function Yn(t){return Xn(t)+qn(t)}function te(t){return Xn(t)+qn(t).toLowerCase()}function ne(t){return tn(t)?.name}const ee=K("Map"),re=z(ee),oe=/Array/,ie="Array";function ce(t){if(t){const n=ne(t);if(oe.test(n)&&n!==ie)return!0}return!1}function se(t){return!a(t)}const ue=K("BigInt"),ae=z(ue),fe=K("Boolean"),le=z(fe),he=K("ArrayBuffer"),pe=z(he);const ge=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const de=K("Date"),ye=z(de);function me(t){return!1===t}const Ae=K("Float32Array"),be=z(Ae),we=K("Float64Array"),ve=z(we),{isInteger:Ce}=Number,Oe=Ce,Ie=K("Int16Array"),je=z(Ie),Fe=K("Int32Array"),Me=z(Fe),Ee=K("Int8Array"),Re=z(Ee);function Se(t){return!!t&&t instanceof Promise}function xe(t){return!!t&&(Se(t)||Vt(t)||Lt(t))}const{isSafeInteger:Te}=Number,Ne=Te;const Be=K("Uint16Array"),Pe=z(Be),Ue=K("Uint32Array"),ke=z(Ue),$e=K("Uint8Array"),De=z($e),Le=K("Uint8ClampedArray"),qe=z(Le),_e=K("WeakMap"),Ve=z(_e),Ze=void 0!==globalThis.Deno,Ke=void 0!==globalThis.process&&process.versions&&process.versions.node;function ze(t,n=!0){return Boolean(t)&&n}function We(t,n){return me(H(t,n))}const Ge=JSON;const Je=Ge.stringify;function He(t,n,e){const r=globalThis.options||e;let o;return pt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Je(t)}\n\t\tExpected: ${Je(n)}`,r)}async function Qe(t,n,e){const r=await t;return!(pt(n)&&!1===await n(r,e))&&!We(r,n)||He(r,n,e)}const Xe=globalThis.structuredClone;async function Ye(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);a(r)&&e.push(r)}return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const i=await n(e,o,t);a(i)&&r(i)}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);a(c)&&(i?o.set(e,c):o[e]=c)}return o}function tr(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const i=n(e,r,t);a(i)&&o(i)}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);a(c)&&(o?r.set(e,c):r[e]=c)}return r}const nr=Zt(h,g,jn,In,tr,Ye);function er(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=pt(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function rr(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=pt(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const or=Zt(x,T,Fn,Mn,er,rr);function ir(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const cr=ir(l),sr=ir(M);function ur(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ar=ur(p),fr=ur(E);const lr=Rt(/\./);class hr{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=v(hr);class gr{static models=new Map;constructor(t,n){a(n)?(bt(this,n),this.modelName=t,gr.models.set(t,n)):bt(this,t)}delete(t){gr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),gr.models.set(t||this.modelName,this)}has(t){return gr.models.has(t||this.modelName)}get(t){return gr.models.get(t||this.modelName)}}class dr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Pt(t,(n=>{t[n]=new dr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new dr(e),!0)})}}class yr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return a(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const mr=v(yr);class Ar{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):a(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=nn(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=zt,t.Intervals=hr,t.Model=gr,t.Store=dr,t.Timers=Jt,t.UniqID=yr,t.VirtualStorage=Ar,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Yt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return l(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return xe(t)||xe(n)?Qe(t,n,e):!(pt(n)&&!1===n(t,e))&&!We(t,n)||He(t,n,e)},t.assertAsync=Qe,t.assign=bt,t.assignToClass=wt,t.assignToObject=At,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=sn(t,(t=>pt(t)?t.bind(n):t));return e?bt(e,r):r},t.cacheNativeMethod=gn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Bn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return v(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(G(t))return ht(t);if(b(t))return i(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=i,t.clearBuffer=ht,t.clearIntervals=function(){Gt(setTimeout(Wt,0),(t=>{pr.remove(t)}))},t.clearTimers=function(){Gt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Xe(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=nn,t.compact=function(t){if(J(t)){const n=D(t),e=n.length,r={};for(let o=0;oze(t)))},t.compactKeys=function(t){const n=[];return Pt(t,((t,e)=>{a(t)&&n.push(e)})),n},t.compactMap=nr,t.compactMapArray=h,t.compactMapAsyncArray=g,t.compactMapAsyncObject=In,t.compactMapObject=jn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{const c=e.join(r,i);if((await n.stat(c)).isDirectory()){const s=e.join(o,i.replace(r,""));await n.mkdir(s,{recursive:!0}),await t(c,s)}else await async function(t,r,o){const i=e.join(t,o),c=e.join(r,o);await n.copyFile(i,c)}(r,o,i)})),!0},t.countBy=function(t,n){const e={};let r;return l(t,(t=>{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return l(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return l(t,(t=>{t[n]||e++})),e},t.currentFile=function(t){return globalThis.__filename?__filename:r.fileURLToPath(t.url)},t.currentPath=function(t){return globalThis.__dirname?__dirname:o.dirname(r.fileURLToPath(t.url))},t.curry=function(t,n=t.length){const e=[],r=(...o)=>{if(e.push(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.curryRight=function(t,n=t.length){const e=[],r=(...o)=>{if(e.unshift(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Qt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=mn,t.difference=j,t.divide=function(t,n){return t/n},t.drop=F,t.dropRight=(t,n=1,e=t.length)=>F(t,0,e-n),t.each=Kt,t.eachArray=l,t.eachAsyncArray=p,t.eachAsyncObject=Bt,t.eachObject=Pt,t.eachRight=M,t.eachRightAsync=E,t.ensureArray=C,t.ensureBuffer=function(t){return G(t)&&t||a(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=Cn,t.escapeRegex=Rn,t.escapeRegexRegex=En,t.every=hn,t.everyArg=function(...t){return Vt(t[0])?async function(...n){return hn(t,(async t=>hn(n,(async n=>t(n)))))}:function(...n){return hn(t,(t=>hn(n,(n=>t(n)))))}},t.everyArray=R,t.everyAsyncArray=S,t.everyAsyncObject=un,t.everyObject=an,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rvt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=vt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>vt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(C(n))),[]);return e},t.flattenDeep=O,t.flow=cr,t.flowAsync=ar,t.flowAsyncRight=fr,t.flowRight=sr,t.forEach=I,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else pt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=$t,t.forOfAsync=qt,t.forOfCompactMap=tr,t.forOfCompactMapAsync=Ye,t.forOfEvery=fn,t.forOfEveryAsync=ln,t.forOfFilter=er,t.forOfFilterAsync=rr,t.forOfMap=en,t.forOfMapAsync=rn,t.generateLoop=Zt,t.get=k,t.getEntries=function(t){if(a(t))return On(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return jt(t,n)[0]},t.getLowest=function(t,n){return Ot(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return R(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=yn,t.getPropNames=dn,t.getType=tn,t.getTypeName=ne,t.groupBy=function(t,n){const e={};return l(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!se(n)&&!se(e)&&(n===e||(yt(n)?yt(e)?n.includes(e,r):Tn(e)?e.test(n):pt(e)?e(n):b(e)?R(e,(e=>t(n,e))):hn(e,(e=>t(n,e))):b(n)?Tn(e)?R(n,(t=>t.test(e))):pt(e)?R(n,e):b(e)?R(e,(e=>t(n,e))):n.includes(e,r):!!J(n)&&(Tn(e)?an(n,(t=>t.test(e))):pt(e)?an(n,e):J(e)?an(n,((t,n)=>t===e[n])):an(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}})))},t.hasDot=lr,t.hasKeys=q,t.hasLength=s,t.hasProp=An,t.hasValue=a,t.htmlEntities=Gn,t.ifInvoke=function(t,n,...e){if(pt(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!a(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(a(t)){if(pt(n))return e?Yt(n,e,r):n(...r);if(J(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return h(t,(t=>{if(R(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return pr.set(t,n)},t.intervals=pr,t.invert=function(t,n={}){if(t)return Pt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(a(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return Y(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!a(t)&&"[object Arguments]"===t.toString()},t.isArray=b,t.isArrayBuffer=pe,t.isArrayBufferCall=he,t.isArrayLike=function(t,n){if(se(t)||pt(t))return!1;if(b(t)||ce(t))return!0;const e=t.length;if(!se(e)||!dt(e)||e<0)return!1;if(n){const n=D(t);return!!n&&hn(n,((t,n)=>n>=0&&dt(n)))}return!0},t.isAsync=Vt,t.isAsyncCall=_t,t.isBigInt=ae,t.isBigIntCall=ue,t.isBoolean=le,t.isBooleanCall=fe,t.isBuffer=G,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(a(t)){const n=t?.constructor?.name;return ge.test(n)}return!1},t.isConstructor=_,t.isConstructorFactory=V,t.isConstructorNameFactory=K,t.isDate=ye,t.isDateCall=de,t.isDeno=Ze,t.isEmpty=function(t){return yt(t)||b(t)?!s(t):J(t)?!Nn(t):!a(t)},t.isEqual=H,t.isF32=be,t.isF32Call=Ae,t.isF64=ve,t.isF64Call=we,t.isFalse=me,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=xt,t.isFileJS=Tt,t.isFileJSON=Nt,t.isFloat=Oe,t.isFunction=pt,t.isGenerator=Lt,t.isGeneratorCall=Dt,t.isI16=je,t.isI16Call=Ie,t.isI32=Me,t.isI32Call=Fe,t.isI8=Re,t.isI8Call=Ee,t.isIterable=function(t){return a(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=xe,t.isMap=re,t.isMapCall=ee,t.isMatchArray=function(t,n){return t.length===n.length&&R(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=D(t),r=D(n);return e.length===r.length&&R(e,(e=>t[e]===n[e]))},t.isNegative=y,t.isNodejs=Ke,t.isNotArray=function(t){return!b(t)},t.isNotNumber=function(t){return!dt(t)},t.isNotString=function(t){return!yt(t)},t.isNull=u,t.isNumber=dt,t.isNumberCall=gt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=J,t.isPositive=function(t){return 1===vn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Se,t.isRegex=Tn,t.isRegexCall=xn,t.isRelated=function(t,n){return!se(t)&&!se(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Ne,t.isSame=bn,t.isSameType=function(t,n){const e=tn(t),r=tn(n);return e===r&&e.name===r.name},t.isSet=kt,t.isSetCall=Ut,t.isString=yt,t.isTrue=function(t){return!0===t},t.isTruthy=ze,t.isTypeFactory=z,t.isTypedArray=ce,t.isU16=Pe,t.isU16Call=Be,t.isU32=ke,t.isU32Call=Ue,t.isU8=De,t.isU8C=qe,t.isU8CCall=Le,t.isU8Call=$e,t.isUndefined=c,t.isWeakMap=Ve,t.isWeakMapCall=_e,t.isZero=Cn,t.jsonParse=function(t,n){if(t)return Ge.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase().replace(Un,"-")},t.keys=D,t.largest=function(t){return Q(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Ln," ").trim().toLowerCase()},t.map=sn,t.mapArray=X,t.mapAsyncArray=Y,t.mapAsyncObject=on,t.mapObject=cn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{Kt(e,((e,r)=>{if(n[r]&&(J(e)||b(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return a(n)?v(gr,[t,n]):k(t,gr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=se,t.noop=Wt,t.notEqual=We,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=mt,t.objectEntries=On,t.objectSize=Nn,t.omit=function(t,n){if(!t)return{};if(b(n)){const e=Sn(n);return Fn(t,((t,n)=>!e.test(n)))}if(Tn(n))return Fn(t,((t,e)=>!n.test(e)));if(yt(n))return Fn(t,((t,e)=>e!==n));if(dt(n)){const e=n.toString();return Fn(t,((t,n)=>n!==e))}return pt(n)?Fn(t,((t,e)=>!n(t,e))):mt({},t)},t.once=t=>{let n;return(...e)=>(a(n)||(n=t(...e)),n)},t.onlyUnique=at,t.over=function(t){return(...n)=>sn(t,(t=>t(...n)))},t.overEvery=function(t){return n=>hn(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[h(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return l(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return X(t,(t=>Ft(t,n)))},t.pluckObject=Ft,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=D(t))=>R(e,(e=>H(t[e],n[e]))),t.randomFloat=function(t,n=0){return wn()*(t-n)+n},t.randomInt=ot,t.range=function(t,n,e=1,r=[]){return y(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Rt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return st(t);if(1===n)return[t[ot(e-1,0)]];const r=[],o={};let i,c=0;for(;cMt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Et(t,r,n,e)))},t.sortCollectionAscending=jt,t.sortCollectionAscendingFilter=It,t.sortCollectionDescending=Ot,t.sortCollectionDescendingFilter=Ct,t.sortNumberAscending=function(t){return t.sort(tt)},t.sortNumberDescening=function(t){return t.sort(nt)},t.sortObjectsAlphabetically=Mt,t.sortObjectsAlphabeticallyReverse=Et,t.sortUnique=ft,t.stringify=Je,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=tt,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=nt,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Qt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Qt,t.timers=Ht,t.times=Gt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Pt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return lt(O(t))},t.uniqID=mr,t.unique=lt,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rYn(t)))},t.upperFirstLetter=Xn,t.upperFirstOnly=te,t.upperFirstOnlyAll=function(t){return t.replace(Qn,(t=>te(t)))},t.virtualStorage=function(t){return new Ar(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Hn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=v(Map),e=[];return 2===t.length?j(t[0],t[1]):(l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return l(t,((t,r)=>{e[t]=n[r]})),e}})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:fs/promises"),require("node:path"),require("node:url"),require("path")):"function"==typeof define&&define.amd?define(["exports","node:fs/promises","node:path","node:url","path"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={},t.promises,t.path,t.node_url,t.path$1)}(this,(function(t,n,e,r,o){"use strict";function i(t){return t.length=0,t}function c(t){return void 0===t}function s(t){return Boolean(t.length)}function u(t){return null===t}function a(t){return!c(t)&&!u(t)}function f(t){return t}function l(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const u=n.call(r,t,i,e,c,s,o);a(u)&&e.push(u)})):l(t,((t,i,c,s)=>{const u=n(t,i,e,c,s,r,o);a(u)&&e.push(u)})),e}async function p(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i{const i=await n(t,r,e,o);a(i)&&e.push(i)})),e}const{sign:d}=Math;function y(t){return-1===d(t)}function m(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}const b=Array.isArray;const w=Reflect.construct;function v(t,n=[],e){const r=b(n)?n:[n];return e?w(t,r,e):w(t,r)}function C(t){return b(t)&&t||a(t)&&[t]||[]}function O(t){return t.flat(1/0)}function I(t,n){return t.forEach(n),t}function j(...t){const n=v(Map),e=[];return l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function F(t,n=1,e=t.length){return t.splice(n,e)}function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function E(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function R(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,i,c,r)&&e.push(t)})),e}async function T(t,n,e=[],r){return await p(t,(async(t,o,i,c)=>{!0===await n(t,o,e,i,c,r)&&e.push(t)})),e}const N=/\.|\[/,B=/]/g,P="";function U(t){return t.replace(B,P).split(N)}function k(t,n){if(!n)return!1;let e=n;return R(b(t)?t:U(t),(t=>(e=e[t],a(e)))),e}const $=Object.keys;function D(t){if(t)return $(t)}const L=Object.hasOwn;function q(t,...n){if(t)return R(n,(n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}}))}function _(t,n){return t?.constructor===n||!1}function V(t){return n=>_(n,t)}function Z(t){return t?.constructor?.name}function K(t){return n=>Z(n)===t||!1}function z(t){return function(n,...e){return e?t(n)&&R(e,t):t(n)}}const W=K("Buffer"),G=z(W),J=t=>!!a(t)&&"Object("===t.constructor.toString().trim().slice(9,16),H=(t,n)=>{if(t===n)return!0;if(G(t))return t.equals(n);if(t.toString()===n.toString())if(J(t)){const e=D(t);if(q(n,e))return R(e,(e=>H(t[e],n[e])))}else if(b(t)&&t.length===n.length)return R(t,((t,e)=>H(t,n[e])));return!1};const Q=Math.max;function X(t,n,e=[],r,o){return a(r)?l(t,((t,i,c,s)=>{e[i]=n.call(r,t,i,e,c,s,o)})):l(t,((t,r,i,c)=>{e[r]=n(t,r,e,i,c,o)})),e}async function Y(t,n){const e=[];return await p(t,(async(t,r,o)=>{e[r]=await n(t,r,e,o)})),e}function tt(t,n){return t-n}function nt(t,n){return n-t}const{floor:et,random:rt}=Math;function ot(t,n=0){return et(rt()*(t-n))+n}const it=Array.from;function ct(t,n,e){if(a(t))return it(t,n,e)}function st(t,n=t.length){if(t.length<=1)return ct(t);const e=ct(t);let r,o,i=0;for(;i!!a(t)&&t instanceof Function,gt=K("Number"),dt=z(gt);const yt=V(String);const mt=Object.assign;function At(t,n){if(J(n))mt(t,n);else if(pt(n)){const e=n.name;e?t[e]=n:mt(t,n)}else(yt(n)||dt(n))&&(t[n]=n);return t}function bt(t,...n){const e=n.length;for(let r=0;ri?-1:0:1:-1}function Ot(t,n="id",e){return t.sort(((t,r)=>Ct(t,r,n,e)))}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?oi?1:0:-1:1}function jt(t,n="id",e){return t.sort(((t,r)=>It(t,r,n,e)))}function Ft(t,n){if(t)return yt(n)?t[n]:X(n,(n=>t[n]))}function Mt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Et(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Rt(t){return n=>!!a(n)&&t.test(n)}const St=Rt(/\.css$/),xt=Rt(/\.html$/),Tt=Rt(/\.js$/),Nt=Rt(/\.json$/);const Bt=async(t,n,e,r)=>{if(!t)return;const o=D(t);return a(e)?await p(o,((i,c,s,u)=>n.call(e,t[i],i,t,u,o,r))):await p(o,((e,i,c,s)=>n(t[e],e,t,s,o,r))),t};function Pt(t,n,e,r){if(!t)return;const o=D(t);return a(e)?l(o,((o,i,c,s)=>{n.call(e,t[o],o,t,s,c,r)})):l(o,((e,o,i,c)=>{n(t[e],e,t,c,i,r)})),t}const Ut=K("Set"),kt=z(Ut);function $t(t,n){if(kt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const Dt=K("GeneratorFunction"),Lt=z(Dt);async function qt(t,n,e){if(kt(t)){for(const e of t)await n(e,t);return t}if(Lt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const _t=K("AsyncFunction"),Vt=z(_t);function Zt(t,n,e,r,o,i){return(c,s,u,f,l)=>{let h;const p=Vt(s);if(a(c)&&s)return h=b(c)?p?n:t:J(c)||pt(c)?p?r:e:o?p?i:o:Lt(c)?i:p?r:e,h(c,s,u,f,l)}}const Kt=Zt(l,p,Pt,Bt,$t,qt);class zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Kt(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Wt(){}function Gt(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ht=v(Jt);function Qt(t,n){return Ht.set(t,n)}const Xt=Reflect.apply;function Yt(t,n,e){if(pt(t))return Xt(t,n,e)}function tn(t){return t?.constructor}function nn(t,n=[]){const e=tn(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function en(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);o?r.set(e,c):r[e]=c}return r}async function rn(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);i?o.set(e,c):o[e]=c}return o}async function on(t,n,e={}){if(t)return await Bt(t,(async(t,r,o,i,c)=>{e[r]=await n(t,r,e,o,i,c)})),e}function cn(t,n,e={},r,o){if(t)return a(r)?Pt(t,((t,i,c,s,u)=>{e[i]=n.call(r,t,i,e,c,s,u,o)})):Pt(t,((t,r,i,c,s)=>{e[r]=n(t,r,e,i,c,s,o)})),e}const sn=Zt(X,Y,cn,on,en,rn);async function un(t,n){if(!t)return;return S(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function an(t,n){if(!t)return;return R(D(t),((e,r,o,i)=>n(t[e],e,t,i,o)))}function fn(t,n=f){if(b(t)||kt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function ln(t,n=f,e){if(Lt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(b(t)||kt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const hn=Zt(R,S,an,un,fn,ln);const pn=Function.prototype;function gn(t){return pn.call.bind(t)}const dn=Object.getOwnPropertyNames,yn=Object.getOwnPropertyDescriptor,mn=Object.defineProperty,An=gn(Object.hasOwnProperty),bn=Object.is;const{random:wn}=Math;const{sign:vn}=Math;function Cn(t){return 0===t}const On=Object.entries;async function In(t,n=f,e={}){return await Bt(t,(async(t,r,o,i,c)=>{const s=await n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function jn(t,n=f,e={}){return Pt(t,((t,r,o,i,c)=>{const s=n(t,r,e,o,i,c);a(s)&&(e[r]=s)})),e}function Fn(t,n,e={}){return Pt(t,((t,r,o,i,c)=>{!0===n(t,r,e,o,i,c)&&(e[r]=t)})),e}async function Mn(t,n,e={}){return await Bt(t,(async(t,r,o,i,c)=>{!0===await n(t,r,e,o,i,c)&&(e[r]=t)})),e}const En=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Rn(t){return t.replace(En,"\\$&")}function Sn(t,n){return n?Sn(X(t,Rn)):RegExp(t.join("|"))}const xn=K("RegExp"),Tn=z(xn);function Nn(t){if(!t)return;if(J(t))return D(t).length;const n=t.length;if(a(n))return n;const e=t.size;return a(n)?e:D(t).length}const Bn=/[ _-]+/g;const Pn=/[ _-]+/g,Un=/[ ]+/g;const kn=/[ _-]+/g,$n=/[ ]+/g;const Dn=/[ _-]+/g;const Ln=/[ _-]+/g;function qn(t,n=1){return t.substring(n)}const _n=/%(?![\da-f]{2})/gi,Vn=/&/g,Zn=//g,zn=/"/g;function Wn(t){return decodeURIComponent(t.replace(_n,(()=>"%25")))}function Gn(t){return t.replace(Vn,"&").replace(Zn,"<").replace(Kn,">").replace(zn,""")}const Jn=/\S+/g,Hn=/\w+/g;const Qn=/\w+/g;function Xn(t){return t[0].toUpperCase()}function Yn(t){return Xn(t)+qn(t)}function te(t){return Xn(t)+qn(t).toLowerCase()}function ne(t){return tn(t)?.name}const ee=K("Map"),re=z(ee),oe=/Array/,ie="Array";function ce(t){if(t){const n=ne(t);if(oe.test(n)&&n!==ie)return!0}return!1}function se(t){return!a(t)}const ue=K("BigInt"),ae=z(ue),fe=K("Boolean"),le=z(fe),he=K("ArrayBuffer"),pe=z(he);const ge=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const de=K("Date"),ye=z(de);function me(t){return!1===t}const Ae=K("Float32Array"),be=z(Ae),we=K("Float64Array"),ve=z(we),{isInteger:Ce}=Number,Oe=Ce,Ie=K("Int16Array"),je=z(Ie),Fe=K("Int32Array"),Me=z(Fe),Ee=K("Int8Array"),Re=z(Ee);function Se(t){return!!t&&t instanceof Promise}function xe(t){return!!t&&(Se(t)||Vt(t)||Lt(t))}const{isSafeInteger:Te}=Number,Ne=Te;const Be=K("Uint16Array"),Pe=z(Be),Ue=K("Uint32Array"),ke=z(Ue),$e=K("Uint8Array"),De=z($e),Le=K("Uint8ClampedArray"),qe=z(Le),_e=K("WeakMap"),Ve=z(_e),Ze=void 0!==globalThis.Deno,Ke=void 0!==globalThis.process&&process.versions&&process.versions.node;function ze(t,n=!0){return Boolean(t)&&n}function We(t,n){return me(H(t,n))}const Ge=JSON;const Je=Ge.stringify;function He(t,n,e){const r=globalThis.options||e;let o;return pt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Je(t)}\n\t\tExpected: ${Je(n)}`,r)}async function Qe(t,n,e){const r=await t;return!(pt(n)&&!1===await n(r,e))&&!We(r,n)||He(r,n,e)}const Xe=globalThis.structuredClone;async function Ye(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);a(r)&&e.push(r)}return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const i=await n(e,o,t);a(i)&&r(i)}return o}const i=pt(o.set);for await(const[e,r]of t){const c=await n(r,e,o,t);a(c)&&(i?o.set(e,c):o[e]=c)}return o}function tr(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const i=n(e,r,t);a(i)&&o(i)}return r}const o=pt(r.set);for(const[e,i]of t){const c=n(i,e,r,t);a(c)&&(o?r.set(e,c):r[e]=c)}return r}const nr=Zt(h,g,jn,In,tr,Ye);function er(t,n=f,e){const r=e||nn(t);if(b(t)||kt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=pt(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function rr(t,n=f,e,r){if(Lt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||nn(t);if(b(t)||kt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=pt(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const or=Zt(x,T,Fn,Mn,er,rr);function ir(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const cr=ir(l),sr=ir(M);function ur(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const ar=ur(p),fr=ur(E);const lr=Rt(/\./);class hr{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=v(hr);class gr{static models=new Map;constructor(t,n){a(n)?(bt(this,n),this.modelName=t,gr.models.set(t,n)):bt(this,t)}delete(t){gr.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),gr.models.set(t||this.modelName,this)}has(t){return gr.models.has(t||this.modelName)}get(t){return gr.models.get(t||this.modelName)}}class dr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Pt(t,(n=>{t[n]=new dr(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new dr(e),!0)})}}class yr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return a(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const mr=v(yr);class Ar{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):a(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=nn(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=zt,t.Intervals=hr,t.Model=gr,t.Store=dr,t.Timers=Jt,t.UniqID=yr,t.VirtualStorage=Ar,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Yt,t.arrayToRegex=Sn,t.arraysToObject=function(t,n){const e={};return l(t,((t,r)=>{e[n[r]]=t})),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){return xe(t)||xe(n)?Qe(t,n,e):!(pt(n)&&!1===n(t,e))&&!We(t,n)||He(t,n,e)},t.assertAsync=Qe,t.assign=bt,t.assignToClass=wt,t.assignToObject=At,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=sn(t,(t=>pt(t)?t.bind(n):t));return e?bt(e,r):r},t.cacheNativeMethod=gn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Bn," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n},t.chain=function(t){return v(zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clear=function(t){if(t){if(G(t))return ht(t);if(b(t))return i(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=i,t.clearBuffer=ht,t.clearIntervals=function(){Gt(setTimeout(Wt,0),(t=>{pr.remove(t)}))},t.clearTimers=function(){Gt(setTimeout(Wt,0),(t=>{Ht.remove(t)}))},t.clone=function(t){return Xe(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=nn,t.compact=function(t){if(J(t)){const n=D(t),e=n.length,r={};for(let o=0;oze(t)))},t.compactKeys=function(t){const n=[];return Pt(t,((t,e)=>{a(t)&&n.push(e)})),n},t.compactMap=nr,t.compactMapArray=h,t.compactMapAsyncArray=g,t.compactMapAsyncObject=In,t.compactMapObject=jn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{const c=e.join(r,i);if((await n.stat(c)).isDirectory()){const s=e.join(o,i.replace(r,""));await n.mkdir(s,{recursive:!0}),await t(c,s)}else await async function(t,r,o){const i=e.join(t,o),c=e.join(r,o);await n.copyFile(i,c)}(r,o,i)})),!0},t.countBy=function(t,n){const e={};let r;return l(t,(t=>{r=n(t),e[r]||(e[r]=0),e[r]++})),e},t.countKey=function(t,n){let e=0;return l(t,(t=>{t[n]&&e++})),e},t.countWithoutKey=function(t,n){let e=0;return l(t,(t=>{t[n]||e++})),e},t.currentFile=function(t){return globalThis.__filename?__filename:r.fileURLToPath(t.url)},t.currentPath=function(t){return globalThis.__dirname?__dirname:o.dirname(r.fileURLToPath(t.url))},t.curry=function(t,n=t.length){const e=[],r=(...o)=>{if(e.push(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.curryRight=function(t,n=t.length){const e=[],r=(...o)=>{if(e.unshift(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.debounce=function(t,n){function e(...t){!1!==e.id&&Ht.remove(e.id),e.id=Qt((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Ht.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=mn,t.difference=j,t.divide=function(t,n){return t/n},t.drop=F,t.dropRight=(t,n=1,e=t.length)=>F(t,0,e-n),t.each=Kt,t.eachArray=l,t.eachAsyncArray=p,t.eachAsyncObject=Bt,t.eachObject=Pt,t.eachRight=M,t.eachRightAsync=E,t.ensureArray=C,t.ensureBuffer=function(t){return G(t)&&t||a(t)&&Buffer.from(t)||Buffer.alloc(0)},t.equalsZero=Cn,t.escapeRegex=Rn,t.escapeRegexRegex=En,t.every=hn,t.everyArg=function(...t){return Vt(t[0])?async function(...n){return hn(t,(async t=>hn(n,(async n=>t(n)))))}:function(...n){return hn(t,(t=>hn(n,(n=>t(n)))))}},t.everyArray=R,t.everyAsyncArray=S,t.everyAsyncObject=un,t.everyObject=an,t.extendClass=function(t,...n){const e=n.length;for(let r=0;rvt(t,0,0,n,e)));return-1!==r&&r},t.findIndexCache=vt,t.findItem=function(t,n,e="id"){const r=t.find(((t,r)=>vt(t,0,0,n,e)));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(C(n))),[]);return e},t.flattenDeep=O,t.flow=cr,t.flowAsync=ar,t.flowAsyncRight=fr,t.flowRight=sr,t.forEach=I,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{const r=n(t,e);o(r)}))}else pt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e},t.forOf=$t,t.forOfAsync=qt,t.forOfCompactMap=tr,t.forOfCompactMapAsync=Ye,t.forOfEvery=fn,t.forOfEveryAsync=ln,t.forOfFilter=er,t.forOfFilterAsync=rr,t.forOfMap=en,t.forOfMapAsync=rn,t.generateLoop=Zt,t.get=k,t.getEntries=function(t){if(a(t))return On(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return jt(t,n)[0]},t.getLowest=function(t,n){return Ot(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return R(t,((t,r)=>(e=r,n>=t&&(e=r+1,!0)))),e},t.getPropDesc=yn,t.getPropNames=dn,t.getType=tn,t.getTypeName=ne,t.groupBy=function(t,n){const e={};return l(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e},t.has=function t(n,e,r){return!se(n)&&!se(e)&&(n===e||(yt(n)?yt(e)?n.includes(e,r):Tn(e)?e.test(n):pt(e)?e(n):b(e)?R(e,(e=>t(n,e))):hn(e,(e=>t(n,e))):b(n)?Tn(e)?R(n,(t=>t.test(e))):pt(e)?R(n,e):b(e)?R(e,(e=>t(n,e))):n.includes(e,r):!!J(n)&&(Tn(e)?an(n,(t=>t.test(e))):pt(e)?an(n,e):J(e)?an(n,((t,n)=>t===e[n])):an(n,(n=>t(n,e))))))},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find((n=>{const e=U(n);if(1===e.length)return L(t,n);{const n=e.pop(),r=k(e,t);return!!r&&L(r,n)}})))},t.hasDot=lr,t.hasKeys=q,t.hasLength=s,t.hasProp=An,t.hasValue=a,t.htmlEntities=Gn,t.ifInvoke=function(t,n,...e){if(pt(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!a(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(a(t)){if(pt(n))return e?Yt(n,e,r):n(...r);if(J(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i{e[t[n]]=t})),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return h(t,(t=>{if(R(n,(n=>n.includes(t))))return t}))},t.interval=function(t,n){return pr.set(t,n)},t.intervals=pr,t.invert=function(t,n={}){if(t)return Pt(t,((t,e)=>{n[t]=e})),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(a(e))for(let o=0;ot[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return Y(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!a(t)&&"[object Arguments]"===t.toString()},t.isArray=b,t.isArrayBuffer=pe,t.isArrayBufferCall=he,t.isArrayLike=function(t,n){if(se(t)||pt(t))return!1;if(b(t)||ce(t))return!0;const e=t.length;if(!se(e)||!dt(e)||e<0)return!1;if(n){const n=D(t);return!!n&&hn(n,((t,n)=>n>=0&&dt(n)))}return!0},t.isAsync=Vt,t.isAsyncCall=_t,t.isBigInt=ae,t.isBigIntCall=ue,t.isBoolean=le,t.isBooleanCall=fe,t.isBuffer=G,t.isBufferCall=W,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(a(t)){const n=t?.constructor?.name;return ge.test(n)}return!1},t.isConstructor=_,t.isConstructorFactory=V,t.isConstructorNameFactory=K,t.isDate=ye,t.isDateCall=de,t.isDeno=Ze,t.isEmpty=function(t){return yt(t)||b(t)?!s(t):J(t)?!Nn(t):!a(t)},t.isEqual=H,t.isEven=function(t){return!(1&t)},t.isF32=be,t.isF32Call=Ae,t.isF64=ve,t.isF64Call=we,t.isFalse=me,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=St,t.isFileHTML=xt,t.isFileJS=Tt,t.isFileJSON=Nt,t.isFloat=Oe,t.isFunction=pt,t.isGenerator=Lt,t.isGeneratorCall=Dt,t.isI16=je,t.isI16Call=Ie,t.isI32=Me,t.isI32Call=Fe,t.isI8=Re,t.isI8Call=Ee,t.isIterable=function(t){return a(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=xe,t.isMap=re,t.isMapCall=ee,t.isMatchArray=function(t,n){return t.length===n.length&&R(t,((t,e)=>H(n[e],t)))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=D(t),r=D(n);return e.length===r.length&&R(e,(e=>t[e]===n[e]))},t.isNegative=y,t.isNodejs=Ke,t.isNotArray=function(t){return!b(t)},t.isNotNumber=function(t){return!dt(t)},t.isNotString=function(t){return!yt(t)},t.isNull=u,t.isNumber=dt,t.isNumberCall=gt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&te},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=J,t.isPositive=function(t){return 1===vn(t)},t.isPrimitive=function(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n},t.isPromise=Se,t.isRegex=Tn,t.isRegexCall=xn,t.isRelated=function(t,n){return!se(t)&&!se(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=Ne,t.isSame=bn,t.isSameType=function(t,n){const e=tn(t),r=tn(n);return e===r&&e.name===r.name},t.isSet=kt,t.isSetCall=Ut,t.isString=yt,t.isTrue=function(t){return!0===t},t.isTruthy=ze,t.isTypeFactory=z,t.isTypedArray=ce,t.isU16=Pe,t.isU16Call=Be,t.isU32=ke,t.isU32Call=Ue,t.isU8=De,t.isU8C=qe,t.isU8CCall=Le,t.isU8Call=$e,t.isUndefined=c,t.isWeakMap=Ve,t.isWeakMapCall=_e,t.isZero=Cn,t.jsonParse=function(t,n){if(t)return Ge.parse(t,n)},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Pn," ").trim().toLowerCase().replace(Un,"-")},t.keys=D,t.largest=function(t){return Q(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Ln," ").trim().toLowerCase()},t.map=sn,t.mapArray=X,t.mapAsyncArray=Y,t.mapAsyncObject=on,t.mapObject=cn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let c=i-1;c>=0;c--)e[o]=n(t[c],c,t,i,r),o++;return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i{Kt(e,((e,r)=>{if(n[r]&&(J(e)||b(e)||e.forEach))return t(n[r],e);n[r]=e}))})),n},t.model=function(t,n){return a(n)?v(gr,[t,n]):k(t,gr.models)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.noValue=se,t.noop=Wt,t.notEqual=We,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=mt,t.objectEntries=On,t.objectSize=Nn,t.omit=function(t,n){if(!t)return{};if(b(n)){const e=Sn(n);return Fn(t,((t,n)=>!e.test(n)))}if(Tn(n))return Fn(t,((t,e)=>!n.test(e)));if(yt(n))return Fn(t,((t,e)=>e!==n));if(dt(n)){const e=n.toString();return Fn(t,((t,n)=>n!==e))}return pt(n)?Fn(t,((t,e)=>!n(t,e))):mt({},t)},t.once=t=>{let n;return(...e)=>(a(n)||(n=t(...e)),n)},t.onlyUnique=at,t.over=function(t){return(...n)=>sn(t,(t=>t(...n)))},t.overEvery=function(t){return n=>hn(t,(t=>t(n)))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[h(t,((t,r)=>{if(n(t,r))return t;e.push(t)})),e]},t.pick=(t,n,e={})=>{if(t)return l(n,(n=>{e[n]=t[n]})),e},t.pluck=function(t,n){return X(t,(t=>Ft(t,n)))},t.pluckObject=Ft,t.promise=function(t){return new Promise(t)},t.propertyMatch=(t,n,e=D(t))=>R(e,(e=>H(t[e],n[e]))),t.randomFloat=function(t,n=0){return wn()*(t-n)+n},t.randomInt=ot,t.range=function(t,n,e=1,r=[]){return y(e)?r:tt(...n.map((t=>e[t])))},t.regexTestFactory=Rt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;re)return st(t);if(1===n)return[t[ot(e-1,0)]];const r=[],o={};let i,c=0;for(;cMt(t,r,n,e)))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort(((t,r)=>Et(t,r,n,e)))},t.sortCollectionAscending=jt,t.sortCollectionAscendingFilter=It,t.sortCollectionDescending=Ot,t.sortCollectionDescendingFilter=Ct,t.sortNumberAscending=function(t){return t.sort(tt)},t.sortNumberDescening=function(t){return t.sort(nt)},t.sortObjectsAlphabetically=Mt,t.sortObjectsAlphabeticallyReverse=Et,t.sortUnique=ft,t.stringify=Je,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=tt,t.subtractAll=function(t){return t.reduce(((t,n)=>t-n),0)},t.subtractReverse=nt,t.sumAll=function(t){return t.reduce(((t,n)=>t+n),0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Qt((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Ht.remove(e.id),e.id=!1},e},t.timer=Qt,t.timers=Ht,t.times=Gt,t.timesAsync=async function(t,n){for(let e=0;en?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=e-n;for(;c=0&&(i=r[c]," "!==i);c--);return t.slice(0,c).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,c=n;for(;c0&&(i=r[c]," "!==i);c++);return t.substring(c,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.unZipObject=t=>{const n=[],e=[];return Pt(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},t.union=function(...t){return lt(O(t))},t.uniqID=mr,t.unique=lt,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;rYn(t)))},t.upperFirstLetter=Xn,t.upperFirstOnly=te,t.upperFirstOnlyAll=function(t){return t.replace(Qn,(t=>te(t)))},t.virtualStorage=function(t){return new Ar(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o!e.has(t)))},t.words=function(t){return t.match(Hn)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=v(Map),e=[];return 2===t.length?j(t[0],t[1]):(l(t,((t,e)=>{l(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),I(n,(t=>{1===t.count&&e.push(t.child)})),e)},t.zip=function(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))},t.zipObject=(t,n)=>{const e={};return l(t,((t,r)=>{e[t]=n[r]})),e}})); //# sourceMappingURL=index.js.map diff --git a/package/module/basic.js b/package/module/basic.js index 2344234..181af9e 100644 --- a/package/module/basic.js +++ b/package/module/basic.js @@ -1,2 +1,2 @@ -function t(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function n(t){return t.length=0,t}function r(t){return t.slice()}function e(t){return void 0===t}function o(t){return Boolean(t.length)}function u(t){return null===t}function c(t){return!e(t)&&!u(t)}function i(t){return t}function s(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const f=n.call(e,t,u,r,i,s,o);c(f)&&r.push(f)})):s(t,((t,u,i,s)=>{const f=n(t,u,r,i,s,e,o);c(f)&&r.push(f)})),r}async function l(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const u=await n(t,e,r,o);c(u)&&r.push(u)})),r}const{sign:h}=Math;function g(t){return-1===h(t)}function p(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function m(t,n,r=1,e=[]){return g(r)?e:t{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function x(t,n=1,r=t.length){return t.splice(n,r)}const O=(t,n=1,r=t.length)=>x(t,0,r-n);function $(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function j(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function C(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function F(t,n,r=[],e){return await l(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function R(t,n){return n?t.slice(0,n):t[0]}function N(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat(A(n))),[]);return r}function T(t){return t.slice(0,t.length-1)}function P(t,...n){return f(t,(t=>{if(C(n,(n=>n.includes(t))))return t}))}function U(t,n,r){if(!t)return;const e=t.length;if(c(r))for(let o=0;o(r=r[t],c(r)))),r}const q=Object.keys;function V(t){if(t)return q(t)}const z=Object.hasOwn;function G(t,...n){if(t)return C(n,(n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}}))}function J(t,...n){if(t)return Boolean(n.find((n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}})))}function W(t,n){return t?.constructor===n||!1}function H(t){return n=>W(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...r){return r?t(n)&&C(r,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!c(t)&&"Object("===t.constructor.toString().trim().slice(9,16),rt=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const r=V(t);if(G(n,r))return C(r,(r=>rt(t[r],n[r])))}else if(w(t)&&t.length===n.length)return C(t,((t,r)=>rt(t,n[r])));return!1};function et(t,n){return t.length===n.length&&C(t,((t,r)=>rt(n[r],t)))}const ot=Math.max;function ut(t){return ot(...t)}function ct(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function it(t,n,r=[],e,o){return c(e)?s(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):s(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function st(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function lt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function at(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function dt(t,n){return n-t}function mt(t){return t.sort(dt)}function wt(t,n){let r=t.length;for(let e=0;er)return $t(t);if(1===n)return[t[Et(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Ft(t,n=1){return t.slice(0,n)}function Rt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Nt(t,n,r){return r.indexOf(t)===n}function Tt(t,n,r){return t!==r[n-1]}function Pt(t,n){return n?t.filter(Tt):t.filter(Nt)}function Ut(...t){return Pt(I(t))}function Lt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Vt(...t){const n=v(Map),r=[];return 2===t.length?M(t[0],t[1]):(s(t,((t,r)=>{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&r.push(t.child)})),r)}function zt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Gt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Jt(t){return tt(t)&&t||c(t)&&Buffer.from(t)||Buffer.alloc(0)}function Wt(t){return t.fill(0),t}const Ht=t=>!!c(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=H(String);function tn(t){return!Yt(t)}const nn=Object.assign;function rn(t,n){if(nt(n))nn(t,n);else if(Ht(n)){const r=n.name;r?t[r]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function en(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function sn(t,n){let r=0;return s(t,(t=>{t[n]&&r++})),r}function fn(t,n){let r=0;return s(t,(t=>{t[n]||r++})),r}function ln(t,n,r,e,o){if(t[o]===e)return!0}function an(t,n,r="id"){const e=t.findIndex(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function hn(t,n,r="id"){const e=t.find(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function gn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function pn(t,n="id",r){return t.sort(((t,e)=>gn(t,e,n,r)))}function dn(t,n){return pn(t,n,!1)[0]}function mn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function wn(t,n="id",r){return t.sort(((t,e)=>mn(t,e,n,r)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const r={};return s(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function vn(t,n="id"){const r={};return s(t,(t=>{r[t[n]]=t})),r}function An(t,n,r,e){return it(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function In(t,n,r,e){return ft(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function Mn(t,n){return it(t,(t=>En(t,n)))}function xn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function On(t,n="id",r){return t.sort(((t,e)=>xn(t,e,n,r)))}function $n(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function jn(t,n="id",r){return t.sort(((t,e)=>$n(t,e,n,r)))}function Cn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Sn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Bn(t){return n=>!!c(n)&&t.test(n)}const Fn=Bn(/\.css$/),Rn=Bn(/\.html$/),Nn=Bn(/\.js$/),Tn=Bn(/\.json$/);function Pn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Un(t,n){return(...r)=>t(...r.splice(0,n))}function Ln(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const _n=async(t,n,r,e)=>{if(!t)return;const o=V(t);return c(r)?await l(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await l(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Dn(t,n,r,e){if(!t)return;const o=V(t);return c(r)?s(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):s(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Zn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let h;const g=Hn(s);if(c(i)&&s)return h=w(i)?g?n:t:nt(i)||Ht(i)?g?e:r:o?g?u:o:Gn(i)?u:g?e:r,h(i,s,f,l,a)}}const Qn=Kn(s,l,Dn,_n,Vn,Jn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function tr(t,r=t.length){const e=[],o=(...u)=>{if(e.push(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function nr(t,r=t.length){const e=[],o=(...u)=>{if(e.unshift(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function rr(){}function er(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const cr=v(ur);function ir(t,n){return cr.set(t,n)}function sr(){er(setTimeout(rr,0),(t=>{cr.remove(t)}))}const fr=Reflect.apply;function lr(t,n,r){if(Ht(t))return fr(t,n,r)}function ar(t,n){function r(...t){!1!==r.id&&cr.remove(r.id),r.id=ir((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(cr.remove(r.id),r.id=!1)},r}function hr(t,n,...r){if(Ht(t))return n?t.call(n,...r):t(...r)}function gr(t){return(...n)=>!t(...n)}function pr(t=0){return(...n)=>n[t]}const dr=t=>{let n;return(...r)=>(c(n)||(n=t(...r)),n)};function mr(t){return t?.constructor}function wr(t,n=[]){const r=mr(t);return r===Function&&"function"===r.name?function(){}:v(r,n)}function yr(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=Ht(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function br(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=Ht(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function vr(t,n,r={}){if(t)return await _n(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function Ar(t,n,r={},e,o){if(t)return c(e)?Dn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Dn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Ir=Kn(it,ft,Ar,vr,yr,br);function Er(t){return(...n)=>Ir(t,(t=>t(...n)))}async function Mr(t,n){if(!t)return;return S(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function xr(t,n){if(!t)return;return C(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Or(t,n=i){if(w(t)||qn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function $r(t,n=i,r){if(Gn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(w(t)||qn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const jr=Kn(C,S,xr,Mr,Or,$r);function Cr(t){return n=>jr(t,(t=>t(n)))}function Sr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Br(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=ir((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{cr.remove(r.id),r.id=!1},r}function Fr(t,n){return(...r)=>n(t,...r)}const Rr=Function.prototype;function Nr(t){return Rr.call.bind(t)}const Tr=Object.getOwnPropertyNames,Pr=Object.getOwnPropertyDescriptor,Ur=Object.defineProperty,Lr=Nr(Object.hasOwnProperty),_r=Object.is;function Dr(t,n){return t+n}function Zr(t){return t-1}function kr(t,n){return t/n}function qr(t){return t+1}function Vr(t,n){return t*n}function zr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Gr}=Math;function Jr(t,n=0){return Gr()*(t-n)+n}function Wr(t,n){return t%n}function Hr(t){return t.reduce(((t,n)=>t-n),0)}function Kr(t){return t.reduce(((t,n)=>t+n),0)}function Qr(t,n,r){return t>n&&tr}const{sign:Yr}=Math;function te(t){return 1===Yr(t)}function ne(t){return 0===t}const re=Object.entries;function ee(t){if(c(t))return re(t)}function oe(t){const n=[];return Dn(t,((t,r)=>{c(t)&&n.push(r)})),n}async function ue(t,n=i,r={}){return await _n(t,(async(t,e,o,u,i)=>{const s=await n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function ce(t,n=i,r={}){return Dn(t,((t,e,o,u,i)=>{const s=n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function ie(t,n,r={}){return Dn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function se(t,n,r={}){return await _n(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function fe(t,n={}){if(t)return Dn(t,((t,r)=>{n[t]=r})),n}const le=(t,n)=>{if(t===n)return!0;const r=V(t),e=V(n);return r.length===e.length&&C(r,(r=>t[r]===n[r]))},ae=/[()[\]{}*+?^$|#.,/\\\s-]/g;function he(t){return t.replace(ae,"\\$&")}function ge(t,n){return n?ge(it(t,he)):RegExp(t.join("|"))}const pe=Q("RegExp"),de=X(pe);function me(t,n){if(!t)return{};if(w(n)){const r=ge(n);return ie(t,((t,n)=>!r.test(n)))}if(de(n))return ie(t,((t,r)=>!n.test(r)));if(Yt(n))return ie(t,((t,r)=>r!==n));if(Qt(n)){const r=n.toString();return ie(t,((t,n)=>n!==r))}return Ht(n)?ie(t,((t,r)=>!n(t,r))):nn({},t)}const we=(t,n,r={})=>{if(t)return s(n,(n=>{r[n]=t[n]})),r};function ye(t){if(!t)return;if(nt(t))return V(t).length;const n=t.length;if(c(n))return n;const r=t.size;return c(n)?r:V(t).length}const be=(t,n)=>{const r={};return s(t,((t,e)=>{r[t]=n[e]})),r},ve=t=>{const n=[],r=[];return Dn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Ae=/[ _-]+/g;function Ie(t){let n="";return t.replace(Ae," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Ee=/[ _-]+/g,Me=/[ ]+/g;function xe(t){return t.replace(/([A-Z]+)/g," $1").replace(Ee," ").trim().toLowerCase().replace(Me,"-")}const Oe=/[ _-]+/g,$e=/[ ]+/g;function je(t){return t.replace(/([A-Z]+)/g," $1").replace(Oe," ").trim().toLowerCase().replace($e,"_")}const Ce=/[ _-]+/g;function Se(t){return t.replace(/([A-Z]+)/g," $1").replace(Ce," ").trim().toUpperCase()}const Be=/[ _-]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Be," ").trim().toLowerCase()}function Re(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Ne(t,n=1){return t[t.length-n]}function Te(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Pe(t,n=1){return t.slice(0,-1*n)}function Ue(t,n=1){return t.substring(n)}function Le(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const _e=/%(?![\da-f]{2})/gi,De=/&/g,Ze=//g,qe=/"/g;function Ve(t){return decodeURIComponent(t.replace(_e,(()=>"%25")))}function ze(t){return t.replace(De,"&").replace(Ze,"<").replace(ke,">").replace(qe,""")}function Ge(t){return ze(Ve(t))}const Je=/\S+/g,We=/\w+/g;function He(t){return t.match(Je)||[]}function Ke(t){return t.match(We)||[]}function Qe(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function Xe(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const Ye=/\w+/g;function to(t){return t[0].toUpperCase()}function no(t){return to(t)+Ue(t)}function ro(t){return to(t)+Ue(t).toLowerCase()}function eo(t){return t.replace(Ye,(t=>no(t)))}function oo(t){return t.replace(Ye,(t=>ro(t)))}function uo(t){return mr(t)?.name}function co(t){return!!c(t)&&"[object Arguments]"===t.toString()}const io=Q("Map"),so=X(io),fo=/Array/,lo="Array";function ao(t){if(t){const n=uo(t);if(fo.test(n)&&n!==lo)return!0}return!1}function ho(t){return!c(t)}function go(t,n){if(ho(t)||Ht(t))return!1;if(w(t)||ao(t))return!0;const r=t.length;if(!ho(r)||!Qt(r)||r<0)return!1;if(n){const n=V(t);return!!n&&jr(n,((t,n)=>n>=0&&Qt(n)))}return!0}const po=Q("BigInt"),mo=X(po),wo=Q("Boolean"),yo=X(wo),bo=Q("ArrayBuffer"),vo=X(bo);function Ao(t,n){return!(!t||!n)&&t instanceof n}const Io=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function Eo(t){if(c(t)){const n=t?.constructor?.name;return Io.test(n)}return!1}const Mo=Q("Date"),xo=X(Mo);function Oo(t){return Yt(t)||w(t)?!o(t):nt(t)?!ye(t):!c(t)}function $o(t){return!1===t}const jo=Q("Float32Array"),Co=X(jo),So=Q("Float64Array"),Bo=X(So),{isInteger:Fo}=Number,Ro=Fo,No=Q("Int16Array"),To=X(No),Po=Q("Int32Array"),Uo=X(Po),Lo=Q("Int8Array"),_o=X(Lo);function Do(t){return c(t)&&"function"==typeof t[Symbol.iterator]}function Zo(t){return!!t&&t instanceof Promise}function ko(t){return!!t&&(Zo(t)||Hn(t)||Gn(t))}function qo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Vo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function zo(t,n){return!ho(t)&&!ho(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Go}=Number,Jo=Go;function Wo(t,n){const r=mr(t),e=mr(n);return r===e&&r.name===e.name}function Ho(t){return!0===t}const Ko=Q("Uint16Array"),Qo=X(Ko),Xo=Q("Uint32Array"),Yo=X(Xo),tu=Q("Uint8Array"),nu=X(tu),ru=Q("Uint8ClampedArray"),eu=X(ru),ou=Q("WeakMap"),uu=X(ou),cu=void 0!==globalThis.Deno,iu=void 0!==globalThis.process&&process.versions&&process.versions.node;function su(t,n=!0){return Boolean(t)&&n}function fu(t,n=!0){return!1===Boolean(t)&&n}function lu(t,n,r,e){if(c(t)){if(Ht(n))return r?lr(n,r,e):n(...e);if(nt(n))return n[r]=t,n}}function au(t,n){return $o(rt(t,n))}const hu=JSON;function gu(t,n){if(t)return hu.parse(t,n)}const pu=hu.stringify;function du(t,n,r){const e=globalThis.options||r;let o;return Ht(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${pu(t)}\n\t\tExpected: ${pu(n)}`,e)}async function mu(t,n,r){const e=await t;return!(Ht(n)&&!1===await n(e,r))&&!au(e,n)||du(e,n,r)}function wu(t,n,r){if(ko(t)||ko(n))return mu(t,n,r);return!(Ht(n)&&!1===n(t,r))&&!au(t,n)||du(t,n,r)}function yu(t,n,r){const e=Ir(t,(t=>Ht(t)?t.bind(n):t));return r?en(r,e):e}function bu(t){if(t){if(tt(t))return Wt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const vu=globalThis.structuredClone;function Au(t){return vu(t)}async function Iu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;usu(t)))}async function Mu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);c(e)&&r.push(e)}return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);c(u)&&e(u)}return o}const u=Ht(o.set);for await(const[r,e]of t){const i=await n(e,r,o,t);c(i)&&(u?o.set(r,i):o[r]=i)}return o}function xu(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);c(u)&&o(u)}return e}const o=Ht(e.set);for(const[r,u]of t){const i=n(u,r,e,t);c(i)&&(o?e.set(r,i):e[r]=i)}return e}const Ou=Kn(f,a,ce,ue,xu,Mu);function $u(...t){return Hn(t[0])?async function(...n){return jr(t,(async t=>jr(n,(async n=>t(n)))))}:function(...n){return jr(t,(t=>jr(n,(n=>t(n)))))}}function ju(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=Ht(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Cu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=Ht(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Su=Kn(B,F,ie,se,ju,Cu);function Bu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Fu=Bu(s),Ru=Bu($);function Nu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Tu=Nu(l),Pu=Nu(j);function Uu(t,n){const r=wr(t),e=r.push||r.add;if(e&&Ht(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else Ht(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Lu(t,n){const r={};return s(t,((t,e)=>{r[n[e]]=t})),r}function _u(t,n,r){return!ho(t)&&!ho(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,r):de(n)?n.test(t):Ht(n)?n(t):w(n)?C(n,(n=>_u(t,n))):jr(n,(n=>_u(t,n))):w(t)?de(n)?C(t,(t=>t.test(n))):Ht(n)?C(t,n):w(n)?C(n,(n=>_u(t,n))):t.includes(n,r):!!nt(t)&&(de(n)?xr(t,(t=>t.test(n))):Ht(n)?xr(t,n):nt(n)?xr(t,((t,r)=>t===n[r])):xr(t,(t=>_u(t,n))))))}const Du=Bn(/\./),Zu=(t,n,r)=>(n&&!c(t[n])&&(t[n]=r),t);class ku{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const qu=v(ku);function Vu(t,n){return qu.set(t,n)}function zu(){er(setTimeout(rr,0),(t=>{qu.remove(t)}))}function Gu(t,...n){return Qn(n,(n=>{Qn(n,((n,r)=>{if(t[r]&&(nt(n)||w(n)||n.forEach))return Gu(t[r],n);t[r]=n}))})),t}class Ju{static models=new Map;constructor(t,n){c(n)?(en(this,n),this.modelName=t,Ju.models.set(t,n)):en(this,t)}delete(t){Ju.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Ju.models.set(t||this.modelName,this)}has(t){return Ju.models.has(t||this.modelName)}get(t){return Ju.models.get(t||this.modelName)}}function Wu(t,n){return c(n)?v(Ju,[t,n]):k(t,Ju.models)}function Hu(t,n){return[t,n]}function Ku(t,n,r){const e=t.length,o=[];for(let u=0;uC(r,(r=>rt(t[r],n[r])));function Yu(t,n,r){return n&&nt(t)||Qt(n)&&w(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function tc(t,n,r){return Qt(r)&&w(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class nc{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Dn(t,(n=>{t[n]=new nc(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new nc(r),!0)})}}function rc(){return[]}function ec(){return!1}const oc=()=>({}),uc=()=>"",cc=()=>!0;async function ic(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const ac=v(lc);class hc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):c(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=wr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function gc(t){return new hc(t)}async function pc(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function n(t){return t.length=0,t}function r(t){return t.slice()}function e(t){return void 0===t}function o(t){return Boolean(t.length)}function u(t){return null===t}function c(t){return!e(t)&&!u(t)}function i(t){return t}function s(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const f=n.call(e,t,u,r,i,s,o);c(f)&&r.push(f)})):s(t,((t,u,i,s)=>{const f=n(t,u,r,i,s,e,o);c(f)&&r.push(f)})),r}async function l(t,n,r,e){if(!t)return;const o=t.length;if(c(r))for(let u=0;u{const u=await n(t,e,r,o);c(u)&&r.push(u)})),r}const{sign:h}=Math;function g(t){return-1===h(t)}function p(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function m(t,n,r=1,e=[]){return g(r)?e:t{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function x(t,n=1,r=t.length){return t.splice(n,r)}const O=(t,n=1,r=t.length)=>x(t,0,r-n);function $(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function j(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function C(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function F(t,n,r=[],e){return await l(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function R(t,n){return n?t.slice(0,n):t[0]}function N(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat(A(n))),[]);return r}function T(t){return t.slice(0,t.length-1)}function P(t,...n){return f(t,(t=>{if(C(n,(n=>n.includes(t))))return t}))}function U(t,n,r){if(!t)return;const e=t.length;if(c(r))for(let o=0;o(r=r[t],c(r)))),r}const q=Object.keys;function V(t){if(t)return q(t)}const z=Object.hasOwn;function G(t,...n){if(t)return C(n,(n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}}))}function J(t,...n){if(t)return Boolean(n.find((n=>{const r=Z(n);if(1===r.length)return z(t,n);{const n=r.pop(),e=k(r,t);return!!e&&z(e,n)}})))}function W(t,n){return t?.constructor===n||!1}function H(t){return n=>W(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...r){return r?t(n)&&C(r,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!c(t)&&"Object("===t.constructor.toString().trim().slice(9,16),rt=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const r=V(t);if(G(n,r))return C(r,(r=>rt(t[r],n[r])))}else if(w(t)&&t.length===n.length)return C(t,((t,r)=>rt(t,n[r])));return!1};function et(t,n){return t.length===n.length&&C(t,((t,r)=>rt(n[r],t)))}const ot=Math.max;function ut(t){return ot(...t)}function ct(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function it(t,n,r=[],e,o){return c(e)?s(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):s(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function st(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function lt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function at(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function dt(t,n){return n-t}function mt(t){return t.sort(dt)}function wt(t,n){let r=t.length;for(let e=0;er)return $t(t);if(1===n)return[t[Et(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Ft(t,n=1){return t.slice(0,n)}function Rt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Nt(t,n,r){return r.indexOf(t)===n}function Tt(t,n,r){return t!==r[n-1]}function Pt(t,n){return n?t.filter(Tt):t.filter(Nt)}function Ut(...t){return Pt(I(t))}function Lt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Vt(...t){const n=v(Map),r=[];return 2===t.length?M(t[0],t[1]):(s(t,((t,r)=>{s(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&r.push(t.child)})),r)}function zt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Gt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Jt(t){return tt(t)&&t||c(t)&&Buffer.from(t)||Buffer.alloc(0)}function Wt(t){return t.fill(0),t}const Ht=t=>!!c(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=H(String);function tn(t){return!Yt(t)}const nn=Object.assign;function rn(t,n){if(nt(n))nn(t,n);else if(Ht(n)){const r=n.name;r?t[r]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function en(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function sn(t,n){let r=0;return s(t,(t=>{t[n]&&r++})),r}function fn(t,n){let r=0;return s(t,(t=>{t[n]||r++})),r}function ln(t,n,r,e,o){if(t[o]===e)return!0}function an(t,n,r="id"){const e=t.findIndex(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function hn(t,n,r="id"){const e=t.find(((t,e)=>ln(t,0,0,n,r)));return-1!==e&&e}function gn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function pn(t,n="id",r){return t.sort(((t,e)=>gn(t,e,n,r)))}function dn(t,n){return pn(t,n,!1)[0]}function mn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function wn(t,n="id",r){return t.sort(((t,e)=>mn(t,e,n,r)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const r={};return s(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function vn(t,n="id"){const r={};return s(t,(t=>{r[t[n]]=t})),r}function An(t,n,r,e){return it(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function In(t,n,r,e){return ft(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function Mn(t,n){return it(t,(t=>En(t,n)))}function xn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function On(t,n="id",r){return t.sort(((t,e)=>xn(t,e,n,r)))}function $n(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function jn(t,n="id",r){return t.sort(((t,e)=>$n(t,e,n,r)))}function Cn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Sn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Bn(t){return n=>!!c(n)&&t.test(n)}const Fn=Bn(/\.css$/),Rn=Bn(/\.html$/),Nn=Bn(/\.js$/),Tn=Bn(/\.json$/);function Pn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Un(t,n){return(...r)=>t(...r.splice(0,n))}function Ln(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const _n=async(t,n,r,e)=>{if(!t)return;const o=V(t);return c(r)?await l(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await l(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Dn(t,n,r,e){if(!t)return;const o=V(t);return c(r)?s(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):s(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Zn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let h;const g=Hn(s);if(c(i)&&s)return h=w(i)?g?n:t:nt(i)||Ht(i)?g?e:r:o?g?u:o:Gn(i)?u:g?e:r,h(i,s,f,l,a)}}const Qn=Kn(s,l,Dn,_n,Vn,Jn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function tr(t,r=t.length){const e=[],o=(...u)=>{if(e.push(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function nr(t,r=t.length){const e=[],o=(...u)=>{if(e.unshift(...u),e.length===r){const r=t(...e);return n(e),r}return o};return o}function rr(){}function er(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const cr=v(ur);function ir(t,n){return cr.set(t,n)}function sr(){er(setTimeout(rr,0),(t=>{cr.remove(t)}))}const fr=Reflect.apply;function lr(t,n,r){if(Ht(t))return fr(t,n,r)}function ar(t,n){function r(...t){!1!==r.id&&cr.remove(r.id),r.id=ir((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(cr.remove(r.id),r.id=!1)},r}function hr(t,n,...r){if(Ht(t))return n?t.call(n,...r):t(...r)}function gr(t){return(...n)=>!t(...n)}function pr(t=0){return(...n)=>n[t]}const dr=t=>{let n;return(...r)=>(c(n)||(n=t(...r)),n)};function mr(t){return t?.constructor}function wr(t,n=[]){const r=mr(t);return r===Function&&"function"===r.name?function(){}:v(r,n)}function yr(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=Ht(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function br(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=Ht(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function vr(t,n,r={}){if(t)return await _n(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function Ar(t,n,r={},e,o){if(t)return c(e)?Dn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Dn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Ir=Kn(it,ft,Ar,vr,yr,br);function Er(t){return(...n)=>Ir(t,(t=>t(...n)))}async function Mr(t,n){if(!t)return;return S(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function xr(t,n){if(!t)return;return C(V(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Or(t,n=i){if(w(t)||qn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function $r(t,n=i,r){if(Gn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(w(t)||qn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const jr=Kn(C,S,xr,Mr,Or,$r);function Cr(t){return n=>jr(t,(t=>t(n)))}function Sr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Br(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=ir((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{cr.remove(r.id),r.id=!1},r}function Fr(t,n){return(...r)=>n(t,...r)}const Rr=Function.prototype;function Nr(t){return Rr.call.bind(t)}const Tr=Object.getOwnPropertyNames,Pr=Object.getOwnPropertyDescriptor,Ur=Object.defineProperty,Lr=Nr(Object.hasOwnProperty),_r=Object.is;function Dr(t,n){return t+n}function Zr(t){return t-1}function kr(t,n){return t/n}function qr(t){return t+1}function Vr(t,n){return t*n}function zr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Gr}=Math;function Jr(t,n=0){return Gr()*(t-n)+n}function Wr(t,n){return t%n}function Hr(t){return t.reduce(((t,n)=>t-n),0)}function Kr(t){return t.reduce(((t,n)=>t+n),0)}function Qr(t,n,r){return t>n&&tr}const{sign:Yr}=Math;function te(t){return 1===Yr(t)}function ne(t){return 0===t}function re(t){return!(1&~t)}function ee(t){return!(1&t)}const oe=Object.entries;function ue(t){if(c(t))return oe(t)}function ce(t){const n=[];return Dn(t,((t,r)=>{c(t)&&n.push(r)})),n}async function ie(t,n=i,r={}){return await _n(t,(async(t,e,o,u,i)=>{const s=await n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function se(t,n=i,r={}){return Dn(t,((t,e,o,u,i)=>{const s=n(t,e,r,o,u,i);c(s)&&(r[e]=s)})),r}function fe(t,n,r={}){return Dn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function le(t,n,r={}){return await _n(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function ae(t,n={}){if(t)return Dn(t,((t,r)=>{n[t]=r})),n}const he=(t,n)=>{if(t===n)return!0;const r=V(t),e=V(n);return r.length===e.length&&C(r,(r=>t[r]===n[r]))},ge=/[()[\]{}*+?^$|#.,/\\\s-]/g;function pe(t){return t.replace(ge,"\\$&")}function de(t,n){return n?de(it(t,pe)):RegExp(t.join("|"))}const me=Q("RegExp"),we=X(me);function ye(t,n){if(!t)return{};if(w(n)){const r=de(n);return fe(t,((t,n)=>!r.test(n)))}if(we(n))return fe(t,((t,r)=>!n.test(r)));if(Yt(n))return fe(t,((t,r)=>r!==n));if(Qt(n)){const r=n.toString();return fe(t,((t,n)=>n!==r))}return Ht(n)?fe(t,((t,r)=>!n(t,r))):nn({},t)}const be=(t,n,r={})=>{if(t)return s(n,(n=>{r[n]=t[n]})),r};function ve(t){if(!t)return;if(nt(t))return V(t).length;const n=t.length;if(c(n))return n;const r=t.size;return c(n)?r:V(t).length}const Ae=(t,n)=>{const r={};return s(t,((t,e)=>{r[t]=n[e]})),r},Ie=t=>{const n=[],r=[];return Dn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Ee=/[ _-]+/g;function Me(t){let n="";return t.replace(Ee," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const xe=/[ _-]+/g,Oe=/[ ]+/g;function $e(t){return t.replace(/([A-Z]+)/g," $1").replace(xe," ").trim().toLowerCase().replace(Oe,"-")}const je=/[ _-]+/g,Ce=/[ ]+/g;function Se(t){return t.replace(/([A-Z]+)/g," $1").replace(je," ").trim().toLowerCase().replace(Ce,"_")}const Be=/[ _-]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Be," ").trim().toUpperCase()}const Re=/[ _-]+/g;function Ne(t){return t.replace(/([A-Z]+)/g," $1").replace(Re," ").trim().toLowerCase()}function Te(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Pe(t,n=1){return t[t.length-n]}function Ue(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Le(t,n=1){return t.slice(0,-1*n)}function _e(t,n=1){return t.substring(n)}function De(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const Ze=/%(?![\da-f]{2})/gi,ke=/&/g,qe=//g,ze=/"/g;function Ge(t){return decodeURIComponent(t.replace(Ze,(()=>"%25")))}function Je(t){return t.replace(ke,"&").replace(qe,"<").replace(Ve,">").replace(ze,""")}function We(t){return Je(Ge(t))}const He=/\S+/g,Ke=/\w+/g;function Qe(t){return t.match(He)||[]}function Xe(t){return t.match(Ke)||[]}function Ye(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function to(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const no=/\w+/g;function ro(t){return t[0].toUpperCase()}function eo(t){return ro(t)+_e(t)}function oo(t){return ro(t)+_e(t).toLowerCase()}function uo(t){return t.replace(no,(t=>eo(t)))}function co(t){return t.replace(no,(t=>oo(t)))}function io(t){return mr(t)?.name}function so(t){return!!c(t)&&"[object Arguments]"===t.toString()}const fo=Q("Map"),lo=X(fo),ao=/Array/,ho="Array";function go(t){if(t){const n=io(t);if(ao.test(n)&&n!==ho)return!0}return!1}function po(t){return!c(t)}function mo(t,n){if(po(t)||Ht(t))return!1;if(w(t)||go(t))return!0;const r=t.length;if(!po(r)||!Qt(r)||r<0)return!1;if(n){const n=V(t);return!!n&&jr(n,((t,n)=>n>=0&&Qt(n)))}return!0}const wo=Q("BigInt"),yo=X(wo),bo=Q("Boolean"),vo=X(bo),Ao=Q("ArrayBuffer"),Io=X(Ao);function Eo(t,n){return!(!t||!n)&&t instanceof n}const Mo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function xo(t){if(c(t)){const n=t?.constructor?.name;return Mo.test(n)}return!1}const Oo=Q("Date"),$o=X(Oo);function jo(t){return Yt(t)||w(t)?!o(t):nt(t)?!ve(t):!c(t)}function Co(t){return!1===t}const So=Q("Float32Array"),Bo=X(So),Fo=Q("Float64Array"),Ro=X(Fo),{isInteger:No}=Number,To=No,Po=Q("Int16Array"),Uo=X(Po),Lo=Q("Int32Array"),_o=X(Lo),Do=Q("Int8Array"),Zo=X(Do);function ko(t){return c(t)&&"function"==typeof t[Symbol.iterator]}function qo(t){return!!t&&t instanceof Promise}function Vo(t){return!!t&&(qo(t)||Hn(t)||Gn(t))}function zo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Go(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Jo(t,n){return!po(t)&&!po(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Wo}=Number,Ho=Wo;function Ko(t,n){const r=mr(t),e=mr(n);return r===e&&r.name===e.name}function Qo(t){return!0===t}const Xo=Q("Uint16Array"),Yo=X(Xo),tu=Q("Uint32Array"),nu=X(tu),ru=Q("Uint8Array"),eu=X(ru),ou=Q("Uint8ClampedArray"),uu=X(ou),cu=Q("WeakMap"),iu=X(cu),su=void 0!==globalThis.Deno,fu=void 0!==globalThis.process&&process.versions&&process.versions.node;function lu(t,n=!0){return Boolean(t)&&n}function au(t,n=!0){return!1===Boolean(t)&&n}function hu(t,n,r,e){if(c(t)){if(Ht(n))return r?lr(n,r,e):n(...e);if(nt(n))return n[r]=t,n}}function gu(t,n){return Co(rt(t,n))}const pu=JSON;function du(t,n){if(t)return pu.parse(t,n)}const mu=pu.stringify;function wu(t,n,r){const e=globalThis.options||r;let o;return Ht(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${mu(t)}\n\t\tExpected: ${mu(n)}`,e)}async function yu(t,n,r){const e=await t;return!(Ht(n)&&!1===await n(e,r))&&!gu(e,n)||wu(e,n,r)}function bu(t,n,r){if(Vo(t)||Vo(n))return yu(t,n,r);return!(Ht(n)&&!1===n(t,r))&&!gu(t,n)||wu(t,n,r)}function vu(t,n,r){const e=Ir(t,(t=>Ht(t)?t.bind(n):t));return r?en(r,e):e}function Au(t){if(t){if(tt(t))return Wt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Iu=globalThis.structuredClone;function Eu(t){return Iu(t)}async function Mu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;ulu(t)))}async function Ou(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);c(e)&&r.push(e)}return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);c(u)&&e(u)}return o}const u=Ht(o.set);for await(const[r,e]of t){const i=await n(e,r,o,t);c(i)&&(u?o.set(r,i):o[r]=i)}return o}function $u(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);c(u)&&o(u)}return e}const o=Ht(e.set);for(const[r,u]of t){const i=n(u,r,e,t);c(i)&&(o?e.set(r,i):e[r]=i)}return e}const ju=Kn(f,a,se,ie,$u,Ou);function Cu(...t){return Hn(t[0])?async function(...n){return jr(t,(async t=>jr(n,(async n=>t(n)))))}:function(...n){return jr(t,(t=>jr(n,(n=>t(n)))))}}function Su(t,n=i,r){const e=r||wr(t);if(w(t)||qn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=Ht(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Bu(t,n=i,r,e){if(Gn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||wr(t);if(w(t)||qn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=Ht(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Fu=Kn(B,F,fe,le,Su,Bu);function Ru(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Nu=Ru(s),Tu=Ru($);function Pu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Uu=Pu(l),Lu=Pu(j);function _u(t,n){const r=wr(t),e=r.push||r.add;if(e&&Ht(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else Ht(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Du(t,n){const r={};return s(t,((t,e)=>{r[n[e]]=t})),r}function Zu(t,n,r){return!po(t)&&!po(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,r):we(n)?n.test(t):Ht(n)?n(t):w(n)?C(n,(n=>Zu(t,n))):jr(n,(n=>Zu(t,n))):w(t)?we(n)?C(t,(t=>t.test(n))):Ht(n)?C(t,n):w(n)?C(n,(n=>Zu(t,n))):t.includes(n,r):!!nt(t)&&(we(n)?xr(t,(t=>t.test(n))):Ht(n)?xr(t,n):nt(n)?xr(t,((t,r)=>t===n[r])):xr(t,(t=>Zu(t,n))))))}const ku=Bn(/\./),qu=(t,n,r)=>(n&&!c(t[n])&&(t[n]=r),t);class Vu{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const zu=v(Vu);function Gu(t,n){return zu.set(t,n)}function Ju(){er(setTimeout(rr,0),(t=>{zu.remove(t)}))}function Wu(t,...n){return Qn(n,(n=>{Qn(n,((n,r)=>{if(t[r]&&(nt(n)||w(n)||n.forEach))return Wu(t[r],n);t[r]=n}))})),t}class Hu{static models=new Map;constructor(t,n){c(n)?(en(this,n),this.modelName=t,Hu.models.set(t,n)):en(this,t)}delete(t){Hu.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Hu.models.set(t||this.modelName,this)}has(t){return Hu.models.has(t||this.modelName)}get(t){return Hu.models.get(t||this.modelName)}}function Ku(t,n){return c(n)?v(Hu,[t,n]):k(t,Hu.models)}function Qu(t,n){return[t,n]}function Xu(t,n,r){const e=t.length,o=[];for(let u=0;uC(r,(r=>rt(t[r],n[r])));function nc(t,n,r){return n&&nt(t)||Qt(n)&&w(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function rc(t,n,r){return Qt(r)&&w(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class ec{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Dn(t,(n=>{t[n]=new ec(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new ec(r),!0)})}}function oc(){return[]}function uc(){return!1}const cc=()=>({}),ic=()=>"",sc=()=>!0;async function fc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const gc=v(hc);class pc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):c(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=wr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function dc(t){return new pc(t)}async function mc(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{o%n||(e.push([]),o&&r++),e[r].push(t)})),e}function n(t){return t.length=0,t}function e(t){return t.slice()}function r(t){return void 0===t}function o(t){return Boolean(t.length)}function c(t){return null===t}function u(t){return!r(t)&&!c(t)}function i(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const f=n.call(r,t,c,e,i,s,o);u(f)&&e.push(f)})):s(t,((t,c,i,s)=>{const f=n(t,c,e,i,s,r,o);u(f)&&e.push(f)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const c=await n(t,r,e,o);u(c)&&e.push(c)})),e}const{sign:h}=Math;function d(t){return-1===h(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}function m(t,n,e=1,r=[]){return d(e)?r:t{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function $(t,n=1,e=t.length){return t.splice(n,e)}const S=(t,n=1,e=t.length)=>$(t,0,e-n);function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function C(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function j(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,c,u,r)&&e.push(t)})),e}async function L(t,n,e=[],r){return await a(t,(async(t,o,c,u)=>{!0===await n(t,o,e,c,u,r)&&e.push(t)})),e}function T(t,n){return n?t.slice(0,n):t[0]}function B(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e}function N(t){return t.slice(0,t.length-1)}function R(t,...n){return f(t,(t=>{if(j(n,(n=>n.includes(t))))return t}))}function P(t,n,e){if(!t)return;const r=t.length;if(u(e))for(let o=0;o(e=e[t],u(e)))),e}const q=Object.keys;function z(t){if(t)return q(t)}const H=Object.hasOwn;function W(t,...n){if(t)return j(n,(n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}}))}function G(t,...n){if(t)return Boolean(n.find((n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}})))}function V(t,n){return t?.constructor===n||!1}function J(t){return n=>V(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...e){return e?t(n)&&j(e,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!u(t)&&"Object("===t.constructor.toString().trim().slice(9,16),et=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const e=z(t);if(W(n,e))return j(e,(e=>et(t[e],n[e])))}else if(w(t)&&t.length===n.length)return j(t,((t,e)=>et(t,n[e])));return!1};function rt(t,n){return t.length===n.length&&j(t,((t,e)=>et(n[e],t)))}const ot=Math.max;function ct(t){return ot(...t)}function ut(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]}function it(t,n,e=[],r,o){return u(r)?s(t,((t,c,u,i)=>{e[c]=n.call(r,t,c,e,u,i,o)})):s(t,((t,r,c,u)=>{e[r]=n(t,r,e,c,u,o)})),e}async function st(t,n,e){if(!t)return;const r=[],o=t.length;if(e)for(let c=0;c{e[r]=await n(t,r,e,o)})),e}function at(t,n,e=[],r){let o=0;const c=t.length;for(let u=c-1;u>=0;u--)e[o]=n(t[u],u,t,c,r),o++;return e}function lt(t,n,e=[],r){const o=t.length;for(let c=0;c{if(n(t,r))return t;e.push(t)})),e]}function pt(t,n){return n-t}function mt(t){return t.sort(pt)}function wt(t,n){let e=t.length;for(let r=0;re)return Mt(t);if(1===n)return[t[Et(e-1,0)]];const r=[],o={};let c,u=0;for(;u(e=r,n>=t&&(e=r+1,!0)))),e}function Lt(t,n=1){return t.slice(0,n)}function Tt(t,n=1){const e=t.length;return t.slice(e-n,e)}function Bt(t,n,e){return e.indexOf(t)===n}function Nt(t,n,e){return t!==e[n-1]}function Rt(t,n){return n?t.filter(Nt):t.filter(Bt)}function Pt(...t){return Rt(I(t))}function Ut(t,n){const e=t.length;for(let r=0;r!e.has(t)))}function zt(...t){const n=v(Map),e=[];return 2===t.length?x(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&e.push(t.child)})),e)}function Ht(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Wt(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Gt(t){return tt(t)&&t||u(t)&&Buffer.from(t)||Buffer.alloc(0)}function Vt(t){return t.fill(0),t}const Jt=t=>!!u(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=J(String);function tn(t){return!Yt(t)}const nn=Object.assign;function en(t,n){if(nt(n))nn(t,n);else if(Jt(n)){const e=n.name;e?t[e]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function rn(t,...n){const e=n.length;for(let r=0;r{r=n(t),e[r]||(e[r]=0),e[r]++})),e}function sn(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e}function fn(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e}function an(t,n,e,r,o){if(t[o]===r)return!0}function ln(t,n,e="id"){const r=t.findIndex(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function hn(t,n,e="id"){const r=t.find(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function dn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?-1:0:1:-1}function gn(t,n="id",e){return t.sort(((t,r)=>dn(t,r,n,e)))}function pn(t,n){return gn(t,n,!1)[0]}function mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?1:0:-1:1}function wn(t,n="id",e){return t.sort(((t,r)=>mn(t,r,n,e)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e}function vn(t,n="id"){const e={};return s(t,(t=>{e[t[n]]=t})),e}function An(t,n,e,r){return it(t,r?(t,o)=>t[n].call(r,e):(t,r)=>t[n](e))}function In(t,n,e,r){return ft(t,r?t=>t[n].call(r,e):async t=>t[n](e))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function xn(t,n){return it(t,(t=>En(t,n)))}function $n(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):o.localeCompare(c)}function Sn(t,n="id",e){return t.sort(((t,r)=>$n(t,r,n,e)))}function Mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c.localeCompare(o)}function Cn(t,n="id",e){return t.sort(((t,r)=>Mn(t,r,n,e)))}function jn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function On(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Fn(t){return n=>!!u(n)&&t.test(n)}const Ln=Fn(/\.css$/),Tn=Fn(/\.html$/),Bn=Fn(/\.js$/),Nn=Fn(/\.json$/);function Rn(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)}function Pn(t,n){return(...e)=>t(...e.splice(0,n))}function Un(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)}const _n=async(t,n,e,r)=>{if(!t)return;const o=z(t);return u(e)?await a(o,((c,u,i,s)=>n.call(e,t[c],c,t,s,o,r))):await a(o,((e,c,u,i)=>n(t[e],e,t,i,o,r))),t};function kn(t,n,e,r){if(!t)return;const o=z(t);return u(e)?s(o,((o,c,u,i)=>{n.call(e,t[o],o,t,i,u,r)})):s(o,((e,o,c,u)=>{n(t[e],e,t,u,c,r)})),t}async function Dn(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{let h;const d=Jn(s);if(u(i)&&s)return h=w(i)?d?n:t:nt(i)||Jt(i)?d?r:e:o?d?c:o:Wn(i)?c:d?r:e,h(i,s,f,a,l)}}const Qn=Kn(s,a,kn,_n,zn,Gn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function te(t,e=t.length){const r=[],o=(...c)=>{if(r.push(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ne(t,e=t.length){const r=[],o=(...c)=>{if(r.unshift(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ee(){}function re(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ue=v(ce);function ie(t,n){return ue.set(t,n)}function se(){re(setTimeout(ee,0),(t=>{ue.remove(t)}))}const fe=Reflect.apply;function ae(t,n,e){if(Jt(t))return fe(t,n,e)}function le(t,n){function e(...t){!1!==e.id&&ue.remove(e.id),e.id=ie((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(ue.remove(e.id),e.id=!1)},e}function he(t,n,...e){if(Jt(t))return n?t.call(n,...e):t(...e)}function de(t){return(...n)=>!t(...n)}function ge(t=0){return(...n)=>n[t]}const pe=t=>{let n;return(...e)=>(u(n)||(n=t(...e)),n)};function me(t){return t?.constructor}function we(t,n=[]){const e=me(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function ye(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=Jt(r.set);for(const[e,c]of t){const u=n(c,e,r,t);o?r.set(e,u):r[e]=u}return r}async function be(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const c=Jt(o.set);for await(const[e,r]of t){const u=await n(r,e,o,t);c?o.set(e,u):o[e]=u}return o}async function ve(t,n,e={}){if(t)return await _n(t,(async(t,r,o,c,u)=>{e[r]=await n(t,r,e,o,c,u)})),e}function Ae(t,n,e={},r,o){if(t)return u(r)?kn(t,((t,c,u,i,s)=>{e[c]=n.call(r,t,c,e,u,i,s,o)})):kn(t,((t,r,c,u,i)=>{e[r]=n(t,r,e,c,u,i,o)})),e}const Ie=Kn(it,ft,Ae,ve,ye,be);function Ee(t){return(...n)=>Ie(t,(t=>t(...n)))}async function xe(t,n){if(!t)return;return O(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function $e(t,n){if(!t)return;return j(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function Se(t,n=i){if(w(t)||qn(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function Me(t,n=i,e){if(Wn(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(w(t)||qn(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const Ce=Kn(j,O,$e,xe,Se,Me);function je(t){return n=>Ce(t,(t=>t(n)))}function Oe(t,n){return(...e)=>t(...n.map((t=>e[t])))}function Fe(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=ie((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{ue.remove(e.id),e.id=!1},e}function Le(t,n){return(...e)=>n(t,...e)}const Te=Function.prototype;function Be(t){return Te.call.bind(t)}const Ne=Object.getOwnPropertyNames,Re=Object.getOwnPropertyDescriptor,Pe=Object.defineProperty,Ue=Be(Object.hasOwnProperty),_e=Object.is;function ke(t,n){return t+n}function De(t){return t-1}function Ze(t,n){return t/n}function qe(t){return t+1}function ze(t,n){return t*n}function He(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:We}=Math;function Ge(t,n=0){return We()*(t-n)+n}function Ve(t,n){return t%n}function Je(t){return t.reduce(((t,n)=>t-n),0)}function Ke(t){return t.reduce(((t,n)=>t+n),0)}function Qe(t,n,e){return t>n&&te}const{sign:Ye}=Math;function tr(t){return 1===Ye(t)}function nr(t){return 0===t}const er=Object.entries;function rr(t){if(u(t))return er(t)}function or(t){const n=[];return kn(t,((t,e)=>{u(t)&&n.push(e)})),n}async function cr(t,n=i,e={}){return await _n(t,(async(t,r,o,c,i)=>{const s=await n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function ur(t,n=i,e={}){return kn(t,((t,r,o,c,i)=>{const s=n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function ir(t,n,e={}){return kn(t,((t,r,o,c,u)=>{!0===n(t,r,e,o,c,u)&&(e[r]=t)})),e}async function sr(t,n,e={}){return await _n(t,(async(t,r,o,c,u)=>{!0===await n(t,r,e,o,c,u)&&(e[r]=t)})),e}function fr(t,n={}){if(t)return kn(t,((t,e)=>{n[t]=e})),n}const ar=(t,n)=>{if(t===n)return!0;const e=z(t),r=z(n);return e.length===r.length&&j(e,(e=>t[e]===n[e]))},lr=/[()[\]{}*+?^$|#.,/\\\s-]/g;function hr(t){return t.replace(lr,"\\$&")}function dr(t,n){return n?dr(it(t,hr)):RegExp(t.join("|"))}const gr=Q("RegExp"),pr=X(gr);function mr(t,n){if(!t)return{};if(w(n)){const e=dr(n);return ir(t,((t,n)=>!e.test(n)))}if(pr(n))return ir(t,((t,e)=>!n.test(e)));if(Yt(n))return ir(t,((t,e)=>e!==n));if(Qt(n)){const e=n.toString();return ir(t,((t,n)=>n!==e))}return Jt(n)?ir(t,((t,e)=>!n(t,e))):nn({},t)}const wr=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e};function yr(t){if(!t)return;if(nt(t))return z(t).length;const n=t.length;if(u(n))return n;const e=t.size;return u(n)?e:z(t).length}const br=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},vr=t=>{const n=[],e=[];return kn(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},Ar=/[ _-]+/g;function Ir(t){let n="";return t.replace(Ar," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Er=/[ _-]+/g,xr=/[ ]+/g;function $r(t){return t.replace(/([A-Z]+)/g," $1").replace(Er," ").trim().toLowerCase().replace(xr,"-")}const Sr=/[ _-]+/g,Mr=/[ ]+/g;function Cr(t){return t.replace(/([A-Z]+)/g," $1").replace(Sr," ").trim().toLowerCase().replace(Mr,"_")}const jr=/[ _-]+/g;function Or(t){return t.replace(/([A-Z]+)/g," $1").replace(jr," ").trim().toUpperCase()}const Fr=/[ _-]+/g;function Lr(t){return t.replace(/([A-Z]+)/g," $1").replace(Fr," ").trim().toLowerCase()}function Tr(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)}function Br(t,n=1){return t[t.length-n]}function Nr(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Rr(t,n=1){return t.slice(0,-1*n)}function Pr(t,n=1){return t.substring(n)}function Ur(t,n,e){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),e)}const _r=/%(?![\da-f]{2})/gi,kr=/&/g,Dr=//g,qr=/"/g;function zr(t){return decodeURIComponent(t.replace(_r,(()=>"%25")))}function Hr(t){return t.replace(kr,"&").replace(Dr,"<").replace(Zr,">").replace(qr,""")}function Wr(t){return Hr(zr(t))}const Gr=/\S+/g,Vr=/\w+/g;function Jr(t){return t.match(Gr)||[]}function Kr(t){return t.match(Vr)||[]}function Qr(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=e-n;for(;u=0&&(c=r[u]," "!==c);u--);return t.slice(0,u).trim()})(t,n,e):t}function Xr(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=n;for(;u0&&(c=r[u]," "!==c);u++);return t.substring(u,e).trim()})(t,n,e):t}const Yr=/\w+/g;function to(t){return t[0].toUpperCase()}function no(t){return to(t)+Pr(t)}function eo(t){return to(t)+Pr(t).toLowerCase()}function ro(t){return t.replace(Yr,(t=>no(t)))}function oo(t){return t.replace(Yr,(t=>eo(t)))}function co(t){return me(t)?.name}function uo(t){return!!u(t)&&"[object Arguments]"===t.toString()}const io=Q("Map"),so=X(io),fo=/Array/,ao="Array";function lo(t){if(t){const n=co(t);if(fo.test(n)&&n!==ao)return!0}return!1}function ho(t){return!u(t)}function go(t,n){if(ho(t)||Jt(t))return!1;if(w(t)||lo(t))return!0;const e=t.length;if(!ho(e)||!Qt(e)||e<0)return!1;if(n){const n=z(t);return!!n&&Ce(n,((t,n)=>n>=0&&Qt(n)))}return!0}const po=Q("BigInt"),mo=X(po),wo=Q("Boolean"),yo=X(wo),bo=Q("ArrayBuffer"),vo=X(bo);function Ao(t,n){return!(!t||!n)&&t instanceof n}const Io=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function Eo(t){if(u(t)){const n=t?.constructor?.name;return Io.test(n)}return!1}const xo=Q("Date"),$o=X(xo);function So(t){return Yt(t)||w(t)?!o(t):nt(t)?!yr(t):!u(t)}function Mo(t){return!1===t}const Co=Q("Float32Array"),jo=X(Co),Oo=Q("Float64Array"),Fo=X(Oo),{isInteger:Lo}=Number,To=Lo,Bo=Q("Int16Array"),No=X(Bo),Ro=Q("Int32Array"),Po=X(Ro),Uo=Q("Int8Array"),_o=X(Uo);function ko(t){return u(t)&&"function"==typeof t[Symbol.iterator]}function Do(t){return!!t&&t instanceof Promise}function Zo(t){return!!t&&(Do(t)||Jn(t)||Wn(t))}function qo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function zo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Ho(t,n){return!ho(t)&&!ho(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Wo}=Number,Go=Wo;function Vo(t,n){const e=me(t),r=me(n);return e===r&&e.name===r.name}function Jo(t){return!0===t}const Ko=Q("Uint16Array"),Qo=X(Ko),Xo=Q("Uint32Array"),Yo=X(Xo),tc=Q("Uint8Array"),nc=X(tc),ec=Q("Uint8ClampedArray"),rc=X(ec),oc=Q("WeakMap"),cc=X(oc),uc=void 0!==globalThis.Deno,ic=void 0!==globalThis.process&&process.versions&&process.versions.node;function sc(t,n=!0){return Boolean(t)&&n}function fc(t,n=!0){return!1===Boolean(t)&&n}function ac(t,n,e,r){if(u(t)){if(Jt(n))return e?ae(n,e,r):n(...r);if(nt(n))return n[e]=t,n}}function lc(t,n){return Mo(et(t,n))}const hc=JSON;function dc(t,n){if(t)return hc.parse(t,n)}const gc=hc.stringify;function pc(t,n,e){const r=globalThis.options||e;let o;return Jt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${gc(t)}\n\t\tExpected: ${gc(n)}`,r)}async function mc(t,n,e){const r=await t;return!(Jt(n)&&!1===await n(r,e))&&!lc(r,n)||pc(r,n,e)}function wc(t,n,e){if(Zo(t)||Zo(n))return mc(t,n,e);return!(Jt(n)&&!1===n(t,e))&&!lc(t,n)||pc(t,n,e)}function yc(t,n,e){const r=Ie(t,(t=>Jt(t)?t.bind(n):t));return e?rn(e,r):r}function bc(t){if(t){if(tt(t))return Vt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const vc=globalThis.structuredClone;function Ac(t){return vc(t)}async function Ic(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;csc(t)))}async function xc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);u(r)&&e.push(r)}return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);u(c)&&r(c)}return o}const c=Jt(o.set);for await(const[e,r]of t){const i=await n(r,e,o,t);u(i)&&(c?o.set(e,i):o[e]=i)}return o}function $c(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);u(c)&&o(c)}return r}const o=Jt(r.set);for(const[e,c]of t){const i=n(c,e,r,t);u(i)&&(o?r.set(e,i):r[e]=i)}return r}const Sc=Kn(f,l,ur,cr,$c,xc);function Mc(...t){return Jn(t[0])?async function(...n){return Ce(t,(async t=>Ce(n,(async n=>t(n)))))}:function(...n){return Ce(t,(t=>Ce(n,(n=>t(n)))))}}function Cc(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=Jt(r.set);for(const[o,c]of t){!0===n(c,o,r,t)&&(e?r.set(o,c):r[o]=c)}}return r}async function jc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=Jt(o.set);for await(const[r,c]of t){!0===await n(c,r,o,t)&&(e?o.set(r,c):o[r]=c)}}return o}const Oc=Kn(F,L,ir,sr,Cc,jc);function Fc(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const Lc=Fc(s),Tc=Fc(M);function Bc(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const Nc=Bc(a),Rc=Bc(C);function Pc(t,n){const e=we(t),r=e.push||e.add;if(r&&Jt(r)){const o=r.bind(e);t.forEach((t=>{const r=n(t,e);o(r)}))}else Jt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e}function Uc(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e}function _c(t,n,e){return!ho(t)&&!ho(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,e):pr(n)?n.test(t):Jt(n)?n(t):w(n)?j(n,(n=>_c(t,n))):Ce(n,(n=>_c(t,n))):w(t)?pr(n)?j(t,(t=>t.test(n))):Jt(n)?j(t,n):w(n)?j(n,(n=>_c(t,n))):t.includes(n,e):!!nt(t)&&(pr(n)?$e(t,(t=>t.test(n))):Jt(n)?$e(t,n):nt(n)?$e(t,((t,e)=>t===n[e])):$e(t,(t=>_c(t,n))))))}const kc=Fn(/\./),Dc=(t,n,e)=>(n&&!u(t[n])&&(t[n]=e),t);class Zc{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const qc=v(Zc);function zc(t,n){return qc.set(t,n)}function Hc(){re(setTimeout(ee,0),(t=>{qc.remove(t)}))}function Wc(t,...n){return Qn(n,(n=>{Qn(n,((n,e)=>{if(t[e]&&(nt(n)||w(n)||n.forEach))return Wc(t[e],n);t[e]=n}))})),t}class Gc{static models=new Map;constructor(t,n){u(n)?(rn(this,n),this.modelName=t,Gc.models.set(t,n)):rn(this,t)}delete(t){Gc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Gc.models.set(t||this.modelName,this)}has(t){return Gc.models.has(t||this.modelName)}get(t){return Gc.models.get(t||this.modelName)}}function Vc(t,n){return u(n)?v(Gc,[t,n]):Z(t,Gc.models)}function Jc(t,n){return[t,n]}function Kc(t,n,e){const r=t.length,o=[];for(let c=0;cj(e,(e=>et(t[e],n[e])));function Yc(t,n,e){return n&&nt(t)||Qt(n)&&w(t)?t[n]=e:t.set?t.set(n,e):t.push?t.push(e):t.add?t.add(e):t[n]=e,t}function tu(t,n,e){return Qt(e)&&w(t)?t[e]=n:t.push?t.push(n):t.add?t.add(n):t[e]=n,t}class nu{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;kn(t,(n=>{t[n]=new nu(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new nu(e),!0)})}}function eu(){return[]}function ru(){return!1}const ou=()=>({}),cu=()=>"",uu=()=>!0;async function iu(t,n){for(let e=0;e0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const lu=v(au);class hu{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):u(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=we(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function du(t){return new hu(t)}async function gu(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;c{yo(t)&&t&&(mu[n]=t)})),s(wu.brands,(t=>{mu[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{mu[t]=!0}))}function yu(t,n,e,r){return t.addEventListener(n,e,r),t}function bu(t,n,e,r){return t.removeEventListener(n,e,r),t}function vu(t){return 13===t.keyCode}const Au=document.createDocumentFragment.bind(document);function Iu(t,n){return t.appendChild(n),n}function Eu(t,n){return w(n)?br(n,it(n,(n=>t.getAttribute(n)))):(kn(n,((n,e)=>{t.setAttribute(e,n)})),t)}const xu=/^.[\w_-]+$/,$u=/^[A-Za-z]+$/,Su=/\s/,Mu=document.getElementsByClassName.bind(document),Cu=document.getElementsByTagName.bind(document),ju=document.getElementById.bind(document),Ou=document.querySelector.bind(document),Fu=document.querySelectorAll.bind(document);function Lu(t){switch(t[0]){case"#":if(!Su.test(t))return ju(Pr(t));break;case".":if(xu.test(t))return Mu(Pr(t));break;default:if($u.test(t))return Cu(t)}return Fu(t)}const Tu=document.createElement.bind(document);function Bu(t){const n=kc(t)&&t||`${t}.js`;return(t=>Qc((n=>{yu(t,"load",n,!0),yu(t,"error",n,!0),Iu(Ou("head"),t)})))(Eu(Tu("script"),{async:"",src:n}))}function Nu(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&yu(document,"DOMContentLoaded",t),!1)}Nu((()=>{const t=ju("AcidLib");Bu(t&&t.getAttribute("data-index")||"/index")}));const Ru=location.protocol,Pu="http:"===Ru?"ws":"wss",Uu=location.hostname,_u={hardware:{cores:navigator.hardwareConcurrency},host:{name:Uu,protocol:Ru,protocolSocket:Pu}};function ku(){rn(_u,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function Du(){ku()}let Zu;Nu(Du),yu(window,"load",Du,!0),yu(window,"resize",Du,!0),function(t){try{t().removeItem("TESTING"),Zu=!0}catch(t){Zu=!1}}((()=>localStorage));class qu{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=du(t)}hasLocal=Zu;setItem(t,n){return this.hasLocal&&this.local.setItem(t,Yt(n)?n:gc(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return u(n)?n:!u(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}function zu(t){return new qu(t)}const Hu=(t,n)=>`color:${t};background:${n};`,Wu={alert:Hu("#fff","#f44336"),important:Hu("#fff","#E91E63"),notify:Hu("#fff","#651FFF"),warning:Hu("#000","#FFEA00")},Gu=(t,n)=>{const e=Yt(t)?t:gc(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Wu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Wu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},Vu=(t,n,e)=>{Wu[t]=Hu(n,e)};function Ju(t){return t&&9!==t.nodeType}function Ku(t){return!!u(t)&&"[object HTMLCollection]"===t.toString()}function Qu(t){return!!u(t)&&"[object NodeList]"===t.toString()}export{qu as BrowserStorage,Xn as Chain,Zc as Intervals,Gc as Model,nu as Store,ce as Timers,au as UniqID,hu as VirtualStorage,ke as add,Rn as after,Iu as append,ae as apply,dr as arrayToRegex,Uc as arraysToObject,Pn as ary,wc as assert,mc as assertAsync,rn as assign,on as assignToClass,en as assignToObject,Un as before,yc as bindAll,zu as browserStorage,Be as cacheNativeMethod,He as calcProgress,Ir as camelCase,Yn as chain,t as chunk,Nr as chunkString,bc as clear,n as clearArray,Vt as clearBuffer,Hc as clearIntervals,se as clearTimers,Ac as clone,e as cloneArray,we as cloneType,Gu as cnsl,Vu as cnslTheme,Ec as compact,or as compactKeys,Sc as compactMap,f as compactMapArray,l as compactMapAsyncArray,cr as compactMapAsyncObject,ur as compactMapObject,Ic as concurrent,st as concurrentEachArray,Kc as concurrentStatus,v as construct,K as constructorName,un as countBy,sn as countKey,fn as countWithoutKey,Au as createFragment,te as curry,ne as curryRight,le as debounce,De as deduct,Pe as defProp,x as difference,Ze as divide,$ as drop,S as dropRight,Qn as each,s as eachArray,a as eachAsyncArray,_n as eachAsyncObject,kn as eachObject,M as eachRight,C as eachRightAsync,A as ensureArray,Gt as ensureBuffer,nr as equalsZero,hr as escapeRegex,lr as escapeRegexRegex,yu as eventAdd,bu as eventRemove,Ce as every,Mc as everyArg,j as everyArray,O as everyAsyncArray,xe as everyAsyncObject,$e as everyObject,cn as extendClass,Oc as filter,F as filterArray,L as filterAsyncArray,sr as filterAsyncObject,ir as filterObject,ln as findIndex,an as findIndexCache,hn as findItem,T as first,B as flatten,I as flattenDeep,Lc as flow,Nc as flowAsync,Rc as flowAsyncRight,Tc as flowRight,E as forEach,Dn as forEachAsync,Pc as forMap,zn as forOf,Gn as forOfAsync,$c as forOfCompactMap,xc as forOfCompactMapAsync,Se as forOfEvery,Me as forOfEveryAsync,Cc as forOfFilter,jc as forOfFilterAsync,ye as forOfMap,be as forOfMapAsync,Kn as generateLoop,Z as get,Mu as getByClass,ju as getById,Cu as getByTag,rr as getEntries,jn as getFileExtension,On as getFilename,yn as getHighest,pn as getLowest,Ft as getNumberInsertIndex,Re as getPropDesc,Ne as getPropNames,me as getType,co as getTypeName,bn as groupBy,_c as has,G as hasAnyKeys,kc as hasDot,W as hasKeys,o as hasLength,Zu as hasLocal,Ue as hasProp,u as hasValue,Hr as htmlEntities,he as ifInvoke,Dc as ifNotAssign,ac as ifValue,Bu as importjs,gu as inAsync,pu as inSync,qe as increment,vn as indexBy,_u as info,N as initial,Rr as initialString,Tr as insertInRange,R as intersection,zc as interval,qc as intervals,fr as invert,P as invokeArray,An as invokeCollection,In as invokeCollectionAsync,mu as isAgent,uo as isArguments,w as isArray,vo as isArrayBuffer,bo as isArrayBufferCall,go as isArrayLike,Jn as isAsync,Vn as isAsyncCall,mo as isBigInt,po as isBigIntCall,yo as isBoolean,wo as isBooleanCall,tt as isBuffer,Y as isBufferCall,Ao as isChild,Eo as isCloneable,V as isConstructor,J as isConstructorFactory,Q as isConstructorNameFactory,$o as isDate,xo as isDateCall,uc as isDeno,Nu as isDocumentReady,Ju as isDom,So as isEmpty,vu as isEnter,et as isEqual,jo as isF32,Co as isF32Call,Fo as isF64,Oo as isF64Call,Mo as isFalse,fc as isFalsy,Ln as isFileCSS,Tn as isFileHTML,Bn as isFileJS,Nn as isFileJSON,To as isFloat,Jt as isFunction,Wn as isGenerator,Hn as isGeneratorCall,Ku as isHTMLCollection,No as isI16,Bo as isI16Call,Po as isI32,Ro as isI32Call,_o as isI8,Uo as isI8Call,ko as isIterable,Zo as isKindAsync,so as isMap,io as isMapCall,rt as isMatchArray,ar as isMatchObject,d as isNegative,Qu as isNodeList,ic as isNodejs,y as isNotArray,Xt as isNotNumber,tn as isNotString,c as isNull,Qt as isNumber,Kt as isNumberCall,xt as isNumberEqual,Qe as isNumberInRange,Xe as isNumberNotInRange,qo as isParent,nt as isPlainObject,tr as isPositive,zo as isPrimitive,Do as isPromise,pr as isRegex,gr as isRegexCall,Ho as isRelated,Go as isSafeInt,_e as isSame,Vo as isSameType,qn as isSet,Zn as isSetCall,Yt as isString,Jo as isTrue,sc as isTruthy,X as isTypeFactory,lo as isTypedArray,Qo as isU16,Ko as isU16Call,Yo as isU32,Xo as isU32Call,nc as isU8,rc as isU8C,ec as isU8CCall,tc as isU8Call,r as isUndefined,cc as isWeakMap,oc as isWeakMapCall,nr as isZero,dc as jsonParse,$r as kebabCase,z as keys,ct as largest,ut as last,Lr as lowerCase,Ie as map,it as mapArray,ft as mapAsyncArray,ve as mapAsyncObject,Ae as mapObject,at as mapRightArray,lt as mapWhile,Wc as merge,Vc as model,ze as multiply,de as negate,ho as noValue,Eu as nodeAttribute,ee as noop,lc as notEqual,ge as nthArg,nn as objectAssign,er as objectEntries,yr as objectSize,mr as omit,pe as once,Bt as onlyUnique,Ee as over,je as overEvery,Jc as pair,gt as partition,wr as pick,xn as pluck,En as pluckObject,Qc as promise,Xc as propertyMatch,Ou as querySelector,Fu as querySelectorAll,Ge as randomFloat,Et as randomInt,m as range,p as rangeDown,g as rangeUp,zr as rawURLDecode,Oe as reArg,Fn as regexTestFactory,Ve as remainder,wt as remove,yt as removeBy,Ur as replaceList,bt as rest,Pr as restString,i as returnValue,vt as right,Br as rightString,Ct as sample,Wr as sanitize,ku as saveDimensions,Lu as selector,Yc as setKey,tu as setValue,Mt as shuffle,Ot as smallest,Cr as snakeCase,Sn as sortCollectionAlphabetically,Cn as sortCollectionAlphabeticallyReverse,wn as sortCollectionAscending,mn as sortCollectionAscendingFilter,gn as sortCollectionDescending,dn as sortCollectionDescendingFilter,dt as sortNumberAscending,mt as sortNumberDescening,$n as sortObjectsAlphabetically,Mn as sortObjectsAlphabeticallyReverse,Nt as sortUnique,gc as stringify,eu as stubArray,ru as stubFalse,ou as stubObject,cu as stubString,uu as stubTrue,ht as subtract,Je as subtractAll,pt as subtractReverse,Ke as sumAll,Lt as take,Tt as takeRight,Wu as themes,Fe as throttle,ie as timer,ue as timers,re as times,iu as timesAsync,oe as timesMap,su as timesMapAsync,St as toArray,D as toPath,fu as toggle,Jr as tokenize,Qr as truncate,Xr as truncateRight,Wt as unZip,vr as unZipObject,Pt as union,lu as uniqID,Rt as unique,Ut as untilFalseArray,_t as untilTrueArray,Du as updateDimensions,Or as upperCase,no as upperFirst,ro as upperFirstAll,to as upperFirstLetter,eo as upperFirstOnly,oo as upperFirstOnlyAll,du as virtualStorage,kt as whileCompactMap,Dt as whileEachArray,Zt as whileMapArray,qt as without,Kr as words,Le as wrap,zt as xor,Ht as zip,br as zipObject}; +function t(t,n=1){const e=[];let r=0;return t.forEach(((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)})),e}function n(t){return t.length=0,t}function e(t){return t.slice()}function r(t){return void 0===t}function o(t){return Boolean(t.length)}function c(t){return null===t}function u(t){return!r(t)&&!c(t)}function i(t){return t}function s(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const f=n.call(r,t,c,e,i,s,o);u(f)&&e.push(f)})):s(t,((t,c,i,s)=>{const f=n(t,c,e,i,s,r,o);u(f)&&e.push(f)})),e}async function a(t,n,e,r){if(!t)return;const o=t.length;if(u(e))for(let c=0;c{const c=await n(t,r,e,o);u(c)&&e.push(c)})),e}const{sign:h}=Math;function d(t){return-1===h(t)}function g(t,n,e,r){let o=t;for(;on;)r.push(o),o-=e;return r}function m(t,n,e=1,r=[]){return d(e)?r:t{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)})),e}function $(t,n=1,e=t.length){return t.splice(n,e)}const S=(t,n=1,e=t.length)=>$(t,0,e-n);function M(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function C(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}function j(t,n,e){if(!t)return;const r=t.length;for(let o=0;o{!0===n(t,o,e,c,u,r)&&e.push(t)})),e}async function L(t,n,e=[],r){return await a(t,(async(t,o,c,u)=>{!0===await n(t,o,e,c,u,r)&&e.push(t)})),e}function T(t,n){return n?t.slice(0,n):t[0]}function B(t,n=1){if(!t)return;let e=t;for(let t=0;tt.concat(A(n))),[]);return e}function N(t){return t.slice(0,t.length-1)}function R(t,...n){return f(t,(t=>{if(j(n,(n=>n.includes(t))))return t}))}function P(t,n,e){if(!t)return;const r=t.length;if(u(e))for(let o=0;o(e=e[t],u(e)))),e}const q=Object.keys;function z(t){if(t)return q(t)}const H=Object.hasOwn;function W(t,...n){if(t)return j(n,(n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}}))}function G(t,...n){if(t)return Boolean(n.find((n=>{const e=D(n);if(1===e.length)return H(t,n);{const n=e.pop(),r=Z(e,t);return!!r&&H(r,n)}})))}function V(t,n){return t?.constructor===n||!1}function J(t){return n=>V(n,t)}function K(t){return t?.constructor?.name}function Q(t){return n=>K(n)===t||!1}function X(t){return function(n,...e){return e?t(n)&&j(e,t):t(n)}}const Y=Q("Buffer"),tt=X(Y),nt=t=>!!u(t)&&"Object("===t.constructor.toString().trim().slice(9,16),et=(t,n)=>{if(t===n)return!0;if(tt(t))return t.equals(n);if(t.toString()===n.toString())if(nt(t)){const e=z(t);if(W(n,e))return j(e,(e=>et(t[e],n[e])))}else if(w(t)&&t.length===n.length)return j(t,((t,e)=>et(t,n[e])));return!1};function rt(t,n){return t.length===n.length&&j(t,((t,e)=>et(n[e],t)))}const ot=Math.max;function ct(t){return ot(...t)}function ut(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]}function it(t,n,e=[],r,o){return u(r)?s(t,((t,c,u,i)=>{e[c]=n.call(r,t,c,e,u,i,o)})):s(t,((t,r,c,u)=>{e[r]=n(t,r,e,c,u,o)})),e}async function st(t,n,e){if(!t)return;const r=[],o=t.length;if(e)for(let c=0;c{e[r]=await n(t,r,e,o)})),e}function at(t,n,e=[],r){let o=0;const c=t.length;for(let u=c-1;u>=0;u--)e[o]=n(t[u],u,t,c,r),o++;return e}function lt(t,n,e=[],r){const o=t.length;for(let c=0;c{if(n(t,r))return t;e.push(t)})),e]}function pt(t,n){return n-t}function mt(t){return t.sort(pt)}function wt(t,n){let e=t.length;for(let r=0;re)return Mt(t);if(1===n)return[t[Et(e-1,0)]];const r=[],o={};let c,u=0;for(;u(e=r,n>=t&&(e=r+1,!0)))),e}function Lt(t,n=1){return t.slice(0,n)}function Tt(t,n=1){const e=t.length;return t.slice(e-n,e)}function Bt(t,n,e){return e.indexOf(t)===n}function Nt(t,n,e){return t!==e[n-1]}function Rt(t,n){return n?t.filter(Nt):t.filter(Bt)}function Pt(...t){return Rt(I(t))}function Ut(t,n){const e=t.length;for(let r=0;r!e.has(t)))}function zt(...t){const n=v(Map),e=[];return 2===t.length?x(t[0],t[1]):(s(t,((t,e)=>{s(t,((t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)}))})),E(n,(t=>{1===t.count&&e.push(t.child)})),e)}function Ht(...t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Wt(t){return t[0].map(((n,e)=>t.map((t=>t[e]))))}function Gt(t){return tt(t)&&t||u(t)&&Buffer.from(t)||Buffer.alloc(0)}function Vt(t){return t.fill(0),t}const Jt=t=>!!u(t)&&t instanceof Function,Kt=Q("Number"),Qt=X(Kt);function Xt(t){return!Qt(t)}const Yt=J(String);function tn(t){return!Yt(t)}const nn=Object.assign;function en(t,n){if(nt(n))nn(t,n);else if(Jt(n)){const e=n.name;e?t[e]=n:nn(t,n)}else(Yt(n)||Qt(n))&&(t[n]=n);return t}function rn(t,...n){const e=n.length;for(let r=0;r{r=n(t),e[r]||(e[r]=0),e[r]++})),e}function sn(t,n){let e=0;return s(t,(t=>{t[n]&&e++})),e}function fn(t,n){let e=0;return s(t,(t=>{t[n]||e++})),e}function an(t,n,e,r,o){if(t[o]===r)return!0}function ln(t,n,e="id"){const r=t.findIndex(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function hn(t,n,e="id"){const r=t.find(((t,r)=>an(t,0,0,n,e)));return-1!==r&&r}function dn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?-1:0:1:-1}function gn(t,n="id",e){return t.sort(((t,r)=>dn(t,r,n,e)))}function pn(t,n){return gn(t,n,!1)[0]}function mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c?o?oc?1:0:-1:1}function wn(t,n="id",e){return t.sort(((t,r)=>mn(t,r,n,e)))}function yn(t,n="id"){return wn(t,n)[0]}function bn(t,n){const e={};return s(t,(t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)})),e}function vn(t,n="id"){const e={};return s(t,(t=>{e[t[n]]=t})),e}function An(t,n,e,r){return it(t,r?(t,o)=>t[n].call(r,e):(t,r)=>t[n](e))}function In(t,n,e,r){return ft(t,r?t=>t[n].call(r,e):async t=>t[n](e))}function En(t,n){if(t)return Yt(n)?t[n]:it(n,(n=>t[n]))}function xn(t,n){return it(t,(t=>En(t,n)))}function $n(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):o.localeCompare(c)}function Sn(t,n="id",e){return t.sort(((t,r)=>$n(t,r,n,e)))}function Mn(t,n,e,r){const o=t[e],c=n[e];return o===c&&r?r(t,n,e):c.localeCompare(o)}function Cn(t,n="id",e){return t.sort(((t,r)=>Mn(t,r,n,e)))}function jn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function On(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Fn(t){return n=>!!u(n)&&t.test(n)}const Ln=Fn(/\.css$/),Tn=Fn(/\.html$/),Bn=Fn(/\.js$/),Nn=Fn(/\.json$/);function Rn(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)}function Pn(t,n){return(...e)=>t(...e.splice(0,n))}function Un(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)}const _n=async(t,n,e,r)=>{if(!t)return;const o=z(t);return u(e)?await a(o,((c,u,i,s)=>n.call(e,t[c],c,t,s,o,r))):await a(o,((e,c,u,i)=>n(t[e],e,t,i,o,r))),t};function kn(t,n,e,r){if(!t)return;const o=z(t);return u(e)?s(o,((o,c,u,i)=>{n.call(e,t[o],o,t,i,u,r)})):s(o,((e,o,c,u)=>{n(t[e],e,t,u,c,r)})),t}async function Dn(t,n){const e=[],r=[];let o=0;t.forEach(((t,n)=>{e[o]=t,r[o]=t,o++}));for(let t=0;t{let h;const d=Jn(s);if(u(i)&&s)return h=w(i)?d?n:t:nt(i)||Jt(i)?d?r:e:o?d?c:o:Wn(i)?c:d?r:e,h(i,s,f,a,l)}}const Qn=Kn(s,a,kn,_n,zn,Gn);class Xn{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Qn(t,((t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function Yn(t){return v(Xn,[t])}function te(t,e=t.length){const r=[],o=(...c)=>{if(r.push(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ne(t,e=t.length){const r=[],o=(...c)=>{if(r.unshift(...c),r.length===e){const e=t(...r);return n(r),e}return o};return o}function ee(){}function re(t,n){for(let e=0;e{t(),e.remove(r)}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const ue=v(ce);function ie(t,n){return ue.set(t,n)}function se(){re(setTimeout(ee,0),(t=>{ue.remove(t)}))}const fe=Reflect.apply;function ae(t,n,e){if(Jt(t))return fe(t,n,e)}function le(t,n){function e(...t){!1!==e.id&&ue.remove(e.id),e.id=ie((()=>{e.callable(...t),e.id=!1}),n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(ue.remove(e.id),e.id=!1)},e}function he(t,n,...e){if(Jt(t))return n?t.call(n,...e):t(...e)}function de(t){return(...n)=>!t(...n)}function ge(t=0){return(...n)=>n[t]}const pe=t=>{let n;return(...e)=>(u(n)||(n=t(...e)),n)};function me(t){return t?.constructor}function we(t,n=[]){const e=me(t);return e===Function&&"function"===e.name?function(){}:v(e,n)}function ye(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=Jt(r.set);for(const[e,c]of t){const u=n(c,e,r,t);o?r.set(e,u):r[e]=u}return r}async function be(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const c=Jt(o.set);for await(const[e,r]of t){const u=await n(r,e,o,t);c?o.set(e,u):o[e]=u}return o}async function ve(t,n,e={}){if(t)return await _n(t,(async(t,r,o,c,u)=>{e[r]=await n(t,r,e,o,c,u)})),e}function Ae(t,n,e={},r,o){if(t)return u(r)?kn(t,((t,c,u,i,s)=>{e[c]=n.call(r,t,c,e,u,i,s,o)})):kn(t,((t,r,c,u,i)=>{e[r]=n(t,r,e,c,u,i,o)})),e}const Ie=Kn(it,ft,Ae,ve,ye,be);function Ee(t){return(...n)=>Ie(t,(t=>t(...n)))}async function xe(t,n){if(!t)return;return O(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function $e(t,n){if(!t)return;return j(z(t),((e,r,o,c)=>n(t[e],e,t,c,o)))}function Se(t,n=i){if(w(t)||qn(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function Me(t,n=i,e){if(Wn(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(w(t)||qn(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const Ce=Kn(j,O,$e,xe,Se,Me);function je(t){return n=>Ce(t,(t=>t(n)))}function Oe(t,n){return(...e)=>t(...n.map((t=>e[t])))}function Fe(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=ie((()=>{e.shouldThrottle&&e.callable(...t),e.id=!1}),n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{ue.remove(e.id),e.id=!1},e}function Le(t,n){return(...e)=>n(t,...e)}const Te=Function.prototype;function Be(t){return Te.call.bind(t)}const Ne=Object.getOwnPropertyNames,Re=Object.getOwnPropertyDescriptor,Pe=Object.defineProperty,Ue=Be(Object.hasOwnProperty),_e=Object.is;function ke(t,n){return t+n}function De(t){return t-1}function Ze(t,n){return t/n}function qe(t){return t+1}function ze(t,n){return t*n}function He(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:We}=Math;function Ge(t,n=0){return We()*(t-n)+n}function Ve(t,n){return t%n}function Je(t){return t.reduce(((t,n)=>t-n),0)}function Ke(t){return t.reduce(((t,n)=>t+n),0)}function Qe(t,n,e){return t>n&&te}const{sign:Ye}=Math;function tr(t){return 1===Ye(t)}function nr(t){return 0===t}function er(t){return!(1&~t)}function rr(t){return!(1&t)}const or=Object.entries;function cr(t){if(u(t))return or(t)}function ur(t){const n=[];return kn(t,((t,e)=>{u(t)&&n.push(e)})),n}async function ir(t,n=i,e={}){return await _n(t,(async(t,r,o,c,i)=>{const s=await n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function sr(t,n=i,e={}){return kn(t,((t,r,o,c,i)=>{const s=n(t,r,e,o,c,i);u(s)&&(e[r]=s)})),e}function fr(t,n,e={}){return kn(t,((t,r,o,c,u)=>{!0===n(t,r,e,o,c,u)&&(e[r]=t)})),e}async function ar(t,n,e={}){return await _n(t,(async(t,r,o,c,u)=>{!0===await n(t,r,e,o,c,u)&&(e[r]=t)})),e}function lr(t,n={}){if(t)return kn(t,((t,e)=>{n[t]=e})),n}const hr=(t,n)=>{if(t===n)return!0;const e=z(t),r=z(n);return e.length===r.length&&j(e,(e=>t[e]===n[e]))},dr=/[()[\]{}*+?^$|#.,/\\\s-]/g;function gr(t){return t.replace(dr,"\\$&")}function pr(t,n){return n?pr(it(t,gr)):RegExp(t.join("|"))}const mr=Q("RegExp"),wr=X(mr);function yr(t,n){if(!t)return{};if(w(n)){const e=pr(n);return fr(t,((t,n)=>!e.test(n)))}if(wr(n))return fr(t,((t,e)=>!n.test(e)));if(Yt(n))return fr(t,((t,e)=>e!==n));if(Qt(n)){const e=n.toString();return fr(t,((t,n)=>n!==e))}return Jt(n)?fr(t,((t,e)=>!n(t,e))):nn({},t)}const br=(t,n,e={})=>{if(t)return s(n,(n=>{e[n]=t[n]})),e};function vr(t){if(!t)return;if(nt(t))return z(t).length;const n=t.length;if(u(n))return n;const e=t.size;return u(n)?e:z(t).length}const Ar=(t,n)=>{const e={};return s(t,((t,r)=>{e[t]=n[r]})),e},Ir=t=>{const n=[],e=[];return kn(t,((t,r)=>{n.push(r),e.push(t)})),[n,e]},Er=/[ _-]+/g;function xr(t){let n="";return t.replace(Er," ").trim().split(" ").forEach(((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const $r=/[ _-]+/g,Sr=/[ ]+/g;function Mr(t){return t.replace(/([A-Z]+)/g," $1").replace($r," ").trim().toLowerCase().replace(Sr,"-")}const Cr=/[ _-]+/g,jr=/[ ]+/g;function Or(t){return t.replace(/([A-Z]+)/g," $1").replace(Cr," ").trim().toLowerCase().replace(jr,"_")}const Fr=/[ _-]+/g;function Lr(t){return t.replace(/([A-Z]+)/g," $1").replace(Fr," ").trim().toUpperCase()}const Tr=/[ _-]+/g;function Br(t){return t.replace(/([A-Z]+)/g," $1").replace(Tr," ").trim().toLowerCase()}function Nr(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)}function Rr(t,n=1){return t[t.length-n]}function Pr(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function Ur(t,n=1){return t.slice(0,-1*n)}function _r(t,n=1){return t.substring(n)}function kr(t,n,e){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),e)}const Dr=/%(?![\da-f]{2})/gi,Zr=/&/g,qr=//g,Hr=/"/g;function Wr(t){return decodeURIComponent(t.replace(Dr,(()=>"%25")))}function Gr(t){return t.replace(Zr,"&").replace(qr,"<").replace(zr,">").replace(Hr,""")}function Vr(t){return Gr(Wr(t))}const Jr=/\S+/g,Kr=/\w+/g;function Qr(t){return t.match(Jr)||[]}function Xr(t){return t.match(Kr)||[]}function Yr(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=e-n;for(;u=0&&(c=r[u]," "!==c);u--);return t.slice(0,u).trim()})(t,n,e):t}function to(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let c,u=n;for(;u0&&(c=r[u]," "!==c);u++);return t.substring(u,e).trim()})(t,n,e):t}const no=/\w+/g;function eo(t){return t[0].toUpperCase()}function ro(t){return eo(t)+_r(t)}function oo(t){return eo(t)+_r(t).toLowerCase()}function co(t){return t.replace(no,(t=>ro(t)))}function uo(t){return t.replace(no,(t=>oo(t)))}function io(t){return me(t)?.name}function so(t){return!!u(t)&&"[object Arguments]"===t.toString()}const fo=Q("Map"),ao=X(fo),lo=/Array/,ho="Array";function go(t){if(t){const n=io(t);if(lo.test(n)&&n!==ho)return!0}return!1}function po(t){return!u(t)}function mo(t,n){if(po(t)||Jt(t))return!1;if(w(t)||go(t))return!0;const e=t.length;if(!po(e)||!Qt(e)||e<0)return!1;if(n){const n=z(t);return!!n&&Ce(n,((t,n)=>n>=0&&Qt(n)))}return!0}const wo=Q("BigInt"),yo=X(wo),bo=Q("Boolean"),vo=X(bo),Ao=Q("ArrayBuffer"),Io=X(Ao);function Eo(t,n){return!(!t||!n)&&t instanceof n}const xo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function $o(t){if(u(t)){const n=t?.constructor?.name;return xo.test(n)}return!1}const So=Q("Date"),Mo=X(So);function Co(t){return Yt(t)||w(t)?!o(t):nt(t)?!vr(t):!u(t)}function jo(t){return!1===t}const Oo=Q("Float32Array"),Fo=X(Oo),Lo=Q("Float64Array"),To=X(Lo),{isInteger:Bo}=Number,No=Bo,Ro=Q("Int16Array"),Po=X(Ro),Uo=Q("Int32Array"),_o=X(Uo),ko=Q("Int8Array"),Do=X(ko);function Zo(t){return u(t)&&"function"==typeof t[Symbol.iterator]}function qo(t){return!!t&&t instanceof Promise}function zo(t){return!!t&&(qo(t)||Jn(t)||Wn(t))}function Ho(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Wo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Go(t,n){return!po(t)&&!po(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Vo}=Number,Jo=Vo;function Ko(t,n){const e=me(t),r=me(n);return e===r&&e.name===r.name}function Qo(t){return!0===t}const Xo=Q("Uint16Array"),Yo=X(Xo),tc=Q("Uint32Array"),nc=X(tc),ec=Q("Uint8Array"),rc=X(ec),oc=Q("Uint8ClampedArray"),cc=X(oc),uc=Q("WeakMap"),ic=X(uc),sc=void 0!==globalThis.Deno,fc=void 0!==globalThis.process&&process.versions&&process.versions.node;function ac(t,n=!0){return Boolean(t)&&n}function lc(t,n=!0){return!1===Boolean(t)&&n}function hc(t,n,e,r){if(u(t)){if(Jt(n))return e?ae(n,e,r):n(...r);if(nt(n))return n[e]=t,n}}function dc(t,n){return jo(et(t,n))}const gc=JSON;function pc(t,n){if(t)return gc.parse(t,n)}const mc=gc.stringify;function wc(t,n,e){const r=globalThis.options||e;let o;return Jt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${mc(t)}\n\t\tExpected: ${mc(n)}`,r)}async function yc(t,n,e){const r=await t;return!(Jt(n)&&!1===await n(r,e))&&!dc(r,n)||wc(r,n,e)}function bc(t,n,e){if(zo(t)||zo(n))return yc(t,n,e);return!(Jt(n)&&!1===n(t,e))&&!dc(t,n)||wc(t,n,e)}function vc(t,n,e){const r=Ie(t,(t=>Jt(t)?t.bind(n):t));return e?rn(e,r):r}function Ac(t){if(t){if(tt(t))return Vt(t);if(w(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Ic=globalThis.structuredClone;function Ec(t){return Ic(t)}async function xc(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;cac(t)))}async function Sc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);u(r)&&e.push(r)}return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const c=await n(e,o,t);u(c)&&r(c)}return o}const c=Jt(o.set);for await(const[e,r]of t){const i=await n(r,e,o,t);u(i)&&(c?o.set(e,i):o[e]=i)}return o}function Mc(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const c=n(e,r,t);u(c)&&o(c)}return r}const o=Jt(r.set);for(const[e,c]of t){const i=n(c,e,r,t);u(i)&&(o?r.set(e,i):r[e]=i)}return r}const Cc=Kn(f,l,sr,ir,Mc,Sc);function jc(...t){return Jn(t[0])?async function(...n){return Ce(t,(async t=>Ce(n,(async n=>t(n)))))}:function(...n){return Ce(t,(t=>Ce(n,(n=>t(n)))))}}function Oc(t,n=i,e){const r=e||we(t);if(w(t)||qn(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=Jt(r.set);for(const[o,c]of t){!0===n(c,o,r,t)&&(e?r.set(o,c):r[o]=c)}}return r}async function Fc(t,n=i,e,r){if(Wn(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||we(t);if(w(t)||qn(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=Jt(o.set);for await(const[r,c]of t){!0===await n(c,r,o,t)&&(e?o.set(r,c):o[r]=c)}}return o}const Lc=Kn(F,L,fr,ar,Oc,Fc);function Tc(t){return(...n)=>e=>{let r=e;return t(n,(t=>{r=t(r)})),r}}const Bc=Tc(s),Nc=Tc(M);function Rc(t){return(...n)=>async e=>{let r=e;return await t(n,(async t=>{r=await t(r)})),r}}const Pc=Rc(a),Uc=Rc(C);function _c(t,n){const e=we(t),r=e.push||e.add;if(r&&Jt(r)){const o=r.bind(e);t.forEach((t=>{const r=n(t,e);o(r)}))}else Jt(e.set)?t.forEach(((t,r)=>{const o=n(t,r,e);e.set(r,o)})):t.forEach(((t,r)=>{const o=n(t,r,e);e[r]=o}));return e}function kc(t,n){const e={};return s(t,((t,r)=>{e[n[r]]=t})),e}function Dc(t,n,e){return!po(t)&&!po(n)&&(t===n||(Yt(t)?Yt(n)?t.includes(n,e):wr(n)?n.test(t):Jt(n)?n(t):w(n)?j(n,(n=>Dc(t,n))):Ce(n,(n=>Dc(t,n))):w(t)?wr(n)?j(t,(t=>t.test(n))):Jt(n)?j(t,n):w(n)?j(n,(n=>Dc(t,n))):t.includes(n,e):!!nt(t)&&(wr(n)?$e(t,(t=>t.test(n))):Jt(n)?$e(t,n):nt(n)?$e(t,((t,e)=>t===n[e])):$e(t,(t=>Dc(t,n))))))}const Zc=Fn(/\./),qc=(t,n,e)=>(n&&!u(t[n])&&(t[n]=e),t);class zc{list=v(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval((()=>{t()}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Hc=v(zc);function Wc(t,n){return Hc.set(t,n)}function Gc(){re(setTimeout(ee,0),(t=>{Hc.remove(t)}))}function Vc(t,...n){return Qn(n,(n=>{Qn(n,((n,e)=>{if(t[e]&&(nt(n)||w(n)||n.forEach))return Vc(t[e],n);t[e]=n}))})),t}class Jc{static models=new Map;constructor(t,n){u(n)?(rn(this,n),this.modelName=t,Jc.models.set(t,n)):rn(this,t)}delete(t){Jc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Jc.models.set(t||this.modelName,this)}has(t){return Jc.models.has(t||this.modelName)}get(t){return Jc.models.get(t||this.modelName)}}function Kc(t,n){return u(n)?v(Jc,[t,n]):Z(t,Jc.models)}function Qc(t,n){return[t,n]}function Xc(t,n,e){const r=t.length,o=[];for(let c=0;cj(e,(e=>et(t[e],n[e])));function nu(t,n,e){return n&&nt(t)||Qt(n)&&w(t)?t[n]=e:t.set?t.set(n,e):t.push?t.push(e):t.add?t.add(e):t[n]=e,t}function eu(t,n,e){return Qt(e)&&w(t)?t[e]=n:t.push?t.push(n):t.add?t.add(n):t[e]=n,t}class ru{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;kn(t,(n=>{t[n]=new ru(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new ru(e),!0)})}}function ou(){return[]}function cu(){return!1}const uu=()=>({}),iu=()=>"",su=()=>!0;async function fu(t,n){for(let e=0;e0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const du=v(hu);class gu{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):u(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=we(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function pu(t){return new gu(t)}async function mu(t,n,...e){const r=t.length,o=[];if(n)for(let c=0;c{vo(t)&&t&&(yu[n]=t)})),s(bu.brands,(t=>{yu[t.brand]=t.version}));else if(navigator.userAgent){let t=navigator.userAgent.toLowerCase();t=t.replace(/_/g,"."),t=t.replace(/[#_,;()]/g,"");s(t.split(/ |\//),(t=>{yu[t]=!0}))}function vu(t,n,e,r){return t.addEventListener(n,e,r),t}function Au(t,n,e,r){return t.removeEventListener(n,e,r),t}function Iu(t){return 13===t.keyCode}const Eu=document.createDocumentFragment.bind(document);function xu(t,n){return t.appendChild(n),n}function $u(t,n){return w(n)?Ar(n,it(n,(n=>t.getAttribute(n)))):(kn(n,((n,e)=>{t.setAttribute(e,n)})),t)}const Su=/^.[\w_-]+$/,Mu=/^[A-Za-z]+$/,Cu=/\s/,ju=document.getElementsByClassName.bind(document),Ou=document.getElementsByTagName.bind(document),Fu=document.getElementById.bind(document),Lu=document.querySelector.bind(document),Tu=document.querySelectorAll.bind(document);function Bu(t){switch(t[0]){case"#":if(!Cu.test(t))return Fu(_r(t));break;case".":if(Su.test(t))return ju(_r(t));break;default:if(Mu.test(t))return Ou(t)}return Tu(t)}const Nu=document.createElement.bind(document);function Ru(t){const n=Zc(t)&&t||`${t}.js`;return(t=>Yc((n=>{vu(t,"load",n,!0),vu(t,"error",n,!0),xu(Lu("head"),t)})))($u(Nu("script"),{async:"",src:n}))}function Pu(t){const n=document.readyState;return"interactive"===n||"completed"===n||"complete"===n?!t||t():(t&&vu(document,"DOMContentLoaded",t),!1)}Pu((()=>{const t=Fu("AcidLib");Ru(t&&t.getAttribute("data-index")||"/index")}));const Uu=location.protocol,_u="http:"===Uu?"ws":"wss",ku=location.hostname,Du={hardware:{cores:navigator.hardwareConcurrency},host:{name:ku,protocol:Uu,protocolSocket:_u}};function Zu(){rn(Du,{bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function qu(){Zu()}let zu;Pu(qu),vu(window,"load",qu,!0),vu(window,"resize",qu,!0),function(t){try{t().removeItem("TESTING"),zu=!0}catch(t){zu=!1}}((()=>localStorage));class Hu{constructor(t){this.hasLocal&&(this.local=localStorage),this.storage=pu(t)}hasLocal=zu;setItem(t,n){return this.hasLocal&&this.local.setItem(t,Yt(n)?n:mc(n)),this.storage.setItem(t,n)}getItem(t){const n=this.storage.getItem(t);return u(n)?n:!u(n)&&this.hasLocal?this.local.getItem(t):void 0}clear(){this.hasLocal&&this.local.clear(),this.storage.clear()}removeItem(t){this.hasLocal&&this.local.removeItem(t),this.storage.removeItem(t)}}function Wu(t){return new Hu(t)}const Gu=(t,n)=>`color:${t};background:${n};`,Vu={alert:Gu("#fff","#f44336"),important:Gu("#fff","#E91E63"),notify:Gu("#fff","#651FFF"),warning:Gu("#000","#FFEA00")},Ju=(t,n)=>{const e=Yt(t)?t:mc(t);if("alert"===n||"warning"===n)return console.trace(`%c${e}`,`${Vu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`);console.log(`%c${e}`,`${Vu[n]}font-size:13px;padding:2px 5px;border-radius:2px;`)},Ku=(t,n,e)=>{Vu[t]=Gu(n,e)};function Qu(t){return t&&9!==t.nodeType}function Xu(t){return!!u(t)&&"[object HTMLCollection]"===t.toString()}function Yu(t){return!!u(t)&&"[object NodeList]"===t.toString()}export{Hu as BrowserStorage,Xn as Chain,zc as Intervals,Jc as Model,ru as Store,ce as Timers,hu as UniqID,gu as VirtualStorage,ke as add,Rn as after,xu as append,ae as apply,pr as arrayToRegex,kc as arraysToObject,Pn as ary,bc as assert,yc as assertAsync,rn as assign,on as assignToClass,en as assignToObject,Un as before,vc as bindAll,Wu as browserStorage,Be as cacheNativeMethod,He as calcProgress,xr as camelCase,Yn as chain,t as chunk,Pr as chunkString,Ac as clear,n as clearArray,Vt as clearBuffer,Gc as clearIntervals,se as clearTimers,Ec as clone,e as cloneArray,we as cloneType,Ju as cnsl,Ku as cnslTheme,$c as compact,ur as compactKeys,Cc as compactMap,f as compactMapArray,l as compactMapAsyncArray,ir as compactMapAsyncObject,sr as compactMapObject,xc as concurrent,st as concurrentEachArray,Xc as concurrentStatus,v as construct,K as constructorName,un as countBy,sn as countKey,fn as countWithoutKey,Eu as createFragment,te as curry,ne as curryRight,le as debounce,De as deduct,Pe as defProp,x as difference,Ze as divide,$ as drop,S as dropRight,Qn as each,s as eachArray,a as eachAsyncArray,_n as eachAsyncObject,kn as eachObject,M as eachRight,C as eachRightAsync,A as ensureArray,Gt as ensureBuffer,nr as equalsZero,gr as escapeRegex,dr as escapeRegexRegex,vu as eventAdd,Au as eventRemove,Ce as every,jc as everyArg,j as everyArray,O as everyAsyncArray,xe as everyAsyncObject,$e as everyObject,cn as extendClass,Lc as filter,F as filterArray,L as filterAsyncArray,ar as filterAsyncObject,fr as filterObject,ln as findIndex,an as findIndexCache,hn as findItem,T as first,B as flatten,I as flattenDeep,Bc as flow,Pc as flowAsync,Uc as flowAsyncRight,Nc as flowRight,E as forEach,Dn as forEachAsync,_c as forMap,zn as forOf,Gn as forOfAsync,Mc as forOfCompactMap,Sc as forOfCompactMapAsync,Se as forOfEvery,Me as forOfEveryAsync,Oc as forOfFilter,Fc as forOfFilterAsync,ye as forOfMap,be as forOfMapAsync,Kn as generateLoop,Z as get,ju as getByClass,Fu as getById,Ou as getByTag,cr as getEntries,jn as getFileExtension,On as getFilename,yn as getHighest,pn as getLowest,Ft as getNumberInsertIndex,Re as getPropDesc,Ne as getPropNames,me as getType,io as getTypeName,bn as groupBy,Dc as has,G as hasAnyKeys,Zc as hasDot,W as hasKeys,o as hasLength,zu as hasLocal,Ue as hasProp,u as hasValue,Gr as htmlEntities,he as ifInvoke,qc as ifNotAssign,hc as ifValue,Ru as importjs,mu as inAsync,wu as inSync,qe as increment,vn as indexBy,Du as info,N as initial,Ur as initialString,Nr as insertInRange,R as intersection,Wc as interval,Hc as intervals,lr as invert,P as invokeArray,An as invokeCollection,In as invokeCollectionAsync,yu as isAgent,so as isArguments,w as isArray,Io as isArrayBuffer,Ao as isArrayBufferCall,mo as isArrayLike,Jn as isAsync,Vn as isAsyncCall,yo as isBigInt,wo as isBigIntCall,vo as isBoolean,bo as isBooleanCall,tt as isBuffer,Y as isBufferCall,Eo as isChild,$o as isCloneable,V as isConstructor,J as isConstructorFactory,Q as isConstructorNameFactory,Mo as isDate,So as isDateCall,sc as isDeno,Pu as isDocumentReady,Qu as isDom,Co as isEmpty,Iu as isEnter,et as isEqual,rr as isEven,Fo as isF32,Oo as isF32Call,To as isF64,Lo as isF64Call,jo as isFalse,lc as isFalsy,Ln as isFileCSS,Tn as isFileHTML,Bn as isFileJS,Nn as isFileJSON,No as isFloat,Jt as isFunction,Wn as isGenerator,Hn as isGeneratorCall,Xu as isHTMLCollection,Po as isI16,Ro as isI16Call,_o as isI32,Uo as isI32Call,Do as isI8,ko as isI8Call,Zo as isIterable,zo as isKindAsync,ao as isMap,fo as isMapCall,rt as isMatchArray,hr as isMatchObject,d as isNegative,Yu as isNodeList,fc as isNodejs,y as isNotArray,Xt as isNotNumber,tn as isNotString,c as isNull,Qt as isNumber,Kt as isNumberCall,xt as isNumberEqual,Qe as isNumberInRange,Xe as isNumberNotInRange,er as isOdd,Ho as isParent,nt as isPlainObject,tr as isPositive,Wo as isPrimitive,qo as isPromise,wr as isRegex,mr as isRegexCall,Go as isRelated,Jo as isSafeInt,_e as isSame,Ko as isSameType,qn as isSet,Zn as isSetCall,Yt as isString,Qo as isTrue,ac as isTruthy,X as isTypeFactory,go as isTypedArray,Yo as isU16,Xo as isU16Call,nc as isU32,tc as isU32Call,rc as isU8,cc as isU8C,oc as isU8CCall,ec as isU8Call,r as isUndefined,ic as isWeakMap,uc as isWeakMapCall,nr as isZero,pc as jsonParse,Mr as kebabCase,z as keys,ct as largest,ut as last,Br as lowerCase,Ie as map,it as mapArray,ft as mapAsyncArray,ve as mapAsyncObject,Ae as mapObject,at as mapRightArray,lt as mapWhile,Vc as merge,Kc as model,ze as multiply,de as negate,po as noValue,$u as nodeAttribute,ee as noop,dc as notEqual,ge as nthArg,nn as objectAssign,or as objectEntries,vr as objectSize,yr as omit,pe as once,Bt as onlyUnique,Ee as over,je as overEvery,Qc as pair,gt as partition,br as pick,xn as pluck,En as pluckObject,Yc as promise,tu as propertyMatch,Lu as querySelector,Tu as querySelectorAll,Ge as randomFloat,Et as randomInt,m as range,p as rangeDown,g as rangeUp,Wr as rawURLDecode,Oe as reArg,Fn as regexTestFactory,Ve as remainder,wt as remove,yt as removeBy,kr as replaceList,bt as rest,_r as restString,i as returnValue,vt as right,Rr as rightString,Ct as sample,Vr as sanitize,Zu as saveDimensions,Bu as selector,nu as setKey,eu as setValue,Mt as shuffle,Ot as smallest,Or as snakeCase,Sn as sortCollectionAlphabetically,Cn as sortCollectionAlphabeticallyReverse,wn as sortCollectionAscending,mn as sortCollectionAscendingFilter,gn as sortCollectionDescending,dn as sortCollectionDescendingFilter,dt as sortNumberAscending,mt as sortNumberDescening,$n as sortObjectsAlphabetically,Mn as sortObjectsAlphabeticallyReverse,Nt as sortUnique,mc as stringify,ou as stubArray,cu as stubFalse,uu as stubObject,iu as stubString,su as stubTrue,ht as subtract,Je as subtractAll,pt as subtractReverse,Ke as sumAll,Lt as take,Tt as takeRight,Vu as themes,Fe as throttle,ie as timer,ue as timers,re as times,fu as timesAsync,oe as timesMap,au as timesMapAsync,St as toArray,D as toPath,lu as toggle,Qr as tokenize,Yr as truncate,to as truncateRight,Wt as unZip,Ir as unZipObject,Pt as union,du as uniqID,Rt as unique,Ut as untilFalseArray,_t as untilTrueArray,qu as updateDimensions,Lr as upperCase,ro as upperFirst,co as upperFirstAll,eo as upperFirstLetter,oo as upperFirstOnly,uo as upperFirstOnlyAll,pu as virtualStorage,kt as whileCompactMap,Dt as whileEachArray,Zt as whileMapArray,qt as without,Xr as words,Le as wrap,zt as xor,Ht as zip,Ar as zipObject}; //# sourceMappingURL=index.js.map diff --git a/package/module/index.js b/package/module/index.js index d8f8b32..d9d37f6 100644 --- a/package/module/index.js +++ b/package/module/index.js @@ -1,2 +1,2 @@ -import{readdir as t,stat as n,mkdir as r,copyFile as e}from"node:fs/promises";import o from"node:path";import{fileURLToPath as u}from"node:url";import c from"path";function i(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function s(t){return t.length=0,t}function f(t){return t.slice()}function a(t){return void 0===t}function l(t){return Boolean(t.length)}function h(t){return null===t}function p(t){return!a(t)&&!h(t)}function g(t){return t}function d(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const s=n.call(e,t,u,r,c,i,o);p(s)&&r.push(s)})):d(t,((t,u,c,i)=>{const s=n(t,u,r,c,i,e,o);p(s)&&r.push(s)})),r}async function w(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const u=await n(t,e,r,o);p(u)&&r.push(u)})),r}const{sign:b}=Math;function v(t){return-1===b(t)}function A(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function E(t,n,r=1,e=[]){return v(r)?e:t{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function T(t,n=1,r=t.length){return t.splice(n,r)}const _=(t,n=1,r=t.length)=>T(t,0,r-n);function F(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function R(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function N(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function D(t,n,r=[],e){return await w(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function L(t,n){return n?t.slice(0,n):t[0]}function Z(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat($(n))),[]);return r}function k(t){return t.slice(0,t.length-1)}function q(t,...n){return m(t,(t=>{if(N(n,(n=>n.includes(t))))return t}))}function V(t,n,r){if(!t)return;const e=t.length;if(p(r))for(let o=0;o(r=r[t],p(r)))),r}const K=Object.keys;function Q(t){if(t)return K(t)}const X=Object.hasOwn;function Y(t,...n){if(t)return N(n,(n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}}))}function tt(t,...n){if(t)return Boolean(n.find((n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}})))}function nt(t,n){return t?.constructor===n||!1}function rt(t){return n=>nt(n,t)}function et(t){return t?.constructor?.name}function ot(t){return n=>et(n)===t||!1}function ut(t){return function(n,...r){return r?t(n)&&N(r,t):t(n)}}const ct=ot("Buffer"),it=ut(ct),st=t=>!!p(t)&&"Object("===t.constructor.toString().trim().slice(9,16),ft=(t,n)=>{if(t===n)return!0;if(it(t))return t.equals(n);if(t.toString()===n.toString())if(st(t)){const r=Q(t);if(Y(n,r))return N(r,(r=>ft(t[r],n[r])))}else if(j(t)&&t.length===n.length)return N(t,((t,r)=>ft(t,n[r])));return!1};function at(t,n){return t.length===n.length&&N(t,((t,r)=>ft(n[r],t)))}const lt=Math.max;function ht(t){return lt(...t)}function pt(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function gt(t,n,r=[],e,o){return p(e)?d(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):d(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function dt(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function wt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function yt(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function It(t,n){return n-t}function Et(t){return t.sort(It)}function jt(t,n){let r=t.length;for(let e=0;er)return Ft(t);if(1===n)return[t[St(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Dt(t,n=1){return t.slice(0,n)}function Lt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Zt(t,n,r){return r.indexOf(t)===n}function kt(t,n,r){return t!==r[n-1]}function qt(t,n){return n?t.filter(kt):t.filter(Zt)}function Vt(...t){return qt(C(t))}function zt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Qt(...t){const n=O(Map),r=[];return 2===t.length?B(t[0],t[1]):(d(t,((t,r)=>{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&r.push(t.child)})),r)}function Xt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Yt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function tn(t){return it(t)&&t||p(t)&&Buffer.from(t)||Buffer.alloc(0)}function nn(t){return t.fill(0),t}const rn=t=>!!p(t)&&t instanceof Function,en=ot("Number"),on=ut(en);function un(t){return!on(t)}const cn=rt(String);function sn(t){return!cn(t)}const fn=Object.assign;function an(t,n){if(st(n))fn(t,n);else if(rn(n)){const r=n.name;r?t[r]=n:fn(t,n)}else(cn(n)||on(n))&&(t[n]=n);return t}function ln(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function dn(t,n){let r=0;return d(t,(t=>{t[n]&&r++})),r}function mn(t,n){let r=0;return d(t,(t=>{t[n]||r++})),r}function wn(t,n,r,e,o){if(t[o]===e)return!0}function yn(t,n,r="id"){const e=t.findIndex(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function bn(t,n,r="id"){const e=t.find(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function vn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function An(t,n="id",r){return t.sort(((t,e)=>vn(t,e,n,r)))}function In(t,n){return An(t,n,!1)[0]}function En(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function jn(t,n="id",r){return t.sort(((t,e)=>En(t,e,n,r)))}function Mn(t,n="id"){return jn(t,n)[0]}function xn(t,n){const r={};return d(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function On(t,n="id"){const r={};return d(t,(t=>{r[t[n]]=t})),r}function $n(t,n,r,e){return gt(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function Cn(t,n,r,e){return mt(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function Sn(t,n){if(t)return cn(n)?t[n]:gt(n,(n=>t[n]))}function Bn(t,n){return gt(t,(t=>Sn(t,n)))}function Tn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function _n(t,n="id",r){return t.sort(((t,e)=>Tn(t,e,n,r)))}function Fn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function Rn(t,n="id",r){return t.sort(((t,e)=>Fn(t,e,n,r)))}function Nn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Pn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Un(t){return n=>!!p(n)&&t.test(n)}const Dn=Un(/\.css$/),Ln=Un(/\.html$/),Zn=Un(/\.js$/),kn=Un(/\.json$/);function qn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Vn(t,n){return(...r)=>t(...r.splice(0,n))}function zn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const Gn=async(t,n,r,e)=>{if(!t)return;const o=Q(t);return p(r)?await w(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await w(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Jn(t,n,r,e){if(!t)return;const o=Q(t);return p(r)?d(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):d(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Wn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let l;const h=rr(i);if(p(c)&&i)return l=j(c)?h?n:t:st(c)||rn(c)?h?e:r:o?h?u:o:Yn(c)?u:h?e:r,l(c,i,s,f,a)}}const or=er(d,w,Jn,Gn,Qn,tr);class ur{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;or(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function cr(t){return O(ur,[t])}function ir(t,n=t.length){const r=[],e=(...o)=>{if(r.push(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function sr(t,n=t.length){const r=[],e=(...o)=>{if(r.unshift(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function fr(){}function ar(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=O(hr);function gr(t,n){return pr.set(t,n)}function dr(){ar(setTimeout(fr,0),(t=>{pr.remove(t)}))}const mr=Reflect.apply;function wr(t,n,r){if(rn(t))return mr(t,n,r)}function yr(t,n){function r(...t){!1!==r.id&&pr.remove(r.id),r.id=gr((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(pr.remove(r.id),r.id=!1)},r}function br(t,n,...r){if(rn(t))return n?t.call(n,...r):t(...r)}function vr(t){return(...n)=>!t(...n)}function Ar(t=0){return(...n)=>n[t]}const Ir=t=>{let n;return(...r)=>(p(n)||(n=t(...r)),n)};function Er(t){return t?.constructor}function jr(t,n=[]){const r=Er(t);return r===Function&&"function"===r.name?function(){}:O(r,n)}function Mr(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function xr(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function Or(t,n,r={}){if(t)return await Gn(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function $r(t,n,r={},e,o){if(t)return p(e)?Jn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Jn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Cr=er(gt,mt,$r,Or,Mr,xr);function Sr(t){return(...n)=>Cr(t,(t=>t(...n)))}async function Br(t,n){if(!t)return;return P(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Tr(t,n){if(!t)return;return N(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function _r(t,n=g){if(j(t)||Kn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function Fr(t,n=g,r){if(Yn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(j(t)||Kn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const Rr=er(N,P,Tr,Br,_r,Fr);function Nr(t){return n=>Rr(t,(t=>t(n)))}function Pr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Ur(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=gr((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{pr.remove(r.id),r.id=!1},r}function Dr(t,n){return(...r)=>n(t,...r)}const Lr=Function.prototype;function Zr(t){return Lr.call.bind(t)}const kr=Object.getOwnPropertyNames,qr=Object.getOwnPropertyDescriptor,Vr=Object.defineProperty,zr=Zr(Object.hasOwnProperty),Gr=Object.is;function Jr(t,n){return t+n}function Wr(t){return t-1}function Hr(t,n){return t/n}function Kr(t){return t+1}function Qr(t,n){return t*n}function Xr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Yr}=Math;function te(t,n=0){return Yr()*(t-n)+n}function ne(t,n){return t%n}function re(t){return t.reduce(((t,n)=>t-n),0)}function ee(t){return t.reduce(((t,n)=>t+n),0)}function oe(t,n,r){return t>n&&tr}const{sign:ce}=Math;function ie(t){return 1===ce(t)}function se(t){return 0===t}const fe=Object.entries;function ae(t){if(p(t))return fe(t)}function le(t){const n=[];return Jn(t,((t,r)=>{p(t)&&n.push(r)})),n}async function he(t,n=g,r={}){return await Gn(t,(async(t,e,o,u,c)=>{const i=await n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function pe(t,n=g,r={}){return Jn(t,((t,e,o,u,c)=>{const i=n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function ge(t,n,r={}){return Jn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function de(t,n,r={}){return await Gn(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function me(t,n={}){if(t)return Jn(t,((t,r)=>{n[t]=r})),n}const we=(t,n)=>{if(t===n)return!0;const r=Q(t),e=Q(n);return r.length===e.length&&N(r,(r=>t[r]===n[r]))},ye=/[()[\]{}*+?^$|#.,/\\\s-]/g;function be(t){return t.replace(ye,"\\$&")}function ve(t,n){return n?ve(gt(t,be)):RegExp(t.join("|"))}const Ae=ot("RegExp"),Ie=ut(Ae);function Ee(t,n){if(!t)return{};if(j(n)){const r=ve(n);return ge(t,((t,n)=>!r.test(n)))}if(Ie(n))return ge(t,((t,r)=>!n.test(r)));if(cn(n))return ge(t,((t,r)=>r!==n));if(on(n)){const r=n.toString();return ge(t,((t,n)=>n!==r))}return rn(n)?ge(t,((t,r)=>!n(t,r))):fn({},t)}const je=(t,n,r={})=>{if(t)return d(n,(n=>{r[n]=t[n]})),r};function Me(t){if(!t)return;if(st(t))return Q(t).length;const n=t.length;if(p(n))return n;const r=t.size;return p(n)?r:Q(t).length}const xe=(t,n)=>{const r={};return d(t,((t,e)=>{r[t]=n[e]})),r},Oe=t=>{const n=[],r=[];return Jn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},$e=/[ _-]+/g;function Ce(t){let n="";return t.replace($e," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Se=/[ _-]+/g,Be=/[ ]+/g;function Te(t){return t.replace(/([A-Z]+)/g," $1").replace(Se," ").trim().toLowerCase().replace(Be,"-")}const _e=/[ _-]+/g,Fe=/[ ]+/g;function Re(t){return t.replace(/([A-Z]+)/g," $1").replace(_e," ").trim().toLowerCase().replace(Fe,"_")}const Ne=/[ _-]+/g;function Pe(t){return t.replace(/([A-Z]+)/g," $1").replace(Ne," ").trim().toUpperCase()}const Ue=/[ _-]+/g;function De(t){return t.replace(/([A-Z]+)/g," $1").replace(Ue," ").trim().toLowerCase()}function Le(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function Ze(t,n=1){return t[t.length-n]}function ke(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function qe(t,n=1){return t.slice(0,-1*n)}function Ve(t,n=1){return t.substring(n)}function ze(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const Ge=/%(?![\da-f]{2})/gi,Je=/&/g,We=//g,Ke=/"/g;function Qe(t){return decodeURIComponent(t.replace(Ge,(()=>"%25")))}function Xe(t){return t.replace(Je,"&").replace(We,"<").replace(He,">").replace(Ke,""")}function Ye(t){return Xe(Qe(t))}const to=/\S+/g,no=/\w+/g;function ro(t){return t.match(to)||[]}function eo(t){return t.match(no)||[]}function oo(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function uo(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const co=/\w+/g;function io(t){return t[0].toUpperCase()}function so(t){return io(t)+Ve(t)}function fo(t){return io(t)+Ve(t).toLowerCase()}function ao(t){return t.replace(co,(t=>so(t)))}function lo(t){return t.replace(co,(t=>fo(t)))}function ho(t){return Er(t)?.name}function po(t){return!!p(t)&&"[object Arguments]"===t.toString()}const go=ot("Map"),mo=ut(go),wo=/Array/,yo="Array";function bo(t){if(t){const n=ho(t);if(wo.test(n)&&n!==yo)return!0}return!1}function vo(t){return!p(t)}function Ao(t,n){if(vo(t)||rn(t))return!1;if(j(t)||bo(t))return!0;const r=t.length;if(!vo(r)||!on(r)||r<0)return!1;if(n){const n=Q(t);return!!n&&Rr(n,((t,n)=>n>=0&&on(n)))}return!0}const Io=ot("BigInt"),Eo=ut(Io),jo=ot("Boolean"),Mo=ut(jo),xo=ot("ArrayBuffer"),Oo=ut(xo);function $o(t,n){return!(!t||!n)&&t instanceof n}const Co=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function So(t){if(p(t)){const n=t?.constructor?.name;return Co.test(n)}return!1}const Bo=ot("Date"),To=ut(Bo);function _o(t){return cn(t)||j(t)?!l(t):st(t)?!Me(t):!p(t)}function Fo(t){return!1===t}const Ro=ot("Float32Array"),No=ut(Ro),Po=ot("Float64Array"),Uo=ut(Po),{isInteger:Do}=Number,Lo=Do,Zo=ot("Int16Array"),ko=ut(Zo),qo=ot("Int32Array"),Vo=ut(qo),zo=ot("Int8Array"),Go=ut(zo);function Jo(t){return p(t)&&"function"==typeof t[Symbol.iterator]}function Wo(t){return!!t&&t instanceof Promise}function Ho(t){return!!t&&(Wo(t)||rr(t)||Yn(t))}function Ko(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Qo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function Xo(t,n){return!vo(t)&&!vo(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:Yo}=Number,tu=Yo;function nu(t,n){const r=Er(t),e=Er(n);return r===e&&r.name===e.name}function ru(t){return!0===t}const eu=ot("Uint16Array"),ou=ut(eu),uu=ot("Uint32Array"),cu=ut(uu),iu=ot("Uint8Array"),su=ut(iu),fu=ot("Uint8ClampedArray"),au=ut(fu),lu=ot("WeakMap"),hu=ut(lu),pu=void 0!==globalThis.Deno,gu=void 0!==globalThis.process&&process.versions&&process.versions.node;function du(t,n=!0){return Boolean(t)&&n}function mu(t,n=!0){return!1===Boolean(t)&&n}function wu(t,n,r,e){if(p(t)){if(rn(n))return r?wr(n,r,e):n(...e);if(st(n))return n[r]=t,n}}function yu(t,n){return Fo(ft(t,n))}const bu=JSON;function vu(t,n){if(t)return bu.parse(t,n)}const Au=bu.stringify;function Iu(t,n,r){const e=globalThis.options||r;let o;return rn(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Au(t)}\n\t\tExpected: ${Au(n)}`,e)}async function Eu(t,n,r){const e=await t;return!(rn(n)&&!1===await n(e,r))&&!yu(e,n)||Iu(e,n,r)}function ju(t,n,r){if(Ho(t)||Ho(n))return Eu(t,n,r);return!(rn(n)&&!1===n(t,r))&&!yu(t,n)||Iu(t,n,r)}function Mu(t,n,r){const e=Cr(t,(t=>rn(t)?t.bind(n):t));return r?ln(r,e):e}function xu(t){if(t){if(it(t))return nn(t);if(j(t))return s(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Ou=globalThis.structuredClone;function $u(t){return Ou(t)}async function Cu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;udu(t)))}async function Bu(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);p(e)&&r.push(e)}return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);p(u)&&e(u)}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);p(c)&&(u?o.set(r,c):o[r]=c)}return o}function Tu(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);p(u)&&o(u)}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);p(c)&&(o?e.set(r,c):e[r]=c)}return e}const _u=er(m,y,pe,he,Tu,Bu);function Fu(...t){return rr(t[0])?async function(...n){return Rr(t,(async t=>Rr(n,(async n=>t(n)))))}:function(...n){return Rr(t,(t=>Rr(n,(n=>t(n)))))}}function Ru(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=rn(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Nu(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=rn(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Pu=er(U,D,ge,de,Ru,Nu);function Uu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Du=Uu(d),Lu=Uu(F);function Zu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const ku=Zu(w),qu=Zu(R);function Vu(t,n){const r=jr(t),e=r.push||r.add;if(e&&rn(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else rn(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function zu(t,n){const r={};return d(t,((t,e)=>{r[n[e]]=t})),r}function Gu(t,n,r){return!vo(t)&&!vo(n)&&(t===n||(cn(t)?cn(n)?t.includes(n,r):Ie(n)?n.test(t):rn(n)?n(t):j(n)?N(n,(n=>Gu(t,n))):Rr(n,(n=>Gu(t,n))):j(t)?Ie(n)?N(t,(t=>t.test(n))):rn(n)?N(t,n):j(n)?N(n,(n=>Gu(t,n))):t.includes(n,r):!!st(t)&&(Ie(n)?Tr(t,(t=>t.test(n))):rn(n)?Tr(t,n):st(n)?Tr(t,((t,r)=>t===n[r])):Tr(t,(t=>Gu(t,n))))))}const Ju=Un(/\./),Wu=(t,n,r)=>(n&&!p(t[n])&&(t[n]=r),t);class Hu{list=O(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Ku=O(Hu);function Qu(t,n){return Ku.set(t,n)}function Xu(){ar(setTimeout(fr,0),(t=>{Ku.remove(t)}))}function Yu(t,...n){return or(n,(n=>{or(n,((n,r)=>{if(t[r]&&(st(n)||j(n)||n.forEach))return Yu(t[r],n);t[r]=n}))})),t}class tc{static models=new Map;constructor(t,n){p(n)?(ln(this,n),this.modelName=t,tc.models.set(t,n)):ln(this,t)}delete(t){tc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),tc.models.set(t||this.modelName,this)}has(t){return tc.models.has(t||this.modelName)}get(t){return tc.models.get(t||this.modelName)}}function nc(t,n){return p(n)?O(tc,[t,n]):H(t,tc.models)}function rc(t,n){return[t,n]}function ec(t,n,r){const e=t.length,o=[];for(let u=0;uN(r,(r=>ft(t[r],n[r])));function cc(t,n,r){return n&&st(t)||on(n)&&j(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function ic(t,n,r){return on(r)&&j(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class sc{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Jn(t,(n=>{t[n]=new sc(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new sc(r),!0)})}}function fc(){return[]}function ac(){return!1}const lc=()=>({}),hc=()=>"",pc=()=>!0;async function gc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const yc=O(wc);class bc{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):p(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=jr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function vc(t){return new bc(t)}async function Ac(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{const i=o.join(u,t);if((await n(i)).isDirectory()){const n=o.join(c,t.replace(u,""));await r(n,{recursive:!0}),await Ec(i,n)}else await async function(t,n,r){const u=o.join(t,r),c=o.join(n,r);await e(u,c)}(u,c,t)})),!0}function jc(t){return globalThis.__filename?__filename:u(t.url)}function Mc(t){return globalThis.__dirname?__dirname:c.dirname(u(t.url))}export{ur as Chain,Hu as Intervals,tc as Model,sc as Store,hr as Timers,wc as UniqID,bc as VirtualStorage,Jr as add,qn as after,wr as apply,ve as arrayToRegex,zu as arraysToObject,Vn as ary,ju as assert,Eu as assertAsync,ln as assign,hn as assignToClass,an as assignToObject,zn as before,Mu as bindAll,Zr as cacheNativeMethod,Xr as calcProgress,Ce as camelCase,cr as chain,i as chunk,ke as chunkString,xu as clear,s as clearArray,nn as clearBuffer,Xu as clearIntervals,dr as clearTimers,$u as clone,f as cloneArray,jr as cloneType,Su as compact,le as compactKeys,_u as compactMap,m as compactMapArray,y as compactMapAsyncArray,he as compactMapAsyncObject,pe as compactMapObject,Cu as concurrent,dt as concurrentEachArray,ec as concurrentStatus,O as construct,et as constructorName,Ec as copyFolder,gn as countBy,dn as countKey,mn as countWithoutKey,jc as currentFile,Mc as currentPath,ir as curry,sr as curryRight,yr as debounce,Wr as deduct,Vr as defProp,B as difference,Hr as divide,T as drop,_ as dropRight,or as each,d as eachArray,w as eachAsyncArray,Gn as eachAsyncObject,Jn as eachObject,F as eachRight,R as eachRightAsync,$ as ensureArray,tn as ensureBuffer,se as equalsZero,be as escapeRegex,ye as escapeRegexRegex,Rr as every,Fu as everyArg,N as everyArray,P as everyAsyncArray,Br as everyAsyncObject,Tr as everyObject,pn as extendClass,Pu as filter,U as filterArray,D as filterAsyncArray,de as filterAsyncObject,ge as filterObject,yn as findIndex,wn as findIndexCache,bn as findItem,L as first,Z as flatten,C as flattenDeep,Du as flow,ku as flowAsync,qu as flowAsyncRight,Lu as flowRight,S as forEach,Wn as forEachAsync,Vu as forMap,Qn as forOf,tr as forOfAsync,Tu as forOfCompactMap,Bu as forOfCompactMapAsync,_r as forOfEvery,Fr as forOfEveryAsync,Ru as forOfFilter,Nu as forOfFilterAsync,Mr as forOfMap,xr as forOfMapAsync,er as generateLoop,H as get,ae as getEntries,Nn as getFileExtension,Pn as getFilename,Mn as getHighest,In as getLowest,Ut as getNumberInsertIndex,qr as getPropDesc,kr as getPropNames,Er as getType,ho as getTypeName,xn as groupBy,Gu as has,tt as hasAnyKeys,Ju as hasDot,Y as hasKeys,l as hasLength,zr as hasProp,p as hasValue,Xe as htmlEntities,br as ifInvoke,Wu as ifNotAssign,wu as ifValue,Ac as inAsync,Ic as inSync,Kr as increment,On as indexBy,k as initial,qe as initialString,Le as insertInRange,q as intersection,Qu as interval,Ku as intervals,me as invert,V as invokeArray,$n as invokeCollection,Cn as invokeCollectionAsync,po as isArguments,j as isArray,Oo as isArrayBuffer,xo as isArrayBufferCall,Ao as isArrayLike,rr as isAsync,nr as isAsyncCall,Eo as isBigInt,Io as isBigIntCall,Mo as isBoolean,jo as isBooleanCall,it as isBuffer,ct as isBufferCall,$o as isChild,So as isCloneable,nt as isConstructor,rt as isConstructorFactory,ot as isConstructorNameFactory,To as isDate,Bo as isDateCall,pu as isDeno,_o as isEmpty,ft as isEqual,No as isF32,Ro as isF32Call,Uo as isF64,Po as isF64Call,Fo as isFalse,mu as isFalsy,Dn as isFileCSS,Ln as isFileHTML,Zn as isFileJS,kn as isFileJSON,Lo as isFloat,rn as isFunction,Yn as isGenerator,Xn as isGeneratorCall,ko as isI16,Zo as isI16Call,Vo as isI32,qo as isI32Call,Go as isI8,zo as isI8Call,Jo as isIterable,Ho as isKindAsync,mo as isMap,go as isMapCall,at as isMatchArray,we as isMatchObject,v as isNegative,gu as isNodejs,M as isNotArray,un as isNotNumber,sn as isNotString,h as isNull,on as isNumber,en as isNumberCall,Bt as isNumberEqual,oe as isNumberInRange,ue as isNumberNotInRange,Ko as isParent,st as isPlainObject,ie as isPositive,Qo as isPrimitive,Wo as isPromise,Ie as isRegex,Ae as isRegexCall,Xo as isRelated,tu as isSafeInt,Gr as isSame,nu as isSameType,Kn as isSet,Hn as isSetCall,cn as isString,ru as isTrue,du as isTruthy,ut as isTypeFactory,bo as isTypedArray,ou as isU16,eu as isU16Call,cu as isU32,uu as isU32Call,su as isU8,au as isU8C,fu as isU8CCall,iu as isU8Call,a as isUndefined,hu as isWeakMap,lu as isWeakMapCall,se as isZero,vu as jsonParse,Te as kebabCase,Q as keys,ht as largest,pt as last,De as lowerCase,Cr as map,gt as mapArray,mt as mapAsyncArray,Or as mapAsyncObject,$r as mapObject,wt as mapRightArray,yt as mapWhile,Yu as merge,nc as model,Qr as multiply,vr as negate,vo as noValue,fr as noop,yu as notEqual,Ar as nthArg,fn as objectAssign,fe as objectEntries,Me as objectSize,Ee as omit,Ir as once,Zt as onlyUnique,Sr as over,Nr as overEvery,rc as pair,At as partition,je as pick,Bn as pluck,Sn as pluckObject,oc as promise,uc as propertyMatch,te as randomFloat,St as randomInt,E as range,I as rangeDown,A as rangeUp,Qe as rawURLDecode,Pr as reArg,Un as regexTestFactory,ne as remainder,jt as remove,Mt as removeBy,ze as replaceList,xt as rest,Ve as restString,g as returnValue,Ot as right,Ze as rightString,Rt as sample,Ye as sanitize,cc as setKey,ic as setValue,Ft as shuffle,Pt as smallest,Re as snakeCase,_n as sortCollectionAlphabetically,Rn as sortCollectionAlphabeticallyReverse,jn as sortCollectionAscending,En as sortCollectionAscendingFilter,An as sortCollectionDescending,vn as sortCollectionDescendingFilter,vt as sortNumberAscending,Et as sortNumberDescening,Tn as sortObjectsAlphabetically,Fn as sortObjectsAlphabeticallyReverse,kt as sortUnique,Au as stringify,fc as stubArray,ac as stubFalse,lc as stubObject,hc as stubString,pc as stubTrue,bt as subtract,re as subtractAll,It as subtractReverse,ee as sumAll,Dt as take,Lt as takeRight,Ur as throttle,gr as timer,pr as timers,ar as times,gc as timesAsync,lr as timesMap,dc as timesMapAsync,_t as toArray,W as toPath,mc as toggle,ro as tokenize,oo as truncate,uo as truncateRight,Yt as unZip,Oe as unZipObject,Vt as union,yc as uniqID,qt as unique,zt as untilFalseArray,Gt as untilTrueArray,Pe as upperCase,so as upperFirst,ao as upperFirstAll,io as upperFirstLetter,fo as upperFirstOnly,lo as upperFirstOnlyAll,vc as virtualStorage,Jt as whileCompactMap,Wt as whileEachArray,Ht as whileMapArray,Kt as without,eo as words,Dr as wrap,Qt as xor,Xt as zip,xe as zipObject}; +import{readdir as t,stat as n,mkdir as r,copyFile as e}from"node:fs/promises";import o from"node:path";import{fileURLToPath as u}from"node:url";import c from"path";function i(t,n=1){const r=[];let e=0;return t.forEach(((t,o)=>{o%n||(r.push([]),o&&e++),r[e].push(t)})),r}function s(t){return t.length=0,t}function f(t){return t.slice()}function a(t){return void 0===t}function l(t){return Boolean(t.length)}function h(t){return null===t}function p(t){return!a(t)&&!h(t)}function g(t){return t}function d(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const s=n.call(e,t,u,r,c,i,o);p(s)&&r.push(s)})):d(t,((t,u,c,i)=>{const s=n(t,u,r,c,i,e,o);p(s)&&r.push(s)})),r}async function w(t,n,r,e){if(!t)return;const o=t.length;if(p(r))for(let u=0;u{const u=await n(t,e,r,o);p(u)&&r.push(u)})),r}const{sign:b}=Math;function v(t){return-1===b(t)}function A(t,n,r,e){let o=t;for(;on;)e.push(o),o-=r;return e}function E(t,n,r=1,e=[]){return v(r)?e:t{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&0===t.parentIndex&&r.push(t.child)})),r}function T(t,n=1,r=t.length){return t.splice(n,r)}const _=(t,n=1,r=t.length)=>T(t,0,r-n);function F(t,n,r){if(!t)return;const e=t.length;for(let o=e-1;o>=0;o--)n(t[o],o,t,e,r);return t}async function R(t,n){if(!t)return;const r=t.length;for(let e=r-1;e>=0;e--)await n(t[e],e,t,r);return t}function N(t,n,r){if(!t)return;const e=t.length;for(let o=0;o{!0===n(t,o,r,u,c,e)&&r.push(t)})),r}async function D(t,n,r=[],e){return await w(t,(async(t,o,u,c)=>{!0===await n(t,o,r,u,c,e)&&r.push(t)})),r}function L(t,n){return n?t.slice(0,n):t[0]}function Z(t,n=1){if(!t)return;let r=t;for(let t=0;tt.concat($(n))),[]);return r}function k(t){return t.slice(0,t.length-1)}function q(t,...n){return m(t,(t=>{if(N(n,(n=>n.includes(t))))return t}))}function V(t,n,r){if(!t)return;const e=t.length;if(p(r))for(let o=0;o(r=r[t],p(r)))),r}const K=Object.keys;function Q(t){if(t)return K(t)}const X=Object.hasOwn;function Y(t,...n){if(t)return N(n,(n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}}))}function tt(t,...n){if(t)return Boolean(n.find((n=>{const r=W(n);if(1===r.length)return X(t,n);{const n=r.pop(),e=H(r,t);return!!e&&X(e,n)}})))}function nt(t,n){return t?.constructor===n||!1}function rt(t){return n=>nt(n,t)}function et(t){return t?.constructor?.name}function ot(t){return n=>et(n)===t||!1}function ut(t){return function(n,...r){return r?t(n)&&N(r,t):t(n)}}const ct=ot("Buffer"),it=ut(ct),st=t=>!!p(t)&&"Object("===t.constructor.toString().trim().slice(9,16),ft=(t,n)=>{if(t===n)return!0;if(it(t))return t.equals(n);if(t.toString()===n.toString())if(st(t)){const r=Q(t);if(Y(n,r))return N(r,(r=>ft(t[r],n[r])))}else if(j(t)&&t.length===n.length)return N(t,((t,r)=>ft(t,n[r])));return!1};function at(t,n){return t.length===n.length&&N(t,((t,r)=>ft(n[r],t)))}const lt=Math.max;function ht(t){return lt(...t)}function pt(t,n){const r=t.length;return n?t.slice(r-n,r):t[r-1]}function gt(t,n,r=[],e,o){return p(e)?d(t,((t,u,c,i)=>{r[u]=n.call(e,t,u,r,c,i,o)})):d(t,((t,e,u,c)=>{r[e]=n(t,e,r,u,c,o)})),r}async function dt(t,n,r){if(!t)return;const e=[],o=t.length;if(r)for(let u=0;u{r[e]=await n(t,e,r,o)})),r}function wt(t,n,r=[],e){let o=0;const u=t.length;for(let c=u-1;c>=0;c--)r[o]=n(t[c],c,t,u,e),o++;return r}function yt(t,n,r=[],e){const o=t.length;for(let u=0;u{if(n(t,e))return t;r.push(t)})),r]}function It(t,n){return n-t}function Et(t){return t.sort(It)}function jt(t,n){let r=t.length;for(let e=0;er)return Ft(t);if(1===n)return[t[St(r-1,0)]];const e=[],o={};let u,c=0;for(;c(r=e,n>=t&&(r=e+1,!0)))),r}function Dt(t,n=1){return t.slice(0,n)}function Lt(t,n=1){const r=t.length;return t.slice(r-n,r)}function Zt(t,n,r){return r.indexOf(t)===n}function kt(t,n,r){return t!==r[n-1]}function qt(t,n){return n?t.filter(kt):t.filter(Zt)}function Vt(...t){return qt(C(t))}function zt(t,n){const r=t.length;for(let e=0;e!r.has(t)))}function Qt(...t){const n=O(Map),r=[];return 2===t.length?B(t[0],t[1]):(d(t,((t,r)=>{d(t,((t,e)=>{let o=n.get(t);if(o){if(o.parentIndex===r)return;o.count++}else o={count:1,parentIndex:r,child:t},n.set(t,o)}))})),S(n,(t=>{1===t.count&&r.push(t.child)})),r)}function Xt(...t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function Yt(t){return t[0].map(((n,r)=>t.map((t=>t[r]))))}function tn(t){return it(t)&&t||p(t)&&Buffer.from(t)||Buffer.alloc(0)}function nn(t){return t.fill(0),t}const rn=t=>!!p(t)&&t instanceof Function,en=ot("Number"),on=ut(en);function un(t){return!on(t)}const cn=rt(String);function sn(t){return!cn(t)}const fn=Object.assign;function an(t,n){if(st(n))fn(t,n);else if(rn(n)){const r=n.name;r?t[r]=n:fn(t,n)}else(cn(n)||on(n))&&(t[n]=n);return t}function ln(t,...n){const r=n.length;for(let e=0;e{e=n(t),r[e]||(r[e]=0),r[e]++})),r}function dn(t,n){let r=0;return d(t,(t=>{t[n]&&r++})),r}function mn(t,n){let r=0;return d(t,(t=>{t[n]||r++})),r}function wn(t,n,r,e,o){if(t[o]===e)return!0}function yn(t,n,r="id"){const e=t.findIndex(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function bn(t,n,r="id"){const e=t.find(((t,e)=>wn(t,0,0,n,r)));return-1!==e&&e}function vn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?-1:0:1:-1}function An(t,n="id",r){return t.sort(((t,e)=>vn(t,e,n,r)))}function In(t,n){return An(t,n,!1)[0]}function En(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u?o?ou?1:0:-1:1}function jn(t,n="id",r){return t.sort(((t,e)=>En(t,e,n,r)))}function Mn(t,n="id"){return jn(t,n)[0]}function xn(t,n){const r={};return d(t,(t=>{const e=n(t);r[e]||(r[e]=[]),r[e].push(t)})),r}function On(t,n="id"){const r={};return d(t,(t=>{r[t[n]]=t})),r}function $n(t,n,r,e){return gt(t,e?(t,o)=>t[n].call(e,r):(t,e)=>t[n](r))}function Cn(t,n,r,e){return mt(t,e?t=>t[n].call(e,r):async t=>t[n](r))}function Sn(t,n){if(t)return cn(n)?t[n]:gt(n,(n=>t[n]))}function Bn(t,n){return gt(t,(t=>Sn(t,n)))}function Tn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):o.localeCompare(u)}function _n(t,n="id",r){return t.sort(((t,e)=>Tn(t,e,n,r)))}function Fn(t,n,r,e){const o=t[r],u=n[r];return o===u&&e?e(t,n,r):u.localeCompare(o)}function Rn(t,n="id",r){return t.sort(((t,e)=>Fn(t,e,n,r)))}function Nn(t){if(t)return t.substring(t.lastIndexOf(".")+1)}function Pn(t){if(t)return t.substring(t.lastIndexOf("/")+1)}function Un(t){return n=>!!p(n)&&t.test(n)}const Dn=Un(/\.css$/),Ln=Un(/\.html$/),Zn=Un(/\.js$/),kn=Un(/\.json$/);function qn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e<=0&&(r=n(...t),e=null),r)}function Vn(t,n){return(...r)=>t(...r.splice(0,n))}function zn(t,n){let r,e=t;return(...t)=>(null!==e&&e--,e>=1?r=n(...t):e=null,r)}const Gn=async(t,n,r,e)=>{if(!t)return;const o=Q(t);return p(r)?await w(o,((u,c,i,s)=>n.call(r,t[u],u,t,s,o,e))):await w(o,((r,u,c,i)=>n(t[r],r,t,i,o,e))),t};function Jn(t,n,r,e){if(!t)return;const o=Q(t);return p(r)?d(o,((o,u,c,i)=>{n.call(r,t[o],o,t,i,c,e)})):d(o,((r,o,u,c)=>{n(t[r],r,t,c,u,e)})),t}async function Wn(t,n){const r=[],e=[];let o=0;t.forEach(((t,n)=>{r[o]=t,e[o]=t,o++}));for(let t=0;t{let l;const h=rr(i);if(p(c)&&i)return l=j(c)?h?n:t:st(c)||rn(c)?h?e:r:o?h?u:o:Yn(c)?u:h?e:r,l(c,i,s,f,a)}}const or=er(d,w,Jn,Gn,Qn,tr);class ur{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;or(t,((t,r)=>{n[r]=function(...r){return this.value=t.call(n,n.value,...r),n}}))}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}function cr(t){return O(ur,[t])}function ir(t,n=t.length){const r=[],e=(...o)=>{if(r.push(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function sr(t,n=t.length){const r=[],e=(...o)=>{if(r.unshift(...o),r.length===n){const n=t(...r);return s(r),n}return e};return e}function fr(){}function ar(t,n){for(let r=0;r{t(),r.remove(e)}),n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const pr=O(hr);function gr(t,n){return pr.set(t,n)}function dr(){ar(setTimeout(fr,0),(t=>{pr.remove(t)}))}const mr=Reflect.apply;function wr(t,n,r){if(rn(t))return mr(t,n,r)}function yr(t,n){function r(...t){!1!==r.id&&pr.remove(r.id),r.id=gr((()=>{r.callable(...t),r.id=!1}),n)}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{!1!==r.id&&(pr.remove(r.id),r.id=!1)},r}function br(t,n,...r){if(rn(t))return n?t.call(n,...r):t(...r)}function vr(t){return(...n)=>!t(...n)}function Ar(t=0){return(...n)=>n[t]}const Ir=t=>{let n;return(...r)=>(p(n)||(n=t(...r)),n)};function Er(t){return t?.constructor}function jr(t,n=[]){const r=Er(t);return r===Function&&"function"===r.name?function(){}:O(r,n)}function Mr(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){o(n(r,e,t))}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);o?e.set(r,c):e[r]=c}return e}async function xr(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))r.push(await n(o,r,t));return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){e(await n(r,o,t))}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);u?o.set(r,c):o[r]=c}return o}async function Or(t,n,r={}){if(t)return await Gn(t,(async(t,e,o,u,c)=>{r[e]=await n(t,e,r,o,u,c)})),r}function $r(t,n,r={},e,o){if(t)return p(e)?Jn(t,((t,u,c,i,s)=>{r[u]=n.call(e,t,u,r,c,i,s,o)})):Jn(t,((t,e,u,c,i)=>{r[e]=n(t,e,r,u,c,i,o)})),r}const Cr=er(gt,mt,$r,Or,Mr,xr);function Sr(t){return(...n)=>Cr(t,(t=>t(...n)))}async function Br(t,n){if(!t)return;return P(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function Tr(t,n){if(!t)return;return N(Q(t),((r,e,o,u)=>n(t[r],r,t,u,o)))}function _r(t,n=g){if(j(t)||Kn(t))for(const r of t){if(!1===n(r,t))return!1}else for(const[r,e]of t){if(!1===n(e,r,t))return!1}return!0}async function Fr(t,n=g,r){if(Yn(t))for await(const e of t(...r)){if(!1===await n(e,t))return!1}else if(j(t)||Kn(t))for(const r of t){if(!1===await n(r,t))return!1}else for(const[r,e]of t){if(!1===await n(e,r,t))return!1}return!0}const Rr=er(N,P,Tr,Br,_r,Fr);function Nr(t){return n=>Rr(t,(t=>t(n)))}function Pr(t,n){return(...r)=>t(...n.map((t=>r[t])))}function Ur(t,n){function r(...t){r.id?r.shouldThrottle=!0:(r.callable(...t),r.id=gr((()=>{r.shouldThrottle&&r.callable(...t),r.id=!1}),n))}return r.id=!1,r.callable=t.bind(r),r.clear=()=>{pr.remove(r.id),r.id=!1},r}function Dr(t,n){return(...r)=>n(t,...r)}const Lr=Function.prototype;function Zr(t){return Lr.call.bind(t)}const kr=Object.getOwnPropertyNames,qr=Object.getOwnPropertyDescriptor,Vr=Object.defineProperty,zr=Zr(Object.hasOwnProperty),Gr=Object.is;function Jr(t,n){return t+n}function Wr(t){return t-1}function Hr(t,n){return t/n}function Kr(t){return t+1}function Qr(t,n){return t*n}function Xr(t,n){return 0!==t&&(0===n?0:n/t*100)}const{random:Yr}=Math;function te(t,n=0){return Yr()*(t-n)+n}function ne(t,n){return t%n}function re(t){return t.reduce(((t,n)=>t-n),0)}function ee(t){return t.reduce(((t,n)=>t+n),0)}function oe(t,n,r){return t>n&&tr}const{sign:ce}=Math;function ie(t){return 1===ce(t)}function se(t){return 0===t}function fe(t){return!(1&~t)}function ae(t){return!(1&t)}const le=Object.entries;function he(t){if(p(t))return le(t)}function pe(t){const n=[];return Jn(t,((t,r)=>{p(t)&&n.push(r)})),n}async function ge(t,n=g,r={}){return await Gn(t,(async(t,e,o,u,c)=>{const i=await n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function de(t,n=g,r={}){return Jn(t,((t,e,o,u,c)=>{const i=n(t,e,r,o,u,c);p(i)&&(r[e]=i)})),r}function me(t,n,r={}){return Jn(t,((t,e,o,u,c)=>{!0===n(t,e,r,o,u,c)&&(r[e]=t)})),r}async function we(t,n,r={}){return await Gn(t,(async(t,e,o,u,c)=>{!0===await n(t,e,r,o,u,c)&&(r[e]=t)})),r}function ye(t,n={}){if(t)return Jn(t,((t,r)=>{n[t]=r})),n}const be=(t,n)=>{if(t===n)return!0;const r=Q(t),e=Q(n);return r.length===e.length&&N(r,(r=>t[r]===n[r]))},ve=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Ae(t){return t.replace(ve,"\\$&")}function Ie(t,n){return n?Ie(gt(t,Ae)):RegExp(t.join("|"))}const Ee=ot("RegExp"),je=ut(Ee);function Me(t,n){if(!t)return{};if(j(n)){const r=Ie(n);return me(t,((t,n)=>!r.test(n)))}if(je(n))return me(t,((t,r)=>!n.test(r)));if(cn(n))return me(t,((t,r)=>r!==n));if(on(n)){const r=n.toString();return me(t,((t,n)=>n!==r))}return rn(n)?me(t,((t,r)=>!n(t,r))):fn({},t)}const xe=(t,n,r={})=>{if(t)return d(n,(n=>{r[n]=t[n]})),r};function Oe(t){if(!t)return;if(st(t))return Q(t).length;const n=t.length;if(p(n))return n;const r=t.size;return p(n)?r:Q(t).length}const $e=(t,n)=>{const r={};return d(t,((t,e)=>{r[t]=n[e]})),r},Ce=t=>{const n=[],r=[];return Jn(t,((t,e)=>{n.push(e),r.push(t)})),[n,r]},Se=/[ _-]+/g;function Be(t){let n="";return t.replace(Se," ").trim().split(" ").forEach(((t,r)=>{n+=0===r?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})),n}const Te=/[ _-]+/g,_e=/[ ]+/g;function Fe(t){return t.replace(/([A-Z]+)/g," $1").replace(Te," ").trim().toLowerCase().replace(_e,"-")}const Re=/[ _-]+/g,Ne=/[ ]+/g;function Pe(t){return t.replace(/([A-Z]+)/g," $1").replace(Re," ").trim().toLowerCase().replace(Ne,"_")}const Ue=/[ _-]+/g;function De(t){return t.replace(/([A-Z]+)/g," $1").replace(Ue," ").trim().toUpperCase()}const Le=/[ _-]+/g;function Ze(t){return t.replace(/([A-Z]+)/g," $1").replace(Le," ").trim().toLowerCase()}function ke(t,n,r){return t.slice(0,n)+r+t.slice(n,t.length)}function qe(t,n=1){return t[t.length-n]}function Ve(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))}function ze(t,n=1){return t.slice(0,-1*n)}function Ge(t,n=1){return t.substring(n)}function Je(t,n,r){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),r)}const We=/%(?![\da-f]{2})/gi,He=/&/g,Ke=//g,Xe=/"/g;function Ye(t){return decodeURIComponent(t.replace(We,(()=>"%25")))}function to(t){return t.replace(He,"&").replace(Ke,"<").replace(Qe,">").replace(Xe,""")}function no(t){return to(Ye(t))}const ro=/\S+/g,eo=/\w+/g;function oo(t){return t.match(ro)||[]}function uo(t){return t.match(eo)||[]}function co(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=r-n;for(;c=0&&(u=e[c]," "!==u);c--);return t.slice(0,c).trim()})(t,n,r):t}function io(t,n){const r=t.length;return r>n?((t,n,r)=>{const e=t.split(""),o=e.length;let u,c=n;for(;c0&&(u=e[c]," "!==u);c++);return t.substring(c,r).trim()})(t,n,r):t}const so=/\w+/g;function fo(t){return t[0].toUpperCase()}function ao(t){return fo(t)+Ge(t)}function lo(t){return fo(t)+Ge(t).toLowerCase()}function ho(t){return t.replace(so,(t=>ao(t)))}function po(t){return t.replace(so,(t=>lo(t)))}function go(t){return Er(t)?.name}function mo(t){return!!p(t)&&"[object Arguments]"===t.toString()}const wo=ot("Map"),yo=ut(wo),bo=/Array/,vo="Array";function Ao(t){if(t){const n=go(t);if(bo.test(n)&&n!==vo)return!0}return!1}function Io(t){return!p(t)}function Eo(t,n){if(Io(t)||rn(t))return!1;if(j(t)||Ao(t))return!0;const r=t.length;if(!Io(r)||!on(r)||r<0)return!1;if(n){const n=Q(t);return!!n&&Rr(n,((t,n)=>n>=0&&on(n)))}return!0}const jo=ot("BigInt"),Mo=ut(jo),xo=ot("Boolean"),Oo=ut(xo),$o=ot("ArrayBuffer"),Co=ut($o);function So(t,n){return!(!t||!n)&&t instanceof n}const Bo=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");function To(t){if(p(t)){const n=t?.constructor?.name;return Bo.test(n)}return!1}const _o=ot("Date"),Fo=ut(_o);function Ro(t){return cn(t)||j(t)?!l(t):st(t)?!Oe(t):!p(t)}function No(t){return!1===t}const Po=ot("Float32Array"),Uo=ut(Po),Do=ot("Float64Array"),Lo=ut(Do),{isInteger:Zo}=Number,ko=Zo,qo=ot("Int16Array"),Vo=ut(qo),zo=ot("Int32Array"),Go=ut(zo),Jo=ot("Int8Array"),Wo=ut(Jo);function Ho(t){return p(t)&&"function"==typeof t[Symbol.iterator]}function Ko(t){return!!t&&t instanceof Promise}function Qo(t){return!!t&&(Ko(t)||rr(t)||Yn(t))}function Xo(t,n){return!!(t&&n&&n.call)&&t instanceof n}function Yo(t){const n=typeof value;return null==t||"object"!==n&&"function"!==n}function tu(t,n){return!Io(t)&&!Io(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)}const{isSafeInteger:nu}=Number,ru=nu;function eu(t,n){const r=Er(t),e=Er(n);return r===e&&r.name===e.name}function ou(t){return!0===t}const uu=ot("Uint16Array"),cu=ut(uu),iu=ot("Uint32Array"),su=ut(iu),fu=ot("Uint8Array"),au=ut(fu),lu=ot("Uint8ClampedArray"),hu=ut(lu),pu=ot("WeakMap"),gu=ut(pu),du=void 0!==globalThis.Deno,mu=void 0!==globalThis.process&&process.versions&&process.versions.node;function wu(t,n=!0){return Boolean(t)&&n}function yu(t,n=!0){return!1===Boolean(t)&&n}function bu(t,n,r,e){if(p(t)){if(rn(n))return r?wr(n,r,e):n(...e);if(st(n))return n[r]=t,n}}function vu(t,n){return No(ft(t,n))}const Au=JSON;function Iu(t,n){if(t)return Au.parse(t,n)}const Eu=Au.stringify;function ju(t,n,r){const e=globalThis.options||r;let o;return rn(e)?o=`${e.name} : ${e.constructor.name}`:e&&(o=`${e.title||e.method.name} -> ${e.file}`),new Error(`Test Failed: ${o}\n\t\tResult: ${Eu(t)}\n\t\tExpected: ${Eu(n)}`,e)}async function Mu(t,n,r){const e=await t;return!(rn(n)&&!1===await n(e,r))&&!vu(e,n)||ju(e,n,r)}function xu(t,n,r){if(Qo(t)||Qo(n))return Mu(t,n,r);return!(rn(n)&&!1===n(t,r))&&!vu(t,n)||ju(t,n,r)}function Ou(t,n,r){const e=Cr(t,(t=>rn(t)?t.bind(n):t));return r?ln(r,e):e}function $u(t){if(t){if(it(t))return nn(t);if(j(t))return s(t);t.clear?t.clear():t.length&&(t.length=0)}return t}const Cu=globalThis.structuredClone;function Su(t){return Cu(t)}async function Bu(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;uwu(t)))}async function _u(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e)){const e=await n(o,r,t);p(e)&&r.push(e)}return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){const u=await n(r,o,t);p(u)&&e(u)}return o}const u=rn(o.set);for await(const[r,e]of t){const c=await n(e,r,o,t);p(c)&&(u?o.set(r,c):o[r]=c)}return o}function Fu(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){const u=n(r,e,t);p(u)&&o(u)}return e}const o=rn(e.set);for(const[r,u]of t){const c=n(u,r,e,t);p(c)&&(o?e.set(r,c):e[r]=c)}return e}const Ru=er(m,y,de,ge,Fu,_u);function Nu(...t){return rr(t[0])?async function(...n){return Rr(t,(async t=>Rr(n,(async n=>t(n)))))}:function(...n){return Rr(t,(t=>Rr(n,(n=>t(n)))))}}function Pu(t,n=g,r){const e=r||jr(t);if(j(t)||Kn(t)){const r=e.push||e.add,o=r&&r.bind(e);for(const r of t){!0===n(r,e,t)&&o(r)}}else{const r=rn(e.set);for(const[o,u]of t){!0===n(u,o,e,t)&&(r?e.set(o,u):e[o]=u)}}return e}async function Uu(t,n=g,r,e){if(Yn(t)){const r=[];for await(const o of t(...e))!0===await n(o,r,t)&&r.push(o);return r}const o=r||jr(t);if(j(t)||Kn(t)){const r=o.push||o.add,e=r&&r.bind(o);for(const r of t){!0===await n(r,o,t)&&e(r)}}else{const r=rn(o.set);for await(const[e,u]of t){!0===await n(u,e,o,t)&&(r?o.set(e,u):o[e]=u)}}return o}const Du=er(U,D,me,we,Pu,Uu);function Lu(t){return(...n)=>r=>{let e=r;return t(n,(t=>{e=t(e)})),e}}const Zu=Lu(d),ku=Lu(F);function qu(t){return(...n)=>async r=>{let e=r;return await t(n,(async t=>{e=await t(e)})),e}}const Vu=qu(w),zu=qu(R);function Gu(t,n){const r=jr(t),e=r.push||r.add;if(e&&rn(e)){const o=e.bind(r);t.forEach((t=>{const e=n(t,r);o(e)}))}else rn(r.set)?t.forEach(((t,e)=>{const o=n(t,e,r);r.set(e,o)})):t.forEach(((t,e)=>{const o=n(t,e,r);r[e]=o}));return r}function Ju(t,n){const r={};return d(t,((t,e)=>{r[n[e]]=t})),r}function Wu(t,n,r){return!Io(t)&&!Io(n)&&(t===n||(cn(t)?cn(n)?t.includes(n,r):je(n)?n.test(t):rn(n)?n(t):j(n)?N(n,(n=>Wu(t,n))):Rr(n,(n=>Wu(t,n))):j(t)?je(n)?N(t,(t=>t.test(n))):rn(n)?N(t,n):j(n)?N(n,(n=>Wu(t,n))):t.includes(n,r):!!st(t)&&(je(n)?Tr(t,(t=>t.test(n))):rn(n)?Tr(t,n):st(n)?Tr(t,((t,r)=>t===n[r])):Tr(t,(t=>Wu(t,n))))))}const Hu=Un(/\./),Ku=(t,n,r)=>(n&&!p(t[n])&&(t[n]=r),t);class Qu{list=O(Map);construct(){}remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const r=setInterval((()=>{t()}),n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach((n=>{t.remove(n)}))}}const Xu=O(Qu);function Yu(t,n){return Xu.set(t,n)}function tc(){ar(setTimeout(fr,0),(t=>{Xu.remove(t)}))}function nc(t,...n){return or(n,(n=>{or(n,((n,r)=>{if(t[r]&&(st(n)||j(n)||n.forEach))return nc(t[r],n);t[r]=n}))})),t}class rc{static models=new Map;constructor(t,n){p(n)?(ln(this,n),this.modelName=t,rc.models.set(t,n)):ln(this,t)}delete(t){rc.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),rc.models.set(t||this.modelName,this)}has(t){return rc.models.has(t||this.modelName)}get(t){return rc.models.get(t||this.modelName)}}function ec(t,n){return p(n)?O(rc,[t,n]):H(t,rc.models)}function oc(t,n){return[t,n]}function uc(t,n,r){const e=t.length,o=[];for(let u=0;uN(r,(r=>ft(t[r],n[r])));function sc(t,n,r){return n&&st(t)||on(n)&&j(t)?t[n]=r:t.set?t.set(n,r):t.push?t.push(r):t.add?t.add(r):t[n]=r,t}function fc(t,n,r){return on(r)&&j(t)?t[r]=n:t.push?t.push(n):t.add?t.add(n):t[r]=n,t}class ac{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Jn(t,(n=>{t[n]=new ac(t[n])})),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,r)=>(console.log(t,n,t[n]),t[n]=new ac(r),!0)})}}function lc(){return[]}function hc(){return!1}const pc=()=>({}),gc=()=>"",dc=()=>!0;async function mc(t,n){for(let r=0;r0,r=this.totalActive===this.totalFree;n&&r&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const vc=O(bc);class Ac{constructor(t=new Map){this.items=t}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):p(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=jr(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}function Ic(t){return new Ac(t)}async function Ec(t,n,...r){const e=t.length,o=[];if(n)for(let u=0;u{const i=o.join(u,t);if((await n(i)).isDirectory()){const n=o.join(c,t.replace(u,""));await r(n,{recursive:!0}),await Mc(i,n)}else await async function(t,n,r){const u=o.join(t,r),c=o.join(n,r);await e(u,c)}(u,c,t)})),!0}function xc(t){return globalThis.__filename?__filename:u(t.url)}function Oc(t){return globalThis.__dirname?__dirname:c.dirname(u(t.url))}export{ur as Chain,Qu as Intervals,rc as Model,ac as Store,hr as Timers,bc as UniqID,Ac as VirtualStorage,Jr as add,qn as after,wr as apply,Ie as arrayToRegex,Ju as arraysToObject,Vn as ary,xu as assert,Mu as assertAsync,ln as assign,hn as assignToClass,an as assignToObject,zn as before,Ou as bindAll,Zr as cacheNativeMethod,Xr as calcProgress,Be as camelCase,cr as chain,i as chunk,Ve as chunkString,$u as clear,s as clearArray,nn as clearBuffer,tc as clearIntervals,dr as clearTimers,Su as clone,f as cloneArray,jr as cloneType,Tu as compact,pe as compactKeys,Ru as compactMap,m as compactMapArray,y as compactMapAsyncArray,ge as compactMapAsyncObject,de as compactMapObject,Bu as concurrent,dt as concurrentEachArray,uc as concurrentStatus,O as construct,et as constructorName,Mc as copyFolder,gn as countBy,dn as countKey,mn as countWithoutKey,xc as currentFile,Oc as currentPath,ir as curry,sr as curryRight,yr as debounce,Wr as deduct,Vr as defProp,B as difference,Hr as divide,T as drop,_ as dropRight,or as each,d as eachArray,w as eachAsyncArray,Gn as eachAsyncObject,Jn as eachObject,F as eachRight,R as eachRightAsync,$ as ensureArray,tn as ensureBuffer,se as equalsZero,Ae as escapeRegex,ve as escapeRegexRegex,Rr as every,Nu as everyArg,N as everyArray,P as everyAsyncArray,Br as everyAsyncObject,Tr as everyObject,pn as extendClass,Du as filter,U as filterArray,D as filterAsyncArray,we as filterAsyncObject,me as filterObject,yn as findIndex,wn as findIndexCache,bn as findItem,L as first,Z as flatten,C as flattenDeep,Zu as flow,Vu as flowAsync,zu as flowAsyncRight,ku as flowRight,S as forEach,Wn as forEachAsync,Gu as forMap,Qn as forOf,tr as forOfAsync,Fu as forOfCompactMap,_u as forOfCompactMapAsync,_r as forOfEvery,Fr as forOfEveryAsync,Pu as forOfFilter,Uu as forOfFilterAsync,Mr as forOfMap,xr as forOfMapAsync,er as generateLoop,H as get,he as getEntries,Nn as getFileExtension,Pn as getFilename,Mn as getHighest,In as getLowest,Ut as getNumberInsertIndex,qr as getPropDesc,kr as getPropNames,Er as getType,go as getTypeName,xn as groupBy,Wu as has,tt as hasAnyKeys,Hu as hasDot,Y as hasKeys,l as hasLength,zr as hasProp,p as hasValue,to as htmlEntities,br as ifInvoke,Ku as ifNotAssign,bu as ifValue,Ec as inAsync,jc as inSync,Kr as increment,On as indexBy,k as initial,ze as initialString,ke as insertInRange,q as intersection,Yu as interval,Xu as intervals,ye as invert,V as invokeArray,$n as invokeCollection,Cn as invokeCollectionAsync,mo as isArguments,j as isArray,Co as isArrayBuffer,$o as isArrayBufferCall,Eo as isArrayLike,rr as isAsync,nr as isAsyncCall,Mo as isBigInt,jo as isBigIntCall,Oo as isBoolean,xo as isBooleanCall,it as isBuffer,ct as isBufferCall,So as isChild,To as isCloneable,nt as isConstructor,rt as isConstructorFactory,ot as isConstructorNameFactory,Fo as isDate,_o as isDateCall,du as isDeno,Ro as isEmpty,ft as isEqual,ae as isEven,Uo as isF32,Po as isF32Call,Lo as isF64,Do as isF64Call,No as isFalse,yu as isFalsy,Dn as isFileCSS,Ln as isFileHTML,Zn as isFileJS,kn as isFileJSON,ko as isFloat,rn as isFunction,Yn as isGenerator,Xn as isGeneratorCall,Vo as isI16,qo as isI16Call,Go as isI32,zo as isI32Call,Wo as isI8,Jo as isI8Call,Ho as isIterable,Qo as isKindAsync,yo as isMap,wo as isMapCall,at as isMatchArray,be as isMatchObject,v as isNegative,mu as isNodejs,M as isNotArray,un as isNotNumber,sn as isNotString,h as isNull,on as isNumber,en as isNumberCall,Bt as isNumberEqual,oe as isNumberInRange,ue as isNumberNotInRange,fe as isOdd,Xo as isParent,st as isPlainObject,ie as isPositive,Yo as isPrimitive,Ko as isPromise,je as isRegex,Ee as isRegexCall,tu as isRelated,ru as isSafeInt,Gr as isSame,eu as isSameType,Kn as isSet,Hn as isSetCall,cn as isString,ou as isTrue,wu as isTruthy,ut as isTypeFactory,Ao as isTypedArray,cu as isU16,uu as isU16Call,su as isU32,iu as isU32Call,au as isU8,hu as isU8C,lu as isU8CCall,fu as isU8Call,a as isUndefined,gu as isWeakMap,pu as isWeakMapCall,se as isZero,Iu as jsonParse,Fe as kebabCase,Q as keys,ht as largest,pt as last,Ze as lowerCase,Cr as map,gt as mapArray,mt as mapAsyncArray,Or as mapAsyncObject,$r as mapObject,wt as mapRightArray,yt as mapWhile,nc as merge,ec as model,Qr as multiply,vr as negate,Io as noValue,fr as noop,vu as notEqual,Ar as nthArg,fn as objectAssign,le as objectEntries,Oe as objectSize,Me as omit,Ir as once,Zt as onlyUnique,Sr as over,Nr as overEvery,oc as pair,At as partition,xe as pick,Bn as pluck,Sn as pluckObject,cc as promise,ic as propertyMatch,te as randomFloat,St as randomInt,E as range,I as rangeDown,A as rangeUp,Ye as rawURLDecode,Pr as reArg,Un as regexTestFactory,ne as remainder,jt as remove,Mt as removeBy,Je as replaceList,xt as rest,Ge as restString,g as returnValue,Ot as right,qe as rightString,Rt as sample,no as sanitize,sc as setKey,fc as setValue,Ft as shuffle,Pt as smallest,Pe as snakeCase,_n as sortCollectionAlphabetically,Rn as sortCollectionAlphabeticallyReverse,jn as sortCollectionAscending,En as sortCollectionAscendingFilter,An as sortCollectionDescending,vn as sortCollectionDescendingFilter,vt as sortNumberAscending,Et as sortNumberDescening,Tn as sortObjectsAlphabetically,Fn as sortObjectsAlphabeticallyReverse,kt as sortUnique,Eu as stringify,lc as stubArray,hc as stubFalse,pc as stubObject,gc as stubString,dc as stubTrue,bt as subtract,re as subtractAll,It as subtractReverse,ee as sumAll,Dt as take,Lt as takeRight,Ur as throttle,gr as timer,pr as timers,ar as times,mc as timesAsync,lr as timesMap,wc as timesMapAsync,_t as toArray,W as toPath,yc as toggle,oo as tokenize,co as truncate,io as truncateRight,Yt as unZip,Ce as unZipObject,Vt as union,vc as uniqID,qt as unique,zt as untilFalseArray,Gt as untilTrueArray,De as upperCase,ao as upperFirst,ho as upperFirstAll,fo as upperFirstLetter,lo as upperFirstOnly,po as upperFirstOnlyAll,Ic as virtualStorage,Jt as whileCompactMap,Wt as whileEachArray,Ht as whileMapArray,Kt as without,uo as words,Dr as wrap,Qt as xor,Xt as zip,$e as zipObject}; //# sourceMappingURL=index.js.map diff --git a/source/arrays/mapWhile.js b/source/arrays/mapWhile.js index c9f642f..0057e66 100644 --- a/source/arrays/mapWhile.js +++ b/source/arrays/mapWhile.js @@ -21,7 +21,7 @@ import { returnValue } from '../utilities/returnValue.js'; */ export function mapWhile(source, iteratee, results = [], additionalArgument) { const arrayLength = source.length; - for (let index = 0;index < arrayLength;index++) { + for (let index = 0; index < arrayLength; index++) { const item = source[index]; const returned = iteratee(item, index, results, source, arrayLength, additionalArgument); if (returned === false) { diff --git a/source/numbers/index.js b/source/numbers/index.js index ccbd005..4e66b1e 100644 --- a/source/numbers/index.js +++ b/source/numbers/index.js @@ -4,3 +4,5 @@ export * from './isNumberNotInRange.js'; export * from './isNegative.js'; export * from './isPositive.js'; export * from './isZero.js'; +export * from './isOdd.js'; +export * from './isEven.js'; diff --git a/source/numbers/isEven.js b/source/numbers/isEven.js new file mode 100644 index 0000000..f912f78 --- /dev/null +++ b/source/numbers/isEven.js @@ -0,0 +1,17 @@ +/** + * Checks if a number is even & returns true or false. + * + * @function isEven + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isEven, assert } from '@universalweb/acid'; + * assert(isEven(1), true); + */ +export function isEven(source) { + return (source & 1) === 0; +} + diff --git a/source/numbers/isOdd.js b/source/numbers/isOdd.js new file mode 100644 index 0000000..c970300 --- /dev/null +++ b/source/numbers/isOdd.js @@ -0,0 +1,16 @@ +/** + * Checks if a number is odd & returns true or false. + * + * @function isOdd + * @category number + * @type {Function} + * @param {Number} source - Number to be checked. + * @returns {Boolean} - Returns true or false. + * + * @example + * import { isOdd, assert } from '@universalweb/acid'; + * assert(isOdd(1), true); + */ +export function isOdd(source) { + return (source & 1) === 1; +} diff --git a/source/objects/zip.js b/source/objects/zip.js index c3a24ca..38407b0 100644 --- a/source/objects/zip.js +++ b/source/objects/zip.js @@ -15,11 +15,11 @@ import { eachObject } from './each.js'; * // => { 'a': 1, 'b': 2 } */ export const zipObject = (properties, values) => { - const zipedObject = {}; + const source = {}; eachArray(properties, (item, key) => { - zipedObject[item] = values[key]; + source[item] = values[key]; }); - return zipedObject; + return source; }; /** * Takes an array of grouped elements and creates an array regrouping the elements to their pre-zip object configuration. @@ -35,12 +35,15 @@ export const zipObject = (properties, values) => { * // => [['a', 'b'], [1, 2]] */ export const unZipObject = (object) => { - const unZippedKeys = []; - const values = []; + const objectKeys = []; + const objectValues = []; eachObject(object, (item, key) => { - unZippedKeys.push(key); - values.push(item); + objectKeys.push(key); + objectValues.push(item); }); - return [unZippedKeys, values]; + return [ + objectKeys, + objectValues, + ]; }; diff --git a/source/utilities/compactMap.js b/source/utilities/compactMap.js index 01bb73c..284e912 100644 --- a/source/utilities/compactMap.js +++ b/source/utilities/compactMap.js @@ -22,5 +22,11 @@ import { generateLoop } from './generateLoop.js'; * return item; * }), {b: 2, c: 3}); */ -export const compactMap = generateLoop(compactMapArray, compactMapAsyncArray, - compactMapObject, compactMapAsyncObject, forOfCompactMap, forOfCompactMapAsync); +export const compactMap = generateLoop( + compactMapArray, + compactMapAsyncArray, + compactMapObject, + compactMapAsyncObject, + forOfCompactMap, + forOfCompactMapAsync +); diff --git a/source/utilities/concurrentStatus.js b/source/utilities/concurrentStatus.js index 97f7673..8192601 100644 --- a/source/utilities/concurrentStatus.js +++ b/source/utilities/concurrentStatus.js @@ -22,7 +22,7 @@ import { returnValue } from './returnValue.js'; export function concurrentStatus(source, iteratee, additionalArgument) { const arrayLength = source.length; const queue = []; - for (let index = 0;index < arrayLength; index++) { + for (let index = 0; index < arrayLength; index++) { queue[index] = iteratee(source[index], index, source, arrayLength, additionalArgument); } return Promise.allSettled(queue); diff --git a/source/utilities/generateLoop.js b/source/utilities/generateLoop.js index a2fedae..b458da0 100644 --- a/source/utilities/generateLoop.js +++ b/source/utilities/generateLoop.js @@ -11,15 +11,15 @@ export function generateLoop(arrayLoop, arrayLoopAsync, objectLoop, objectLoopAs if (!hasValue(source) || !iteratee) { return; } else if (isArray(source)) { - returned = (isIterateeAsync) ? arrayLoopAsync : arrayLoop; + returned = isIterateeAsync ? arrayLoopAsync : arrayLoop; } else if (isPlainObject(source) || isFunction(source)) { - returned = (isIterateeAsync) ? objectLoopAsync : objectLoop; + returned = isIterateeAsync ? objectLoopAsync : objectLoop; } else if (forOfLoop) { - returned = (isIterateeAsync) ? forOfLoopAsync : forOfLoop; + returned = isIterateeAsync ? forOfLoopAsync : forOfLoop; } else if (isGenerator(source)) { returned = forOfLoopAsync; } else { - returned = (isIterateeAsync) ? objectLoopAsync : objectLoop; + returned = isIterateeAsync ? objectLoopAsync : objectLoop; } return returned(source, iteratee, argument1, argument2, argument3); }; diff --git a/source/utilities/get.js b/source/utilities/get.js index fc21d9e..b757cf3 100644 --- a/source/utilities/get.js +++ b/source/utilities/get.js @@ -26,7 +26,7 @@ export function get(propertyString, target) { return false; } let link = target; - const pathArray = (isArray(propertyString)) ? propertyString : toPath(propertyString); + const pathArray = isArray(propertyString) ? propertyString : toPath(propertyString); everyArray(pathArray, (item) => { link = link[item]; return hasValue(link); diff --git a/source/utilities/toggle.js b/source/utilities/toggle.js index 8c896d5..ec5b480 100644 --- a/source/utilities/toggle.js +++ b/source/utilities/toggle.js @@ -17,6 +17,6 @@ import { isEqual } from './isEqual.js'; * // => false */ export function toggle(value, on = true, off = false) { - return (isEqual(on, value)) ? off : on; + return ((isEqual(on, value)) ? off : on); }